mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 03:48:11 +08:00
* defs.h: Incorporate param.h. All users changed.
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
This commit is contained in:
40
gdb/exec.c
40
gdb/exec.c
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user