* -file-list-exec-source-files && libraries
@ 2004-06-11 18:29 Bob Rossi
2004-06-11 18:35 ` Bob Rossi
0 siblings, 1 reply; 5+ messages in thread
From: Bob Rossi @ 2004-06-11 18:29 UTC (permalink / raw)
To: gdb
Hi,
A user of -file-list-exec-source-files noticed that this command does
not initially list the files that are in a library. For example,
I have
$ ls
Makefile lib.c lib.h lib.o libmilib.a main main.c
And
$ cat Makefile
all:
gcc -c -g -Wall lib.c
ar cru libmilib.a lib.o
gcc -g -Wall main.c -o main -L. -lmilib -I.
When I do -file-list-exec-source-files originally, it doesn't show
lib.c, after I do 'list lib.c:1' it will then show the filename. Also, I
believe it shows all of the filenames in the library.
My question is, is there any way to get this funcionality from the get
go? Load the psymtabs for all the libraries?
Or is there a GDB command that forces loading all symbols into the
partial symbol table at start?
Thanks,
Bob Rossi
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: -file-list-exec-source-files && libraries
2004-06-11 18:29 -file-list-exec-source-files && libraries Bob Rossi
@ 2004-06-11 18:35 ` Bob Rossi
2004-06-12 2:14 ` info sources regression with dwarf2/stabs Bob Rossi
2004-06-15 22:53 ` -file-list-exec-source-files && libraries Jim Blandy
0 siblings, 2 replies; 5+ messages in thread
From: Bob Rossi @ 2004-06-11 18:35 UTC (permalink / raw)
To: gdb
On Fri, Jun 11, 2004 at 02:29:16PM -0400, Bob Rossi wrote:
> Hi,
>
> A user of -file-list-exec-source-files noticed that this command does
> not initially list the files that are in a library. For example,
>
> I have
> $ ls
> Makefile lib.c lib.h lib.o libmilib.a main main.c
>
> And
> $ cat Makefile
> all:
> gcc -c -g -Wall lib.c
> ar cru libmilib.a lib.o
> gcc -g -Wall main.c -o main -L. -lmilib -I.
>
> When I do -file-list-exec-source-files originally, it doesn't show
> lib.c, after I do 'list lib.c:1' it will then show the filename. Also, I
> believe it shows all of the filenames in the library.
>
> My question is, is there any way to get this funcionality from the get
> go? Load the psymtabs for all the libraries?
>
> Or is there a GDB command that forces loading all symbols into the
> partial symbol table at start?
Unfortunatly, I forgot to add one thing. The files from all libraries do
show up when the stabs debugging format is used. It seems like this is a
dwarf2 problem. Anyone know if this is a bug?
Or something maybe I could look into?
Thanks,
Bob Rossi
^ permalink raw reply [flat|nested] 5+ messages in thread
* info sources regression with dwarf2/stabs
2004-06-11 18:35 ` Bob Rossi
@ 2004-06-12 2:14 ` Bob Rossi
2004-06-15 13:51 ` Bob Rossi
2004-06-15 22:53 ` -file-list-exec-source-files && libraries Jim Blandy
1 sibling, 1 reply; 5+ messages in thread
From: Bob Rossi @ 2004-06-12 2:14 UTC (permalink / raw)
To: gdb
On Fri, Jun 11, 2004 at 02:35:10PM -0400, Bob Rossi wrote:
> On Fri, Jun 11, 2004 at 02:29:16PM -0400, Bob Rossi wrote:
> > Hi,
> >
> > A user of -file-list-exec-source-files noticed that this command does
> > not initially list the files that are in a library. For example,
> >
> > I have
> > $ ls
> > Makefile lib.c lib.h lib.o libmilib.a main main.c
> >
> > And
> > $ cat Makefile
> > all:
> > gcc -c -g -Wall lib.c
> > ar cru libmilib.a lib.o
> > gcc -g -Wall main.c -o main -L. -lmilib -I.
> >
> > When I do -file-list-exec-source-files originally, it doesn't show
> > lib.c, after I do 'list lib.c:1' it will then show the filename. Also, I
> > believe it shows all of the filenames in the library.
> >
> > My question is, is there any way to get this funcionality from the get
> > go? Load the psymtabs for all the libraries?
> >
> > Or is there a GDB command that forces loading all symbols into the
> > partial symbol table at start?
>
> Unfortunatly, I forgot to add one thing. The files from all libraries do
> show up when the stabs debugging format is used. It seems like this is a
> dwarf2 problem. Anyone know if this is a bug?
>
> Or something maybe I could look into?
Finally, this is also a problem with the 'info sources' command. Does
that make the problem a little more interesting to anyone? :)
Bob Rossi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: info sources regression with dwarf2/stabs
2004-06-12 2:14 ` info sources regression with dwarf2/stabs Bob Rossi
@ 2004-06-15 13:51 ` Bob Rossi
0 siblings, 0 replies; 5+ messages in thread
From: Bob Rossi @ 2004-06-15 13:51 UTC (permalink / raw)
To: gdb
On Fri, Jun 11, 2004 at 10:14:45PM -0400, Bob Rossi wrote:
> On Fri, Jun 11, 2004 at 02:35:10PM -0400, Bob Rossi wrote:
> > On Fri, Jun 11, 2004 at 02:29:16PM -0400, Bob Rossi wrote:
> > > Hi,
> > >
> > > A user of -file-list-exec-source-files noticed that this command does
> > > not initially list the files that are in a library. For example,
> > >
> > > I have
> > > $ ls
> > > Makefile lib.c lib.h lib.o libmilib.a main main.c
> > >
> > > And
> > > $ cat Makefile
> > > all:
> > > gcc -c -g -Wall lib.c
> > > ar cru libmilib.a lib.o
> > > gcc -g -Wall main.c -o main -L. -lmilib -I.
> > >
> > > When I do -file-list-exec-source-files originally, it doesn't show
> > > lib.c, after I do 'list lib.c:1' it will then show the filename. Also, I
> > > believe it shows all of the filenames in the library.
> > >
> > > My question is, is there any way to get this funcionality from the get
> > > go? Load the psymtabs for all the libraries?
> > >
> > > Or is there a GDB command that forces loading all symbols into the
> > > partial symbol table at start?
> >
> > Unfortunatly, I forgot to add one thing. The files from all libraries do
> > show up when the stabs debugging format is used. It seems like this is a
> > dwarf2 problem. Anyone know if this is a bug?
> >
> > Or something maybe I could look into?
>
> Finally, this is also a problem with the 'info sources' command. Does
> that make the problem a little more interesting to anyone? :)
Ping, any ideas?
Thanks,
Bob Rossi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: -file-list-exec-source-files && libraries
2004-06-11 18:35 ` Bob Rossi
2004-06-12 2:14 ` info sources regression with dwarf2/stabs Bob Rossi
@ 2004-06-15 22:53 ` Jim Blandy
1 sibling, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2004-06-15 22:53 UTC (permalink / raw)
To: Bob Rossi; +Cc: gdb
Bob Rossi <bob@brasko.net> writes:
> On Fri, Jun 11, 2004 at 02:29:16PM -0400, Bob Rossi wrote:
> > Hi,
> >
> > A user of -file-list-exec-source-files noticed that this command does
> > not initially list the files that are in a library. For example,
> >
> > I have
> > $ ls
> > Makefile lib.c lib.h lib.o libmilib.a main main.c
> >
> > And
> > $ cat Makefile
> > all:
> > gcc -c -g -Wall lib.c
> > ar cru libmilib.a lib.o
> > gcc -g -Wall main.c -o main -L. -lmilib -I.
> >
> > When I do -file-list-exec-source-files originally, it doesn't show
> > lib.c, after I do 'list lib.c:1' it will then show the filename. Also, I
> > believe it shows all of the filenames in the library.
> >
> > My question is, is there any way to get this funcionality from the get
> > go? Load the psymtabs for all the libraries?
> >
> > Or is there a GDB command that forces loading all symbols into the
> > partial symbol table at start?
>
> Unfortunatly, I forgot to add one thing. The files from all libraries do
> show up when the stabs debugging format is used. It seems like this is a
> dwarf2 problem. Anyone know if this is a bug?
>
> Or something maybe I could look into?
Hmm. The partial symbol tables ought to be listing every source file
mentioned in the program. Otherwise, when a user refers to a source
file by name (say, to set a breakpoint), GDB won't be able to tell
which compilation units' symbols to read in.
Dwarf 2 used to have a problem with this, but the following change
fixed that problem:
2004-05-03 J. Brobecker <brobecker@gnat.com>
* dwarf2read.c (line_header): Add new included_p field in
field file_names.
(partial_die_info): New field has_stmt_list. New field line_offset.
(dwarf2_create_include_psymtab): New function.
(dwarf2_build_include_psymtabs): New function.
(add_file_name): Add forward declaration. Initialize new field.
(dwarf_decode_lines): Add new parameter. Enhance this procedure
to be able to determine the list of files included by the
given unit, and build their associated psymtabs.
(dwarf2_build_psymtabs_hard): Build the psymtabs for the included
files as well.
(psymtab_to_symtab_1): Build the symtabs of all dependencies as well.
(read_file_scope): Update call to dwarf_decode_lines.
(read_partial_die): Handle DW_AT_stmt_list attributes.
So, does 'readelf -wl main' mention all the source files? It should.
Does 'maint info psymtabs' mention all the source files? It should,
too.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-06-15 22:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 18:29 -file-list-exec-source-files && libraries Bob Rossi
2004-06-11 18:35 ` Bob Rossi
2004-06-12 2:14 ` info sources regression with dwarf2/stabs Bob Rossi
2004-06-15 13:51 ` Bob Rossi
2004-06-15 22:53 ` -file-list-exec-source-files && libraries Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox