This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Support gcore for i386 inferiors on amd64


Hi,

currently "gcore" command creates invalid core file for i386 (32-bit) inferiors
running on amd64 gdb/machine.

bfd interface lacks the proper support so it is supplying its own
implementation of 32-bit target while running on 64-bit built bfd.

Patch mostly created by Fujitsu.

Attached glibc patch for review for a possible push there.
Still the gdb patch fallbacks on its copy in the case of legacy/current glibc.


Regards,
Jan


2006-09-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Fujitsu

	* amd64-linux-nat.c: Support new to_elfcore_write_prpsinfo,
	to_elfcore_write_prstatus, to_elfcore_write_prfpreg.
	(i386_linux_gregset32_reg_offset): New mapping for i386 on amd64.
	(amd64_linux_gcore_create_hook): New hook for modifying segment attrs.
	* gcore.c (gcore_create_hook): Hook function variable.
	(gcore_create_callback): Call (*gcore_create_hook).
	* configure.ac: Check for sys/user32.h, sys/procfs32.h.
	* configure, config.in: Regenerated.
	* corelow.c (init_core_ops): Support new to_elfcore_write_prpsinfo,
	to_elfcore_write_prstatus, to_elfcore_write_prfpreg.
	* fbsd-nat.c (fbsd_make_corefile_notes): Virtualize elfcore_*.
	* linux-nat.c (linux_nat_do_thread_registers): Likewise.
	(linux_nat_make_corefile_notes): Likewise.
	* procfs.c (procfs_do_thread_registers): Likewise.
	(procfs_make_note_section): Likewise.
	* target.c (update_current_target): Likewise.
	* target.h (struct target_ops): Likewise.
	* Makefile.in: Dependencies updated.


2006-09-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sys/procfs32.h: Define 32-bit core
	file structures for 32bit inferiors dumped by 64bit GDB.
	* sysdeps/unix/sysv/linux/x86_64/sys/user32.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sys/user.h: Simplified by user32.h.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Add procfs32.h, user32.h.

Attachment: gdb-6.5-gcore-i386-on-amd64.patch
Description: Text document

Attachment: glibc-procfs32.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]