From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Daniel Jacobowitz <drow@false.org>,
Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: [0/2] Inspect extra signal information
Date: Wed, 04 Feb 2009 00:49:00 -0000 [thread overview]
Message-ID: <200902040049.10820.pedro@codesourcery.com> (raw)
In-Reply-To: <20090204002438.GA29944@caradoc.them.org>
On Wednesday 04 February 2009 00:24:38, Daniel Jacobowitz wrote:
> What Doug described is pretty similar to what I had in mind; it does
> not fix the issue for gdbserver, but does for gdb. Read each field of
> the ptrace buffer, then use gdbarch to retrieve the type this would be
> expected to have in the inferior. Use gdb's type/value machinery to
> store the raw fields into the new value. Pass that value's contents
> back through the target layer to gdb, which will see the right values
> because it uses the same gdbarch to interpret them.
A few emails ago I mentioned "if I make use of struct type/struct value
if may not be bad, but, gdbserver can't use those..." :-), and I was
also thinking of something similar, but simpler. I was thinking
of building up a value with the 64-bit type (gdb knows how to
build it already), and pass it the raw 64-bit data. Then build
a new value with the 32-bit data, and iterate simulatenously in both
values through each field and copy/convert each field to the 32-bit
value, as appropriate. But as you say below, I don't like having
two ways to do the same thing, given that something has to be done
on the gdbserver side.
> Now, whether those hoops are worth it is another question. If we have
> to do this in gdbserver anyway, we could use the same method in gdb.
That's my thinking too. I'm half through, let's see what comes out...
> I vaguely remember having to do something similar for Solaris's
> procfs.
Yep. I remember that. It was related to that fact that auxv data
in procfs is presented with a 64-bit layout to a 64-bit gdb, even
if the inferior is 32-bit. If I'm not mistaken:
2008-05-04 Vladimir Prus ...
* target.h (struct target_ops): New field to_auxv_parse.
* auxv.c (default_auxv_parse): New, renamed from previous
target_auxv_parse.
(target_auxv_parse): Try to call target method. Fallback to
default_auxv_parse if not found.
* procfs.c (procfs_auxv_parse): New.
(init_procfs_ops): On Solaris, in 64-bit mode, install
procfs_auxv_parse.
> Only biarch platforms would have this problem, and fortunately there
> aren't too many.
--
Pedro Alves
next prev parent reply other threads:[~2009-02-04 0:49 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 18:47 Pedro Alves
2009-01-12 18:49 ` Pedro Alves
2009-01-12 18:52 ` [1/2] " Pedro Alves
2009-01-12 19:40 ` Eli Zaretskii
2009-02-02 16:51 ` Pedro Alves
2009-02-02 21:04 ` Eli Zaretskii
2009-02-05 1:14 ` Pedro Alves
2009-02-05 20:30 ` Eli Zaretskii
2009-02-06 23:31 ` Pedro Alves
2009-01-12 18:50 ` [2/2] " Pedro Alves
2009-01-12 19:39 ` Eli Zaretskii
2009-01-13 12:32 ` Pedro Alves
2009-01-13 18:55 ` Eli Zaretskii
2009-01-13 19:08 ` Pedro Alves
2009-01-13 19:15 ` Eli Zaretskii
2009-02-06 23:35 ` Pedro Alves
2009-02-09 6:23 ` Paul Pluzhnikov
2009-02-09 22:17 ` Pedro Alves
2009-04-06 19:00 ` Paul Pluzhnikov
2009-04-06 19:18 ` relying on testsuite results Thiago Jung Bauermann
2009-04-06 19:33 ` Paul Pluzhnikov
2009-04-06 19:57 ` Daniel Jacobowitz
2009-04-06 19:51 ` Tom Tromey
2009-04-06 20:22 ` Mark Kettenis
2009-04-07 14:57 ` [2/2] Inspect extra signal information Pedro Alves
2009-01-12 23:27 ` [0/2] " Mark Kettenis
2009-01-13 11:05 ` Pedro Alves
2009-01-13 18:42 ` Eli Zaretskii
2009-01-13 18:50 ` Pedro Alves
2009-01-13 19:19 ` Eli Zaretskii
2009-01-13 19:37 ` Pedro Alves
2009-01-13 19:47 ` Pedro Alves
2009-02-02 14:40 ` Pedro Alves
2009-02-02 20:49 ` Mark Kettenis
2009-02-03 15:02 ` Pedro Alves
2009-02-03 16:42 ` Ulrich Weigand
2009-02-03 18:06 ` Daniel Jacobowitz
2009-02-03 18:24 ` Pedro Alves
2009-02-03 19:04 ` Daniel Jacobowitz
2009-02-03 19:51 ` Pedro Alves
2009-02-03 23:18 ` Doug Evans
2009-02-03 23:50 ` Pedro Alves
2009-02-04 0:17 ` Doug Evans
2009-02-04 0:24 ` Daniel Jacobowitz
2009-02-04 0:49 ` Pedro Alves [this message]
2009-02-04 21:02 ` [3/2] Inspect extra signal information, handle amd64 bi-arch gdb Pedro Alves
2009-02-04 21:17 ` Daniel Jacobowitz
2009-02-06 23:37 ` Pedro Alves
2009-02-07 2:28 ` Paul Pluzhnikov
2009-02-07 14:56 ` Pedro Alves
2009-02-07 16:14 ` Paul Pluzhnikov
2009-02-04 22:07 ` Doug Evans
2009-02-03 18:23 ` [0/2] Inspect extra signal information Pedro Alves
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=200902040049.10820.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--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