Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324300 - [breakpoints][cdi] Markers are not updated for pending breakpoints that become active
Summary: [breakpoints][cdi] Markers are not updated for pending breakpoints that becom...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.2   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 389945
  Show dependency tree
 
Reported: 2010-09-02 08:44 EDT by Marc Khouzam CLA
Modified: 2014-02-19 01:08 EST (History)
5 users (show)

See Also:


Attachments
Proposed fix. (9.00 KB, patch)
2012-09-11 16:08 EDT, Nobody - feel free to take it CLA
nobody: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2010-09-02 08:44:12 EDT
We now always set breakpoints using the -f option so that the bp is kept as pending if the source code is not loaded yet.  The problem is that once the code is loaded, GDB activates the pending breakpoint, but we don't reflect that with the installed marker (little checkmark) in Eclipse.

The proposed solution can be found in bug 248595 comment #8.

Also, there is an improvement being worked on in GDB to have a new MI event that will tell the frontend that a breakpoint has become active.  Please see:

http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg20196.html
Comment 1 Marc Khouzam CLA 2012-09-04 10:02:42 EDT
Breakpoint notifications are available since GDB 7.4 which will allow us to know when a breakpoint has gone from pending to enabled.
Comment 2 Marc Khouzam CLA 2012-09-11 14:07:09 EDT
Hi Mikhail,

just a reminder, if you have time, to post the beginnings of the patch you have for this fix.

Thanks!

Marc
Comment 3 Nobody - feel free to take it CLA 2012-09-11 14:19:46 EDT
(In reply to comment #2)
> Hi Mikhail,
> 
> just a reminder, if you have time, to post the beginnings of the patch you
> have for this fix.
> 
> Thanks!
> 
> Marc

Sorry Marc, I have completely forgotten about this patch. Will do it today.
Comment 4 Nobody - feel free to take it CLA 2012-09-11 15:30:47 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Hi Mikhail,
> > 
> > just a reminder, if you have time, to post the beginnings of the patch you
> > have for this fix.
> > 
> > Thanks!
> > 
> > Marc
> 
> Sorry Marc, I have completely forgotten about this patch. Will do it today.

Marc, I am having trouble to make my example working. I can step into the dll's code but I don't get notifications from gdb the pending breakpoint is set. I get notifications (=breakpoint-modified and =breakpoint-deleted) for temporary breakpoint so it is supported by gdb (I am using 7.4). But I don't get any notification for the breakpoint set in the dll. The same example worked a couple of years ago. Do you want me to push the patch to Gerrit anyway?
Comment 5 Marc Khouzam CLA 2012-09-11 15:37:14 EDT
(In reply to comment #4)
> Marc, I am having trouble to make my example working. I can step into the
> dll's code but I don't get notifications from gdb the pending breakpoint is
> set. I get notifications (=breakpoint-modified and =breakpoint-deleted) for
> temporary breakpoint so it is supported by gdb (I am using 7.4). But I don't
> get any notification for the breakpoint set in the dll. The same example
> worked a couple of years ago. Do you want me to push the patch to Gerrit
> anyway?

If it's ok with you, I'll take whatever you have.  It will still save me time.  I'll just build on top of yours.  I'll have to figure out how to deal with a double commit with Gerrit though...  Not sure yet how I can handle this.
Comment 6 Nobody - feel free to take it CLA 2012-09-11 16:08:18 EDT
Created attachment 220950 [details]
Proposed fix.
Comment 7 Nobody - feel free to take it CLA 2012-09-11 16:09:54 EDT
(In reply to comment #5)
> If it's ok with you, I'll take whatever you have.  It will still save me
> time.  I'll just build on top of yours.  I'll have to figure out how to deal
> with a double commit with Gerrit though...  Not sure yet how I can handle
> this.

Not sure I understand what you mean by "double commit". Attaching the patch in case if pushing it to Gerrit is a problem.
Comment 8 Marc Khouzam CLA 2012-09-11 16:12:53 EDT
(In reply to comment #7)
> (In reply to comment #5)
> > If it's ok with you, I'll take whatever you have.  It will still save me
> > time.  I'll just build on top of yours.  I'll have to figure out how to deal
> > with a double commit with Gerrit though...  Not sure yet how I can handle
> > this.
> 
> Not sure I understand what you mean by "double commit". Attaching the patch
> in case if pushing it to Gerrit is a problem.

Thanks!

I don't want to handle this fix as a single commit, or else it won't reflect what you did.  I was planning on taking your patch, committing in locally in my repo and then doing a second commit on top of it to complete the work.  That should all work with Git but I don't know how to handle it in Gerrit for review.
Comment 9 Nobody - feel free to take it CLA 2012-09-11 16:24:12 EDT
(In reply to comment #8)
> I don't want to handle this fix as a single commit, or else it won't reflect
> what you did.  I was planning on taking your patch, committing in locally in
> my repo and then doing a second commit on top of it to complete the work. 
> That should all work with Git but I don't know how to handle it in Gerrit
> for review.

Neither do I. Do you still want me to push it to Gerrit?
Regarding the patch, as far as I remember you wanted me to move the notification handling to the breakpoint service instead of MIBreakpointsManager. I remember trying it and realizing that it would require too many modifications.
Comment 10 Marc Khouzam CLA 2012-09-11 16:31:18 EDT
(In reply to comment #9)
 
> Neither do I. Do you still want me to push it to Gerrit?

No, I'll use from here and figure what to do about Gerrit when I get there.  Worst case is that we can use Gerrit for review but commit directly to Git to keep both commits visible.

> Regarding the patch, as far as I remember you wanted me to move the
> notification handling to the breakpoint service instead of
> MIBreakpointsManager. I remember trying it and realizing that it would
> require too many modifications.

Ok, I'll keep this in mind.

Thanks again.
Comment 11 Marc Khouzam CLA 2014-02-03 14:54:08 EST
This might have been fixed by bug 392512 if someone wants to try it.

At a minimum, the work needed now must be very small.
Comment 12 Marc Khouzam CLA 2014-02-17 14:07:09 EST
I tried loading a shared lib with a breakpoint set and the 'installed' decorator properly appeared.  So this bug was fixed by Mikhail's fix to bug 392512.
Comment 13 Nobody - feel free to take it CLA 2014-02-17 19:12:42 EST
(In reply to Marc Khouzam from comment #12)
> I tried loading a shared lib with a breakpoint set and the 'installed'
> decorator properly appeared.  So this bug was fixed by Mikhail's fix to bug
> 392512.

I was surprised to see this bug still open but didn't have time to check. Sorry for late reaction, it's a public holiday today in Ontario.