This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] [PR gdb/23093] Implementation of "gdbarch_gdb_signal_to/from_target" on FreeBSD
- From: Rajendra SY <rajendra dot sy at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 20 Apr 2018 13:52:41 +0530
- Subject: [PATCH] [PR gdb/23093] Implementation of "gdbarch_gdb_signal_to/from_target" on FreeBSD
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):