Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com
Subject: Re: PATCH: PR corefiles/11467: amd64 gdb generates corrupted 32bit  	core file
Date: Sun, 11 Apr 2010 17:33:00 -0000	[thread overview]
Message-ID: <l2g6dc9ffc81004111033i7a6bb924m4f615fb29d925cac@mail.gmail.com> (raw)
In-Reply-To: <201004111649.o3BGnx9J015256@glazunov.sibelius.xs4all.nl>

On Sun, Apr 11, 2010 at 9:49 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Sat, 10 Apr 2010 15:27:42 -0700
>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>>
>> On Sat, Apr 10, 2010 at 03:19:43PM -0700, H.J. Lu wrote:
>> > Hi,
>> >
>> > I am checking in this patch to support 32bit core note sections on
>> > Linux/x86-64. I will submit a separate gdb patch.
>> >
>> >
>> > H.J.
>> > ---
>> > 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
>> >
>> >     PR corefiles/11467
>> >     * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
>> >     for x86_64-*-linux*.
>> >     * config.in: Regenerated.
>> >     * configure: Likewise.
>> >
>> >     * elf.c: Include CORE_HEADER if it is defined.
>> >
>> > 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
>> >         Jan Kratochvil  <jan.kratochvil@redhat.com>
>> >
>> >     * hosts/x86-64linux.h: New.
>>
>> Hi,
>>
>> Hi,
>>
>> Here is the gdb patch to properly generate 32bit coredumps on
>> Linux/x86-64. The key here is to use the right register offset
>> for gcore. OK to install?
>
> No, this is wrong.  This should all be handled by -tdep.c code.  The
> gcore code in linux-nat.c nly falls back on the fetch_gregset() if for
> some reason the gdbarch_regset_from_core_section() function doesn't
> return a valid register set.  I don't immediately see why, but that is
> what you need to fix.
>

I will prepare a patch. I will move codes from i386-linux-nat.c to
i386-linux-tdep.c.  I will add i386_linux_regset_from_core_section
and call

 set_gdbarch_regset_from_core_section (gdbarch,
              i386_linux_regset_from_core_section);

in i386_linux_init_abi. i386_linux_regset_from_core_section will
call fill_gregset originally in i386-linux-nat.c.

Thanks.


-- 
H.J.


      reply	other threads:[~2010-04-11 17:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-10 22:19 H.J. Lu
2010-04-10 22:27 ` H.J. Lu
2010-04-11  0:01   ` H.J. Lu
2010-04-11 20:53     ` H.J. Lu
2010-04-12 13:22       ` H.J. Lu
2010-04-12 18:24         ` Mark Kettenis
2010-04-12 18:50           ` H.J. Lu
2010-04-13 18:40             ` Mark Kettenis
2010-04-13 19:19               ` H.J. Lu
2010-04-13 20:03               ` H.J. Lu
2010-04-13 17:18         ` H.J. Lu
2010-04-13 17:27           ` Mark Kettenis
2010-04-13 17:39             ` H.J. Lu
2010-04-13 18:43               ` Mark Kettenis
2010-04-13 17:48           ` H.J. Lu
2010-04-13 20:38             ` H.J. Lu
2010-04-13 20:48               ` Mark Kettenis
2010-04-11 16:50   ` Mark Kettenis
2010-04-11 17:33     ` H.J. Lu [this message]

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=l2g6dc9ffc81004111033i7a6bb924m4f615fb29d925cac@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    /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