Changeset 46916 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Jul 2, 2013 5:22:10 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86911
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r46266 r46916 2841 2841 for (;;) 2842 2842 { 2843 /* Read the 'header'. */2843 /* Read the 'header'. Skipping zero code bytes. */ 2844 2844 uint32_t const uCurCode = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0); 2845 uint32_t const uCurTag = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0); 2846 uint8_t const uChildren = rtDwarfCursor_GetU8(&Cursor, 0); 2847 if (RT_FAILURE(Cursor.rc)) 2848 break; 2849 if ( uCurTag > 0xffff 2850 || uChildren > 1) 2845 if (uCurCode != 0) 2851 2846 { 2852 Cursor.rc = VERR_DWARF_BAD_ABBREV; 2853 break; 2847 uint32_t const uCurTag = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0); 2848 uint8_t const uChildren = rtDwarfCursor_GetU8(&Cursor, 0); 2849 if (RT_FAILURE(Cursor.rc)) 2850 break; 2851 if ( uCurTag > 0xffff 2852 || uChildren > 1) 2853 { 2854 Cursor.rc = VERR_DWARF_BAD_ABBREV; 2855 break; 2856 } 2857 2858 /* Cache it? */ 2859 if (uCurCode <= pThis->cCachedAbbrevsAlloced) 2860 { 2861 PRTDWARFABBREV pEntry = &pThis->paCachedAbbrevs[uCurCode - 1]; 2862 while (pThis->cCachedAbbrevs < uCurCode) 2863 { 2864 pThis->paCachedAbbrevs[pThis->cCachedAbbrevs].fFilled = false; 2865 pThis->cCachedAbbrevs++; 2866 } 2867 2868 pEntry->fFilled = true; 2869 pEntry->fChildren = RT_BOOL(uChildren); 2870 pEntry->uTag = uCurTag; 2871 pEntry->offSpec = rtDwarfCursor_CalcSectOffsetU32(&Cursor); 2872 2873 if (uCurCode == uCode) 2874 { 2875 pRet = pEntry; 2876 if (uCurCode == pThis->cCachedAbbrevsAlloced) 2877 break; 2878 } 2879 } 2880 2881 /* Skip the specification. */ 2882 uint32_t uAttr, uForm; 2883 do 2884 { 2885 uAttr = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0); 2886 uForm = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0); 2887 } while (uAttr != 0); 2854 2888 } 2855 2856 /* Cache it? */2857 if (uCurCode <= pThis->cCachedAbbrevsAlloced)2858 {2859 PRTDWARFABBREV pEntry = &pThis->paCachedAbbrevs[uCurCode - 1];2860 while (pThis->cCachedAbbrevs < uCurCode)2861 {2862 pThis->paCachedAbbrevs[pThis->cCachedAbbrevs].fFilled = false;2863 pThis->cCachedAbbrevs++;2864 }2865 2866 pEntry->fFilled = true;2867 pEntry->fChildren = RT_BOOL(uChildren);2868 pEntry->uTag = uCurTag;2869 pEntry->offSpec = rtDwarfCursor_CalcSectOffsetU32(&Cursor);2870 2871 if (uCurCode == uCode)2872 {2873 pRet = pEntry;2874 if (uCurCode == pThis->cCachedAbbrevsAlloced)2875 break;2876 }2877 }2878 2879 /* Skip the specification. */2880 uint32_t uAttr, uForm;2881 do2882 {2883 uAttr = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0);2884 uForm = rtDwarfCursor_GetULeb128AsU32(&Cursor, 0);2885 } while (uAttr != 0);2886 2889 if (RT_FAILURE(Cursor.rc)) 2887 2890 break;
Note:
See TracChangeset
for help on using the changeset viewer.