Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312579 - Debug session hangs due to too much output
Summary: Debug session hangs due to too much output
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-cdi-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 06:33 EDT by Marc Khouzam CLA
Modified: 2017-10-23 13:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2010-05-12 06:33:50 EDT
When I run CDI with GDB 6.8 or 7.0 on Windows 7 (I didn't try anything else), I can hang the debug session by stepping over a method that creates a lot of output.

1- Debug the program below on Windows with CDI (maybe affects Linux too?)
2- step over the call to 'foo(0)'
=> the debug session hands
   the _inferior_ console shows a *stopped event which makes me guess that is the event that CDI misses and that is why it hangs.

#include <stdio.h>

void foo(int i) {
	if (i >= 200) return;
	foo(i+1);
	printf("The value of the integer variable i is %d\n", i);
}

int main() {
    int de = 99;
    foo(0);
    return 0;
}
Comment 1 Marc Khouzam CLA 2010-05-12 06:35:50 EDT
The is the trailing end of the inferior console


The value of the integer variable i is 9
The value of the integer variable i is 8
The value of the integer varia*stopped,reason="end-stepping-range",frame={addr="0x004013e5",func="main",args=[],file="..\\src\\TestDSFGDB.c",fullname="C:/Users/Marc/runtime-DSFGDB/Test DSFGDB/.settings/..\\src\\TestDSFGDB.c",line="12"},thread-id="1",stopped-threads="all"
Comment 2 Marc Khouzam CLA 2010-05-12 06:38:11 EDT
I just noticed that the inferior output also is printed in the GDB console!
Comment 3 Marc Khouzam CLA 2010-05-12 09:17:30 EDT
I can reproduce this on Linux when I turn off "Connect I/O to terminal"

The GDB output has the *stopped event right in the middle of a printout

...
[1,273,670,114,345] out of fool 176,0
[1,273,670,114,345] out of fool 175,0
[1,273,670,114,346] out of fool 174*stopped,reason="end-stepping-range",frame={addr="0x08048c43",fun\
c="main",args=[],file="../src/DSFTestApp.cpp",fullname="/local/lmckhou/runtime-TestDSF/DSFTestApp/sr\
c/DSFTestApp.cpp",line="664"},thread-id="1",stopped-threads="all"
[1,273,670,114,346] (gdb)
Comment 4 Jonah Graham CLA 2017-10-23 13:40:02 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