diff options
author | Yao Qi <yao@codesourcery.com> | 2011-08-14 15:58:40 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-08-14 15:58:40 +0000 |
commit | d93f7b5c9552338037fcb8fc03b3a04e21c478cd (patch) | |
tree | d58f54fca8f04dae26a3c4a478249ee3ddc05255 /gdb/testsuite/gdb.base | |
parent | 58dbd54186b324c1481454892e03c5fb8307dbc1 (diff) | |
download | gdb-d93f7b5c9552338037fcb8fc03b3a04e21c478cd.zip gdb-d93f7b5c9552338037fcb8fc03b3a04e21c478cd.tar.gz gdb-d93f7b5c9552338037fcb8fc03b3a04e21c478cd.tar.bz2 |
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-*-*.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/savedregs.c | 14 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/savedregs.exp | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 61ad439..2bd25936 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -394,6 +394,11 @@ gdb_test_multiple "maint info sections" "maint info sections" { set data_section ER_RW pass "maint info sections" } + -re "Exec file:\r\n.*break($EXEEXT)?., file type.*neardata.*$gdb_prompt $" { + # c6x doesn't have .data section. It has .neardata and .fardata section. + set data_section ".neardata" + pass "maint info sections" + } -re "Exec file:\r\n.*break($EXEEXT)?., file type.*$gdb_prompt $" { pass "maint info sections" } 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 (); } diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp index eeee0ff..b9204a4 100644 --- a/gdb/testsuite/gdb.base/savedregs.exp +++ b/gdb/testsuite/gdb.base/savedregs.exp @@ -143,6 +143,7 @@ process_saved_regs thrower { main } { } # Continue to the signal catcher, check main's saved-reg info, capture # catcher's saved-reg info. gdb_test "handle SIGSEGV pass print nostop" +gdb_test "handle SIGILL pass print nostop" gdb_test "advance catcher" "catcher .* at .*" process_saved_regs catcher { sigtramp thrower } { main } |