public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: uweigand@de.ibm.com
Cc: jan.kratochvil@redhat.com, Jon.Zhou@jdsu.com, gdb@sourceware.org
Subject: Re: support biarch gcore?
Date: Tue, 06 Jul 2010 21:29:00 -0000	[thread overview]
Message-ID: <201007062128.o66LSkNC032580@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <201007062048.o66Kmixd002309@d12av02.megacenter.de.ibm.com>	(uweigand@de.ibm.com)

> Date: Tue, 6 Jul 2010 22:48:44 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> 
> Mark Kettenis wrote:
> 
> > Fixing the code in linux-nat.c is a bit nasty:
> > 
> > * The definition of the 32-bit version of gdb_gregset_t isn't readily
> >   available on 64-bit systems.
> > 
> > * The code is used on all Linux platforms and only a few of them are
> >   bi-arch.
> 
> This was really supposed to be fixed by the gdbarch_core_regset_sections
> mechanism, which provides the names and sizes of all register sets
> expected in a core file for the current architecture.
> 
> However, it seems that this mechanism isn't currently used for .reg
> itself, only for the other sections.  While it is true that .reg needs
> to be handled somewhat specially, it should still be possible to get
> its size from gdbarch_core_regset_sections, and thus avoid the need
> to use the gdb_gregset_t type.
> 
> Unfortunately, it also turned out that the section sizes provided for
> .reg in those targets that have gdbarch_core_regset_sections, while
> currently unused, were also nearly all wrong ...
> 
> The following patch fixes those sizes, and changes linux-nat.c to
> use them.
> 
> Tested on powerpc64-linux (-m64 / -m32), amd64-linux (-m64 / -m32),
> and i386-linux with no regressions.  In fact, it appears to fix all
> pre-existing gcore-related failures on amd64 -m32 ...
> 
> Thoughts?

Although I don't feel qualified to judge the powerpc bits, this makes
quite a bit of sense to me.  And yes, the value for amd64-linux is
obviously wrong.

  reply	other threads:[~2010-07-06 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03 10:48 Examining copied stack contents Martin Schröder
2010-07-05  4:54 ` support biarch gcore? Jon Zhou
2010-07-05  7:12   ` Jan Kratochvil
2010-07-05 11:55     ` Mark Kettenis
2010-07-06 20:48       ` Ulrich Weigand
2010-07-06 21:29         ` Mark Kettenis [this message]
2010-07-07 12:30           ` Ulrich Weigand
2010-07-08  2:35             ` Jon Zhou
2010-07-08 11:17               ` Ulrich Weigand
2010-07-08  4:47             ` H.J. Lu
2010-07-08  5:05               ` H.J. Lu
2010-07-08 11:15                 ` Ulrich Weigand
2010-07-08 13:52                   ` H.J. Lu
2010-07-21 22:45                     ` Joseph S. Myers
2010-07-05 18:50 ` Examining copied stack contents Petr Hluzín
2010-07-05 20:18   ` Martin Schröder
2010-07-05 20:27     ` Joel Brobecker
2010-07-07 17:29   ` Martin Schröder

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=201007062128.o66LSkNC032580@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=Jon.Zhou@jdsu.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=uweigand@de.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).