gdb/
[deliverable/binutils-gdb.git] / gdb / dwarf2loc.c
index e8d39feb8e4b93cba688bba384ba67491f763d66..cadcc17e0bdfcf7621d5327dab744cda4a341d22 100644 (file)
@@ -980,16 +980,24 @@ 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;
 
+  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);
This page took 0.023873 seconds and 4 git commands to generate.