aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-04-14 18:42:28 +0000
committerJim Blandy <jimb@codesourcery.com>2003-04-14 18:42:28 +0000
commit44ea7b70f90e6f139269b8210568fd08f3dd4fbe (patch)
treeb619e7a0d1486a58edc19a067a2db5199d131ef3 /gdb/doc
parentdaf7c4ad3aecfa9c617bfae6950bb0b5782e6edd (diff)
downloadfsf-binutils-gdb-44ea7b70f90e6f139269b8210568fd08f3dd4fbe.zip
fsf-binutils-gdb-44ea7b70f90e6f139269b8210568fd08f3dd4fbe.tar.gz
fsf-binutils-gdb-44ea7b70f90e6f139269b8210568fd08f3dd4fbe.tar.bz2
gdb/ChangeLog:
2003-04-10 Jim Blandy <jimb@redhat.com> * symmisc.c: #include "gdb_regex.h". (maintenance_list_symtabs, maintenance_list_psymtabs): New functions. * maint.c (maintenance_list_command): New function. (_initialize_maint_cmds): Register the above as commands. * symtab.h (maintenance_list_symtabs, maintenance_list_psymtabs): New declarations. * cli/cli-cmds.c (maintenancelistlist): New variable. (init_cmd_lists): Initialize it. * cli/cli-cmds.h (maintenancelistlist): New declaration. * gdbcmd.h (maintenancelistlist): New declaration. * Makefile.in (symmisc.o): Update dependencies. gdb/doc/ChangeLog: 2003-04-09 Jim Blandy <jimb@redhat.com> * gdb.texinfo (Symbols): Document 'maint list symtabs' and 'maint list psymtabs'.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo58
2 files changed, 63 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index ff30236..473eb15 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-09 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Symbols): Document 'maint list symtabs' and 'maint
+ list psymtabs'.
+
2003-04-08 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f00cf2b..00a4ac7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -9033,8 +9033,66 @@ files that @value{GDBN} has skimmed, but not yet read completely. Finally,
required for each object file from which @value{GDBN} has read some symbols.
@xref{Files, ,Commands to specify files}, for a discussion of how
@value{GDBN} reads symbols (in the description of @code{symbol-file}).
+
+@kindex maint list symtabs
+@kindex maint list psymtabs
+@cindex listing @value{GDBN}'s internal symbol tables
+@cindex symbol tables, listing @value{GDBN}'s internal
+@cindex full symbol tables, listing @value{GDBN}'s internal
+@cindex partial symbol tables, listing @value{GDBN}'s internal
+@item maint list symtabs @r{[} @var{regexp} @r{]}
+@itemx maint list psymtabs @r{[} @var{regexp} @r{]}
+
+List the @code{struct symtab} or @code{struct partial_symtab}
+structures whose names match @var{regexp}. If @var{regexp} is not
+given, list them all. The output includes expressions which you can
+copy into a @value{GDBN} debugging this one to examine a particular
+structure in more detail. For example:
+
+@smallexample
+(@value{GDBP}) maint list psymtabs dwarf2read
+@{ objfile /home/gnu/build/gdb/gdb
+ ((struct objfile *) 0x82e69d0)
+ @{ psymtab /home/gnu/src/gdb/dwarf2read.c
+ ((struct partial_symtab *) 0x8474b10)
+ readin no
+ fullname (null)
+ text addresses 0x814d3c8 -- 0x8158074
+ globals (* (struct partial_symbol **) 0x8507a08 @@ 9)
+ statics (* (struct partial_symbol **) 0x40e95b78 @@ 2882)
+ dependencies (none)
+ @}
+@}
+(@value{GDBP}) maint list symtabs
+(@value{GDBP})
+@end smallexample
+@noindent
+We see that there is one partial symbol table whose filename contains
+the string @samp{dwarf2read}, belonging to the @samp{gdb} executable;
+and we see that @value{GDBN} has not read in any symtabs yet at all.
+If we set a breakpoint on a function, that will cause @value{GDBN} to
+read the symtab for the compilation unit containing that function:
+
+@smallexample
+(@value{GDBP}) break dwarf2_psymtab_to_symtab
+Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c,
+line 1574.
+(@value{GDBP}) maint list symtabs
+@{ objfile /home/gnu/build/gdb/gdb
+ ((struct objfile *) 0x82e69d0)
+ @{ symtab /home/gnu/src/gdb/dwarf2read.c
+ ((struct symtab *) 0x86c1f38)
+ dirname (null)
+ fullname (null)
+ blockvector ((struct blockvector *) 0x86c1bd0) (primary)
+ debugformat DWARF 2
+ @}
+@}
+(@value{GDBP})
+@end smallexample
@end table
+
@node Altering
@chapter Altering Execution