[Dwarf-Discuss] Location list entries for caller-saved registers at time of call

Jakub Jelinek jakub at redhat.com
Fri Dec 7 04:54:37 PST 2018


On Fri, Dec 07, 2018 at 12:36:39PM +0000, David Stenberg via Dwarf-Discuss wrote:

For calls, we need to distinguish the locations that are valid in the caller
on the call instruction before the call instruction has been executed, then
locations that are valid while inside of the call and finally locations that
are valid after the call has returned.
The 3 can differ, before the call instruction has been executed the
locations can include registers clobbered by the call, during the call they
can't, as the call could have clobbered them already.  Call-saved registers
aren't a problem, there is unwind info in the callee how to restore that and
the debugger can unwind to the caller.  As GCC generally doesn't track the
length of the call instruction, it uses that end of call instruction - 1
as the label somewhere in the middle of the call instruction, so at the
start of the call instruction can be some locations, during the call other
set and right after the call another set.

	Jakub


More information about the Dwarf-Discuss mailing list