This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug rust/21484] watch -location does not work with rust
- From: "tromey at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 15 May 2017 05:02:34 +0000
- Subject: [Bug rust/21484] watch -location does not work with rust
- Auto-submitted: auto-generated
- References: <bug-21484-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21484
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
This bug turns out to be surprisingly hard.
Location watchpoints try to set the language to C when the
expression is rewritten to *(TYPE*)ADDR.
However, this doesn't actually work, because nothing forces
the re-parse to be done in C.
Making the obvious change there also doesn't work -- it regresses
gdb.dlang/watch-loc.exp, which makes sense, because what happens
then is that gdb tries to parse a D type using the C parser.
My next idea was to change breakpoint.c to create an equivalent
expression without using the parser. But here the problem is
how to re-parse the type string when resetting breakpoints.
There's no existing API (other than the language parser), AFAIK,
that can always parse the output of type_to_string.
And, if you're going to use the language parser anyway... I guess
we might as well just make the rewriter a lang hook. So, that's
my current plan.
--
You are receiving this mail because:
You are on the CC list for the bug.