|
From: Julian S. <js...@ac...> - 2009-10-11 08:42:40
|
On Saturday 10 October 2009, John Reiser wrote:
> ----- memcheck/mc_main.c; set_address_range_perms()
> VG_(message)(Vg_UserMsg, "Warning: set address range perms: "
> "large range [0x%lx, 0x%lx) (%s)\n",
> Plant a breakpoint on that message in set_address_range_perms(). When it
> triggers, then print a stack trace of the user application via
> (gdb) p vgPlain_get_and_pp_StackTrace(vgPlain_get_running_tid(), 10)
A simpler version of this, that doesn't involve GDB is: after
VG_(message)(Vg_UserMsg, "Warning: set address range perms: "
"large range [0x%lx, 0x%lx) (%s)\n",
a, a + lenT, s);
(in mc_main.c) add
VG_(get_and_pp_StackTrace)( VG_(get_running_tid)(), 10 )
rebuild and rerun. 10 is the number of frames to show.
A generally better suggestion for space profiling ("who eat
all the memory?" kind of questions) is to use the Massif tool.
See http://www.valgrind.org/docs/manual/ms-manual.html
J
|