How to create c++ object via new operator in gdb.
I am looking for something similar to
option-1) (gdb) call new ClassType()
or
option-2) (gdb) set $obj = new ClassType()
But both of these options failing in gdb.
How to create c++ object via new operator in gdb.
I am looking for something similar to
option-1) (gdb) call new ClassType()
or
option-2) (gdb) set $obj = new ClassType()
But both of these options failing in gdb.
Try this way:
set var $new = malloc(sizeof(class ClassType))
call ClassType::ClassType($var)