diff options
author | Pedro Alves <palves@redhat.com> | 2012-06-04 16:23:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-04 16:23:57 +0000 |
commit | 1f8cf22072102afa4eb142425aeda8ab71b70233 (patch) | |
tree | 44e3707b359038782fd3c8e72b83b7e970e075a3 /gdb/corelow.c | |
parent | 86b498803658eb5e7ed3eb1a8131051e5e31e0e6 (diff) | |
download | fsf-binutils-gdb-1f8cf22072102afa4eb142425aeda8ab71b70233.zip fsf-binutils-gdb-1f8cf22072102afa4eb142425aeda8ab71b70233.tar.gz fsf-binutils-gdb-1f8cf22072102afa4eb142425aeda8ab71b70233.tar.bz2 |
2012-06-04 Pedro Alves <palves@redhat.com>
* arch-utils.c (default_gdb_signal_from_target): Delete.
* arch-utils.h (default_gdb_signal_from_target): Delete.
* corelow.c (core_open) <signal mapping>: Extended comment. Check
gdbarch_gdb_signal_from_target_p.
* gdbarch.sh (gdb_signal_from_target): Make it an M method (with
predicate).
* gdbarch.h: Regenerate.
* gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r-- | gdb/corelow.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c index 8c3cd5c..dd62560 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -441,11 +441,16 @@ core_open (char *filename, int from_tty) if (siggy > 0) { /* If we don't have a CORE_GDBARCH to work with, assume a native - core. */ + core (map gdb_signal from host signals). If we do have + CORE_GDBARCH to work with, but no gdb_signal_from_target + implementation for that gdbarch, as a fallback measure, + assume the host signal mapping. It'll be correct for native + cores, but most likely incorrect for cross-cores. */ enum gdb_signal sig = (core_gdbarch != NULL - ? gdbarch_gdb_signal_from_target (core_gdbarch, - siggy) - : gdb_signal_from_host (siggy)); + && gdbarch_gdb_signal_from_target_p (core_gdbarch) + ? gdbarch_gdb_signal_from_target (core_gdbarch, + siggy) + : gdb_signal_from_host (siggy)); printf_filtered (_("Program terminated with signal %d, %s.\n"), siggy, gdb_signal_to_string (sig)); |