This is a bug request to add support for using 'new' with convenience variables. It seems that gdb has support for using 'malloc' with convenience variables (thanks tromey for pointing that out!), so while debugging a program written in C I can get the value of out parameters by doing something like this at the gdb command line: > set $mystr = malloc(1000 * sizeof(char)) > get_some_str($mystr) > p $mystr It seems that gdb does not yet support using 'new' with convenience variables though, so it's not possible to do the same thing for code written in C++ where the out parameter is some class type. The code I have to deal with involves digging down through a horrible mess of an object graph and into nasty hash table code to get to the data I typically want, so support for 'new' would certainly be a great help. :-)
I thought there were a lot of similar bug reports, but I can't find them... I second this. The fact that you can't create a new std::string, for instance, is really limiting!
I have a partial patch for 'new'. I plan to also implement 'delete'.
'delete' relies on this being fixed: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37237