This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] testsuite: handle SIGBUS like SIGSEGV


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]