Bug 158522

Summary: debuggerAbnormalExit debugger abnormal exit with watch expression std::string
Product: [Applications] kdevelop Reporter: Vlad Brovko <brovushkin>
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.5.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: test project

Description Vlad Brovko 2008-02-27 23:33:40 UTC
Version:           3.5.0 (using KDE 3.5.9)
Installed from:    Gentoo Packages
Compiler:          g++ (GCC) 4.2.3 (Gentoo 4.2.3 p1.0) USE="cvs debug java perl php python ruby sql subversion -ada -arts -clearcase -fortran -haskell -pascal -perforce -xinerama"
OS:                Linux

How to Reproduce:

1. compile this source with -ggdb
2. start debug
3. set breakpoint to test1() at line "std::cout << s << std::endl;"
4. start debug (F9)
5. add watch "s" (variable s)
6. expand tree: [Watch]-[s]-[_M_dataplus]
7. step over (F10) - result debugger abnormal exit

I compile kdevelop source and trace: function slotDbgProcessExited execute debuggerAbnormalExit
gdb abnormal exit after command lool like this: "kdevelop (debugger): SEND: -var-delete "KDEV8.private._M_dataplus""

Expected Behaviour:
debugger don't abnormal exit :)

#include <stdio.h>
#include <iostream>

void test1()
{
	for (int i = 0; i != 2; ++i)
	{
		char c[16];
		sprintf(c, "test - %d", i);
		std::string s = c;
		std::cout << s << std::endl;
	}
}

int main(int argc, char *argv[])
{
	test1();
	std::cout << "finish" << std::endl;

	return 0;
}
Comment 1 Vlad Brovko 2008-02-27 23:36:20 UTC
Created attachment 23733 [details]
test project

I use x86_64 linux desktop
Comment 2 Andreas Pakulat 2009-07-24 21:47:02 UTC
fixed in kdev4