diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-01-09 00:37:02 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-01-09 00:37:02 +0000 |
commit | be4d1333163c056f725fbbb96b400ce3d22802a7 (patch) | |
tree | b20c9b67c29126bd6eb838a22fa55c87a8eaf629 /gdb/config | |
parent | 30070dac97fea15a420b3f3930b5a20535279ea7 (diff) | |
download | gdb-be4d1333163c056f725fbbb96b400ce3d22802a7.zip gdb-be4d1333163c056f725fbbb96b400ce3d22802a7.tar.gz gdb-be4d1333163c056f725fbbb96b400ce3d22802a7.tar.bz2 |
2002-01-03 Michael Snyder <msnyder@redhat.com>
Implement a "generate-core-file" command in gdb, save target state.
* gcore.c: New file. Implement new command 'generate-core-file'.
Save a corefile image of the current state of the inferior.
* linux-proc.c: Add linux-specific code for saving corefiles.
* target.h (struct target_ops): Add new target vectors for saving
corefiles; to_find_memory_regions and to_make_corefile_notes.
(target_find_memory_regions): New macro.
(target_make_corefile_notes): New macro.
* target.c (update_current_target): Inherit new target methods.
(dummy_find_memory_regions): New place-holder method.
(dummy_make_corefile_notes): New place-holder method.
(init_dummy_target): Initialize new dummy target vectors.
* exec.c (exec_set_find_memory_regions): New function.
Allow the exec_ops vector for memory regions to be taken over.
(exec_make_note_section): New function, target vector method.
* defs.h (exec_set_find_memory_regions): Export prototype.
* procfs.c (proc_find_memory_regions): New function, corefile method.
(procfs_make_note_section): New function, corefile method.
(init_procfs_ops): Set new target vector pointers.
(find_memory_regions_callback): New function.
(procfs_do_thread_registers): New function.
(procfs_corefile_thread_callback): New function.
* sol-thread.c (sol_find_memory_regions): New function.
(sol_make_note_section): New function.
(init_sol_thread_ops): Initialize new target vectors.
* inftarg.c (inftarg_set_find_memory_regions): New function.
Allow to_find_memory_regions vector to be taken over.
(inftarg_set_make_corefile_notes): New function.
Allow to_make_corefile_notes vector to be taken over.
* thread-db.c (thread_db_new_objfile): Don't activate thread-db
interface layer if not target_has_execution (may be a corefile).
* config/i386/linux.mh: Add gcore.o to NATDEPFILES.
* config/sparc/sun4sol2.mh: Ditto.
* config/alpha/alpha-linux.mh: Ditto.
* config/arm/linux.mh: Ditto.
* config/i386/x86-64linux.mh: Ditto.
* config/ia64/linux.mh: Ditto.
* config/m68k/linux.mh: Ditto.
* config/mips/linux.mh: Ditto.
* config/powerpc/linux.mh: Ditto.
* config/sparc/linux.mh: Ditto.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/alpha/alpha-linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/arm/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/i386/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/i386/x86-64linux.mh | 3 | ||||
-rw-r--r-- | gdb/config/ia64/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/m68k/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/mips/linux.mh | 2 | ||||
-rw-r--r-- | gdb/config/powerpc/linux.mh | 3 | ||||
-rw-r--r-- | gdb/config/sparc/linux.mh | 3 | ||||
-rw-r--r-- | gdb/config/sparc/sun4sol2.mh | 3 |
10 files changed, 14 insertions, 10 deletions
diff --git a/gdb/config/alpha/alpha-linux.mh b/gdb/config/alpha/alpha-linux.mh index 0fe3c48..1aad944 100644 --- a/gdb/config/alpha/alpha-linux.mh +++ b/gdb/config/alpha/alpha-linux.mh @@ -3,7 +3,7 @@ XDEPFILES= XM_FILE= xm-alphalinux.h NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o linux-proc.o \ - fork-child.o proc-service.o thread-db.o lin-lwp.o + fork-child.o proc-service.o thread-db.o lin-lwp.o gcore.o LOADLIBES = -ldl -rdynamic diff --git a/gdb/config/arm/linux.mh b/gdb/config/arm/linux.mh index 8b386fb..8c9f530 100644 --- a/gdb/config/arm/linux.mh +++ b/gdb/config/arm/linux.mh @@ -5,7 +5,7 @@ XDEPFILES= NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \ - core-regset.o arm-linux-nat.o linux-proc.o \ + core-regset.o arm-linux-nat.o linux-proc.o gcore.o \ proc-service.o thread-db.o lin-lwp.o LOADLIBES= -ldl -rdynamic diff --git a/gdb/config/i386/linux.mh b/gdb/config/i386/linux.mh index 50d2445..e3fb5ed 100644 --- a/gdb/config/i386/linux.mh +++ b/gdb/config/i386/linux.mh @@ -6,7 +6,7 @@ XDEPFILES= NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \ core-aout.o i386-nat.o i386-linux-nat.o i387-nat.o \ - proc-service.o thread-db.o lin-lwp.o linux-proc.o + proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o # The dynamically loaded libthread_db needs access to symbols in the # gdb executable. diff --git a/gdb/config/i386/x86-64linux.mh b/gdb/config/i386/x86-64linux.mh index f9f31fc..d6a8a70 100644 --- a/gdb/config/i386/x86-64linux.mh +++ b/gdb/config/i386/x86-64linux.mh @@ -6,6 +6,7 @@ XDEPFILES= NAT_FILE= nm-x86-64.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \ core-aout.o i386-nat.o x86-64-nat.o x86-64-linux-nat.o \ - i387-nat.o proc-service.o thread-db.o lin-lwp.o linux-proc.o + i387-nat.o proc-service.o thread-db.o lin-lwp.o \ + linux-proc.o gcore.o LOADLIBES = -ldl -rdynamic diff --git a/gdb/config/ia64/linux.mh b/gdb/config/ia64/linux.mh index 48268d7..5be4270 100644 --- a/gdb/config/ia64/linux.mh +++ b/gdb/config/ia64/linux.mh @@ -4,7 +4,7 @@ XM_FILE= xm-linux.h XDEPFILES= NAT_FILE= nm-linux.h -NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \ +NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o gcore.o \ core-aout.o core-regset.o ia64-linux-nat.o linux-proc.o \ proc-service.o thread-db.o lin-lwp.o diff --git a/gdb/config/m68k/linux.mh b/gdb/config/m68k/linux.mh index aa5121b..e8ea765 100644 --- a/gdb/config/m68k/linux.mh +++ b/gdb/config/m68k/linux.mh @@ -5,7 +5,7 @@ XDEPFILES= NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o \ - corelow.o core-aout.o m68klinux-nat.o linux-proc.o \ + corelow.o core-aout.o m68klinux-nat.o linux-proc.o gcore.o \ proc-service.o thread-db.o lin-lwp.o # The dynamically loaded libthread_db needs access to symbols in the diff --git a/gdb/config/mips/linux.mh b/gdb/config/mips/linux.mh index 47ad1ee..eb3ec14 100644 --- a/gdb/config/mips/linux.mh +++ b/gdb/config/mips/linux.mh @@ -3,6 +3,6 @@ XDEPFILES= XM_FILE= xm-linux.h NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o mips-linux-nat.o \ - thread-db.o lin-lwp.o proc-service.o linux-proc.o + thread-db.o lin-lwp.o proc-service.o linux-proc.o gcore.o LOADLIBES = -ldl -rdynamic diff --git a/gdb/config/powerpc/linux.mh b/gdb/config/powerpc/linux.mh index 7f04a48..e49f700 100644 --- a/gdb/config/powerpc/linux.mh +++ b/gdb/config/powerpc/linux.mh @@ -6,7 +6,8 @@ XM_CLIBS= NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \ -core-regset.o ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o + core-regset.o ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \ + gcore.o LOADLIBES = -ldl -rdynamic diff --git a/gdb/config/sparc/linux.mh b/gdb/config/sparc/linux.mh index e63b2e6..30a97a6 100644 --- a/gdb/config/sparc/linux.mh +++ b/gdb/config/sparc/linux.mh @@ -5,7 +5,8 @@ XDEPFILES= NAT_FILE= nm-linux.h NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \ - proc-service.o thread-db.o lin-lwp.o sparc-linux-nat.o linux-proc.o + proc-service.o thread-db.o lin-lwp.o sparc-linux-nat.o \ + linux-proc.o gcore.o # The dynamically loaded libthread_db needs access to symbols in the # gdb executable. diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh index 8063e16..edcef48 100644 --- a/gdb/config/sparc/sun4sol2.mh +++ b/gdb/config/sparc/sun4sol2.mh @@ -6,7 +6,8 @@ XM_CLIBS= -lsocket -lnsl NAT_FILE= nm-sun4sol2.h NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o solib-legacy.o \ - fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o + fork-child.o procfs.o gcore.o \ + proc-api.o proc-events.o proc-flags.o proc-why.o # /usr/include/v9 is needed only by core-sol2.c when including # v9/sys/privregs.h, or rather the headers it in turn includes. |