|
From: Paul M. <pau...@us...> - 2013-02-14 13:59:56
Attachments:
signature.asc
|
Dear Valgrind users, how can I find out if a binary was compiled with `-fomit-frame-pointers` or not? Thanks, Paul |
|
From: Tom H. <to...@co...> - 2013-02-14 14:14:39
|
On 14/02/13 13:59, Paul Menzel wrote: > how can I find out if a binary was compiled with `-fomit-frame-pointers` > or not? You can't easily - it's not a either/or thing anyway. Different object files that are linked into the binary may have been compiled with and without it. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: John R. <jr...@bi...> - 2013-02-14 14:28:24
|
> how can I find out if a binary was compiled with `-fomit-frame-pointers` > or not? Inspect the DWARF debug info to see if the frame pointer register has the usual annotation for being updated as a frame pointer. If no debug info, then disassemble subroutines until a "set the frame pointer" sequence is found. A leaf subroutine (one that calls no other subroutine) might not use a frame pointer regardless of the command-line flag, so it might be necessary to disassemble every routine. Note that an executable main program may have been created from multiple separately-compiled units (.o files), and each unit might have its own setting. -- |