This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: addr2line ends up off by 1 line numbers when -O0 is used


On Thu, Mar 17, 2016 at 6:15 PM, Britton Kerin <britton.kerin@gmail.com> wrote:
> I'm not sure whether to blame libc (backtrace() function) or gcc or
> addr2line, but
> if I dump the pointers from backtrace() to address_file then use
>
> addr2line -e my_exe -f -i <address_file >call_locations
>
> to recover the line numbers, the line numbers are off by 1 statement
> for some stack frames when -O0 has been used, but not if -O2 has been
> used at compile time.

I think addr2line is Binutils, http://www.gnu.org/software/binutils/.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]