This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] PR gdb/1665 pending catch/throw catchpoints
- From: Daniel Jacobowitz <drow at false dot org>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 1 May 2008 16:12:39 -0400
- Subject: Re: [patch] PR gdb/1665 pending catch/throw catchpoints
- References: <fv80t2$hv9$1@ger.gmane.org> <4817E37A.8020705@qnx.com>
On Tue, Apr 29, 2008 at 11:11:54PM -0400, Aleksandar Ristovski wrote:
> -# As I said before, this test script is not ready yet!
> -
> -continue
There's comments higher up about this continue, they need to be
updated too.
> # Set a catch catchpoint
>
> -gdb_test "catch catch" "Catchpoint \[0-9\]+ \\(catch\\)"
> +gdb_test "catch catch" "Catchpoint \[0-9\]+ \\(catch\\)" \
> + "catch catch (static executable)"
>
> # Set a throw catchpoint
>
> gdb_test "catch throw" "Catchpoint \[0-9\]+ \\(throw\\)" \
> "catch throw (static executable)"
The descriptions on these are wrong, they aren't for a static
executable.
> # The catchpoints should be listed in the list of breakpoints.
> +set addr "<PENDING>"
> +set re_head "Num${ws}Type${ws}Disp${ws}Enb${ws}Address${ws}What"
> +set re_2_bp "1${ws}breakpoint${ws}keep${ws}y${ws}$addr${ws}exception catch"
> +set re_3_bp "2${ws}breakpoint${ws}keep${ws}y${ws}$addr${ws}exception throw"
This won't work if the C++ library is linked in, e.g. -static or a
bare metal toolchain; it won't be pending.
> +gdb_test "tbreak main" "Temporary breakpoint 3.*" \
> + "Set temporary breakpoint at main"
> +
> +gdb_test "run" "Temporary breakpoint 3,.*" "Run to main"
There's runto_main, use that instead; it handles remote targets and so
forth.
If you'll try to update this, I can test it on arm-none-eabi or
another bare metal platform. Running it with
"RUNTESTFLAGS=--target_board unix/-static" should be enough to test
the <PENDING> problem.
--
Daniel Jacobowitz
CodeSourcery