This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA/dwarf2] Fix name of include psymtabs, avoid duplicates


Joel Brobecker writes:

 > >         % gcc -gdwarf-2 -o main foo/main.c
 > > 
 > > When GDB scans the dwarf2 data to create the psymtabs, it scans
 > > the linetable for each CU and create "include psymtabs" for it.
 > > These psymtabs correspond to the files included from that CU
 > > (see call to dwarf2_build_include_psymtabs at the end of
 > > dwarf2_build_psymtabs_hard).
 > > 
 > > Unfortunately, a little omission in my part lead to a bug:
 > > 
 > >         (gdb) file main
 > >         (gdb) info sources
 > >         [...]
 > >         Source files for which symbols will be read in on demand:
 > >         [...], main.c, /home/brobecke/tmp/dup/foo/main.c, [...]

This seems easy to add to the testsuite. Just create a subdirectory in
gdb.dwarf2, and issue the above commands.
 

 > > 2004-10-16  Joel Brobecker  <brobecker@gnat.com>
 > > 
 > >         * dwarf2read.c (dwarf_decode_lines): Use the complete filename
 > >         when creating include psymtabs.
 > > 
 > > Tested on x86-linux, no regression.
 > > OK to apply?

Yes, after you add the test, which should fail before and pass after
your patch.


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