From 26ab7092a2a92cb00adbad2f34bd104cedb41b87 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 27 Jul 2010 20:51:40 +0000 Subject: 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. --- gdb/ia64-linux-nat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gdb/ia64-linux-nat.c') diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index d33e88e1546..f9f5bf36e91 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); } -- cgit v1.2.1