diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-10-15 19:15:57 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-10-15 19:15:57 +0000 |
commit | 9e3a7d65fb3252364680128123209e93919aaf14 (patch) | |
tree | 9431985357f122bd2d241b67ccc0a0079f1593b4 /gdb/dwarf2loc.c | |
parent | 21a7b08989a1c860514d5bd840bc29f5ad97d2e6 (diff) | |
download | gdb-9e3a7d65fb3252364680128123209e93919aaf14.zip gdb-9e3a7d65fb3252364680128123209e93919aaf14.tar.gz gdb-9e3a7d65fb3252364680128123209e93919aaf14.tar.bz2 |
gdb/
Fix entry values resolving in inlined frames.
* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Move func_addr,
gdbarch and caller_frame initialization later. Skip INLINE_FRAME
entries of FRAME.
gdb/testsuite/
Fix entry values resolving in inlined frames.
* gdb.arch/amd64-entry-value-inline.S: New file.
* gdb.arch/amd64-entry-value-inline.c: New file.
* gdb.arch/amd64-entry-value-inline.exp: New file.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index e8d39fe..0bdc042 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -980,16 +980,27 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, union call_site_parameter_u kind_u, struct dwarf2_per_cu_data **per_cu_return) { - CORE_ADDR func_addr = get_frame_func (frame); - CORE_ADDR caller_pc; - struct gdbarch *gdbarch = get_frame_arch (frame); - struct frame_info *caller_frame = get_prev_frame (frame); + CORE_ADDR func_addr, caller_pc; + struct gdbarch *gdbarch; + struct frame_info *caller_frame; struct call_site *call_site; int iparams; /* Initialize it just to avoid a GCC false warning. */ struct call_site_parameter *parameter = NULL; CORE_ADDR target_addr; + /* Skip any inlined frames, entry value call sites work between real + functions. They do not make sense between inline functions as even PC + does not change there. */ + while (get_frame_type (frame) == INLINE_FRAME) + { + frame = get_prev_frame (frame); + gdb_assert (frame != NULL); + } + + func_addr = get_frame_func (frame); + gdbarch = get_frame_arch (frame); + caller_frame = get_prev_frame (frame); if (gdbarch != frame_unwind_arch (frame)) { struct minimal_symbol *msym = lookup_minimal_symbol_by_pc (func_addr); |