2007-06-13 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 13 Jun 2007 17:38:43 +0000 (17:38 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 13 Jun 2007 17:38:43 +0000 (17:38 +0000)
* gdbarch.sh (BREAKPOINT_FROM_PC): Replace by
gdbarch_breakpoint_from_pc.
* s390-tdep.c (s390_gdbarch_init): Likewise (comment).
* remote.c (remote_insert_breakpoint)
(remote_insert_hw_breakpoint): Likewise.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
* mips-tdep.c (mips_breakpoint_from_pc): Likewise (comment).
* breakpoint.h (bp_target_info): Likewise (comment).
* breakpoint.c (read_memory_nobpt): Likewise.
* mem-break.c (default_memory_insert_breakpoint): Likewise.
(symtab.h, breakpoint.h): Remove include. Remove unnecessary comment.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/mem-break.c
gdb/mips-tdep.c
gdb/ppc-linux-tdep.c
gdb/remote.c
gdb/s390-tdep.c

index da8af0aa973293ffb41736980bfd249e65db5ed0..2b3881d6e248a0e71d3bdbabfb29241fc4ac7c86 100644 (file)
@@ -1,3 +1,18 @@
+2007-06-13  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (BREAKPOINT_FROM_PC): Replace by
+       gdbarch_breakpoint_from_pc.
+       * s390-tdep.c (s390_gdbarch_init): Likewise (comment).
+       * remote.c (remote_insert_breakpoint)
+       (remote_insert_hw_breakpoint): Likewise.
+       * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Likewise.
+       * mips-tdep.c (mips_breakpoint_from_pc): Likewise (comment).
+       * breakpoint.h (bp_target_info): Likewise (comment).
+       * breakpoint.c (read_memory_nobpt): Likewise.
+       * mem-break.c (default_memory_insert_breakpoint): Likewise.
+       (symtab.h, breakpoint.h): Remove include. Remove unnecessary comment.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-13  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (TARGET_PTR_BIT): Replace with gdbarch_ptr_bit.
index 730922c535c372d510ac727d821274bb44440cd4..c8e1b4a4d8c0f5bf6bab5196270c92e8a6e510fb 100644 (file)
@@ -706,7 +706,7 @@ read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, unsigned len)
   CORE_ADDR bp_addr = 0;
   int bp_size = 0;
 
-  if (BREAKPOINT_FROM_PC (&bp_addr, &bp_size) == NULL)
+  if (gdbarch_breakpoint_from_pc (current_gdbarch, &bp_addr, &bp_size) == NULL)
     /* No breakpoints on this machine. */
     return target_read_memory (memaddr, myaddr, len);
 
index 6a28b791176738ed539ef90a5ad925a880739dff..1573ac8edd5a2547b378e908675270056f520205 100644 (file)
@@ -188,7 +188,7 @@ struct bp_target_info
 {
   /* Address at which the breakpoint was placed.  This is normally the
      same as ADDRESS from the bp_location, except when adjustment
-     happens in BREAKPOINT_FROM_PC.  The most common form of
+     happens in gdbarch_breakpoint_from_pc.  The most common form of
      adjustment is stripping an alternate ISA marker from the PC which
      is used to determine the type of breakpoint to insert.  */
   CORE_ADDR placed_address;
@@ -203,7 +203,7 @@ struct bp_target_info
   int shadow_len;
 
   /* The size of the placed breakpoint, according to
-     BREAKPOINT_FROM_PC, when the breakpoint was inserted.  This is
+     gdbarch_breakpoint_from_pc, when the breakpoint was inserted.  This is
      generally the same as SHADOW_LEN, unless we did not need
      to read from the target to implement the memory breakpoint
      (e.g. if a remote stub handled the details).  We may still
index 66498c54266c785b15d5c29cb449dbbbc1ed0bbb..e14b8e4b88a9ef687f1a2bef550e9a8504187556 100644 (file)
@@ -712,12 +712,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: bfd_vma_bit = %s\n",
                       paddr_d (current_gdbarch->bfd_vma_bit));
-#ifdef BREAKPOINT_FROM_PC
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "BREAKPOINT_FROM_PC(pcptr, lenptr)",
-                      XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
                       (long) current_gdbarch->breakpoint_from_pc);
index 6767bf73e2bfd02029639058f74c432eea302387..c99b15b36906905a133ad84a75c2b5734c13dd75 100644 (file)
@@ -551,12 +551,6 @@ extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_
 typedef const gdb_byte * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
 extern const gdb_byte * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
-#if !defined (GDB_TM_FILE) && defined (BREAKPOINT_FROM_PC)
-#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
-#endif
-#if !defined (BREAKPOINT_FROM_PC)
-#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
-#endif
 
 extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch);
 
index d401b4d1e2a579696b60a06aa732c20691ac3f50..4ccaf79a75d4682e10810b68006f7eff50e996a5 100755 (executable)
@@ -543,7 +543,7 @@ F:=:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:
 #
 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:
+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
 f::int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
 f::int:memory_remove_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_remove_breakpoint::0
index 2122308880f1127520eaf660edd0875f8f0a66d6..e538bbc369bfc9127adc39614c974c9f5e46bbbc 100644 (file)
@@ -50,7 +50,8 @@ default_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
   int bplen;
 
   /* Determine appropriate breakpoint contents and size for this address.  */
-  bp = BREAKPOINT_FROM_PC (&bp_tgt->placed_address, &bp_tgt->placed_size);
+  bp = gdbarch_breakpoint_from_pc
+       (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
   if (bp == NULL)
     error (_("Software breakpoints not implemented for this target."));
 
index 63e4eead2ecb95f1c3abde3b40dfbd660b4ecdb5..c1c7e72b40059c8896a177772b2ef48fddc227a3 100644 (file)
@@ -4397,12 +4397,12 @@ gdb_print_insn_mips (bfd_vma memaddr, struct disassemble_info *info)
     return print_insn_little_mips (memaddr, info);
 }
 
-/* This function implements the BREAKPOINT_FROM_PC macro.  It uses the program
-   counter value to determine whether a 16- or 32-bit breakpoint should be
-   used.  It returns a pointer to a string of bytes that encode a breakpoint
-   instruction, stores the length of the string to *lenptr, and adjusts pc
-   (if necessary) to point to the actual memory location where the
-   breakpoint should be inserted.  */
+/* This function implements gdbarch_breakpoint_from_pc.  It uses the program
+   counter value to determine whether a 16- or 32-bit breakpoint should be used.
+   It returns a pointer to a string of bytes that encode a breakpoint
+   instruction, stores the length of the string to *lenptr, and adjusts pc (if
+   necessary) to point to the actual memory location where the breakpoint
+   should be inserted.  */
 
 static const gdb_byte *
 mips_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
index 9f2aceea25568af3da14d2d4a1a777be368b9d7c..9eff5b0f71a695b428398c4ae4b13088cde92cc8 100644 (file)
@@ -329,7 +329,7 @@ ppc_linux_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
   gdb_byte old_contents[BREAKPOINT_MAX];
 
   /* Determine appropriate breakpoint contents and size for this address.  */
-  bp = BREAKPOINT_FROM_PC (&addr, &bplen);
+  bp = gdbarch_breakpoint_from_pc (current_gdbarch, &addr, &bplen);
   if (bp == NULL)
     error (_("Software breakpoints not implemented for this target."));
 
index 10707f4f281f167b209fb2341b25421b3e6e472d..e7a7d35caa4f95b0b9fc4b96d364adddd4164691 100644 (file)
@@ -5128,7 +5128,8 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt)
       *(p++) = 'Z';
       *(p++) = '0';
       *(p++) = ',';
-      BREAKPOINT_FROM_PC (&bp_tgt->placed_address, &bp_tgt->placed_size);
+      gdbarch_breakpoint_from_pc
+       (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
       addr = (ULONGEST) remote_address_masked (bp_tgt->placed_address);
       p += hexnumstr (p, addr);
       sprintf (p, ",%d", bp_tgt->placed_size);
@@ -5323,7 +5324,8 @@ remote_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
   /* The length field should be set to the size of a breakpoint
      instruction, even though we aren't inserting one ourselves.  */
 
-  BREAKPOINT_FROM_PC (&bp_tgt->placed_address, &bp_tgt->placed_size);
+  gdbarch_breakpoint_from_pc
+    (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
 
   if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE)
     return -1;
index 395c57e7b17bc61b60423adc31ebc2e2c4becdbc..aa2373554c1be0c6613e4df0143f0b50e6810a75 100644 (file)
@@ -2374,7 +2374,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_char_signed (gdbarch, 0);
 
   /* Amount PC must be decremented by after a breakpoint.  This is
-     often the number of bytes returned by BREAKPOINT_FROM_PC but not
+     often the number of bytes returned by gdbarch_breakpoint_from_pc but not
      always.  */
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
   /* Stack grows downward.  */
This page took 0.040605 seconds and 4 git commands to generate.