From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [0/2] Inspect extra signal information
Date: Mon, 12 Jan 2009 18:47:00 -0000 [thread overview]
Message-ID: <200901121846.51709.pedro@codesourcery.com> (raw)
Hi!
This mini series adds support for inspecting extra signal information.
What this means is, we get a new $_siginfo convenience variable that
is typed to look like the siginfo_t object on unix-ish platforms (but
can be any other type appropriate for the target platform).
E.g., on x86_64-linux,
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400770 in main () at ../../../src/gdb/testsuite/gdb.base/siginfo-obj.c:68
68 *(int *)p = 0;
(gdb) p $_siginfo
$1 = {si_signo = 11, si_errno = 0, si_code = 2, _sifields = {_pad = {-134254592, 32767, 0, 0, 0, 0, 1, 5, 12462832,
0, 4196201, 0, 0, 0, 4196208, 0, 12337488, 0, 12337488, 0, 4196208, 0, 12518720, 0, 12518864, 0, 12518848, 0},
_kill = {si_pid = -134254592, si_uid = 32767}, _timer = {si_tid = -134254592, si_overrun = 32767, si_sigval = {
sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = -134254592, si_uid = 32767, si_sigval = {sival_int = 0,
sival_ptr = 0x0}}, _sigchld = {si_pid = -134254592, si_uid = 32767, si_status = 0, si_utime = 0,
si_stime = 4294967296}, _sigfault = {si_addr = 0x7ffff7ff7000}, _sigpoll = {si_band = 140737354100736,
si_fd = 0}}}
(gdb) ptype $_siginfo
type = struct {
int si_signo;
int si_errno;
int si_code;
union {
int _pad[28];
struct {...} _kill;
struct {...} _timer;
struct {...} _rt;
struct {...} _sigchld;
struct {...} _sigfault;
struct {...} _sigpoll;
} _sifields;
}
(gdb) p $_siginfo._sifields._sigfault.si_addr
$2 = (void *) 0x7ffff7ff7000
part 1:
- Adds some infrastracture to be able to register reader and writer
functions that are responsible for reading and writing
a ``struct value'''s value. We called those lval_computed values. We've
been using these kinds of values for other things in our tree for a
couple of years already --- I've piggy-backed on that, so I got to
push it. :-)
This first patch applies on top of this other one:
http://sourceware.org/ml/gdb-patches/2009-01/msg00252.html
part 2:
- Adds a new target object ``TARGET_OBJECT_SIGNAL_INFO'', used to transfer the
siginfo_t data from the target to GDB core.
- Adds a way for a convenience variable's type and value be lazy. This is because
the actual type of the $_siginfo variable may change between archs (across runs, or
across threads).
- Adds a new gdbarch method (get_siginfo_type) whose job is to return a type
suitable to print/inspect a TARGET_OBJECT_SIGNAL_INFO of a given arch.
- Adds the $_siginfo convenience variable, whose type is lval_computed. The read and
writer functions of this lval_computed variable take care of transfering
a TARGET_OBJECT_SIGINFO to/from the target.
- Adds a generic linux implementation of get_siginfo_type, suitable for linux archs
that use the default siginfo_t structure type, and registers it in x86, x86_64
and arm. Other archs that diverge from the default, will need to implement
their own version, which will be very similar to linux_get_siginfo_type.
- Adds linux native target and remote targets implementations of
transfering TARGET_OBJECT_SIGNAL_INFO.
- Adds gdbserver support for same.
- Docs, and,
- New test.
--
Pedro Alves
next reply other threads:[~2009-01-12 18:47 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 18:47 Pedro Alves [this message]
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
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=200901121846.51709.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/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