[Bug 59276] New: ncurses test program crashes during debug

Guenther Harrasser gideon at huedi.net
Tue Jun 3 12:29:02 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=59276     
           Summary: ncurses test program crashes during debug
           Product: kdevelop
           Version: unspecified
          Platform: Debian testing
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: gideon at huedi.net


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




More information about the KDevelop-devel mailing list