bug: Watch location restrict pointer
Volker Weißmann <[email protected]> Tue, 18 Feb 2020 02:33:51 +0100
| Newsgroups | gmane.comp.gdb.devel,gmane.comp.gdb.bugs.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
the watch -location function does not work when watching a restrict pointer:
main.cpp:
int main() {
=C2=A0=C2=A0=C2=A0 void* __restrict__ ptr =3D 0;
}
gdbinit:
break main.cpp:2
run
watch -location ptr
result:
Breakpoint 1, main () at main.cpp:2
2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 void* __restr=
ict__ ptr =3D 0;
gdbinit:3: Error in sourced command file:
A syntax error in expression, near `restrict *) 0x00007fffffffd608'.
If this is not a bug, but a known limitation, please make the error
message say something like "you cannot watch -location a restrict
pointer" instead of "A syntax error in expression, near `restrict *)
0x00007fffffffd608'." I just spend 4 hours tracking this down and I
don't want anyone else to do the same again.
gdb --version: 9.1
OS: Arch Linux
Greetings
Volker Wei=C3=9Fmann