2003-10-22 Andrew Cagney <cagney@redhat.com>

* exec.h: New file.
	* win32-nat.c: Include "exec.h".
	* solib.c: Include "exec.h".
	* target.h (build_section_table): Delete declaration.
	* somsolib.c: Include "exec.h".
	(exec_ops): Delete extern declaration.
	* rs6000-nat.c: Update copyright.  Include "exec.h".
	(exec_ops): Delete extern declaration.
	* pa64solib.c: Update copyright.  Include "exec.h".
	(exec_ops): Delete extern declaration.
	* exec.c: Update copyright.  Include "exec.h".
	* corelow.c: Update dependencies.  Include "exec.h".
	* Makefile.in (exec_h): Define.
	(exec.o, somsolib.o): Update dependencies.
	(pa64solib.o, corelow.o): Update dependencies.
This commit is contained in:
Andrew Cagney 2003-10-23 03:01:55 +00:00
parent 0088c768bb
commit 4646aa9d0b
12 changed files with 86 additions and 32 deletions

View File

@ -1,3 +1,21 @@
2003-10-22 Andrew Cagney <cagney@redhat.com>
* exec.h: New file.
* win32-nat.c: Include "exec.h".
* solib.c: Include "exec.h".
* target.h (build_section_table): Delete declaration.
* somsolib.c: Include "exec.h".
(exec_ops): Delete extern declaration.
* rs6000-nat.c: Update copyright. Include "exec.h".
(exec_ops): Delete extern declaration.
* pa64solib.c: Update copyright. Include "exec.h".
(exec_ops): Delete extern declaration.
* exec.c: Update copyright. Include "exec.h".
* corelow.c: Update dependencies. Include "exec.h".
* Makefile.in (exec_h): Define.
(exec.o, somsolib.o): Update dependencies.
(pa64solib.o, corelow.o): Update dependencies.
2003-10-22 Andrew Cagney <cagney@redhat.com>
* target.c: Include "gdb_assert.h" (target_read): Call

View File

@ -662,6 +662,7 @@ dwarf2loc_h = dwarf2loc.h
environ_h = environ.h
event_loop_h = event-loop.h
event_top_h = event-top.h
exec_h = exec.h $(target_h)
expression_h = expression.h $(symtab_h) $(doublest_h)
f_lang_h = f-lang.h
frame_base_h = frame-base.h
@ -1648,7 +1649,7 @@ corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
$(dis_asm_h) $(gdb_stat_h) $(completer_h)
corelow.o: corelow.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(command_h) $(bfd_h) $(target_h) $(gdbcore_h) \
$(gdbthread_h) $(regcache_h) $(symfile_h)
$(gdbthread_h) $(regcache_h) $(symfile_h) $(exec_h)
core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
$(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h)
core-sol2.o: core-sol2.c $(defs_h) $(gdb_string_h) $(regcache_h) \
@ -1745,7 +1746,8 @@ event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
$(gdbcmd_h)
exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
$(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
$(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h)
$(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h) \
$(exec_h)
expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
$(gdb_string_h) $(block_h)
@ -2097,7 +2099,7 @@ osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
$(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
$(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
$(regcache_h)
$(regcache_h) $(exec_h)
parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
$(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
@ -2277,7 +2279,7 @@ solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
$(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
$(completer_h) $(filenames_h) $(solist_h)
$(completer_h) $(filenames_h) $(solist_h) $(exec_h)
solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h)
solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
@ -2298,7 +2300,7 @@ somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \
$(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
$(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
$(regcache_h) $(gdb_assert_h)
$(regcache_h) $(gdb_assert_h) $(exec_h)
source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
$(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
$(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
@ -2432,7 +2434,7 @@ w89k-rom.o: w89k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \
$(i386_tdep_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h)
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h)
wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \

View File

@ -1,7 +1,7 @@
/* Core dump and executable file functions below target vector, for GDB.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@ -38,6 +38,7 @@
#include "gdbthread.h"
#include "regcache.h"
#include "symfile.h"
#include "exec.h"
#include <readline/readline.h>
#ifndef O_BINARY

View File

@ -1,7 +1,8 @@
/* Work with executable files, for GDB.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@ -30,6 +31,7 @@
#include "objfiles.h"
#include "completer.h"
#include "value.h"
#include "exec.h"
#ifdef USG
#include <sys/types.h>

39
gdb/exec.h Normal file
View File

@ -0,0 +1,39 @@
/* Work with executable files, for GDB, the GNU debugger.
Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef EXEC_H
#define EXEC_H
#include "target.h"
struct section_table;
struct target_ops;
struct bfd;
struct target_ops exec_ops;
/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
Returns 0 if OK, 1 on error. */
extern int build_section_table (struct bfd *, struct section_table **,
struct section_table **);
#endif

View File

@ -1,6 +1,7 @@
/* Handle HP ELF shared libraries for GDB, the GNU Debugger.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@ -50,6 +51,7 @@
#include "gdbcmd.h"
#include "language.h"
#include "regcache.h"
#include "exec.h"
#include <fcntl.h>
@ -57,9 +59,6 @@
#define O_BINARY 0
#endif
/* Defined in exec.c; used to prevent dangling pointer bug. */
extern struct target_ops exec_ops;
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
/* This lives in hppa-tdep.c. */
extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);

View File

@ -1,7 +1,8 @@
/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@ -34,6 +35,7 @@
#include "arch-utils.h"
#include "language.h" /* for local_hex_string(). */
#include "ppc-tdep.h"
#include "exec.h"
#include <sys/ptrace.h>
#include <sys/reg.h>
@ -127,8 +129,6 @@ typedef union {
extern struct vmap *map_vmap (bfd * bf, bfd * arch);
extern struct target_ops exec_ops;
static void vmap_exec (void);
static void vmap_ldinfo (LdInfo *);

View File

@ -40,7 +40,7 @@
#include "gdbcmd.h"
#include "completer.h"
#include "filenames.h" /* for DOSish file names */
#include "exec.h"
#include "solist.h"
#include <readline/readline.h>

View File

@ -42,6 +42,7 @@
#include "language.h"
#include "regcache.h"
#include "gdb_assert.h"
#include "exec.h"
#include <fcntl.h>
@ -55,10 +56,6 @@
/* #define SOLIB_DEBUG
*/
/* Defined in exec.c; used to prevent dangling pointer bug.
*/
extern struct target_ops exec_ops;
/* This lives in hppa-tdep.c. */
extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);

View File

@ -1152,12 +1152,6 @@ struct section_table *target_section_by_addr (struct target_ops *target,
CORE_ADDR addr);
/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
Returns 0 if OK, 1 on error. */
extern int build_section_table (bfd *, struct section_table **,
struct section_table **);
/* From mem-break.c */
extern int memory_remove_breakpoint (CORE_ADDR, char *);

View File

@ -52,6 +52,7 @@
#include "gdbcmd.h"
#include <sys/param.h>
#include <unistd.h>
#include "exec.h"
/* The ui's event loop. */
extern int (*ui_loop_hook) (int signo);

View File

@ -52,6 +52,7 @@
#include "gdbcmd.h"
#include <sys/param.h>
#include <unistd.h>
#include "exec.h"
/* The ui's event loop. */
extern int (*ui_loop_hook) (int signo);