mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 03:53:43 +01:00
Inline access to initial register values as it's known to be safe.
This commit is contained in:
parent
36511d3d1f
commit
5c2cade264
1 changed files with 4 additions and 8 deletions
|
@ -412,16 +412,12 @@ tdep_trace (unw_cursor_t *cursor, void **buffer, int *size)
|
|||
/* Tell core dwarf routines to call back to us. */
|
||||
d->stash_frames = 1;
|
||||
|
||||
/* Determine initial register values. */
|
||||
/* Determine initial register values. These are direct access safe
|
||||
because we know they come from the initial machine context. */
|
||||
rip = d->ip;
|
||||
rsp = cfa = d->cfa;
|
||||
if (unlikely((ret = dwarf_get (d, d->loc[UNW_X86_64_RBP], &rbp)) < 0))
|
||||
{
|
||||
Debug (1, "returning %d, rbp value not found\n", ret);
|
||||
*size = 0;
|
||||
d->stash_frames = 0;
|
||||
return ret;
|
||||
}
|
||||
ACCESS_MEM_FAST(ret, 0, d, DWARF_GET_LOC(d->loc[UNW_X86_64_RBP]), rbp);
|
||||
assert(ret == 0);
|
||||
|
||||
/* Get frame cache. */
|
||||
if (unlikely(! (cache = trace_cache_get())))
|
||||
|
|
Loading…
Reference in a new issue