|
From: Siddharth N. <sn...@dr...> - 2012-08-06 04:59:27
|
I tried this other method and it worked fine. Thanks for the workaround. Exporting the VALGRIND_LAUNCHER variable and directly running gdb on the tool executable seems to cause this problem. And the problem seems to have something to do with redirecting mallocs from the user program in my environment. It didn't seem to happen in my environment the many months prior to this, so I'll have to see what changed recently. Similar issues have been encountered from trying something totally different: http://comments.gmane.org/gmane.comp.debugging.valgrind.devel/16433 On 5 August 2012 06:22, Philippe Waroquiers <phi...@sk...>wrote: > On Sat, 2012-08-04 at 21:29 -0400, Siddharth Nilakantan wrote: > > > > Debugging callgrind is what I wanted to do. I made some modifications > > to Callgrind for a research project. > > I was debugging some changes I recently made, when I saw this issue, > > the first step was to test unmodified source with gdb. > > Following README_DEVELOPERS, even the pwd example doesn't seem to be > > working: > I am using the --wait-for-gdb=yes technique documented in the > README_DEVELOPERS (tested on x86), just launching a gdb and > attaching to the Valgrind which is in the 'wait for gdb' loop: > > GNU gdb (GDB) 7.4 > Copyright (C) 2012 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > 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 "i686-pc-linux-gnu". > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>. > (gdb) attach 25875 > Attaching to process 25875 > Reading symbols from > /home/philippe/valgrind/trunk_untouched/callgrind/callgrind-x86-linux...done. > Failed to read a valid object file image from memory. > 0x38025e13 in valgrind_main (argc=0, argv=0x0, envp=0x2) at m_main.c:2017 > 2017 __asm__ __volatile__("" ::: "memory","cc"); > (gdb) break main.c:1829 > Breakpoint 1 at 0x380123bc: file main.c, line 1829. > (gdb) c > Continuing. > > Program received signal SIGSEGV, Segmentation fault. > 0x631100a5 in ?? () > (gdb) c > Continuing. > > Breakpoint 1, finish () at main.c:1829 > 1829 CLG_(sprint_eventmapping)(buf, CLG_(dumpmap)); > (gdb) bt > #0 finish () at main.c:1829 > #1 0x38028f5a in shutdown_actions_NORETURN (tid=1, > tids_schedretcode=VgSrc_ExitThread) at m_main.c:2448 > #2 0x3809d6ca in run_a_thread_NORETURN (tidW=1) > at m_syswrap/syswrap-linux.c:199 > #3 0x00000000 in ?? () > (gdb) > > > > |