This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB C plugin system, and STL container viewer as an example


Le vendredi 23 mai 2008 Ã 18:43 +0400, Vladimir Prus a Ãcrit :

> 
> What happens for vector< vector<int> >? It does not seem like you handle the
> inner items.
> 

I do, my plugin can handle this kind of STL type imbrication.

> > 
> > It seems to work well into KDevelop 
> 
> Strange, I don't know any codepath in KDevelop 3.5 that could possible handle this.
> Which version did you try with?
> 

3.5.1

indeed, it seems there is a problem with KDevelop

If you try a very simple project like that :

#include <vector>

int main(int, char **)
{
	std::vector<int> v;
	ïv.push_back(1);
	ïv.push_back(2);
	ïv.push_back(3);
	ïv.push_back(4);
	v[2]=5;
	*(v.begin()) = 6;
	return 0;
}

	in KDevelop, place a breakpoint on the "v.push_back(2);" line, add a
watch expression to 'v'.

	Expand local and watch views of 'v' variable. Then step line by line,
and you'll see that 'watch' part is correctly updated, whereas 'local'
part is not.

	Could it be fixed by something in my GDB patch, or is it a KDevelop
problem, ie does KDevelop assumes that an array never changes its size ?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]