This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix variable objects for references to pointers
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: Nick Roberts <nickrob at snap dot net dot nz>, gdb-patches at sources dot redhat dot com
- Date: Thu, 04 Jan 2007 14:55:32 +0300
- Subject: Re: [PATCH] Fix variable objects for references to pointers
- References: <17792.55489.274138.854508@kahikatea.snap.net.nz> <17820.52196.372141.269808@kahikatea.snap.net.nz>
Nick Roberts wrote:
> > This line isn't testing anything you're interested in, right?
> > Then you can just put a breakpoint in the right place and run
> > to that breakpoint. I'd recommend mi_continue_to. I don't
> > see a convenient helper in mi-support.exp to set the breakpoint, but
> > there's an example in mi-var-cmd.exp.
>
> Something like below?
>
> set end_of_proc [gdb_get_line_number "return 99;"]
> send_gdb "-break-insert $end_of_proc\n"
> mi_continue_to ".*" reference_to_pointer "" ".*${srcfile}" $end_of_proc \
> "continue to return 99"
>
>
> Other tests seem to use mi_gdb_test for -break-insert but I'm not
> interested in the result and mi_continue presumably sifts through the
> output until it reaches
> something it recognises. I'm also not that interested in the breakpoint
> number so I've used a wildcard for future-proofing.
I don't think there's need to polish this fragment. The "Simplified MI testing"
patch of mine is almost approved, and introduces automatic stepping to the right
line in source.
Ah, and I think I'd need to modify that patch so that if you stop on
the wrong line we error out, and don't wait for timeout -- I think the
current version of my patch has exactly this problem that Dan pointed out
earlier in this thread.
- Volodya