This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA/RFC: dump symtab and psymtab lists
gdb/ChangeLog:
2003-04-17 Jim Blandy <jimb at redhat dot com>
Rename commands 'maint list symtabs' and 'maint list psymtabs' to
'maint info symtabs' and 'maint info psymtabs'.
* symmisc.c (maintenance_info_symtabs, maintenance_info_psymtabs):
Renamed from maintenance_list_symtabs and maintenance_list_psymtabs.
* symtab.h (maintenance_info_symtabs, maintenance_info_psymtabs):
Declarations updated.
* maint.c (maintenance_list_command): Delete.
(_initialize_maint_cmds): Update calls to add_cmd.
* gdbcmd.h (maintenancelistlist): Delete declaration.
* cli/cli-cmds.c (maintenancelistlist): Delete.
(init_cmd_lists): Don't initialize it.
* cli/cli-cmds.h (maintenancelistlist): Delete declaration.
gdb/doc/ChangeLog:
2003-04-17 Jim Blandy <jimb at redhat dot com>
* gdb.texinfo (Symbols): Update documentation: 'maint list
symtabs' and 'maint list psymtabs' have been renamed 'maint info
symtabs' and 'maint info psymtabs'.
Index: gdb/gdbcmd.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbcmd.h,v
retrieving revision 1.9
diff -c -r1.9 gdbcmd.h
*** gdb/gdbcmd.h 14 Apr 2003 18:42:27 -0000 1.9
--- gdb/gdbcmd.h 17 Apr 2003 22:02:03 -0000
***************
*** 98,107 ****
extern struct cmd_list_element *maintenanceprintlist;
- /* Chain containing all defined "maintenance list" subcommands. */
-
- extern struct cmd_list_element *maintenancelistlist;
-
extern struct cmd_list_element *setprintlist;
extern struct cmd_list_element *showprintlist;
--- 98,103 ----
Index: gdb/maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.37
diff -c -r1.37 maint.c
*** gdb/maint.c 14 Apr 2003 18:42:27 -0000 1.37
--- gdb/maint.c 17 Apr 2003 22:02:04 -0000
***************
*** 434,451 ****
help_list (maintenanceprintlist, "maintenance print ", -1, gdb_stdout);
}
- /* The "maintenance list" command is defined as a prefix, with
- allow_unknown 0. Therefore, its own definition is called only for
- "maintenance list" with no args. */
-
- /* ARGSUSED */
- static void
- maintenance_list_command (char *arg, int from_tty)
- {
- printf_unfiltered ("\"maintenance list\" must be followed by the name of a list command.\n");
- help_list (maintenancelistlist, "maintenance list ", -1, gdb_stdout);
- }
-
/* The "maintenance translate-address" command converts a section and address
to a symbol. This can be called in two ways:
maintenance translate-address <secname> <addr>
--- 434,439 ----
***************
*** 744,754 ****
&maintenanceprintlist, "maintenance print ", 0,
&maintenancelist);
- add_prefix_cmd ("list", class_maintenance, maintenance_list_command,
- "Maintenance command for listing GDB internal state.",
- &maintenancelistlist, "maintenance list ", 0,
- &maintenancelist);
-
add_prefix_cmd ("set", class_maintenance, maintenance_set_cmd, "\
Set GDB internal variables used by the GDB maintainer.\n\
Configure variables internal to GDB that aid in GDB's maintenance",
--- 732,737 ----
***************
*** 827,844 ****
"Print dump of current object file definitions.",
&maintenanceprintlist);
! add_cmd ("symtabs", class_maintenance, maintenance_list_symtabs,
"List the full symbol tables for all object files.\n\
This does not include information about individual symbols, blocks, or\n\
linetables --- just the symbol table structures themselves.\n\
With an argument REGEXP, list the symbol tables whose names that match that.",
! &maintenancelistlist);
! add_cmd ("psymtabs", class_maintenance, maintenance_list_psymtabs,
"List the partial symbol tables for all object files.\n\
This does not include information about individual partial symbols,\n\
just the symbol table structures themselves.",
! &maintenancelistlist);
add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
"Print statistics about internal gdb state.",
--- 810,827 ----
"Print dump of current object file definitions.",
&maintenanceprintlist);
! add_cmd ("symtabs", class_maintenance, maintenance_info_symtabs,
"List the full symbol tables for all object files.\n\
This does not include information about individual symbols, blocks, or\n\
linetables --- just the symbol table structures themselves.\n\
With an argument REGEXP, list the symbol tables whose names that match that.",
! &maintenanceinfolist);
! add_cmd ("psymtabs", class_maintenance, maintenance_info_psymtabs,
"List the partial symbol tables for all object files.\n\
This does not include information about individual partial symbols,\n\
just the symbol table structures themselves.",
! &maintenanceinfolist);
add_cmd ("statistics", class_maintenance, maintenance_print_statistics,
"Print statistics about internal gdb state.",
Index: gdb/symmisc.c
===================================================================
RCS file: /cvs/src/src/gdb/symmisc.c,v
retrieving revision 1.20
diff -c -r1.20 symmisc.c
*** gdb/symmisc.c 14 Apr 2003 18:42:27 -0000 1.20
--- gdb/symmisc.c 17 Apr 2003 22:02:05 -0000
***************
*** 987,995 ****
}
! /* List all the symbol tables. */
void
! maintenance_list_symtabs (char *regexp, int from_tty)
{
struct objfile *objfile;
--- 987,995 ----
}
! /* List all the symbol tables whose names match REGEXP (optional). */
void
! maintenance_info_symtabs (char *regexp, int from_tty)
{
struct objfile *objfile;
***************
*** 1036,1044 ****
}
! /* List all the partial symbol tables. */
void
! maintenance_list_psymtabs (char *regexp, int from_tty)
{
struct objfile *objfile;
--- 1036,1044 ----
}
! /* List all the partial symbol tables whose names match REGEXP (optional). */
void
! maintenance_info_psymtabs (char *regexp, int from_tty)
{
struct objfile *objfile;
Index: gdb/symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.68
diff -c -r1.68 symtab.h
*** gdb/symtab.h 14 Apr 2003 19:55:27 -0000 1.68
--- gdb/symtab.h 17 Apr 2003 22:02:06 -0000
***************
*** 1233,1241 ****
void maintenance_print_objfiles (char *, int);
! void maintenance_list_symtabs (char *, int);
! void maintenance_list_psymtabs (char *, int);
void maintenance_check_symtabs (char *, int);
--- 1233,1241 ----
void maintenance_print_objfiles (char *, int);
! void maintenance_info_symtabs (char *, int);
! void maintenance_info_psymtabs (char *, int);
void maintenance_check_symtabs (char *, int);
Index: gdb/cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.29
diff -c -r1.29 cli-cmds.c
*** gdb/cli/cli-cmds.c 14 Apr 2003 18:42:28 -0000 1.29
--- gdb/cli/cli-cmds.c 17 Apr 2003 22:02:06 -0000
***************
*** 171,180 ****
struct cmd_list_element *maintenanceprintlist;
- /* Chain containing all defined "maintenance list" subcommands. */
-
- struct cmd_list_element *maintenancelistlist;
-
struct cmd_list_element *setprintlist;
struct cmd_list_element *showprintlist;
--- 171,176 ----
***************
*** 1036,1042 ****
maintenancelist = NULL;
maintenanceinfolist = NULL;
maintenanceprintlist = NULL;
- maintenancelistlist = NULL;
setprintlist = NULL;
showprintlist = NULL;
setchecklist = NULL;
--- 1032,1037 ----
Index: gdb/cli/cli-cmds.h
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.h,v
retrieving revision 1.4
diff -c -r1.4 cli-cmds.h
*** gdb/cli/cli-cmds.h 14 Apr 2003 18:42:28 -0000 1.4
--- gdb/cli/cli-cmds.h 17 Apr 2003 22:02:06 -0000
***************
*** 87,96 ****
extern struct cmd_list_element *maintenanceprintlist;
- /* Chain containing all defined "maintenance list" subcommands. */
-
- extern struct cmd_list_element *maintenancelistlist;
-
extern struct cmd_list_element *setprintlist;
extern struct cmd_list_element *showprintlist;
--- 87,92 ----
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.156
diff -c -r1.156 gdb.texinfo
*** gdb/doc/gdb.texinfo 14 Apr 2003 18:42:28 -0000 1.156
--- gdb/doc/gdb.texinfo 17 Apr 2003 22:02:23 -0000
***************
*** 9034,9047 ****
@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
--- 9034,9047 ----
@xref{Files, ,Commands to specify files}, for a discussion of how
@value{GDBN} reads symbols (in the description of @code{symbol-file}).
! @kindex maint info symtabs
! @kindex maint info 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 info symtabs @r{[} @var{regexp} @r{]}
! @itemx maint info 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
***************
*** 9050,9056 ****
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
--- 9050,9056 ----
structure in more detail. For example:
@smallexample
! (@value{GDBP}) maint info psymtabs dwarf2read
@{ objfile /home/gnu/build/gdb/gdb
((struct objfile *) 0x82e69d0)
@{ psymtab /home/gnu/src/gdb/dwarf2read.c
***************
*** 9063,9069 ****
dependencies (none)
@}
@}
! (@value{GDBP}) maint list symtabs
(@value{GDBP})
@end smallexample
@noindent
--- 9063,9069 ----
dependencies (none)
@}
@}
! (@value{GDBP}) maint info symtabs
(@value{GDBP})
@end smallexample
@noindent
***************
*** 9077,9083 ****
(@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
--- 9077,9083 ----
(@value{GDBP}) break dwarf2_psymtab_to_symtab
Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c,
line 1574.
! (@value{GDBP}) maint info symtabs
@{ objfile /home/gnu/build/gdb/gdb
((struct objfile *) 0x82e69d0)
@{ symtab /home/gnu/src/gdb/dwarf2read.c