From d93f7b5c9552338037fcb8fc03b3a04e21c478cd Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Sun, 14 Aug 2011 15:58:40 +0000 Subject: gdb/testsuite/ * gdb.base/maint.exp: set data_section to ".neardata". * gdb.base/savedregs.c (thrower): Trigger SIGILL on NO-MMU machine. * gdb.base/savedregs.exp: Handle SIGILL. * gdb.mi/mi-syn-frame.c (bar): Trigger SIGILL on NO-MMU machine. * gdb.xml/tdesc-regs.exp: Set core-regs for tic6x-*-*. --- gdb/testsuite/gdb.base/savedregs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gdb/testsuite/gdb.base/savedregs.c') diff --git a/gdb/testsuite/gdb.base/savedregs.c b/gdb/testsuite/gdb.base/savedregs.c index 9f302a0..4f962ac 100644 --- a/gdb/testsuite/gdb.base/savedregs.c +++ b/gdb/testsuite/gdb.base/savedregs.c @@ -45,11 +45,25 @@ catcher (int sig) static void thrower (void) { + /* Trigger a SIGSEGV. */ *(char *)0 = 0; + + /* On MMU-less system, previous memory access to address zero doesn't + trigger a SIGSEGV. Trigger a SIGILL. Each arch should define its + own illegal instruction here. */ + +#if defined(__arm__) + asm(".word 0xf8f00000"); +#elif defined(__TMS320C6X__) + asm(".word 0x56454313"); +#else +#endif + } main () { + signal (SIGILL, catcher); signal (SIGSEGV, catcher); thrower (); } -- cgit v1.1