Bug 59276

Summary: ncurses test program crashes during debug
Product: [Applications] kdevelop Reporter: Guenther Harrasser <gideon>
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.0.0a4   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Guenther Harrasser 2003-06-03 12:28:18 UTC
Version:           3.0.0a4 (using KDE KDE 3.1.2)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 3.3 linux 2.4.21-rc1
OS:          Linux

I want to debug a application using the ncurses library.
But the debugger crashes during the initscr() call.

For example...

#include <iostream>
#include <cstdlib>

#include <ncurses.h>

int main(int argc, char *argv[])
{
  initscr();
  endwin();
  printf("quit\n");
  return EXIT_SUCCESS;
}


I set a breakpoint at initscr() and when i step over this line the debugged terminal crashes immediately.
I'm using the seperate IO Terminal.

When i call the whole thing from the shell with the same gdb-calls it works fine.

Debugging Shell is /usr/bin/libtool.

Debbugger output:

/bin/sh -c /usr/bin/libtool gdb /home/huedi/test/test/src/test -fullname -nx -quiet
(gdb) set edit off 
(gdb) set confirm off 
(gdb) (gdb) 
(gdb) set print static-members off 
(gdb) tty /dev/pts/1 
(gdb) set width 0 
(gdb) set height 0 
(gdb) set stop-on 1 
(gdb) handle SIG32 pass nostop noprint 
(gdb) handle SIG43 pass nostop noprint 
(gdb) set print asm-demangle on 
(gdb) cd /home/huedi/test/test/src 
(gdb) break test.cpp:12 
Breakpoint 1 at 0x80486a9: file test.cpp, line 12.
(gdb) run 
Stopped due to shared library event
(gdb) continue 
Stopped due to shared library event
(gdb) continue 
Stopped due to shared library event
(gdb) continue 

Breakpoint 1, main (argc=1, argv=0xbffffca4) at test.cpp:12
/home/huedi/test/test/src/test.cpp:12:146:beg:0x80486a9
(gdb) backtrace 
#0  main (argc=1, argv=0xbffffca4) at test.cpp:12
(gdb) info breakpoints 
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x080486a9 in main at test.cpp:12
	breakpoint already hit 1 time

... and here i hit step over and my test-app crashes.

cu Huedi
Comment 1 Matt Rogers 2004-12-16 07:34:53 UTC
Please attempt to reproduce with a newer version of KDevelop (the latest released stable version is KDevelop 3.1.2).
Comment 2 Joe Button 2005-01-04 22:00:10 UTC
The test code compiled and could be run and stepped-through fine on Kdevelop 3.1.2. So I guess it's fixed.
Comment 3 Matt Rogers 2005-01-04 22:07:33 UTC
*** Bug has been marked as fixed ***.