This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] testsuite: handle SIGBUS like SIGSEGV
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tristan Gingold <gingold at ACT-Europe dot FR>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Dec 2008 08:49:20 +0400
- Subject: Re: [RFA] testsuite: handle SIGBUS like SIGSEGV
- References: <20081216135721.GA10182@chinon.act-europe.fr>
> 2008-12-16 Tristan Gingold <gingold@adacore.com>
>
> * gdb.base/sigbpt.exp: Detect which signal is received when a NULL
> pointer is dereferenced and use this signal name in regexp.
> * gdb.base/signull.exp: Ditto.
> * gdb.base/sigbpt.c (main): Catch SIGBUS too.
> * gdb.base/signull.c (main): Ditto.
Just one minor comment. Ok with the change requested below:
> - -re "Program received signal SIGSEGV.*pc(\r\n| *) *(0x\[0-9a-f\]*).*$gdb_prompt $" {
> - set segv_addr $expect_out(2,string)
> + -re "Program received signal (SIG\[A-Z\]*).*pc(\r\n| *) *(0x\[0-9a-f\]*).*$gdb_prompt $" {
> + set signame $expect_out(1,string)
> + set segv_addr $expect_out(3,string)
> pass "$test"
Can you change the "(SIG\[A-Z\]*)" regexp to only match SIGSEGV and SIGBUS?
--
Joel