diff options
author | Aleksandar Ristovski <aristovski@qnx.com> | 2008-05-01 19:31:52 +0000 |
---|---|---|
committer | Aleksandar Ristovski <aristovski@qnx.com> | 2008-05-01 19:31:52 +0000 |
commit | 1cded358ac11bda3c08ed79b99e304b3d120b301 (patch) | |
tree | b47e91d6b2813a039a923cf8af7b6d0839676ce3 /gdb/gdbarch.h | |
parent | a0ef42744d050b642351a3974faca030269f5504 (diff) | |
download | gdb-1cded358ac11bda3c08ed79b99e304b3d120b301.zip gdb-1cded358ac11bda3c08ed79b99e304b3d120b301.tar.gz gdb-1cded358ac11bda3c08ed79b99e304b3d120b301.tar.bz2 |
PR gdb/2343
* corelow.c (core_open): Use gdbarch_target_signal_from_host to
translate signal numeric value from the target to GDB's enum
target_signal.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbarch.sh: Added two new functions target_signal_from_host and
target_signal_to_host.
* target.h (default_target_signal_from_host,
default_target_signal_to_host): New functions - declarations.
* signals/signals.c (struct gdbarch): New declaration.
(default_target_signal_to_host, default_target_signal_from_host): New
functions.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index e568993..baba7c7 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -690,6 +690,20 @@ extern void set_gdbarch_static_transform_name (struct gdbarch *gdbarch, gdbarch_ extern int gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch); extern void set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, int sofun_address_maybe_missing); +/* Signal translation: translate inferior's signal (host's) number into + GDB's representation. */ + +typedef enum target_signal (gdbarch_target_signal_from_host_ftype) (struct gdbarch *gdbarch, int signo); +extern enum target_signal gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo); +extern void set_gdbarch_target_signal_from_host (struct gdbarch *gdbarch, gdbarch_target_signal_from_host_ftype *target_signal_from_host); + +/* Signal translation: translate GDB's signal number into inferior's host + signal number. */ + +typedef int (gdbarch_target_signal_to_host_ftype) (struct gdbarch *gdbarch, enum target_signal ts); +extern int gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts); +extern void set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch, gdbarch_target_signal_to_host_ftype *target_signal_to_host); + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |