Le 09/02/2018 à 13:32, Joerg Sonnenberger a écrit :
On Fri, Feb 09, 2018 at 11:23:17AM +0100, Maxime Villard wrote:
It implies that if a bug occurs _before_ these two instructions are executed,
we have a %rbp that points to the _previous_ function, the one we got called
from. And therefore, GDB does not display the current function (where the bug
actually happened), but displays its caller.


This analysis is wrong. GDB will first of all look for frame annotation
data, i.e. .eh_frame or the corresponding .debug_frame. Only if it can't
find such annotation will it fall back to guessing from the function
itself. We default to building .eh_frame for all binaries, but I'm not
completely sure if GCC will create async unwind tables by default.

I'll have to re-check the GDB code, but that the previous function was
displayed and not the current one is the conclusion I came to back then. Will
verify tomorrow.

Maxime

Reply via email to