bug: Watch location restrict pointer

Volker Weißmann <[email protected]>
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() {
     void* __restrict__ ptr = 0;
}


gdbinit:

break main.cpp:2
run
watch -location ptr


result:

Breakpoint 1, main () at main.cpp:2
2           void* __restrict__ ptr = 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ßmann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.