Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315084 - Run to line in another function causes resume and error at suspend
Summary: Run to line in another function causes resume and error at suspend
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-cdi-gdb (show other bugs)
Version: 6.0.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 10:20 EDT by Samuel Hultgren CLA
Modified: 2017-10-23 13:45 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 Samuel Hultgren CLA 2010-05-31 10:20:12 EDT
Build Identifier: 20100218-1602

When using the run-to-line function to run to code inside of another function than the active one, it behaves as continue/Resume instead. Unable to pause/suspend the execution for further debugging/stepping.

After run-to-line command has been given, and you press suspend, the following message is displayed:
Execution is suspended because of error:
Quit (expect signal SIGINT when the program is resumed)

Reproducible: Always

Steps to Reproduce:
1. Use following code in a standard empty c project:
#include<stdio.h>

int test(int e) {
	return ++e;
}

int main(void){
	int i = 0;
	while (1) {
		if (i % 100000 == 0)
			printf("i: %d\n", i);
		i = test(i);
	}
	return 0;
}

2. Start the debug session with gdb and stop at main
3. Place the cursor on line 11 (printf line) and press Ctrl+r or right-click and choose run to line. This works.
4. Now, place the cursor on line 4 (return statement of test()) and press Ctrl+r or right click and choose run to line. The debugger now is resumed and never gets to the return statement.

If we pause/suspends the execution the following message is displayed:
Execution is suspended because of error:
Quit (expect signal SIGINT when the program is resumed)
Comment 1 Marc Khouzam CLA 2010-05-31 13:55:41 EDT
For CDI-GDB, the run-to-line support does not work if you select another method.  This is because is uses -exec-until which does not stop in that case.  If you use DSF-GDB instead, it will work as you expect.

As for the interrupting, I'm not sure about it too much but I know there has been lots of efforts to improve things for Helios as part of Bug 304096.
Comment 2 Jonah Graham CLA 2017-10-23 13:45:50 EDT
(this is part of a batch change)

The CDI debug implementation has been removed in CDT 9.0. Please see bug 484900 and the entry on the New and Noteworthy page https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications