2007-06-09 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Sat, 9 Jun 2007 14:15:52 +0000 (14:15 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sat, 9 Jun 2007 14:15:52 +0000 (14:15 +0000)
* gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
* symtab.c (find_function_start_sal, in_prologue): Likewise.
* linespec.c (minsym_found): Likewise.
* infrun.c (step_into_function): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/infrun.c
gdb/linespec.c
gdb/symtab.c

index 99a1922..c2dab55 100644 (file)
@@ -1,5 +1,13 @@
 2007-06-09  Markus Deuling  <deuling@de.ibm.com>
 
+       * gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
+       * symtab.c (find_function_start_sal, in_prologue): Likewise.
+       * linespec.c (minsym_found): Likewise.
+       * infrun.c (step_into_function): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
+2007-06-09  Markus Deuling  <deuling@de.ibm.com>
+
        * gdbarch.sh (NAME_OF_MALLOC): Replace by gdbarch_name_of_malloc.
        * valops.c (value_allocate_space_in_inferior): Likewise.
        * gdbarch.c, gdbarch.h: Regenerate.
index af1488b..2b44c82 100644 (file)
@@ -1220,12 +1220,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
                       (long) current_gdbarch->skip_permanent_breakpoint);
-#ifdef SKIP_PROLOGUE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "SKIP_PROLOGUE(ip)",
-                      XSTRING (SKIP_PROLOGUE (ip)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: skip_prologue = <0x%lx>\n",
                       (long) current_gdbarch->skip_prologue);
index 81c4f2c..bd28b19 100644 (file)
@@ -669,12 +669,6 @@ extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
-#if !defined (GDB_TM_FILE) && defined (SKIP_PROLOGUE)
-#error "Non multi-arch definition of SKIP_PROLOGUE"
-#endif
-#if !defined (SKIP_PROLOGUE)
-#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
-#endif
 
 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
index 21a48d7..2f7a7f5 100755 (executable)
@@ -541,7 +541,7 @@ f:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_
 F:=:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:regcache
 
 #
-f:=:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
+f::CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
 f::int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
 f:=:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
 M::CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
index db2c4a9..3c64156 100644 (file)
@@ -2709,7 +2709,8 @@ step_into_function (struct execution_control_state *ecs)
 
   s = find_pc_symtab (stop_pc);
   if (s && s->language != language_asm)
-    ecs->stop_func_start = SKIP_PROLOGUE (ecs->stop_func_start);
+    ecs->stop_func_start = gdbarch_skip_prologue
+                            (current_gdbarch, ecs->stop_func_start);
 
   ecs->sal = find_pc_line (ecs->stop_func_start, 0);
   /* Use the step_resume_break to step until the end of the prologue,
index 4950d37..dc003e5 100644 (file)
@@ -1834,7 +1834,8 @@ minsym_found (int funfirstline, struct minimal_symbol *msymbol)
   if (funfirstline)
     {
       values.sals[0].pc += DEPRECATED_FUNCTION_START_OFFSET;
-      values.sals[0].pc = SKIP_PROLOGUE (values.sals[0].pc);
+      values.sals[0].pc = gdbarch_skip_prologue
+                           (current_gdbarch, values.sals[0].pc);
     }
   values.nelts = 1;
   return values;
index c99c59a..8f3aa60 100644 (file)
@@ -2521,20 +2521,21 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
     {                          /* skip "first line" of function (which is actually its prologue) */
       asection *section = SYMBOL_BFD_SECTION (sym);
       /* If function is in an unmapped overlay, use its unmapped LMA
-         address, so that SKIP_PROLOGUE has something unique to work on */
+         address, so that gdbarch_skip_prologue has something unique to work
+         on */
       if (section_is_overlay (section) &&
          !section_is_mapped (section))
        pc = overlay_unmapped_address (pc, section);
 
       pc += DEPRECATED_FUNCTION_START_OFFSET;
-      pc = SKIP_PROLOGUE (pc);
+      pc = gdbarch_skip_prologue (current_gdbarch, pc);
 
       /* For overlays, map pc back into its mapped VMA range */
       pc = overlay_mapped_address (pc, section);
     }
   sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
 
-  /* Check if SKIP_PROLOGUE left us in mid-line, and the next
+  /* Check if gdbarch_skip_prologue left us in mid-line, and the next
      line is still part of the same function.  */
   if (sal.pc != pc
       && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end
@@ -4022,7 +4023,7 @@ in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
      - The minimal symbols and partial symbols, which can usually tell
        us the starting and ending addresses of a function.
      - If we know the function's start address, we can call the
-       architecture-defined SKIP_PROLOGUE function to analyze the
+       architecture-defined gdbarch_skip_prologue function to analyze the
        instruction stream and guess where the prologue ends.
      - Our `func_start' argument; if non-zero, this is the caller's
        best guess as to the function's entry point.  At the time of
@@ -4040,7 +4041,7 @@ in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
       if (! func_start)
        return 1;               /* We *might* be in a prologue.  */
 
-      prologue_end = SKIP_PROLOGUE (func_start);
+      prologue_end = gdbarch_skip_prologue (current_gdbarch, func_start);
 
       return func_start <= pc && pc < prologue_end;
     }
@@ -4064,7 +4065,8 @@ in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
       /* We don't have any good line number info, so use the minsym
         information, together with the architecture-specific prologue
         scanning code.  */
-      CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr);
+      CORE_ADDR prologue_end = gdbarch_skip_prologue
+                                (current_gdbarch, func_addr);
 
       return func_addr <= pc && pc < prologue_end;
     }