aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-01-31 08:45:11 +0000
committerJohn Gilmore <gnu@cygnus>1992-01-31 08:45:11 +0000
commit8c378559226f751d802dd806f6eb1a83c67617a7 (patch)
tree2d10dfa3e46a55047daed267fd2b3d15c16a0059 /gdb
parentab68b260f6edc1cef9a2560ac3fd93532923ab28 (diff)
downloadgdb-8c378559226f751d802dd806f6eb1a83c67617a7.zip
gdb-8c378559226f751d802dd806f6eb1a83c67617a7.tar.gz
gdb-8c378559226f751d802dd806f6eb1a83c67617a7.tar.bz2
* exec.c (exec_files_info): Split out into print_section_info.
Print BFD filename of each section if it's not the default one. * core.c (core_files_info): Call print_section_info.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/core.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/gdb/core.c b/gdb/core.c
index c59fc55..c880d86 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -32,6 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
extern int xfer_memory ();
extern void child_attach (), child_create_inferior ();
+extern void print_section_info ();
extern int sys_nerr;
extern char *sys_errlist[];
@@ -276,22 +277,7 @@ static void
core_files_info (t)
struct target_ops *t;
{
- struct section_table *p;
-
- printf_filtered ("\t`%s', ", bfd_get_filename(core_bfd));
- wrap_here (" ");
- printf_filtered ("file type %s.\n", bfd_get_target(core_bfd));
-
- for (p = t->sections; p < t->sections_end; p++) {
- printf_filtered ("\t%s", local_hex_string_custom (p->addr, "08"));
- printf_filtered (" - %s is %s",
- local_hex_string_custom (p->endaddr, "08"),
- bfd_section_name (p->bfd, p->sec_ptr));
- if (p->bfd != core_bfd) {
- printf_filtered (" in %s", bfd_get_filename (p->bfd));
- }
- printf_filtered ("\n");
- }
+ print_section_info (t, core_bfd);
}
void