> I defined a gdb-macro for this: > > define get_vbits > printf "# mon get_vbits 0x%lx 0x%lx\n" , &$arg0 , sizeof($arg0) > eval "mon get_vbits 0x%lx 0x%lx" , &$arg0 , sizeof($arg0) > end > > Then I can run: > (gdb) get_vbits i_Cond > # mon get_vbits 0xffefff8bf 0x1 > 00 > (gdb)
Thanks for the hints. The sizeof() only works for variables, not pointers, right? gdb should not know about the size of the allocated memory, but valgrind should know that, since it checks for out-of-bounds access. Is this correct? > For the case above, you should check the instruction triggering the error. > (gdb) x/i $rip > > Then you know in what register to look for. with the complete > disassembly you might be able to track down what it exactly was. > Then look near the problematic instruction. > (gdb) disassemble /m > > I think there was also some option to switch valgrind so that the > definedness of registers can be checked: --vgdb-shadow-registers=yes -- João M. S. Silva ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users