From: Rajendra SY <rajendra.sy@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] [PR gdb/23093] Implementation of "gdbarch_gdb_signal_to/from_target" on FreeBSD
Date: Fri, 20 Apr 2018 08:22:00 -0000 [thread overview]
Message-ID: <CAMAnt0nXiGPSixbn1mJ4SeTu-kAX9hWrn_Hx9rsUQoektDbFWA@mail.gmail.com> (raw)
Problem:
The $_exitsignal internal variable does not get updated on FreeBSD platform.
Cause:
FreeBSD target is missing signal mapping functions
"gdb_signal_to_target" & "gdb_signal_from_target".
The code flow gdb/infrun.c:5075 [a call to
gdbarch_gdb_signal_to_target_p()] tries to find out if the target has
these functions. In case of FreeBSD it is not so it just skips
updating '$_exitsignal' variable.
The attached patch implements these functions to provide correct
FreeBSD signal to GDB signal mapping information.
Tests:
FAIL: gdb.base/exitsignal.exp: $_exitsignal is 11 (SIGSEGV) after SIGSEGV.
FAIL: gdb.base/exitsignal.exp: $_exitsignal is 11 (SIGSEGV) after
restarting the inferior
These above currently failing tests will pass with this fix.
gdb/ChangeLog:
2018-04-20 Rajendra SY <rajendra.sy@gmail.com>
PR gdb/23093
* gdb/fbsd-tdep.c (enum gdb_signal):
(fbsd_gdb_signal_from_target):
(fbsd_gdb_signal_to_target):
(fbsd_init_abi):
next reply other threads:[~2018-04-20 8:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 8:22 Rajendra SY [this message]
2018-04-20 9:50 ` Fwd: " Rajendra SY
2018-04-27 3:25 Rajendra SY
2018-05-04 18:39 ` John Baldwin
2018-05-05 5:45 ` Rajendra SY
2018-05-08 0:23 ` John Baldwin
2018-05-10 3:08 ` Rajendra SY
2018-05-15 14:04 ` John Baldwin
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=CAMAnt0nXiGPSixbn1mJ4SeTu-kAX9hWrn_Hx9rsUQoektDbFWA@mail.gmail.com \
--to=rajendra.sy@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).