Bug 110016 - UI for watchpoints on local variables in CDT 3.0
Summary: UI for watchpoints on local variables in CDT 3.0
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-20 10:17 EDT by Hampus Edvardsson CLA
Modified: 2020-09-04 15:21 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hampus Edvardsson CLA 2005-09-20 10:17:57 EDT
Adding watchpoints for local variables was available in CDT 2.1.1 via the "Add
Watchpoint (C/C++)" but seems to be missing in CDT 3.0.

Searching the newsgroup suggests that the only way of setting a watchpoint on a
local varaible is to use the GDB command line.

This seems to be a repeat of bug 84165, but I have not seen any discussion on
why to drop the support on the development mailing list.
Comment 1 Nobody - feel free to take it CLA 2005-09-20 10:49:12 EDT
Speaking more generally we should allow to set a watchpoint on any expression 
that evaluates to address. But the reason why the "Add Watchpoint" feature is 
left out is because we currently can't catch the moment when the expression 
comes back to scope. So if you set a watchpoint on a local variable and it goes 
out of scope, the watchpoint seats in the Breakpoint view and will never be set 
on any session again.
Comment 2 Ling Wang CLA 2007-02-28 16:14:01 EST
I think the watchpoint will be tied to the address that the expression is resolved to. So even if the expression is out of scope, the watchpoint is still alive but will just give user false alarm. But that seems fine as user can tell it's false alarm from the watchpoint even message and can go ahead remove/disable that watchpoint. That's what we do in CodeWarrior debugger.
What do you think ?