Bug 14503

Summary: Strange error message when setting a watchpoint on the location of 'this'
Product: gdb Reporter: Andre' <andre.poenitz>
Component: breakpointsAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 7.5   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Andre' 2012-08-21 15:46:20 UTC
I do not really expect setting a watch point on 'this' to be very useful, but the the error message is strange:

Breakpoint 2, Foo::Foo (this=0xbfffee54, i=0) at ../simple/simple_test_app.cpp:335
335             b = 2 + s + t;
(gdb) watch this
Hardware watchpoint 3: this
(gdb) watch -l this
A syntax error in expression, near `const *) 0xbfffee40'.
(gdb) watch -l this->a
Hardware watchpoint 4: -location this->a
(gdb) watch -l b
Hardware watchpoint 5: -location b

(the second item)