2007-06-18 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 Jun 2007 18:23:08 +0000 (18:23 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 Jun 2007 18:23:08 +0000 (18:23 +0000)
* gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Replace by
gdbarch_deprecated_function_start_offset.
* symtab.c (find_function_start_sal)skip_prologue_using_sal): Likewise.
* linespec.c (minsym_found): Likewise.
* infrun.c (handle_inferior_event): Likewise.
* infcall.c (find_function_addr): Likewise.
* cli/cli-cmds.c (disassemble_command): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/infcall.c
gdb/infrun.c
gdb/linespec.c
gdb/symtab.c

index 0f687f7317da4eab3d74401087980b62b20659a8..08a19e710e5be309ede54698c4a61afc320c3c82 100644 (file)
@@ -1,3 +1,14 @@
+2007-06-18  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Replace by
+       gdbarch_deprecated_function_start_offset.
+       * symtab.c (find_function_start_sal)skip_prologue_using_sal): Likewise.
+       * linespec.c (minsym_found): Likewise.
+       * infrun.c (handle_inferior_event): Likewise.
+       * infcall.c (find_function_addr): Likewise.
+       * cli/cli-cmds.c (disassemble_command): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-18  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Replace by
index 611f1262fd4706cf7303caf8231a803ed1da85b4..df83e8cdf4e2ad8945ab1a9f127cf63bd989bc56 100644 (file)
@@ -925,7 +925,7 @@ disassemble_command (char *arg, int from_tty)
        /* FIXME: cagney/2004-02-07: This should be an observer.  */
        low = tui_get_low_disassembly_address (low, pc);
 #endif
-      low += DEPRECATED_FUNCTION_START_OFFSET;
+      low += gdbarch_deprecated_function_start_offset (current_gdbarch);
     }
   else if (!(space_index = (char *) strchr (arg, ' ')))
     {
@@ -940,7 +940,7 @@ disassemble_command (char *arg, int from_tty)
        /* FIXME: cagney/2004-02-07: This should be an observer.  */
        low = tui_get_low_disassembly_address (low, pc);
 #endif
-      low += DEPRECATED_FUNCTION_START_OFFSET;
+      low += gdbarch_deprecated_function_start_offset (current_gdbarch);
     }
   else
     {
index 4f92ffc33d8fccad81a698e9318d2bc2a14f06ef..60acc18cc60745ed66f4c1e583d6cfcab9398c7e 100644 (file)
@@ -730,11 +730,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_fp_regnum = %s\n",
                       paddr_d (current_gdbarch->deprecated_fp_regnum));
-#ifdef DEPRECATED_FUNCTION_START_OFFSET
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
-                      XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
                       paddr_nz (current_gdbarch->deprecated_function_start_offset));
index de37e84972d7b4c85e6fc44c3e82186d6b33c13b..c9a5d8ab59a67586cbdf64c77eee417a80d769d5 100644 (file)
@@ -459,19 +459,13 @@ extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR
 /* A function can be addressed by either it's "pointer" (possibly a
    descriptor address) or "entry point" (first executable instruction).
    The method "convert_from_func_ptr_addr" converting the former to the
-   latter.  DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+   latter.  gdbarch_deprecated_function_start_offset is being used to implement
    a simplified subset of that functionality - the function's address
    corresponds to the "function pointer" and the function's start
    corresponds to the "function entry point" - and hence is redundant. */
 
 extern CORE_ADDR gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch);
 extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_FUNCTION_START_OFFSET)
-#error "Non multi-arch definition of DEPRECATED_FUNCTION_START_OFFSET"
-#endif
-#if !defined (DEPRECATED_FUNCTION_START_OFFSET)
-#define DEPRECATED_FUNCTION_START_OFFSET (gdbarch_deprecated_function_start_offset (current_gdbarch))
-#endif
 
 /* Return the remote protocol register number associated with this
    register.  Normally the identity mapping. */
index c81e9bc10528a59d07ca3eb5190b0701b9b4bebb..584c0a44b56d8c961f7cc2bad12d58afa962296d 100755 (executable)
@@ -528,12 +528,12 @@ v::CORE_ADDR:decr_pc_after_break:::0:::0
 # A function can be addressed by either it's "pointer" (possibly a
 # descriptor address) or "entry point" (first executable instruction).
 # The method "convert_from_func_ptr_addr" converting the former to the
-# latter.  DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+# latter.  gdbarch_deprecated_function_start_offset is being used to implement
 # a simplified subset of that functionality - the function's address
 # corresponds to the "function pointer" and the function's start
 # corresponds to the "function entry point" - and hence is redundant.
 
-v:=:CORE_ADDR:deprecated_function_start_offset:::0:::0
+v::CORE_ADDR:deprecated_function_start_offset:::0:::0
 
 # Return the remote protocol register number associated with this
 # register.  Normally the identity mapping.
index f7f75f4fd37dac42248f0cc664319f7b8d21326b..537596984c159216dcf526e6b02f57d441265780 100644 (file)
@@ -232,7 +232,7 @@ find_function_addr (struct value *function, struct type **retval_type)
 
   if (retval_type != NULL)
     *retval_type = value_type;
-  return funaddr + DEPRECATED_FUNCTION_START_OFFSET;
+  return funaddr + gdbarch_deprecated_function_start_offset (current_gdbarch);
 }
 
 /* Call breakpoint_auto_delete on the current contents of the bpstat
index 1557dc70f419e9d2216acdab1ec6b8fd83cfbddb..bad50a1eca07ad0e3b37d8871bf60c1b3b0f560d 100644 (file)
@@ -1807,7 +1807,8 @@ handle_inferior_event (struct execution_control_state *ecs)
      will both be 0 if it doesn't work.  */
   find_pc_partial_function (stop_pc, &ecs->stop_func_name,
                            &ecs->stop_func_start, &ecs->stop_func_end);
-  ecs->stop_func_start += DEPRECATED_FUNCTION_START_OFFSET;
+  ecs->stop_func_start
+    += gdbarch_deprecated_function_start_offset (current_gdbarch);
   ecs->another_trap = 0;
   bpstat_clear (&stop_bpstat);
   stop_step = 0;
index dc003e5c9f47c655484c485bccda72b326b4b47f..9043ca6651be5826d3b6b4af63fa368ca1d3b97e 100644 (file)
@@ -1833,7 +1833,8 @@ minsym_found (int funfirstline, struct minimal_symbol *msymbol)
   values.sals[0].section = SYMBOL_BFD_SECTION (msymbol);
   if (funfirstline)
     {
-      values.sals[0].pc += DEPRECATED_FUNCTION_START_OFFSET;
+      values.sals[0].pc
+       += gdbarch_deprecated_function_start_offset (current_gdbarch);
       values.sals[0].pc = gdbarch_skip_prologue
                            (current_gdbarch, values.sals[0].pc);
     }
index 83ff9387556cf7a0d47246d8bdb421bc096f47c5..6a9ef41880df7e0413d818979727eb8d47138522 100644 (file)
@@ -2527,7 +2527,7 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
          !section_is_mapped (section))
        pc = overlay_unmapped_address (pc, section);
 
-      pc += DEPRECATED_FUNCTION_START_OFFSET;
+      pc += gdbarch_deprecated_function_start_offset (current_gdbarch);
       pc = gdbarch_skip_prologue (current_gdbarch, pc);
 
       /* For overlays, map pc back into its mapped VMA range */
@@ -4101,7 +4101,7 @@ skip_prologue_using_sal (CORE_ADDR func_addr)
 
   /* Get an initial range for the function.  */
   find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
-  start_pc += DEPRECATED_FUNCTION_START_OFFSET;
+  start_pc += gdbarch_deprecated_function_start_offset (current_gdbarch);
 
   prologue_sal = find_pc_line (start_pc, 0);
   if (prologue_sal.line != 0)