From f3be411bc8aa87eaa8d8d4510fc529f0f1e1be93 Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Fri, 19 May 2017 18:22:08 -0500 Subject: [PATCH] Use the register_state version of ret_addr_column, rather than the cursor version, for frame-stashing. They have the same value in master. --- src/aarch64/Gstash_frame.c | 4 ++-- src/arm/Gstash_frame.c | 4 ++-- src/x86_64/Gstash_frame.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/aarch64/Gstash_frame.c b/src/aarch64/Gstash_frame.c index 4d4119bd..6a8d8ab3 100644 --- a/src/aarch64/Gstash_frame.c +++ b/src/aarch64/Gstash_frame.c @@ -39,7 +39,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) rs->where[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_OFF_COLUMN], - DWARF_GET_LOC(d->loc[d->ret_addr_column]), + DWARF_GET_LOC(d->loc[rs->ret_addr_column]), rs->where[FP], rs->val[FP], DWARF_GET_LOC(d->loc[FP]), rs->where[LR], rs->val[LR], DWARF_GET_LOC(d->loc[LR]), rs->where[SP], rs->val[SP], DWARF_GET_LOC(d->loc[SP])); @@ -55,7 +55,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) && (rs->val[DWARF_CFA_REG_COLUMN] == FP || rs->val[DWARF_CFA_REG_COLUMN] == SP) && labs(rs->val[DWARF_CFA_OFF_COLUMN]) < (1 << 29) - && d->ret_addr_column == LR + && rs->ret_addr_column == LR && (rs->where[FP] == DWARF_WHERE_UNDEF || rs->where[FP] == DWARF_WHERE_SAME || (rs->where[FP] == DWARF_WHERE_CFAREL diff --git a/src/arm/Gstash_frame.c b/src/arm/Gstash_frame.c index b731d28d..576273be 100644 --- a/src/arm/Gstash_frame.c +++ b/src/arm/Gstash_frame.c @@ -39,7 +39,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) rs->where[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_OFF_COLUMN], - DWARF_GET_LOC(d->loc[d->ret_addr_column]), + DWARF_GET_LOC(d->loc[rs->ret_addr_column]), rs->where[R7], rs->val[R7], DWARF_GET_LOC(d->loc[R7]), rs->where[LR], rs->val[LR], DWARF_GET_LOC(d->loc[LR]), rs->where[SP], rs->val[SP], DWARF_GET_LOC(d->loc[SP])); @@ -55,7 +55,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) && (rs->val[DWARF_CFA_REG_COLUMN] == R7 || rs->val[DWARF_CFA_REG_COLUMN] == SP) && labs(rs->val[DWARF_CFA_OFF_COLUMN]) < (1 << 29) - && d->ret_addr_column == LR + && rs->ret_addr_column == LR && (rs->where[R7] == DWARF_WHERE_UNDEF || rs->where[R7] == DWARF_WHERE_SAME || (rs->where[R7] == DWARF_WHERE_CFAREL diff --git a/src/x86_64/Gstash_frame.c b/src/x86_64/Gstash_frame.c index 861a346d..e893227c 100644 --- a/src/x86_64/Gstash_frame.c +++ b/src/x86_64/Gstash_frame.c @@ -37,7 +37,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) rs->where[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_REG_COLUMN], rs->val[DWARF_CFA_OFF_COLUMN], - DWARF_GET_LOC(d->loc[d->ret_addr_column]), + DWARF_GET_LOC(d->loc[rs->ret_addr_column]), rs->where[RBP], rs->val[RBP], DWARF_GET_LOC(d->loc[RBP]), rs->where[RSP], rs->val[RSP], DWARF_GET_LOC(d->loc[RSP])); @@ -68,7 +68,7 @@ tdep_stash_frame (struct dwarf_cursor *d, struct dwarf_reg_state *rs) && (rs->val[DWARF_CFA_REG_COLUMN] == RBP || rs->val[DWARF_CFA_REG_COLUMN] == RSP) && labs((long) rs->val[DWARF_CFA_OFF_COLUMN]) < (1 << 28) - && DWARF_GET_LOC(d->loc[d->ret_addr_column]) == d->cfa-8 + && DWARF_GET_LOC(d->loc[rs->ret_addr_column]) == d->cfa-8 && (rs->where[RBP] == DWARF_WHERE_UNDEF || rs->where[RBP] == DWARF_WHERE_SAME || (rs->where[RBP] == DWARF_WHERE_CFAREL