public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/14148] New: -fdebug-types-section regresses ststic scope of types
@ 2012-05-23 21:13 jan.kratochvil at redhat dot com
  2012-05-24  0:16 ` [Bug symtab/14148] " dje at google dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-05-23 21:13 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-29 11:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 21:13 [Bug symtab/14148] New: -fdebug-types-section regresses ststic scope of types jan.kratochvil at redhat dot com
2012-05-24  0:16 ` [Bug symtab/14148] " dje at google dot com
2012-05-24  2:18 ` [Bug symtab/14148] -fdebug-types-section regresses static " jan.kratochvil at redhat dot com
2012-05-24  4:35 ` dje at google dot com
2020-04-13 21:33 ` vries at gcc dot gnu.org
2020-04-17 13:39 ` vries at gcc dot gnu.org
2020-04-25 15:13 ` vries at gcc dot gnu.org
2020-04-25 15:19 ` cvs-commit at gcc dot gnu.org
2020-04-29 11:23 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).