This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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):


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]