diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-07-27 20:51:40 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-07-27 20:51:40 +0000 |
commit | 26ab7092a2a92cb00adbad2f34bd104cedb41b87 (patch) | |
tree | fc0c5ed01744e0bc74775f5d9f464bec4fa51c1f /gdb/ia64-linux-nat.c | |
parent | 283e6a52fcfdaaaeae882884a5b848e44249f324 (diff) | |
download | gdb-26ab7092a2a92cb00adbad2f34bd104cedb41b87.zip gdb-26ab7092a2a92cb00adbad2f34bd104cedb41b87.tar.gz gdb-26ab7092a2a92cb00adbad2f34bd104cedb41b87.tar.bz2 |
gdb/
* ia64-linux-nat.c (ia64_linux_status_is_event): New function.
(_initialize_ia64_linux_nat): Install it.
* linux-nat.c (sigtrap_is_event, linux_nat_status_is_event)
(linux_nat_set_status_is_event): New.
(stop_wait_callback, count_events_callback, select_event_lwp_callback)
cancel_breakpoints_callback, linux_nat_filter_event)
(linux_nat_wait_1): Use linux_nat_status_is_event.
* linux-nat.h (linux_nat_set_status_is_event): New prototype.
gdb/testsuite/
* gdb.threads/ia64-sigill.exp: New file.
* gdb.threads/ia64-sigill.c: New file.
Diffstat (limited to 'gdb/ia64-linux-nat.c')
-rw-r--r-- | gdb/ia64-linux-nat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index d33e88e..f9f5bf3 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -809,6 +809,18 @@ ia64_linux_xfer_partial (struct target_ops *ops, offset, len); } +/* For break.b instruction ia64 CPU forgets the immediate value and generates + SIGILL with ILL_ILLOPC instead of more common SIGTRAP with TRAP_BRKPT. + ia64 does not use gdbarch_decr_pc_after_break so we do not have to make any + difference for the signals here. */ + +static int +ia64_linux_status_is_event (int status) +{ + return WIFSTOPPED (status) && (WSTOPSIG (status) == SIGTRAP + || WSTOPSIG (status) == SIGILL); +} + void _initialize_ia64_linux_nat (void); void @@ -848,4 +860,5 @@ _initialize_ia64_linux_nat (void) /* Register the target. */ linux_nat_add_target (t); linux_nat_set_new_thread (t, ia64_linux_new_thread); + linux_nat_set_status_is_event (t, ia64_linux_status_is_event); } |