|
From: janjust <tja...@un...> - 2012-04-06 20:51:52
|
Is there a way to extract the line number within the source code just prior to a wrapper being called? For instance a FORK or malloc were called in file_name.c at line number x Is it possible to get that info through client requests? I'm thinking something along the lines of passing the instrumented address back to the client just before the wrapper and then using get_filename_linenum(), though i'm not sure if that's the way to do it. any ideas? -- View this message in context: http://old.nabble.com/get-line-number-when-wrappers-are-called-tp33645514p33645514.html Sent from the Valgrind - Users mailing list archive at Nabble.com. |
|
From: Julian S. <js...@ac...> - 2012-04-11 07:49:35
|
On Friday, April 06, 2012, janjust wrote: > Is there a way to extract the line number within the source code just prior > to a wrapper being called? > > For instance a FORK or malloc were called in file_name.c at line number x > > Is it possible to get that info through client requests? > > I'm thinking something along the lines of passing the instrumented address > back to the client just before the wrapper and then using > get_filename_linenum(), though i'm not sure if that's the way to do it. Try the client requests VALGRIND_MAP_IP_TO_SRCLOC or VALGRIND_PRINTF_BACKTRACE ? J |
|
From: janjust <tja...@un...> - 2012-04-11 16:14:25
|
Apologies I think I have grossly misused Valgrind terminology. When I said client I meant the tool rather than the client application. Are these macros still applicable? Thanks for the response! Bugzilla from js...@ac... wrote: > > On Friday, April 06, 2012, janjust wrote: >> Is there a way to extract the line number within the source code just >> prior >> to a wrapper being called? >> >> For instance a FORK or malloc were called in file_name.c at line number x >> >> Is it possible to get that info through client requests? >> >> I'm thinking something along the lines of passing the instrumented >> address >> back to the client just before the wrapper and then using >> get_filename_linenum(), though i'm not sure if that's the way to do it. > > Try the client requests VALGRIND_MAP_IP_TO_SRCLOC or > VALGRIND_PRINTF_BACKTRACE ? > > J > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > -- View this message in context: http://old.nabble.com/get-line-number-when-wrappers-are-called-tp33645514p33669523.html Sent from the Valgrind - Users mailing list archive at Nabble.com. |
|
From: janjust <tja...@un...> - 2012-04-19 15:59:23
|
Just in case anyone runs into a similar problem. what worked for me was to call get_StackTrace() and then simply using the get_filename_linenum on ips[1] (namely the wrapper's callee), works like a charm although I'm not sure if this is the appropriate way of handling this. janjust wrote: > > Is there a way to extract the line number within the source code just > prior to a wrapper being called? > > For instance a FORK or malloc were called in file_name.c at line number x > > Is it possible to get that info through client requests? > > I'm thinking something along the lines of passing the instrumented address > back to the client just before the wrapper and then using > get_filename_linenum(), though i'm not sure if that's the way to do it. > > any ideas? > > > > > -- View this message in context: http://old.nabble.com/get-line-number-when-wrappers-are-called-tp33645514p33715196.html Sent from the Valgrind - Users mailing list archive at Nabble.com. |