|
From: WAROQUIERS P. <phi...@eu...> - 2011-09-09 08:15:14
|
>Subject: [Valgrind-users] client request for naming JITted functions > >Is there any way I can tell valgrind/callgrind that an executable >memory region belongs to a particular function "f"? (As in, I want to >provide the name of the function as a char*). And preferably, have >that information forgotten when I do VALGRIND_DISCARD_TRANSLATIONS (or >another client request specific for this purpose.) > >I don't see anything in my valgrind.h or callgrind.h, but I'm >at version 3.5.0. I suppose that you want this to ensure that errors reported by Valgrind are referencing the JITed function name. To my knowledge, there is nothing. I remember seeing a note somewhere telling it would be nice to support better info for JITed code. As part of the integration of gdbserver in 3.7.0, I somewhat looked at what is currently going on this aspect in gdb: in gdb (7.4, under developmnet), an API is being defined to let the JIT compiler provide (easily) a subset of the debug information sufficient to let gdb to stack trace and similar. (search on the web for "jit-reader.h" for details). If more advanced debugging is needed, the JIT compiler is supposed to generate dwarf info for gdb. I guess that one way to have better support for JITted code in Valgrind would be to intercept/hook on the same API. Philippe ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |