This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/14148] New: -fdebug-types-section regresses ststic scopeof types


http://sourceware.org/bugzilla/show_bug.cgi?id=14148

             Bug #: 14148
           Summary: -fdebug-types-section regresses ststic scope of types
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
    Classification: Unclassified


FAILing new testcase for -fdebug-types-section [Re: [RFC - Python scripting]
New methods Symtab.global_block and Symtab.static_block (docs included)]
http://sourceware.org/ml/gdb-patches/2012-05/msg00132.html

PASS:
C="gcc -fno-debug-types-section -g -c -x c -";echo 'struct s { int i; }; extern
void f (void); int main (void) { struct s a; f (); return 0; }'|$C -o 36.o;echo
'struct s { int j; }; void f (void) { struct s b; }'|$C -o 36b.o;gcc -o 36 36.o
36b.o;./gdb -readnow ./36 -ex start -ex 'ptype struct s' -ex step -ex 'ptype
struct s' -ex c -ex q 2>/dev/null|grep -w int
    int i;
    int j;
FAIL:
C="gcc -fdebug-types-section -g -c -x c -";echo 'struct s { int i; }; extern
void f (void); int main (void) { struct s a; f (); return 0; }'|$C -o 36.o;echo
'struct s { int j; }; void f (void) { struct s b; }'|$C -o 36b.o;gcc -o 36 36.o
36b.o;./gdb -readnow ./36 -ex start -ex 'ptype struct s' -ex step -ex 'ptype
struct s' -ex c -ex q 2>/dev/null|grep -w int
    int j;
    int j;

In a different more readable form:

==> 36.c <==
struct s { int i; };
extern void f (void);
int main (void) {
  struct s a;
  f ();
  return 0;
}
==> 36b.c <==
struct s { int j; };
void f (void) {
  struct s b;
}
$ gcc -fdebug-types-section -o 36 36.c 36b.c -Wall -g
$ ./gdb -readnow ./36
(gdb) start
(gdb) ptype struct s
type = struct s {
    int j;
}
(gdb) ptype a
type = struct s {
    int i;
}
(gdb) whatis a
type = struct s

That is with -fdebug-types-section GDB no longer provides STATIC_BLOCK scope
for DW_TAG_type_unit types.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]