GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/zoli/Projects/proba/gdb/a.out...done. (gdb) Temporary breakpoint 1 at 0x4006a4: file a.cc, line 29. Starting program: /home/zoli/Projects/proba/gdb/a.out Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe188) at a.cc:29 29 MyClassBase *myClass = new MyClass(); (gdb) 30 MyVal m; (gdb) 31 m = myClass->getMyVal(); (gdb) $1 = {_vptr.MyClassBase = 0x4008e0} (gdb) (gdb) $2 = {val = 6299664} (gdb) (gdb) $3 = {_vptr.MyClassBase = 0x20fe1} (gdb) (gdb) Cannot access memory at address 0x20fe1 (gdb) (gdb) quit A debugging session is active. Inferior 1 [process 3144] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal]