diff options
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 40 |
1 files changed, 7 insertions, 33 deletions
@@ -1,5 +1,5 @@ /* Work with executable files, for GDB. - Copyright (C) 1988, 1989 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GDB. @@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> #include "defs.h" -#include "param.h" #include "frame.h" #include "inferior.h" #include "target.h" @@ -111,34 +110,6 @@ exec_file_command (filename, from_tty) error ("\"%s\": not in executable format: %s.", scratch_pathname, bfd_errmsg (bfd_error)); -#if FIXME -/* This code needs to be incorporated into BFD */ -#ifdef COFF_ENCAPSULATE - /* If we have a coff header, it can give us better values for - text_start and exec_data_start. This is particularly useful - for remote debugging of embedded systems. */ - if (N_FLAGS(exec_aouthdr) & N_FLAGS_COFF_ENCAPSULATE) - { - struct coffheader ch; - int val; - val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1); - if (val == -1) - perror_with_name (filename); - val = myread (execchan, &ch, sizeof (ch)); - if (val < 0) - perror_with_name (filename); - text_start = ch.text_start; - exec_data_start = ch.data_start; - } else -#endif - { - text_start = - IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr); - exec_data_start = IS_OBJECT_FILE (exec_aouthdr) - ? exec_aouthdr.a_text : N_DATADDR (exec_aouthdr); - } -#endif FIXME - if (build_section_table (exec_bfd, &exec_ops.sections, &exec_ops.sections_end)) error ("Can't find the file sections in `%s': %s", @@ -323,11 +294,14 @@ exec_files_info () { struct section_table *p; - printf ("\tExecutable file `%s'.\n", bfd_get_filename(exec_bfd)); + printf_filtered ("\t`%s', ", bfd_get_filename(exec_bfd)); + wrap_here (" "); + printf_filtered ("file type %s.\n", bfd_get_target(exec_bfd)); for (p = exec_ops.sections; p < exec_ops.sections_end; p++) { - printf("\t%s", local_hex_string_custom (p->addr, "08")); - printf(" - %s is %s\n", local_hex_string_custom (p->endaddr, "08"), + printf_filtered ("\t%s", local_hex_string_custom (p->addr, "08")); + printf_filtered (" - %s is %s\n", + local_hex_string_custom (p->endaddr, "08"), bfd_section_name (exec_bfd, p->sec_ptr)); } } |