be4d133316
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. |
||
---|---|---|
.. | ||
cygwin.mh | ||
cygwin.mt | ||
embed.mt | ||
fbsd.mh | ||
fbsd.mt | ||
gdbserve.mt | ||
go32.mh | ||
go32.mt | ||
i386aix.mh | ||
i386aix.mt | ||
i386aout.mt | ||
i386bsd.mh | ||
i386bsd.mt | ||
i386dgux.mh | ||
i386gnu.mh | ||
i386gnu.mt | ||
i386lynx.mh | ||
i386lynx.mt | ||
i386m3.mh | ||
i386m3.mt | ||
i386mach.mh | ||
i386mk.mh | ||
i386mk.mt | ||
i386nw.mt | ||
i386os9k.mt | ||
i386sco.mh | ||
i386sco4.mh | ||
i386sco5.mh | ||
i386sco5.mt | ||
i386sol2.mh | ||
i386sol2.mt | ||
i386v.mh | ||
i386v.mt | ||
i386v4.mh | ||
i386v4.mt | ||
i386v32.mh | ||
i386v42mp.mh | ||
i386v42mp.mt | ||
linux.mh | ||
linux.mt | ||
nbsd.mh | ||
nbsd.mt | ||
nbsdelf.mh | ||
nbsdelf.mt | ||
ncr3000.mh | ||
ncr3000.mt | ||
nm-fbsd.h | ||
nm-gnu.h | ||
nm-go32.h | ||
nm-i386.h | ||
nm-i386aix.h | ||
nm-i386bsd.h | ||
nm-i386lynx.h | ||
nm-i386mach.h | ||
nm-i386sco.h | ||
nm-i386sco4.h | ||
nm-i386sco5.h | ||
nm-i386sol2.h | ||
nm-i386v.h | ||
nm-i386v4.h | ||
nm-i386v42mp.h | ||
nm-linux.h | ||
nm-m3.h | ||
nm-nbsd.h | ||
nm-nbsdelf.h | ||
nm-obsd.h | ||
nm-ptx4.h | ||
nm-symmetry.h | ||
nm-x86-64.h | ||
obsd.mh | ||
obsd.mt | ||
ptx.mh | ||
ptx.mt | ||
ptx4.mh | ||
ptx4.mt | ||
symmetry.mh | ||
symmetry.mt | ||
tm-cygwin.h | ||
tm-fbsd.h | ||
tm-go32.h | ||
tm-i386.h | ||
tm-i386aix.h | ||
tm-i386bsd.h | ||
tm-i386gnu.h | ||
tm-i386lynx.h | ||
tm-i386m3.h | ||
tm-i386mk.h | ||
tm-i386nw.h | ||
tm-i386os9k.h | ||
tm-i386sco5.h | ||
tm-i386sol2.h | ||
tm-i386v.h | ||
tm-i386v4.h | ||
tm-i386v42mp.h | ||
tm-linux.h | ||
tm-nbsd.h | ||
tm-nbsdelf.h | ||
tm-obsd.h | ||
tm-ptx.h | ||
tm-ptx4.h | ||
tm-symmetry.h | ||
tm-vxworks.h | ||
vxworks.mt | ||
x86-64linux.mh | ||
x86-64linux.mt | ||
xm-cygwin.h | ||
xm-go32.h | ||
xm-i386.h | ||
xm-i386aix.h | ||
xm-i386bsd.h | ||
xm-i386gnu.h | ||
xm-i386lynx.h | ||
xm-i386m3.h | ||
xm-i386mach.h | ||
xm-i386mk.h | ||
xm-i386sco.h | ||
xm-i386v.h | ||
xm-i386v4.h | ||
xm-i386v32.h | ||
xm-nbsd.h | ||
xm-ptx.h | ||
xm-ptx4.h | ||
xm-symmetry.h | ||
xm-windows.h |