Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344636 - [breakpoints] Breakpoints disappear when restarting the inferior
Summary: [breakpoints] Breakpoints disappear when restarting the inferior
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 15:36 EDT by Marc Khouzam CLA
Modified: 2011-05-03 21:23 EDT (History)
2 users (show)

See Also:


Attachments
Fix (4.27 KB, patch)
2011-05-03 21:03 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-05-03 15:36:50 EDT
1- launch an application with GDB >= 7.2
2- set a breakpoint
3- restart the process
4- notice that the breakpoint is no longer installed in GDB

I believe I broke this in Bug 336890, because we uninstall breakpoints once a process exits, but we do not re-install them when it restarts.

I don't think that an uninstall/re-install approach will work because we need to re-install the breakpoints before the process starts, to make sure they are ready.  In the case of a restart, it means we need re-install them before the process dies, since the process dies and restarts in a single GDB operation.  So, we would install the breakpoints, but once we did the restart, we would detect the process death and we would uninstall the breakpoints!

Instead, I think we should avoid uninstalling breakpoints in the case of a restart.
Comment 1 Marc Khouzam CLA 2011-05-03 21:03:13 EDT
Created attachment 194661 [details]
Fix

This patch keeps a set of processes that are being restarted and for those processes, we do not uninstall breakpoints.

I used a set although we currently can only restart one process at a time.  If we ever support restarting multiple processes at once (using multi-select for example), we would need such a set.

Committed to HEAD.
Comment 2 Marc Khouzam CLA 2011-05-03 21:03:42 EDT
Fixed