This is the mail archive of the gdb-prs@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]

[Bug rust/21484] watch -location does not work with rust


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.

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