Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314514 - Cannot set breakpoints in shared libraries
Summary: Cannot set breakpoints in shared libraries
Status: CLOSED DUPLICATE of bug 248595
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 12:49 EDT by James Blackburn CLA
Modified: 2010-05-26 14:10 EDT (History)
1 user (show)

See Also:


Attachments
CDI MI log - breakpoints are set (14.02 KB, text/plain)
2010-05-26 12:56 EDT, James Blackburn CLA
no flags Details
DSF MI log - breakpoints not set (7.20 KB, text/plain)
2010-05-26 12:57 EDT, James Blackburn CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-05-26 12:49:44 EDT
This may be a dupe, but seems a major out-of-the box regression from CDI.

I've got a bunch of breakpoints in some source files that exist in a .so. CDI correctly sets these when it detects the .so is loaded, while DSF doesn't. The result is I haven't figure out (out the box anyway) how to use DSF to debug my app.

GNU gdb (GDB) 7.0.1
CDT: 2010-05-01 19:09:26
Comment 1 James Blackburn CLA 2010-05-26 12:56:55 EDT
Created attachment 170047 [details]
CDI MI log - breakpoints are set
Comment 2 James Blackburn CLA 2010-05-26 12:57:35 EDT
Created attachment 170048 [details]
DSF MI log - breakpoints not set
Comment 3 Marc Khouzam CLA 2010-05-26 13:01:06 EDT
Sorry James, this is one of the parity bugs we didn't have time to get too.  The fix (GDB >= 6.8) is not very big, but the handling of the breakpoint marker was not trivial and I ran out of time.

*** This bug has been marked as a duplicate of bug 248595 ***
Comment 4 James Blackburn CLA 2010-05-26 13:05:03 EDT
Ok, thanks Marc
Comment 5 Marc Khouzam CLA 2010-05-26 14:10:20 EDT
If you want to try a hack to make your life easier, you can make the below two character change in     
org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakInsert
I think this will make your breakpoints on shared libs work.

   public MIBreakInsert(IBreakpointsTargetDMContext ctx, boolean isTemporary,
                        boolean isHardware, String condition, int ignoreCount, 
                        String location, int tid, boolean disabled, 
                        boolean isTracepoint) {

-               super(ctx, "-break-insert"); //$NON-NLS-1$
+               super(ctx, "-break-insert -f"); //$NON-NLS-1$