Accept -g3 stabs info (sketchy?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




OK, am I even /close/ here?  I was having problems with -g2
stabs info in my native debuggers, and problems with -g3 stabs 
info in winedbg.  This patch attempts to allow winedbg to 
gracefully handle -gstabs -g3 (may be gcc3.2-specific) without
barfing on zillions of 'k' and 'B' symbol types.  This may be
totally wrong, somebody who understands this should take a
look before it's comitted to cvs.

CHANGELOG
* programs/winedbg/stabs.c: Greg Turner <gmturner007@ameritech.net>
- stupid revision to a comment
- attempt at handling 'k' and 'B' symbols

Index: programs/winedbg/stabs.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/stabs.c,v
retrieving revision 1.2
diff -u -r1.2 stabs.c
--- programs/winedbg/stabs.c    16 Sep 2002 19:26:48 -0000      1.2
+++ programs/winedbg/stabs.c    29 Sep 2002 09:12:23 -0000
@@ -436,7 +436,7 @@
      * the file (we cannot keep the struct datatype** around, because address can
      * change when realloc is done, so we must call over and over
      * DEBUG_FileSubNr2StabEnum to keep the correct values around
-     * (however, keeping struct datatype* is valid
+     * (however, keeping struct datatype* is valid))
      */
     if (DEBUG_PTS_ReadTypeReference(ptd, &filenr1, &subnr1) == -1) return -1;

@@ -466,6 +466,16 @@
            new_dt = DEBUG_NewDataType(DT_POINTER, NULL);
            if (DEBUG_PTS_ReadTypedef(ptd, NULL, &ref_dt) == -1) return -1;
            DEBUG_SetPointerType(new_dt, ref_dt);
+           break;
+       case 'k': /* 'const' modifier */
+       case 'B': /* 'volatile' modifier */
+           /* just kinda ignore the modifier, I guess -gmt */
+           if (DEBUG_PTS_ReadTypedef(ptd, NULL, &ref_dt) == -1) return -1;
+           new_dt = DEBUG_NewDataType(DEBUG_GetType(ref_dt), NULL);
+           /* I don't get this.. but I figure this is kind of like "r"
+              so I cut and pasted from there ... -gmt */
+           assert(!*DEBUG_FileSubNr2StabEnum(filenr1, subnr1));
+           *DEBUG_FileSubNr2StabEnum(filenr1, subnr1) = new_dt;
            break;
        case '(':
            ptd->ptr--;

-- 
gmt

"Waiting periods are only a step. Registration is only a step.
The prohibition of private firearms is the goal." 
  -U.S. Attorney General Janet Reno, December 1993



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux