From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Support gcore for i386 inferiors on amd64
Date: Tue, 26 Sep 2006 22:55:00 -0000 [thread overview]
Message-ID: <200609262254.k8QMstOG021914@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060923131143.GA22212@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Sat, 23 Sep 2006 15:11:43 +0200)
> Date: Sat, 23 Sep 2006 15:11:43 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> 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.
What's the copyright status of this diff?
> 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.
> 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.
I don't think the elfcore_write_xxx functions belong in the target
vector. They're specific to one type of core file format that's
shared by only three or four operating systems. And even then there's
quite a bit of variation between systems. I think it is simpler to
keep this Linux-specific (although Solaris probably needs something
similar).
There are a few other problems with the code too, but I will nag about
that later.
Mark
next prev parent reply other threads:[~2006-09-26 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-23 13:12 Jan Kratochvil
2006-09-26 22:55 ` Mark Kettenis [this message]
2006-09-28 16:05 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609262254.k8QMstOG021914@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox