OSDN Git Service

2002-01-03 Michael Snyder <msnyder@redhat.com>
authormsnyder <msnyder>
Wed, 9 Jan 2002 00:36:57 +0000 (00:36 +0000)
committermsnyder <msnyder>
Wed, 9 Jan 2002 00:36:57 +0000 (00:36 +0000)
commita1463d2f3fe33b68da52b90d960aac8afd9d021e
treee0cb6dc1d590665eeb7605bbf0ee1c153723c4eb
parent5c5b10f059f57f211f1fa2d3ae3a54c326feb471
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.
20 files changed:
gdb/ChangeLog
gdb/config/alpha/alpha-linux.mh
gdb/config/arm/linux.mh
gdb/config/i386/linux.mh
gdb/config/i386/x86-64linux.mh
gdb/config/ia64/linux.mh
gdb/config/m68k/linux.mh
gdb/config/mips/linux.mh
gdb/config/powerpc/linux.mh
gdb/config/sparc/linux.mh
gdb/config/sparc/sun4sol2.mh
gdb/defs.h
gdb/exec.c
gdb/gcore.c [new file with mode: 0644]
gdb/inftarg.c
gdb/linux-proc.c
gdb/procfs.c
gdb/sol-thread.c
gdb/target.c
gdb/target.h