* 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.
This commit is contained in:
Jan Kratochvil 2010-07-27 20:51:40 +00:00
parent 283e6a52fc
commit 26ab7092a2
7 changed files with 499 additions and 7 deletions

View file

@ -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);
}