2007-06-12 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 12 Jun 2007 16:55:32 +0000 (16:55 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Tue, 12 Jun 2007 16:55:32 +0000 (16:55 +0000)
* gdbarch.sh (SMASH_TEXT_ADDRESS): Replace by
gdbarch_smash_text_address.
* somread.c (som_symtab_read): Likewise.
* elfread.c (record_minimal_symbol): Likewise.
* dbxread.c (process_one_symbol): Likewise.
* coffread.c (coff_symtab_read): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/coffread.c
gdb/dbxread.c
gdb/elfread.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/somread.c

index 20960f3eeecf57694cb0fd4ba5f98c7254f23196..63cf287a22d5325482fc8c973641f4ed132b0ac5 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-12  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (SMASH_TEXT_ADDRESS): Replace by
+       gdbarch_smash_text_address.
+       * somread.c (som_symtab_read): Likewise.
+       * elfread.c (record_minimal_symbol): Likewise.
+       * dbxread.c (process_one_symbol): Likewise.
+       * coffread.c (coff_symtab_read): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-12  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (REGISTER_TO_VALUE): Replace by gdbarch_register_to_value.
index 5b4e52a31bbe87924936080a3928d288ff927912..b6f1feabbed5b8300ad48f7b742769550628937d 100644 (file)
@@ -910,7 +910,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
                      cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC
                      || cs->c_sclass == C_THUMBEXT ?
                      mst_text : mst_file_text;
-                   tmpaddr = SMASH_TEXT_ADDRESS (tmpaddr);
+                   tmpaddr = gdbarch_smash_text_address
+                               (current_gdbarch, tmpaddr);
                  }
                else if (bfd_section->flags & SEC_ALLOC
                         && bfd_section->flags & SEC_LOAD)
index b26d00c6f22d2abc8198ed9ab410ebb566a1a012..702e315fd7c2dd53fca4416cabd218c1dd29fb35 100644 (file)
@@ -2738,7 +2738,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
 
       /* Relocate for dynamic loading.  */
       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-      valu = SMASH_TEXT_ADDRESS (valu);
+      valu = gdbarch_smash_text_address (current_gdbarch, valu);
       last_function_start = valu;
 
       goto define_a_symbol;
index ed217509115723ea8a4166f8e571837f4853dfec..ea28d7c258a9d171fd35898a6bbc6446347edab2 100644 (file)
@@ -96,7 +96,7 @@ record_minimal_symbol (char *name, CORE_ADDR address,
                       asection *bfd_section, struct objfile *objfile)
 {
   if (ms_type == mst_text || ms_type == mst_file_text)
-    address = SMASH_TEXT_ADDRESS (address);
+    address = gdbarch_smash_text_address (current_gdbarch, address);
 
   return prim_record_minimal_symbol_and_info
     (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile);
index fa61d9a1a99ad67fd0a86c1e9cd4f0afe002e12c..bfd1d00d54b533fd3325345dd5dbf8a00df6c4ba 100644 (file)
@@ -1155,12 +1155,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
                       (long) current_gdbarch->skip_trampoline_code);
-#ifdef SMASH_TEXT_ADDRESS
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "SMASH_TEXT_ADDRESS(addr)",
-                      XSTRING (SMASH_TEXT_ADDRESS (addr)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: smash_text_address = <0x%lx>\n",
                       (long) current_gdbarch->smash_text_address);
index c20696ed11297fb314b3e2df69e22903911a95b2..b0a6bdebf77b5e3bc4cd1eec8615cade957ed9aa 100644 (file)
@@ -756,18 +756,12 @@ typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
 extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
 extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
 
-/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
+/* It is not at all clear why gdbarch_smash_text_address is not folded into
    gdbarch_addr_bits_remove. */
 
 typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
 extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
 extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
-#if !defined (GDB_TM_FILE) && defined (SMASH_TEXT_ADDRESS)
-#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
-#endif
-#if !defined (SMASH_TEXT_ADDRESS)
-#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
-#endif
 
 /* FIXME/cagney/2001-01-18: This should be split in two.  A target method that
    indicates if the target needs software single step.  An ISA method to
index 7440cd34891a64dbb53d379412bd3813ca475dd8..425c32c4ec1b6c7f7d9ce0fe6e612646a04b7547 100755 (executable)
@@ -596,9 +596,9 @@ m::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ:
 # sort of generic thing to handle alignment or segmentation (it's
 # possible it should be in TARGET_READ_PC instead).
 f::CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0
-# It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
+# It is not at all clear why gdbarch_smash_text_address is not folded into
 # gdbarch_addr_bits_remove.
-f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0
+f::CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0
 
 # FIXME/cagney/2001-01-18: This should be split in two.  A target method that
 # indicates if the target needs software single step.  An ISA method to
index 7f3130303a5c13983fc9c8bc39c9ff49b516f85d..c4f0744716f246c2530f5022974604b6b5f9dab5 100644 (file)
@@ -133,7 +133,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_text;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
            case ST_ENTRY:
@@ -146,14 +147,16 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
              else
                ms_type = mst_text;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
            case ST_STUB:
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_solib_trampoline;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
            case ST_DATA:
@@ -181,7 +184,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_file_text;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
 
            check_strange_names:
              /* Utah GCC 2.5, FSF GCC 2.6 and later generate correct local
@@ -212,7 +216,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_file_text;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
            case ST_ENTRY:
@@ -223,14 +228,16 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
                 we do for SS_UNIVERSAL and SS_EXTERNAL symbols above.  */
              ms_type = mst_file_text;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
            case ST_STUB:
              symname = bufp->name.n_strx + stringtab;
              ms_type = mst_solib_trampoline;
              bufp->symbol_value += text_offset;
-             bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
+             bufp->symbol_value = gdbarch_smash_text_address
+                                    (current_gdbarch, bufp->symbol_value);
              break;
 
 
This page took 0.03608 seconds and 4 git commands to generate.