[ gas/testsuite/ChangeLog ]
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index 0e95e208cc352a324f9b0eefaa27f033e6140b1d..fd231dee498e3bb022cec819ca2707eee94a6459 100644 (file)
@@ -1,8 +1,8 @@
 /* Everything about breakpoints, for GDB.
 
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-   Foundation, Inc.
+   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,8 +18,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include <ctype.h>
 #include "cli/cli-script.h"
 #include "gdb_assert.h"
 #include "block.h"
+#include "solib.h"
+#include "solist.h"
+#include "observer.h"
+#include "exceptions.h"
 
 #include "gdb-events.h"
+#include "mi/mi-common.h"
 
 /* Prototypes for local functions. */
 
@@ -84,12 +89,7 @@ static void watch_command (char *, int);
 
 static int can_use_hardware_watchpoint (struct value *);
 
-extern void break_at_finish_command (char *, int);
-extern void break_at_finish_at_depth_command (char *, int);
-
-extern void tbreak_at_finish_command (char *, int);
-
-static void break_command_1 (char *, int, int);
+static int break_command_1 (char *, int, int, struct breakpoint *);
 
 static void mention (struct breakpoint *);
 
@@ -99,7 +99,8 @@ static void check_duplicates (struct breakpoint *);
 
 static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
 
-static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr);
+static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr,
+                                            enum bptype bptype);
 
 static void describe_other_breakpoints (CORE_ADDR, asection *);
 
@@ -176,11 +177,6 @@ static void create_fork_vfork_event_catchpoint (int tempflag,
                                                char *cond_string,
                                                enum bptype bp_kind);
 
-static void break_at_finish_at_depth_command_1 (char *arg,
-                                               int flag, int from_tty);
-
-static void break_at_finish_command_1 (char *arg, int flag, int from_tty);
-
 static void stop_command (char *arg, int from_tty);
 
 static void stopin_command (char *arg, int from_tty);
@@ -193,10 +189,6 @@ static char *ep_parse_optional_if_clause (char **arg);
 
 static char *ep_parse_optional_filename (char **arg);
 
-#if defined(CHILD_INSERT_EXEC_CATCHPOINT)
-static void catch_exec_command_1 (char *arg, int tempflag, int from_tty);
-#endif
-
 static void create_exception_catchpoint (int tempflag, char *cond_string,
                                         enum exception_event_kind ex_event,
                                         struct symtab_and_line *sal);
@@ -214,6 +206,31 @@ static void ep_skip_leading_whitespace (char **s);
    if such is available. */
 static int can_use_hw_watchpoints;
 
+static void
+show_can_use_hw_watchpoints (struct ui_file *file, int from_tty,
+                            struct cmd_list_element *c,
+                            const char *value)
+{
+  fprintf_filtered (file, _("\
+Debugger's willingness to use watchpoint hardware is %s.\n"),
+                   value);
+}
+
+/* If AUTO_BOOLEAN_FALSE, gdb will not attempt to create pending breakpoints.
+   If AUTO_BOOLEAN_TRUE, gdb will automatically create pending breakpoints
+   for unrecognized breakpoint locations.  
+   If AUTO_BOOLEAN_AUTO, gdb will query when breakpoints are unrecognized.  */
+static enum auto_boolean pending_break_support;
+static void
+show_pending_break_support (struct ui_file *file, int from_tty,
+                           struct cmd_list_element *c,
+                           const char *value)
+{
+  fprintf_filtered (file, _("\
+Debugger's behavior regarding pending breakpoints is %s.\n"),
+                   value);
+}
+
 void _initialize_breakpoint (void);
 
 extern int addressprint;       /* Print machine addresses? */
@@ -244,16 +261,6 @@ static int overlay_events_enabled;
             B ? (TMP=B->next, 1): 0;   \
             B = TMP)
 
-/* True if SHIFT_INST_REGS defined, false otherwise.  */
-
-int must_shift_inst_regs =
-#if defined(SHIFT_INST_REGS)
-1
-#else
-0
-#endif
- ;
-
 /* True if breakpoint hit counts should be displayed in breakpoint info.  */
 
 int show_breakpoint_hit_counts = 1;
@@ -271,13 +278,13 @@ int breakpoint_count;
 /* Pointer to current exception event record */
 static struct exception_event_record *current_exception_event;
 
-/* Indicator of whether exception catchpoints should be nuked
-   between runs of a program */
-int exception_catchpoints_are_fragile = 0;
+/* Indicator of whether exception catchpoints should be nuked between
+   runs of a program.  */
+int deprecated_exception_catchpoints_are_fragile = 0;
 
 /* Indicator of when exception catchpoints set-up should be
-   reinitialized -- e.g. when program is re-run */
-int exception_support_initialized = 0;
+   reinitialized -- e.g. when program is re-run */
+int deprecated_exception_support_initialized = 0;
 
 /* This function returns a pointer to the string representation of the
    pathname of the dynamically-linked library that has just been
@@ -319,7 +326,7 @@ int exception_support_initialized = 0;
 
 #ifndef SOLIB_CREATE_CATCH_LOAD_HOOK
 #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \
-   error ("catch of library loads not yet implemented on this platform")
+   error (_("catch of library loads not yet implemented on this platform"))
 #endif
 
 /* This function is called by the "catch unload" command.  It allows
@@ -328,10 +335,17 @@ int exception_support_initialized = 0;
    unloaded.  */
 
 #ifndef SOLIB_CREATE_CATCH_UNLOAD_HOOK
-#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename,cond_string) \
-   error ("catch of library unloads not yet implemented on this platform")
+#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \
+   error (_("catch of library unloads not yet implemented on this platform"))
 #endif
 
+/* Return whether a breakpoint is an active enabled breakpoint.  */
+static int
+breakpoint_enabled (struct breakpoint *b)
+{
+  return (b->enable_state == bp_enabled && !b->pending);
+}
+
 /* Set breakpoint count to NUM.  */
 
 void
@@ -397,11 +411,11 @@ get_number_trailer (char **pp, int trailer)
       strncpy (varname, start, p - start);
       varname[p - start] = '\0';
       val = value_of_internalvar (lookup_internalvar (varname));
-      if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_INT)
+      if (TYPE_CODE (value_type (val)) == TYPE_CODE_INT)
        retval = (int) value_as_long (val);
       else
        {
-         printf_filtered ("Convenience variable must have integer value.\n");
+         printf_filtered (_("Convenience variable must have integer value.\n"));
          retval = 0;
        }
     }
@@ -487,7 +501,7 @@ get_number_or_range (char **pp)
          end_value = get_number (temp);
          if (end_value < last_retval) 
            {
-             error ("inverted range");
+             error (_("inverted range"));
            }
          else if (end_value == last_retval)
            {
@@ -501,7 +515,7 @@ get_number_or_range (char **pp)
        }
     }
   else if (! in_range)
-    error ("negative value");
+    error (_("negative value"));
   else
     {
       /* pp points to the '-' that betokens a range.  All
@@ -532,12 +546,12 @@ condition_command (char *arg, int from_tty)
   int bnum;
 
   if (arg == 0)
-    error_no_arg ("breakpoint number");
+    error_no_arg (_("breakpoint number"));
 
   p = arg;
   bnum = get_number (&p);
   if (bnum == 0)
-    error ("Bad breakpoint argument: '%s'", arg);
+    error (_("Bad breakpoint argument: '%s'"), arg);
 
   ALL_BREAKPOINTS (b)
     if (b->number == bnum)
@@ -555,7 +569,7 @@ condition_command (char *arg, int from_tty)
          b->cond = 0;
          b->cond_string = NULL;
          if (from_tty)
-           printf_filtered ("Breakpoint %d now unconditional.\n", bnum);
+           printf_filtered (_("Breakpoint %d now unconditional.\n"), bnum);
        }
       else
        {
@@ -563,16 +577,19 @@ condition_command (char *arg, int from_tty)
          /* I don't know if it matters whether this is the string the user
             typed in or the decompiled expression.  */
          b->cond_string = savestring (arg, strlen (arg));
-         b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0);
-         if (*arg)
-           error ("Junk at end of expression");
+         if (!b->pending)
+           {
+             b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0);
+             if (*arg)
+               error (_("Junk at end of expression"));
+           }
        }
       breakpoints_changed ();
       breakpoint_modify_event (b->number);
       return;
     }
 
-  error ("No breakpoint number %d.", bnum);
+  error (_("No breakpoint number %d."), bnum);
 }
 
 static void
@@ -588,13 +605,13 @@ commands_command (char *arg, int from_tty)
      being read from.  */
 
   if (executing_breakpoint_commands)
-    error ("Can't use the \"commands\" command among a breakpoint's commands.");
+    error (_("Can't use the \"commands\" command among a breakpoint's commands."));
 
   p = arg;
   bnum = get_number (&p);
 
   if (p && *p)
-    error ("Unexpected extra arguments following breakpoint number.");
+    error (_("Unexpected extra arguments following breakpoint number."));
 
   ALL_BREAKPOINTS (b)
     if (b->number == bnum)
@@ -610,7 +627,7 @@ commands_command (char *arg, int from_tty)
        breakpoint_modify_event (b->number);
        return;
     }
-  error ("No breakpoint number %d.", bnum);
+  error (_("No breakpoint number %d."), bnum);
 }
 \f
 /* Like target_read_memory() but if breakpoints are inserted, return
@@ -622,7 +639,8 @@ commands_command (char *arg, int from_tty)
    shadow contents, not the breakpoints themselves.  From breakpoint.c.  */
 
 int
-read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
+deprecated_read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
+                             unsigned len)
 {
   int status;
   struct bp_location *b;
@@ -636,7 +654,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
   ALL_BP_LOCATIONS (b)
   {
     if (b->owner->type == bp_none)
-      warning ("reading through apparently deleted breakpoint #%d?",
+      warning (_("reading through apparently deleted breakpoint #%d?"),
               b->owner->number);
 
     if (b->loc_type != bp_loc_software_breakpoint)
@@ -645,16 +663,10 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
       continue;
     /* Addresses and length of the part of the breakpoint that
        we need to copy.  */
-    /* XXXX The m68k, sh and h8300 have different local and remote
-       breakpoint values.  BREAKPOINT_FROM_PC still manages to
-       correctly determine the breakpoints memory address and size
-       for these targets. */
-    bp_addr = b->address;
-    bp_size = 0;
-    if (BREAKPOINT_FROM_PC (&bp_addr, &bp_size) == NULL)
-      continue;
+    bp_addr = b->target_info.placed_address;
+    bp_size = b->target_info.shadow_len;
     if (bp_size == 0)
-      /* bp isn't valid */
+      /* bp isn't valid, or doesn't shadow memory.  */
       continue;
     if (bp_addr + bp_size <= memaddr)
       /* The breakpoint is entirely before the chunk of memory we
@@ -685,12 +697,12 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
        }
 
       memcpy (myaddr + bp_addr - memaddr,
-             b->shadow_contents + bptoffset, bp_size);
+             b->target_info.shadow_contents + bptoffset, bp_size);
 
       if (bp_addr > memaddr)
        {
          /* Copy the section of memory before the breakpoint.  */
-         status = read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
+         status = deprecated_read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
          if (status != 0)
            return status;
        }
@@ -698,7 +710,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
       if (bp_addr + bp_size < memaddr + len)
        {
          /* Copy the section of memory after the breakpoint.  */
-         status = read_memory_nobpt (bp_addr + bp_size,
+         status = deprecated_read_memory_nobpt (bp_addr + bp_size,
                                      myaddr + bp_addr + bp_size - memaddr,
                                      memaddr + len - (bp_addr + bp_size));
          if (status != 0)
@@ -713,7 +725,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
 \f
 
 /* A wrapper function for inserting catchpoints.  */
-static int
+static void
 insert_catchpoint (struct ui_out *uo, void *args)
 {
   struct breakpoint *b = (struct breakpoint *) args;
@@ -722,23 +734,35 @@ insert_catchpoint (struct ui_out *uo, void *args)
   switch (b->type)
     {
     case bp_catch_fork:
-      val = target_insert_fork_catchpoint (PIDGET (inferior_ptid));
+      target_insert_fork_catchpoint (PIDGET (inferior_ptid));
       break;
     case bp_catch_vfork:
-      val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
+      target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
       break;
     case bp_catch_exec:
-      val = target_insert_exec_catchpoint (PIDGET (inferior_ptid));
+      target_insert_exec_catchpoint (PIDGET (inferior_ptid));
       break;
     default:
-      internal_error (__FILE__, __LINE__, "unknown breakpoint type");
+      internal_error (__FILE__, __LINE__, _("unknown breakpoint type"));
       break;
     }
+}
 
-  if (val < 0)
-    throw_exception (RETURN_ERROR);
+/* Helper routine: free the value chain for a breakpoint (watchpoint).  */
 
-  return 0;
+static void free_valchain (struct bp_location *b)
+{
+  struct value *v;
+  struct value *n;
+
+  /* Free the saved value chain.  We will construct a new one
+     the next time the watchpoint is inserted.  */
+  for (v = b->owner->val_chain; v; v = n)
+    {
+      n = value_next (v);
+      value_free (v);
+    }
+  b->owner->val_chain = NULL;
 }
 
 /* Insert a low-level "breakpoint" of some type.  BPT is the breakpoint.
@@ -757,12 +781,16 @@ insert_bp_location (struct bp_location *bpt,
 
   /* Permanent breakpoints cannot be inserted or removed.  Disabled
      breakpoints should not be inserted.  */
-  if (bpt->owner->enable_state != bp_enabled)
+  if (!breakpoint_enabled (bpt->owner))
     return 0;
 
   if (bpt->inserted || bpt->duplicate)
     return 0;
 
+  /* Initialize the target-specific information.  */
+  memset (&bpt->target_info, 0, sizeof (bpt->target_info));
+  bpt->target_info.placed_address = bpt->address;
+
   if (bpt->loc_type == bp_loc_software_breakpoint
       || bpt->loc_type == bp_loc_hardware_breakpoint)
     {
@@ -774,11 +802,9 @@ insert_bp_location (struct bp_location *bpt,
          /* No overlay handling: just set the breakpoint.  */
 
          if (bpt->loc_type == bp_loc_hardware_breakpoint)
-           val = target_insert_hw_breakpoint (bpt->address, 
-                                              bpt->shadow_contents);
+           val = target_insert_hw_breakpoint (&bpt->target_info);
          else
-           val = target_insert_breakpoint (bpt->address,
-                                           bpt->shadow_contents);
+           val = target_insert_breakpoint (&bpt->target_info);
        }
       else
        {
@@ -790,14 +816,16 @@ insert_bp_location (struct bp_location *bpt,
                 so we must try to set a breakpoint at the LMA.
                 This will not work for a hardware breakpoint.  */
              if (bpt->loc_type == bp_loc_hardware_breakpoint)
-               warning ("hardware breakpoint %d not supported in overlay!\n",
+               warning (_("hardware breakpoint %d not supported in overlay!"),
                         bpt->owner->number);
              else
                {
                  CORE_ADDR addr = overlay_unmapped_address (bpt->address,
                                                             bpt->section);
                  /* Set a software (trap) breakpoint at the LMA.  */
-                 val = target_insert_breakpoint (addr, bpt->shadow_contents);
+                 bpt->overlay_target_info = bpt->target_info;
+                 bpt->overlay_target_info.placed_address = addr;
+                 val = target_insert_breakpoint (&bpt->overlay_target_info);
                  if (val != 0)
                    fprintf_unfiltered (tmp_error_stream, 
                                        "Overlay breakpoint %d failed: in ROM?", 
@@ -809,11 +837,9 @@ insert_bp_location (struct bp_location *bpt,
            {
              /* Yes.  This overlay section is mapped into memory.  */
              if (bpt->loc_type == bp_loc_hardware_breakpoint)
-               val = target_insert_hw_breakpoint (bpt->address, 
-                                                  bpt->shadow_contents);
+               val = target_insert_hw_breakpoint (&bpt->target_info);
              else
-               val = target_insert_breakpoint (bpt->address,
-                                               bpt->shadow_contents);
+               val = target_insert_breakpoint (&bpt->target_info);
            }
          else
            {
@@ -826,8 +852,13 @@ insert_bp_location (struct bp_location *bpt,
       if (val)
        {
          /* Can't set the breakpoint.  */
+         if (
 #if defined (DISABLE_UNSETTABLE_BREAK)
-         if (DISABLE_UNSETTABLE_BREAK (bpt->address))
+             DISABLE_UNSETTABLE_BREAK (bpt->address)
+#else
+             solib_address (bpt->address)
+#endif
+             )
            {
              /* See also: disable_breakpoints_in_shlibs. */
              val = 0;
@@ -845,7 +876,6 @@ insert_bp_location (struct bp_location *bpt,
                                  "breakpoint #%d\n", bpt->owner->number);
            }
          else
-#endif
            {
 #ifdef ONE_PROCESS_WRITETEXT
              *process_warning = 1;
@@ -864,7 +894,7 @@ insert_bp_location (struct bp_location *bpt,
                                      bpt->owner->number);
                  fprintf_filtered (tmp_error_stream, 
                                    "Error accessing memory address ");
-                 print_address_numeric (bpt->address, 1, tmp_error_stream);
+                 deprecated_print_address_numeric (bpt->address, 1, tmp_error_stream);
                  fprintf_filtered (tmp_error_stream, ": %s.\n",
                                    safe_strerror (val));
                }
@@ -888,18 +918,17 @@ insert_bp_location (struct bp_location *bpt,
         must watch.  As soon as a many-to-one mapping is available I'll
         convert this.  */
 
-      struct frame_info *saved_frame;
-      int saved_level, within_current_scope;
+      int within_current_scope;
       struct value *mark = value_mark ();
       struct value *v;
+      struct frame_id saved_frame_id;
 
-      /* Save the current frame and level so we can restore it after
+      /* Save the current frame's ID so we can restore it after
         evaluating the watchpoint expression on its own frame.  */
       /* FIXME drow/2003-09-09: It would be nice if evaluate_expression
         took a frame parameter, so that we didn't have to change the
         selected frame.  */
-      saved_frame = deprecated_selected_frame;
-      saved_level = frame_relative_level (deprecated_selected_frame);
+      saved_frame_id = get_frame_id (deprecated_selected_frame);
 
       /* Determine if the watchpoint is within scope.  */
       if (bpt->owner->exp_valid_block == NULL)
@@ -915,6 +944,8 @@ insert_bp_location (struct bp_location *bpt,
 
       if (within_current_scope)
        {
+         free_valchain (bpt);
+
          /* Evaluate the expression and cut the chain of values
             produced off from the value chain.
 
@@ -922,22 +953,22 @@ insert_bp_location (struct bp_location *bpt,
             laziness to determine what memory GDB actually needed
             in order to compute the value of the expression.  */
          v = evaluate_expression (bpt->owner->exp);
-         VALUE_CONTENTS (v);
+         value_contents (v);
          value_release_to_mark (mark);
 
          bpt->owner->val_chain = v;
          bpt->inserted = 1;
 
          /* Look at each value on the value chain.  */
-         for (; v; v = v->next)
+         for (; v; v = value_next (v))
            {
              /* If it's a memory location, and GDB actually needed
                 its contents to evaluate the expression, then we
                 must watch it.  */
              if (VALUE_LVAL (v) == lval_memory
-                 && ! VALUE_LAZY (v))
+                 && ! value_lazy (v))
                {
-                 struct type *vtype = check_typedef (VALUE_TYPE (v));
+                 struct type *vtype = check_typedef (value_type (v));
 
                  /* We only watch structs and arrays if user asked
                     for it explicitly, never if they just happen to
@@ -949,8 +980,8 @@ insert_bp_location (struct bp_location *bpt,
                      CORE_ADDR addr;
                      int len, type;
 
-                     addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
-                     len = TYPE_LENGTH (VALUE_TYPE (v));
+                     addr = VALUE_ADDRESS (v) + value_offset (v);
+                     len = TYPE_LENGTH (value_type (v));
                      type = hw_write;
                      if (bpt->owner->type == bp_read_watchpoint)
                        type = hw_read;
@@ -986,18 +1017,17 @@ insert_bp_location (struct bp_location *bpt,
        }
       else
        {
-         printf_filtered ("Hardware watchpoint %d deleted ", bpt->owner->number);
-         printf_filtered ("because the program has left the block \n");
-         printf_filtered ("in which its expression is valid.\n");
+         printf_filtered (_("\
+Hardware watchpoint %d deleted because the program has left the block \n\
+in which its expression is valid.\n"),
+                          bpt->owner->number);
          if (bpt->owner->related_breakpoint)
            bpt->owner->related_breakpoint->disposition = disp_del_at_next_stop;
          bpt->owner->disposition = disp_del_at_next_stop;
        }
 
-      /* Restore the frame and level.  */
-      if (saved_frame != deprecated_selected_frame
-         || saved_level != frame_relative_level (deprecated_selected_frame))
-       select_frame (saved_frame);
+      /* Restore the selected frame.  */
+      select_frame (frame_find_by_id (saved_frame_id));
 
       return val;
     }
@@ -1011,7 +1041,7 @@ insert_bp_location (struct bp_location *bpt,
       /* If we get here, we must have a callback mechanism for exception
         events -- with g++ style embedded label support, we insert
         ordinary breakpoints and not catchpoints. */
-      val = target_insert_breakpoint (bpt->address, bpt->shadow_contents);
+      val = target_insert_breakpoint (&bpt->target_info);
       if (val)
        {
          /* Couldn't set breakpoint for some reason */
@@ -1020,7 +1050,7 @@ insert_bp_location (struct bp_location *bpt,
                              bpt->owner->number);
          fprintf_filtered (tmp_error_stream, 
                            "Error accessing memory address ");
-         print_address_numeric (bpt->address, 1, tmp_error_stream);
+         deprecated_print_address_numeric (bpt->address, 1, tmp_error_stream);
          fprintf_filtered (tmp_error_stream, ": %s.\n",
                            safe_strerror (val));
          bpt->owner->enable_state = bp_disabled;
@@ -1061,13 +1091,11 @@ insert_bp_location (struct bp_location *bpt,
           || bpt->owner->type == bp_catch_vfork
           || bpt->owner->type == bp_catch_exec)
     {
-      char *prefix = xstrprintf ("warning: inserting catchpoint %d: ",
-                                bpt->owner->number);
-      struct cleanup *cleanups = make_cleanup (xfree, prefix);
-      val = catch_exceptions (uiout, insert_catchpoint, bpt->owner, prefix,
-                             RETURN_MASK_ERROR);
-      do_cleanups (cleanups);
-      if (val < 0)
+      struct gdb_exception e = catch_exception (uiout, insert_catchpoint,
+                                               bpt->owner, RETURN_MASK_ERROR);
+      exception_fprintf (gdb_stderr, e, "warning: inserting catchpoint %d: ",
+                        bpt->owner->number);
+      if (e.reason < 0)
        bpt->owner->enable_state = bp_disabled;
       else
        bpt->inserted = 1;
@@ -1107,7 +1135,13 @@ insert_breakpoints (void)
     {
       /* Permanent breakpoints cannot be inserted or removed.  Disabled
         breakpoints should not be inserted.  */
-      if (b->owner->enable_state != bp_enabled)
+      if (!breakpoint_enabled (b->owner))
+       continue;
+
+      /* There is no point inserting thread-specific breakpoints if the
+        thread no longer exists.  */
+      if (b->owner->thread != -1
+         && !valid_thread_id (b->owner->thread))
        continue;
 
       /* FIXME drow/2003-10-07: This code should be pushed elsewhere when
@@ -1118,7 +1152,7 @@ insert_breakpoints (void)
          struct value *val;
          val = evaluate_expression (b->owner->exp);
          release_value (val);
-         if (VALUE_LAZY (val))
+         if (value_lazy (val))
            value_fetch_lazy (val);
          b->owner->val = val;
        }
@@ -1202,9 +1236,9 @@ reattach_breakpoints (int pid)
       {
        remove_breakpoint (b, mark_inserted);
        if (b->loc_type == bp_loc_hardware_breakpoint)
-         val = target_insert_hw_breakpoint (b->address, b->shadow_contents);
+         val = target_insert_hw_breakpoint (&b->target_info);
        else
-         val = target_insert_breakpoint (b->address, b->shadow_contents);
+         val = target_insert_breakpoint (&b->target_info);
        /* FIXME drow/2003-10-07: This doesn't handle any other kinds of
           breakpoints.  It's wrong for watchpoints, for example.  */
        if (val != 0)
@@ -1360,7 +1394,7 @@ detach_breakpoints (int pid)
   struct cleanup *old_chain = save_inferior_ptid ();
 
   if (pid == PIDGET (inferior_ptid))
-    error ("Cannot detach breakpoints of inferior_ptid");
+    error (_("Cannot detach breakpoints of inferior_ptid"));
 
   /* Set inferior_ptid; remove_breakpoint uses this global.  */
   inferior_ptid = pid_to_ptid (pid);
@@ -1390,7 +1424,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
     return 0;
 
   if (b->owner->type == bp_none)
-    warning ("attempted to remove apparently deleted breakpoint #%d?"
+    warning (_("attempted to remove apparently deleted breakpoint #%d?")
             b->owner->number);
 
   if (b->loc_type == bp_loc_software_breakpoint
@@ -1408,10 +1442,9 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
          /* No overlay handling: just remove the breakpoint.  */
 
          if (b->loc_type == bp_loc_hardware_breakpoint)
-           val = target_remove_hw_breakpoint (b->address, 
-                                              b->shadow_contents);
+           val = target_remove_hw_breakpoint (&b->target_info);
          else
-           val = target_remove_breakpoint (b->address, b->shadow_contents);
+           val = target_remove_breakpoint (&b->target_info);
        }
       else
        {
@@ -1422,14 +1455,12 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
                /* Yes -- overlay event support is not active, so we
                   should have set a breakpoint at the LMA.  Remove it.  
                */
-               CORE_ADDR addr = overlay_unmapped_address (b->address, 
-                                                          b->section);
                /* Ignore any failures: if the LMA is in ROM, we will
                   have already warned when we failed to insert it.  */
                if (b->loc_type == bp_loc_hardware_breakpoint)
-                 target_remove_hw_breakpoint (addr, b->shadow_contents);
+                 target_remove_hw_breakpoint (&b->overlay_target_info);
                else
-                 target_remove_breakpoint (addr, b->shadow_contents);
+                 target_remove_breakpoint (&b->overlay_target_info);
              }
          /* Did we set a breakpoint at the VMA? 
             If so, we will have marked the breakpoint 'inserted'.  */
@@ -1440,11 +1471,9 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
                 unmapped, but let's not rely on that being safe.  We
                 don't know what the overlay manager might do.  */
              if (b->loc_type == bp_loc_hardware_breakpoint)
-               val = target_remove_hw_breakpoint (b->address, 
-                                                  b->shadow_contents);
+               val = target_remove_hw_breakpoint (&b->target_info);
              else
-               val = target_remove_breakpoint (b->address,
-                                               b->shadow_contents);
+               val = target_remove_breakpoint (&b->target_info);
            }
          else
            {
@@ -1457,7 +1486,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
       b->inserted = (is == mark_inserted);
     }
   else if (b->loc_type == bp_loc_hardware_watchpoint
-          && b->owner->enable_state == bp_enabled
+          && breakpoint_enabled (b->owner)
           && !b->duplicate)
     {
       struct value *v;
@@ -1465,14 +1494,14 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
 
       b->inserted = (is == mark_inserted);
       /* Walk down the saved value chain.  */
-      for (v = b->owner->val_chain; v; v = v->next)
+      for (v = b->owner->val_chain; v; v = value_next (v))
        {
          /* For each memory reference remove the watchpoint
             at that address.  */
          if (VALUE_LVAL (v) == lval_memory
-             && ! VALUE_LAZY (v))
+             && ! value_lazy (v))
            {
-             struct type *vtype = check_typedef (VALUE_TYPE (v));
+             struct type *vtype = check_typedef (value_type (v));
 
              if (v == b->owner->val_chain
                  || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
@@ -1481,8 +1510,8 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
                  CORE_ADDR addr;
                  int len, type;
 
-                 addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
-                 len = TYPE_LENGTH (VALUE_TYPE (v));
+                 addr = VALUE_ADDRESS (v) + value_offset (v);
+                 len = TYPE_LENGTH (value_type (v));
                  type   = hw_write;
                  if (b->owner->type == bp_read_watchpoint)
                    type = hw_read;
@@ -1498,22 +1527,13 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
        }
       /* Failure to remove any of the hardware watchpoints comes here.  */
       if ((is == mark_uninserted) && (b->inserted))
-       warning ("Could not remove hardware watchpoint %d.",
+       warning (_("Could not remove hardware watchpoint %d."),
                 b->owner->number);
-
-      /* Free the saved value chain.  We will construct a new one
-         the next time the watchpoint is inserted.  */
-      for (v = b->owner->val_chain; v; v = n)
-       {
-         n = v->next;
-         value_free (v);
-       }
-      b->owner->val_chain = NULL;
     }
   else if ((b->owner->type == bp_catch_fork ||
            b->owner->type == bp_catch_vfork ||
            b->owner->type == bp_catch_exec)
-          && b->owner->enable_state == bp_enabled
+          && breakpoint_enabled (b->owner)
           && !b->duplicate)
     {
       val = -1;
@@ -1529,7 +1549,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
          val = target_remove_exec_catchpoint (PIDGET (inferior_ptid));
          break;
        default:
-         warning ("Internal error, %s line %d.", __FILE__, __LINE__);
+         warning (_("Internal error, %s line %d."), __FILE__, __LINE__);
          break;
        }
       if (val)
@@ -1538,22 +1558,20 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is)
     }
   else if ((b->owner->type == bp_catch_catch ||
            b->owner->type == bp_catch_throw)
-          && b->owner->enable_state == bp_enabled
+          && breakpoint_enabled (b->owner)
           && !b->duplicate)
     {
-
-      val = target_remove_breakpoint (b->address, b->shadow_contents);
+      val = target_remove_breakpoint (&b->target_info);
       if (val)
        return val;
       b->inserted = (is == mark_inserted);
     }
   else if (ep_is_exception_catchpoint (b->owner)
           && b->inserted       /* sometimes previous insert doesn't happen */
-          && b->owner->enable_state == bp_enabled
+          && breakpoint_enabled (b->owner)
           && !b->duplicate)
     {
-
-      val = target_remove_breakpoint (b->address, b->shadow_contents);
+      val = target_remove_breakpoint (&b->target_info);
       if (val)
        return val;
 
@@ -1631,8 +1649,8 @@ breakpoint_init_inferior (enum inf_context context)
       default:
        /* Likewise for exception catchpoints in dynamic-linked
           executables where required */
-       if (ep_is_exception_catchpoint (b) &&
-           exception_catchpoints_are_fragile)
+       if (ep_is_exception_catchpoint (b)
+           && deprecated_exception_catchpoints_are_fragile)
          {
            warning_needed = 1;
            delete_breakpoint (b);
@@ -1641,14 +1659,14 @@ breakpoint_init_inferior (enum inf_context context)
       }
   }
 
-  if (exception_catchpoints_are_fragile)
-    exception_support_initialized = 0;
+  if (deprecated_exception_catchpoints_are_fragile)
+    deprecated_exception_support_initialized = 0;
 
   /* Don't issue the warning unless it's really needed... */
   if (warning_needed && (context != inf_exited))
     {
-      warning ("Exception catchpoints from last run were deleted.");
-      warning ("You must reinsert them explicitly.");
+      warning (_("Exception catchpoints from last run were deleted.\n"
+                "You must reinsert them explicitly."));
       warning_needed = 0;
     }
 }
@@ -1675,7 +1693,7 @@ breakpoint_here_p (CORE_ADDR pc)
          && bpt->loc_type != bp_loc_hardware_breakpoint)
        continue;
 
-      if ((bpt->owner->enable_state == bp_enabled
+      if ((breakpoint_enabled (bpt->owner)
           || bpt->owner->enable_state == bp_permanent)
          && bpt->address == pc)        /* bp is enabled and matches pc */
        {
@@ -1724,34 +1742,34 @@ breakpoint_inserted_here_p (CORE_ADDR pc)
   return 0;
 }
 
-/* Return nonzero if FRAME is a dummy frame.  We can't use
-   DEPRECATED_PC_IN_CALL_DUMMY because figuring out the saved SP would
-   take too much time, at least using frame_register() on the 68k.
-   This means that for this function to work right a port must use the
-   bp_call_dummy breakpoint.  */
+/* This function returns non-zero iff there is a software breakpoint
+   inserted at PC.  */
 
 int
-deprecated_frame_in_dummy (struct frame_info *frame)
+software_breakpoint_inserted_here_p (CORE_ADDR pc)
 {
-  struct breakpoint *b;
+  struct bp_location *bpt;
+  int any_breakpoint_here = 0;
 
-  /* This function is used by two files: get_frame_type(), after first
-     checking that !DEPRECATED_USE_GENERIC_DUMMY_FRAMES; and
-     sparc-tdep.c, which doesn't yet use generic dummy frames anyway.  */
-  gdb_assert (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+  ALL_BP_LOCATIONS (bpt)
+    {
+      if (bpt->loc_type != bp_loc_software_breakpoint)
+       continue;
+
+      if ((breakpoint_enabled (bpt->owner)
+          || bpt->owner->enable_state == bp_permanent)
+         && bpt->inserted
+         && bpt->address == pc)        /* bp is enabled and matches pc */
+       {
+         if (overlay_debugging 
+             && section_is_overlay (bpt->section) 
+             && !section_is_mapped (bpt->section))
+           continue;           /* unmapped overlay -- can't be a match */
+         else
+           return 1;
+       }
+    }
 
-  ALL_BREAKPOINTS (b)
-  {
-    if (b->type == bp_call_dummy
-       && frame_id_eq (b->frame_id, get_frame_id (frame))
-    /* We need to check the PC as well as the frame on the sparc,
-       for signals.exp in the testsuite.  */
-       && (get_frame_pc (frame)
-           >= (b->loc->address
-               - DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * DEPRECATED_REGISTER_SIZE))
-       && get_frame_pc (frame) <= b->loc->address)
-      return 1;
-  }
   return 0;
 }
 
@@ -1772,7 +1790,7 @@ breakpoint_thread_match (CORE_ADDR pc, ptid_t ptid)
          && bpt->loc_type != bp_loc_hardware_breakpoint)
        continue;
 
-      if ((bpt->owner->enable_state == bp_enabled
+      if ((breakpoint_enabled (bpt->owner)
           || bpt->owner->enable_state == bp_permanent)
          && bpt->address == pc
          && (bpt->owner->thread == -1 || bpt->owner->thread == thread))
@@ -1910,8 +1928,7 @@ bpstat_find_step_resume_breakpoint (bpstat bsp)
 {
   int current_thread;
 
-  if (bsp == NULL)
-    error ("Internal error (bpstat_find_step_resume_breakpoint)");
+  gdb_assert (bsp != NULL);
 
   current_thread = pid_to_thread_id (inferior_ptid);
 
@@ -1924,7 +1941,7 @@ bpstat_find_step_resume_breakpoint (bpstat bsp)
        return bsp->breakpoint_at;
     }
 
-  error ("Internal error (no step_resume breakpoint found)");
+  internal_error (__FILE__, __LINE__, _("No step_resume breakpoint found."));
 }
 
 
@@ -1985,7 +2002,6 @@ bpstat_do_actions (bpstat *bsp)
 {
   bpstat bs;
   struct cleanup *old_chain;
-  struct command_line *cmd;
 
   /* Avoid endless recursion if a `source' command is contained
      in bs->commands.  */
@@ -2010,7 +2026,23 @@ top:
   breakpoint_proceeded = 0;
   for (; bs != NULL; bs = bs->next)
     {
+      struct command_line *cmd;
+      struct cleanup *this_cmd_tree_chain;
+
+      /* Take ownership of the BSP's command tree, if it has one.
+
+         The command tree could legitimately contain commands like
+         'step' and 'next', which call clear_proceed_status, which
+         frees stop_bpstat's command tree.  To make sure this doesn't
+         free the tree we're executing out from under us, we need to
+         take ownership of the tree ourselves.  Since a given bpstat's
+         commands are only executed once, we don't need to copy it; we
+         can clear the pointer in the bpstat, and make sure we free
+         the tree when we're done.  */
       cmd = bs->commands;
+      bs->commands = 0;
+      this_cmd_tree_chain = make_cleanup_free_command_lines (&cmd);
+
       while (cmd != NULL)
        {
          execute_control_command (cmd);
@@ -2020,14 +2052,16 @@ top:
          else
            cmd = cmd->next;
        }
+
+      /* We can free this command tree now.  */
+      do_cleanups (this_cmd_tree_chain);
+
       if (breakpoint_proceeded)
        /* The inferior is proceeded by the command; bomb out now.
           The bpstat chain has been blown away by wait_for_inferior.
           But since execution has stopped again, there is a new bpstat
           to look at, so start over.  */
        goto top;
-      else
-       free_command_lines (&bs->commands);
     }
   do_cleanups (old_chain);
 }
@@ -2076,7 +2110,8 @@ print_it_typical (bpstat bs)
       annotate_breakpoint (bs->breakpoint_at->number);
       ui_out_text (uiout, "\nBreakpoint ");
       if (ui_out_is_mi_like_p (uiout))
-       ui_out_field_string (uiout, "reason", "breakpoint-hit");
+       ui_out_field_string (uiout, "reason", 
+                            async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
       ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number);
       ui_out_text (uiout, ", ");
       return PRINT_SRC_AND_LOC;
@@ -2086,60 +2121,58 @@ print_it_typical (bpstat bs)
       /* Did we stop because the user set the stop_on_solib_events
         variable?  (If so, we report this as a generic, "Stopped due
         to shlib event" message.) */
-      printf_filtered ("Stopped due to shared library event\n");
+      printf_filtered (_("Stopped due to shared library event\n"));
       return PRINT_NOTHING;
       break;
 
     case bp_thread_event:
       /* Not sure how we will get here. 
         GDB should not stop for these breakpoints.  */
-      printf_filtered ("Thread Event Breakpoint: gdb should not stop!\n");
+      printf_filtered (_("Thread Event Breakpoint: gdb should not stop!\n"));
       return PRINT_NOTHING;
       break;
 
     case bp_overlay_event:
       /* By analogy with the thread event, GDB should not stop for these. */
-      printf_filtered ("Overlay Event Breakpoint: gdb should not stop!\n");
+      printf_filtered (_("Overlay Event Breakpoint: gdb should not stop!\n"));
       return PRINT_NOTHING;
       break;
 
     case bp_catch_load:
       annotate_catchpoint (bs->breakpoint_at->number);
-      printf_filtered ("\nCatchpoint %d (", bs->breakpoint_at->number);
-      printf_filtered ("loaded");
-      printf_filtered (" %s), ", bs->breakpoint_at->triggered_dll_pathname);
+      printf_filtered (_("\nCatchpoint %d (loaded %s), "),
+                      bs->breakpoint_at->number,
+                      bs->breakpoint_at->triggered_dll_pathname);
       return PRINT_SRC_AND_LOC;
       break;
 
     case bp_catch_unload:
       annotate_catchpoint (bs->breakpoint_at->number);
-      printf_filtered ("\nCatchpoint %d (", bs->breakpoint_at->number);
-      printf_filtered ("unloaded");
-      printf_filtered (" %s), ", bs->breakpoint_at->triggered_dll_pathname);
+      printf_filtered (_("\nCatchpoint %d (unloaded %s), "),
+                      bs->breakpoint_at->number,
+                      bs->breakpoint_at->triggered_dll_pathname);
       return PRINT_SRC_AND_LOC;
       break;
 
     case bp_catch_fork:
       annotate_catchpoint (bs->breakpoint_at->number);
-      printf_filtered ("\nCatchpoint %d (", bs->breakpoint_at->number);
-      printf_filtered ("forked");
-      printf_filtered (" process %d), ", 
+      printf_filtered (_("\nCatchpoint %d (forked process %d), "),
+                      bs->breakpoint_at->number, 
                       bs->breakpoint_at->forked_inferior_pid);
       return PRINT_SRC_AND_LOC;
       break;
 
     case bp_catch_vfork:
       annotate_catchpoint (bs->breakpoint_at->number);
-      printf_filtered ("\nCatchpoint %d (", bs->breakpoint_at->number);
-      printf_filtered ("vforked");
-      printf_filtered (" process %d), ", 
+      printf_filtered (_("\nCatchpoint %d (vforked process %d), "),
+                      bs->breakpoint_at->number, 
                       bs->breakpoint_at->forked_inferior_pid);
       return PRINT_SRC_AND_LOC;
       break;
 
     case bp_catch_exec:
       annotate_catchpoint (bs->breakpoint_at->number);
-      printf_filtered ("\nCatchpoint %d (exec'd %s), ",
+      printf_filtered (_("\nCatchpoint %d (exec'd %s), "),
                       bs->breakpoint_at->number,
                       bs->breakpoint_at->exec_pathname);
       return PRINT_SRC_AND_LOC;
@@ -2150,25 +2183,22 @@ print_it_typical (bpstat bs)
          (CURRENT_EXCEPTION_KIND == EX_EVENT_CATCH))
        {
          annotate_catchpoint (bs->breakpoint_at->number);
-         printf_filtered ("\nCatchpoint %d (exception caught), "
+         printf_filtered (_("\nCatchpoint %d (exception caught), ")
                           bs->breakpoint_at->number);
-         printf_filtered ("throw location ");
          if (CURRENT_EXCEPTION_THROW_PC && CURRENT_EXCEPTION_THROW_LINE)
-           printf_filtered ("%s:%d",
+           printf_filtered (_("throw location %s:%d, "),
                             CURRENT_EXCEPTION_THROW_FILE,
                             CURRENT_EXCEPTION_THROW_LINE);
          else
-           printf_filtered ("unknown");
+           printf_filtered (_("throw location unknown, "));
 
-         printf_filtered (", catch location ");
          if (CURRENT_EXCEPTION_CATCH_PC && CURRENT_EXCEPTION_CATCH_LINE)
-           printf_filtered ("%s:%d",
+           printf_filtered (_("catch location %s:%d\n"),
                             CURRENT_EXCEPTION_CATCH_FILE,
                             CURRENT_EXCEPTION_CATCH_LINE);
          else
-           printf_filtered ("unknown");
+           printf_filtered (_("catch location unknown\n"));
 
-         printf_filtered ("\n");
          /* don't bother to print location frame info */
          return PRINT_SRC_ONLY;
        }
@@ -2184,25 +2214,22 @@ print_it_typical (bpstat bs)
          (CURRENT_EXCEPTION_KIND == EX_EVENT_THROW))
        {
          annotate_catchpoint (bs->breakpoint_at->number);
-         printf_filtered ("\nCatchpoint %d (exception thrown), ",
+         printf_filtered (_("\nCatchpoint %d (exception thrown), "),
                           bs->breakpoint_at->number);
-         printf_filtered ("throw location ");
          if (CURRENT_EXCEPTION_THROW_PC && CURRENT_EXCEPTION_THROW_LINE)
-           printf_filtered ("%s:%d",
+           printf_filtered (_("throw location %s:%d, "),
                             CURRENT_EXCEPTION_THROW_FILE,
                             CURRENT_EXCEPTION_THROW_LINE);
          else
-           printf_filtered ("unknown");
+           printf_filtered (_("throw location unknown, "));
 
-         printf_filtered (", catch location ");
          if (CURRENT_EXCEPTION_CATCH_PC && CURRENT_EXCEPTION_CATCH_LINE)
-           printf_filtered ("%s:%d",
+           printf_filtered (_("catch location %s:%d\n"),
                             CURRENT_EXCEPTION_CATCH_FILE,
                             CURRENT_EXCEPTION_CATCH_LINE);
          else
-           printf_filtered ("unknown");
+           printf_filtered (_("catch location unknown\n"));
 
-         printf_filtered ("\n");
          /* don't bother to print location frame info */
          return PRINT_SRC_ONLY; 
        }
@@ -2219,7 +2246,9 @@ print_it_typical (bpstat bs)
        {
          annotate_watchpoint (bs->breakpoint_at->number);
          if (ui_out_is_mi_like_p (uiout))
-           ui_out_field_string (uiout, "reason", "watchpoint-trigger");
+           ui_out_field_string
+             (uiout, "reason",
+              async_reason_lookup (EXEC_ASYNC_WATCHPOINT_TRIGGER));
          mention (bs->breakpoint_at);
          ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
          ui_out_text (uiout, "\nOld value = ");
@@ -2239,7 +2268,9 @@ print_it_typical (bpstat bs)
 
     case bp_read_watchpoint:
       if (ui_out_is_mi_like_p (uiout))
-       ui_out_field_string (uiout, "reason", "read-watchpoint-trigger");
+       ui_out_field_string
+         (uiout, "reason",
+          async_reason_lookup (EXEC_ASYNC_READ_WATCHPOINT_TRIGGER));
       mention (bs->breakpoint_at);
       ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
       ui_out_text (uiout, "\nValue = ");
@@ -2255,7 +2286,9 @@ print_it_typical (bpstat bs)
        {
          annotate_watchpoint (bs->breakpoint_at->number);
          if (ui_out_is_mi_like_p (uiout))
-           ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
+           ui_out_field_string
+             (uiout, "reason",
+              async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
          mention (bs->breakpoint_at);
          ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
          ui_out_text (uiout, "\nOld value = ");
@@ -2269,7 +2302,9 @@ print_it_typical (bpstat bs)
        {
          mention (bs->breakpoint_at);
          if (ui_out_is_mi_like_p (uiout))
-           ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
+           ui_out_field_string
+             (uiout, "reason",
+              async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
          ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "value");
          ui_out_text (uiout, "\nValue = ");
        }
@@ -2285,7 +2320,9 @@ print_it_typical (bpstat bs)
 
     case bp_finish:
       if (ui_out_is_mi_like_p (uiout))
-       ui_out_field_string (uiout, "reason", "function-finished");
+       ui_out_field_string
+         (uiout, "reason",
+          async_reason_lookup (EXEC_ASYNC_FUNCTION_FINISHED));
       return PRINT_UNKNOWN;
       break;
 
@@ -2341,7 +2378,7 @@ print_bp_stop_message (bpstat bs)
 
     default:
       internal_error (__FILE__, __LINE__,
-                     "print_bp_stop_message: unrecognized enum value");
+                     _("print_bp_stop_message: unrecognized enum value"));
       break;
     }
 }
@@ -2441,9 +2478,6 @@ watchpoint_check (void *p)
   struct breakpoint *b;
   struct frame_info *fr;
   int within_current_scope;
-#if 0
-  struct frame_id current_frame_id;
-#endif
 
   b = bs->breakpoint_at;
 
@@ -2518,7 +2552,8 @@ watchpoint_check (void *p)
         will be deleted already. So we have no choice but print the
         information here. */
       if (ui_out_is_mi_like_p (uiout))
-       ui_out_field_string (uiout, "reason", "watchpoint-scope");
+       ui_out_field_string
+         (uiout, "reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
       ui_out_text (uiout, "\nWatchpoint ");
       ui_out_field_int (uiout, "wpnum", bs->breakpoint_at->number);
       ui_out_text (uiout, " deleted because the program has left the block in\n\
@@ -2532,11 +2567,10 @@ which its expression is valid.\n");
     }
 }
 
-/* Get a bpstat associated with having just stopped at address *PC
-   and frame address CORE_ADDRESS.  Update *PC to point at the
-   breakpoint (if we hit a breakpoint).  NOT_A_SW_BREAKPOINT is nonzero
-   if this is known to not be a real breakpoint (it could still be a
-   watchpoint, though).  */
+/* Get a bpstat associated with having just stopped at address
+   BP_ADDR in thread PTID.  STOPPED_BY_WATCHPOINT is 1 if the
+   target thinks we stopped due to a hardware watchpoint, 0 if we
+   know we did not trigger a hardware watchpoint, and -1 if we do not know.  */
 
 /* Determine whether we stopped at a breakpoint, etc, or whether we
    don't understand this stop.  Result is a chain of bpstat's such that:
@@ -2553,30 +2587,20 @@ which its expression is valid.\n");
    commands, FIXME??? fields.  */
 
 bpstat
-bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
+bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid, int stopped_by_watchpoint)
 {
   struct breakpoint *b, *temp;
-  CORE_ADDR bp_addr;
   /* True if we've hit a breakpoint (as opposed to a watchpoint).  */
   int real_breakpoint = 0;
   /* Root of the chain of bpstat's */
   struct bpstats root_bs[1];
   /* Pointer to the last thing in the chain currently.  */
   bpstat bs = root_bs;
-
-  /* Get the address where the breakpoint would have been.  The
-     "not_a_sw_breakpoint" argument is meant to distinguish between a
-     breakpoint trap event and a trace/singlestep trap event.  For a
-     trace/singlestep trap event, we would not want to subtract
-     DECR_PC_AFTER_BREAK from the PC. */
-
-  bp_addr = *pc - (not_a_sw_breakpoint ? 0 : DECR_PC_AFTER_BREAK);
+  int thread_id = pid_to_thread_id (ptid);
 
   ALL_BREAKPOINTS_SAFE (b, temp)
   {
-    if (b->enable_state == bp_disabled
-       || b->enable_state == bp_shlib_disabled
-       || b->enable_state == bp_call_disabled)
+    if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
       continue;
 
     if (b->type != bp_watchpoint
@@ -2598,9 +2622,21 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
          continue;
       }
 
+    /* Continuable hardware watchpoints are treated as non-existent if the 
+       reason we stopped wasn't a hardware watchpoint (we didn't stop on 
+       some data address).  Otherwise gdb won't stop on a break instruction 
+       in the code (not from a breakpoint) when a hardware watchpoint has 
+       been defined.  */
+
+    if ((b->type == bp_hardware_watchpoint
+        || b->type == bp_read_watchpoint
+        || b->type == bp_access_watchpoint)
+       && !stopped_by_watchpoint)
+      continue;
+
     if (b->type == bp_hardware_breakpoint)
       {
-       if (b->loc->address != (*pc - DECR_PC_AFTER_HW_BREAK))
+       if (b->loc->address != bp_addr)
          continue;
        if (overlay_debugging           /* unmapped overlay section */
            && section_is_overlay (b->loc->section) 
@@ -2694,7 +2730,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
            /* FALLTHROUGH */
          case 0:
            /* Error from catch_errors.  */
-           printf_filtered ("Watchpoint %d deleted.\n", b->number);
+           printf_filtered (_("Watchpoint %d deleted.\n"), b->number);
            if (b->related_breakpoint)
              b->related_breakpoint->disposition = disp_del_at_next_stop;
            b->disposition = disp_del_at_next_stop;
@@ -2712,15 +2748,14 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
        struct value *v;
        int found = 0;
 
-       addr = target_stopped_data_address ();
-       if (addr == 0)
+       if (!target_stopped_data_address (&current_target, &addr))
          continue;
-       for (v = b->val_chain; v; v = v->next)
+       for (v = b->val_chain; v; v = value_next (v))
          {
            if (VALUE_LVAL (v) == lval_memory
-               && ! VALUE_LAZY (v))
+               && ! value_lazy (v))
              {
-               struct type *vtype = check_typedef (VALUE_TYPE (v));
+               struct type *vtype = check_typedef (value_type (v));
 
                if (v == b->val_chain
                    || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
@@ -2728,11 +2763,11 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
                  {
                    CORE_ADDR vaddr;
 
-                   vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+                   vaddr = VALUE_ADDRESS (v) + value_offset (v);
                    /* Exact match not required.  Within range is
                        sufficient.  */
                    if (addr >= vaddr &&
-                       addr < vaddr + TYPE_LENGTH (VALUE_TYPE (v)))
+                       addr < vaddr + TYPE_LENGTH (value_type (v)))
                      found = 1;
                  }
              }
@@ -2772,7 +2807,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
                /* Can't happen.  */
              case 0:
                /* Error from catch_errors.  */
-               printf_filtered ("Watchpoint %d deleted.\n", b->number);
+               printf_filtered (_("Watchpoint %d deleted.\n"), b->number);
                if (b->related_breakpoint)
                  b->related_breakpoint->disposition = disp_del_at_next_stop;
                b->disposition = disp_del_at_next_stop;
@@ -2826,6 +2861,12 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
            /* Don't consider this a hit.  */
            --(b->hit_count);
          }
+       else if (b->thread != -1 && b->thread != thread_id)
+         {
+           bs->stop = 0;
+           /* Don't consider this a hit.  */
+           --(b->hit_count);
+         }
        else if (b->ignore_count > 0)
          {
            b->ignore_count--;
@@ -2858,30 +2899,6 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
   bs->next = NULL;             /* Terminate the chain */
   bs = root_bs->next;          /* Re-grab the head of the chain */
 
-  if (real_breakpoint && bs)
-    {
-      if (bs->breakpoint_at->type == bp_hardware_breakpoint)
-       {
-         if (DECR_PC_AFTER_HW_BREAK != 0)
-           {
-             *pc = *pc - DECR_PC_AFTER_HW_BREAK;
-             write_pc (*pc);
-           }
-       }
-      else
-       {
-         if (DECR_PC_AFTER_BREAK != 0 || must_shift_inst_regs)
-           {
-             *pc = bp_addr;
-#if defined (SHIFT_INST_REGS)
-             SHIFT_INST_REGS ();
-#else /* No SHIFT_INST_REGS.  */
-             write_pc (bp_addr);
-#endif /* No SHIFT_INST_REGS.  */
-           }
-       }
-    }
-
   /* The value of a hardware watchpoint hasn't changed, but the
      intermediate memory locations we are watching may have.  */
   if (bs && !bs->stop &&
@@ -2998,7 +3015,7 @@ bpstat_what (bpstat bs)
 
   /* step_resume entries: a step resume breakpoint overrides another
      breakpoint of signal handling (see comment in wait_for_inferior
-     at first PC_IN_SIGTRAMP where we set the step_resume breakpoint).  */
+     at where we set the step_resume breakpoint).  */
   /* We handle the through_sigtramp_breakpoint the same way; having both
      one of those and a step_resume_breakpoint is probably very rare (?).  */
 
@@ -3179,7 +3196,7 @@ bpstat_should_step (void)
 {
   struct breakpoint *b;
   ALL_BREAKPOINTS (b)
-    if (b->enable_state == bp_enabled && b->type == bp_watchpoint)
+    if (breakpoint_enabled (b) && b->type == bp_watchpoint)
       return 1;
   return 0;
 }
@@ -3190,7 +3207,7 @@ bpstat_have_active_hw_watchpoints (void)
 {
   struct bp_location *bpt;
   ALL_BP_LOCATIONS (bpt)
-    if ((bpt->owner->enable_state == bp_enabled)
+    if (breakpoint_enabled (bpt->owner)
        && bpt->inserted
        && bpt->loc_type == bp_loc_hardware_watchpoint)
       return 1;
@@ -3322,7 +3339,7 @@ print_one_breakpoint (struct breakpoint *b,
   if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0])))
       || ((int) b->type != bptypes[(int) b->type].type))
     internal_error (__FILE__, __LINE__,
-                   "bptypes table does not describe type #%d.",
+                   _("bptypes table does not describe type #%d."),
                    (int) b->type);
   ui_out_field_string (uiout, "type", bptypes[(int) b->type].description);
 
@@ -3352,7 +3369,7 @@ print_one_breakpoint (struct breakpoint *b,
       {
       case bp_none:
        internal_error (__FILE__, __LINE__,
-                       "print_one_breakpoint: bp_none encountered\n");
+                       _("print_one_breakpoint: bp_none encountered\n"));
        break;
 
       case bp_watchpoint:
@@ -3404,6 +3421,7 @@ print_one_breakpoint (struct breakpoint *b,
            ui_out_field_int (uiout, "what", b->forked_inferior_pid);
            ui_out_spaces (uiout, 1);
          }
+       break;
 
       case bp_catch_exec:
        /* Field 4, the address, is omitted (which makes the columns
@@ -3458,7 +3476,10 @@ print_one_breakpoint (struct breakpoint *b,
        if (addressprint)
          {
            annotate_field (4);
-           ui_out_field_core_addr (uiout, "addr", b->loc->address);
+           if (b->pending)
+             ui_out_field_string (uiout, "addr", "<PENDING>");
+           else
+             ui_out_field_core_addr (uiout, "addr", b->loc->address);
          }
        annotate_field (5);
        *last_addr = b->loc->address;
@@ -3475,8 +3496,22 @@ print_one_breakpoint (struct breakpoint *b,
              }
            ui_out_field_string (uiout, "file", b->source_file);
            ui_out_text (uiout, ":");
+
+            if (ui_out_is_mi_like_p (uiout))
+              {
+                struct symtab_and_line sal = find_pc_line (b->loc->address, 0);
+                char *fullname = symtab_to_fullname (sal.symtab);
+
+                if (fullname)
+                  ui_out_field_string (uiout, "fullname", fullname);
+              }
+
            ui_out_field_int (uiout, "line", b->line_number);
          }
+       else if (b->pending)
+         {
+           ui_out_field_string (uiout, "pending", b->addr_string);
+         }
        else
          {
            print_address_symbolic (b->loc->address, stb->stream, demangle, "");
@@ -3513,7 +3548,15 @@ print_one_breakpoint (struct breakpoint *b,
       ui_out_field_stream (uiout, "cond", stb);
       ui_out_text (uiout, "\n");
     }
-  
+
+  if (b->pending && b->cond_string)
+    {
+      annotate_field (7);
+      ui_out_text (uiout, "\tstop only if ");
+      ui_out_field_string (uiout, "cond", b->cond_string);
+      ui_out_text (uiout, "\n");
+    }
+
   if (b->thread != -1)
     {
       /* FIXME should make an annotation for this */
@@ -3587,14 +3630,14 @@ do_captured_breakpoint_query (struct ui_out *uiout, void *data)
 }
 
 enum gdb_rc
-gdb_breakpoint_query (struct ui_out *uiout, int bnum)
+gdb_breakpoint_query (struct ui_out *uiout, int bnum, char **error_message)
 {
   struct captured_breakpoint_query_args args;
   args.bnum = bnum;
   /* For the moment we don't trust print_one_breakpoint() to not throw
      an error. */
-  return catch_exceptions (uiout, do_captured_breakpoint_query, &args,
-                          NULL, RETURN_MASK_ALL);
+  return catch_exceptions_with_msg (uiout, do_captured_breakpoint_query, &args,
+                                   error_message, RETURN_MASK_ALL);
 }
 
 /* Return non-zero if B is user settable (breakpoints, watchpoints,
@@ -3744,14 +3787,17 @@ describe_other_breakpoints (CORE_ADDR pc, asection *section)
 
   ALL_BREAKPOINTS (b)
     if (b->loc->address == pc) /* address match / overlay match */
-      if (!overlay_debugging || b->loc->section == section)
+      if (!b->pending && (!overlay_debugging || b->loc->section == section))
        others++;
   if (others > 0)
     {
-      printf_filtered ("Note: breakpoint%s ", (others > 1) ? "s" : "");
+      if (others == 1)
+       printf_filtered (_("Note: breakpoint "));
+      else /* if (others == ???) */
+       printf_filtered (_("Note: breakpoints "));
       ALL_BREAKPOINTS (b)
        if (b->loc->address == pc)      /* address match / overlay match */
-         if (!overlay_debugging || b->loc->section == section)
+         if (!b->pending && (!overlay_debugging || b->loc->section == section))
            {
              others--;
              printf_filtered ("%d%s%s ",
@@ -3766,8 +3812,8 @@ describe_other_breakpoints (CORE_ADDR pc, asection *section)
                               (others > 1) ? "," 
                               : ((others == 1) ? " and" : ""));
            }
-      printf_filtered ("also set at pc ");
-      print_address_numeric (pc, 1, gdb_stdout);
+      printf_filtered (_("also set at pc "));
+      deprecated_print_address_numeric (pc, 1, gdb_stdout);
       printf_filtered (".\n");
     }
 }
@@ -3840,6 +3886,7 @@ check_duplicates (struct breakpoint *bpt)
   ALL_BP_LOCATIONS (b)
     if (b->owner->enable_state != bp_disabled
        && b->owner->enable_state != bp_shlib_disabled
+       && !b->owner->pending
        && b->owner->enable_state != bp_call_disabled
        && b->address == address        /* address / overlay match */
        && (!overlay_debugging || b->section == section)
@@ -3866,14 +3913,15 @@ check_duplicates (struct breakpoint *bpt)
       /* Permanent breakpoint should always be inserted.  */
       if (! perm_bp->inserted)
        internal_error (__FILE__, __LINE__,
-                       "allegedly permanent breakpoint is not "
-                       "actually inserted");
+                       _("allegedly permanent breakpoint is not "
+                       "actually inserted"));
 
       ALL_BP_LOCATIONS (b)
        if (b != perm_bp)
          {
            if (b->owner->enable_state != bp_disabled
                && b->owner->enable_state != bp_shlib_disabled
+               && !b->owner->pending
                && b->owner->enable_state != bp_call_disabled
                && b->address == address        /* address / overlay match */
                && (!overlay_debugging || b->section == section)
@@ -3881,8 +3929,8 @@ check_duplicates (struct breakpoint *bpt)
              {
                if (b->inserted)
                  internal_error (__FILE__, __LINE__,
-                                 "another breakpoint was inserted on top of "
-                                 "a permanent breakpoint");
+                                 _("another breakpoint was inserted on top of "
+                                 "a permanent breakpoint"));
 
                b->duplicate = 1;
              }
@@ -3897,13 +3945,13 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
   char astr1[40];
   char astr2[40];
 
-  strcpy (astr1, local_hex_string_custom ((unsigned long) from_addr, "08l"));
-  strcpy (astr2, local_hex_string_custom ((unsigned long) to_addr, "08l"));
+  strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8));
+  strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8));
   if (have_bnum)
-    warning ("Breakpoint %d address previously adjusted from %s to %s.",
+    warning (_("Breakpoint %d address previously adjusted from %s to %s."),
              bnum, astr1, astr2);
   else
-    warning ("Breakpoint address adjusted from %s to %s.", astr1, astr2);
+    warning (_("Breakpoint address adjusted from %s to %s."), astr1, astr2);
 }
 
 /* Adjust a breakpoint's address to account for architectural constraints
@@ -3912,13 +3960,25 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
    this function is simply the identity function.  */
 
 static CORE_ADDR
-adjust_breakpoint_address (CORE_ADDR bpaddr)
+adjust_breakpoint_address (CORE_ADDR bpaddr, enum bptype bptype)
 {
   if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch))
     {
       /* Very few targets need any kind of breakpoint adjustment.  */
       return bpaddr;
     }
+  else if (bptype == bp_watchpoint
+           || bptype == bp_hardware_watchpoint
+           || bptype == bp_read_watchpoint
+           || bptype == bp_access_watchpoint
+           || bptype == bp_catch_fork
+           || bptype == bp_catch_vfork
+           || bptype == bp_catch_exec)
+    {
+      /* Watchpoints and the various bp_catch_* eventpoints should not
+         have their addresses modified.  */
+      return bpaddr;
+    }
   else
     {
       CORE_ADDR adjusted_bpaddr;
@@ -3985,7 +4045,7 @@ allocate_bp_location (struct breakpoint *bpt, enum bptype bp_type)
       loc->loc_type = bp_loc_other;
       break;
     default:
-      internal_error (__FILE__, __LINE__, "unknown breakpoint type");
+      internal_error (__FILE__, __LINE__, _("unknown breakpoint type"));
     }
 
   /* Add this breakpoint to the end of the chain.  */
@@ -4027,7 +4087,8 @@ set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
   memset (b, 0, sizeof (*b));
   b->loc = allocate_bp_location (b, bptype);
   b->loc->requested_address = sal.pc;
-  b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
+  b->loc->address = adjust_breakpoint_address (b->loc->requested_address,
+                                               bptype);
   if (sal.symtab == NULL)
     b->source_file = NULL;
   else
@@ -4050,6 +4111,7 @@ set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
   b->forked_inferior_pid = 0;
   b->exec_pathname = NULL;
   b->ops = NULL;
+  b->pending = 0;
 
   /* Add this breakpoint to the end of the chain
      so that a list of breakpoints will come out in order
@@ -4218,7 +4280,7 @@ create_thread_event_breakpoint (CORE_ADDR address)
   
   b->enable_state = bp_enabled;
   /* addr_string has to be used or breakpoint_re_set will delete me.  */
-  xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
+  b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
 
   return b;
 }
@@ -4233,7 +4295,66 @@ remove_thread_event_breakpoints (void)
       delete_breakpoint (b);
 }
 
-#ifdef SOLIB_ADD
+struct captured_parse_breakpoint_args
+  {
+    char **arg_p;
+    struct symtabs_and_lines *sals_p;
+    char ***addr_string_p;
+    int *not_found_ptr;
+  };
+
+struct lang_and_radix
+  {
+    enum language lang;
+    int radix;
+  };
+
+/* Cleanup helper routine to restore the current language and
+   input radix.  */
+static void
+do_restore_lang_radix_cleanup (void *old)
+{
+  struct lang_and_radix *p = old;
+  set_language (p->lang);
+  input_radix = p->radix;
+}
+
+/* Try and resolve a pending breakpoint.  */
+static int
+resolve_pending_breakpoint (struct breakpoint *b)
+{
+  /* Try and reparse the breakpoint in case the shared library
+     is now loaded.  */
+  struct symtabs_and_lines sals;
+  struct symtab_and_line pending_sal;
+  char **cond_string = (char **) NULL;
+  char *copy_arg = b->addr_string;
+  char **addr_string;
+  char *errmsg;
+  int rc;
+  int not_found = 0;
+  struct ui_file *old_gdb_stderr;
+  struct lang_and_radix old_lr;
+  struct cleanup *old_chain;
+  
+  /* Set language, input-radix, then reissue breakpoint command. 
+     Ensure the language and input-radix are restored afterwards.  */
+  old_lr.lang = current_language->la_language;
+  old_lr.radix = input_radix;
+  old_chain = make_cleanup (do_restore_lang_radix_cleanup, &old_lr);
+  
+  set_language (b->language);
+  input_radix = b->input_radix;
+  rc = break_command_1 (b->addr_string, b->flag, b->from_tty, b);
+  
+  if (rc == GDB_RC_OK)
+    /* Pending breakpoint has been resolved.  */
+    printf_filtered (_("Pending breakpoint \"%s\" resolved\n"), b->addr_string);
+
+  do_cleanups (old_chain);
+  return rc;
+}
+
 void
 remove_solib_event_breakpoints (void)
 {
@@ -4265,12 +4386,14 @@ disable_breakpoints_in_shlibs (int silent)
   /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
   ALL_BREAKPOINTS (b)
   {
-#if defined (PC_SOLIB)
-    if (((b->type == bp_breakpoint) ||
-        (b->type == bp_hardware_breakpoint)) &&
-       b->enable_state == bp_enabled &&
-       !b->loc->duplicate &&
-       PC_SOLIB (b->loc->address))
+    if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint))
+       && breakpoint_enabled (b) && !b->loc->duplicate
+#ifdef PC_SOLIB
+       && PC_SOLIB (b->loc->address)
+#else
+       && solib_address (b->loc->address)
+#endif
+       )
       {
        b->enable_state = bp_shlib_disabled;
        if (!silent)
@@ -4278,35 +4401,85 @@ disable_breakpoints_in_shlibs (int silent)
            if (!disabled_shlib_breaks)
              {
                target_terminal_ours_for_output ();
-               warning ("Temporarily disabling shared library breakpoints:");
+               warning (_("Temporarily disabling shared library breakpoints:"));
              }
            disabled_shlib_breaks = 1;
-           warning ("breakpoint #%d ", b->number);
+           warning (_("breakpoint #%d "), b->number);
          }
       }
-#endif
   }
 }
 
-/* Try to reenable any breakpoints in shared libraries.  */
+/* Disable any breakpoints that are in in an unloaded shared library.  Only
+   apply to enabled breakpoints, disabled ones can just stay disabled.  */
+
 void
-re_enable_breakpoints_in_shlibs (void)
+disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
 {
   struct breakpoint *b;
+  int disabled_shlib_breaks = 0;
 
+  /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK.  */
   ALL_BREAKPOINTS (b)
-    if (b->enable_state == bp_shlib_disabled)
-    {
-      char buf[1];
-
-      /* Do not reenable the breakpoint if the shared library
-         is still not mapped in.  */
-      if (target_read_memory (b->loc->address, buf, 1) == 0)
-       b->enable_state = bp_enabled;
-    }
+  {
+    if ((b->loc->loc_type == bp_loc_hardware_breakpoint
+       || b->loc->loc_type == bp_loc_software_breakpoint)
+       && breakpoint_enabled (b) && !b->loc->duplicate)
+      {
+#ifdef PC_SOLIB
+       char *so_name = PC_SOLIB (b->loc->address);
+#else
+       char *so_name = solib_address (b->loc->address);
+#endif
+       if (so_name && !strcmp (so_name, solib->so_name))
+          {
+           b->enable_state = bp_shlib_disabled;
+           /* At this point, we cannot rely on remove_breakpoint
+              succeeding so we must mark the breakpoint as not inserted
+              to prevent future errors occurring in remove_breakpoints.  */
+           b->loc->inserted = 0;
+           if (!disabled_shlib_breaks)
+             {
+               target_terminal_ours_for_output ();
+               warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""),
+                         so_name);
+             }
+           disabled_shlib_breaks = 1;
+         }
+      }
+  }
 }
 
+/* Try to reenable any breakpoints in shared libraries.  */
+void
+re_enable_breakpoints_in_shlibs (void)
+{
+  struct breakpoint *b, *tmp;
+
+  ALL_BREAKPOINTS_SAFE (b, tmp)
+  {
+    if (b->enable_state == bp_shlib_disabled)
+      {
+       gdb_byte buf[1];
+       char *lib;
+       
+       /* Do not reenable the breakpoint if the shared library is
+          still not mapped in.  */
+#ifdef PC_SOLIB
+       lib = PC_SOLIB (b->loc->address);
+#else
+       lib = solib_address (b->loc->address);
 #endif
+       if (lib != NULL && target_read_memory (b->loc->address, buf, 1) == 0)
+         b->enable_state = bp_enabled;
+      }
+    else if (b->pending && (b->enable_state == bp_enabled))
+      {
+       if (resolve_pending_breakpoint (b) == GDB_RC_OK)
+         delete_breakpoint (b);
+      }
+  }
+}
 
 static void
 solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
@@ -4321,21 +4494,22 @@ solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
   char **canonical = (char **) NULL;
   int thread = -1;             /* All threads. */
 
-  /* Set a breakpoint on the specified hook. */
-  sals = decode_line_1 (&hookname, 1, (struct symtab *) NULL, 0, &canonical);
+  /* Set a breakpoint on the specified hook.  */
+  sals = decode_line_1 (&hookname, 1, (struct symtab *) NULL, 
+                       0, &canonical, NULL);
   addr_end = hookname;
 
   if (sals.nelts == 0)
     {
-      warning ("Unable to set a breakpoint on dynamic linker callback.");
-      warning ("Suggest linking with /opt/langtools/lib/end.o.");
-      warning ("GDB will be unable to track shl_load/shl_unload calls");
+      warning (_("Unable to set a breakpoint on dynamic linker callback.\n"
+                "Suggest linking with /opt/langtools/lib/end.o.\n"
+                "GDB will be unable to track shl_load/shl_unload calls."));
       return;
     }
   if (sals.nelts != 1)
     {
-      warning ("Unable to set unique breakpoint on dynamic linker callback.");
-      warning ("GDB will be unable to track shl_load/shl_unload calls");
+      warning (_("Unable to set unique breakpoint on dynamic linker callback.\n"
+                "GDB will be unable to track shl_load/shl_unload calls."));
       return;
     }
 
@@ -4396,7 +4570,7 @@ void
 create_solib_unload_event_breakpoint (char *hookname, int tempflag,
                                      char *dll_pathname, char *cond_string)
 {
-  solib_load_unload_1 (hookname,tempflag, dll_pathname, 
+  solib_load_unload_1 (hookname, tempflag, dll_pathname, 
                       cond_string, bp_catch_unload);
 }
 
@@ -4490,14 +4664,13 @@ hw_watchpoint_used_count (enum bptype type, int *other_type_used)
   *other_type_used = 0;
   ALL_BREAKPOINTS (b)
   {
-    if (b->enable_state == bp_enabled)
+    if (breakpoint_enabled (b))
       {
        if (b->type == type)
          i++;
        else if ((b->type == bp_hardware_watchpoint ||
                  b->type == bp_read_watchpoint ||
-                 b->type == bp_access_watchpoint)
-                && b->enable_state == bp_enabled)
+                 b->type == bp_access_watchpoint))
          *other_type_used = 1;
       }
   }
@@ -4519,7 +4692,8 @@ set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id)
     if (b->type == bp_longjmp_resume)
     {
       b->loc->requested_address = pc;
-      b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
+      b->loc->address = adjust_breakpoint_address (b->loc->requested_address,
+                                                   b->type);
       b->enable_state = bp_enabled;
       b->frame_id = frame_id;
       check_duplicates (b);
@@ -4539,7 +4713,7 @@ disable_watchpoints_before_interactive_call_start (void)
         || (b->type == bp_read_watchpoint)
         || (b->type == bp_access_watchpoint)
         || ep_is_exception_catchpoint (b))
-       && (b->enable_state == bp_enabled))
+       && breakpoint_enabled (b))
       {
        b->enable_state = bp_call_disabled;
        check_duplicates (b);
@@ -4604,13 +4778,13 @@ mention (struct breakpoint *b)
   stb = ui_out_stream_new (uiout);
   old_chain = make_cleanup_ui_out_stream_delete (stb);
 
-  /* FIXME: This is misplaced; mention() is called by things (like hitting a
-     watchpoint) other than breakpoint creation.  It should be possible to
-     clean this up and at the same time replace the random calls to
-     breakpoint_changed with this hook, as has already been done for
-     delete_breakpoint_hook and so on.  */
-  if (create_breakpoint_hook)
-    create_breakpoint_hook (b);
+  /* FIXME: This is misplaced; mention() is called by things (like
+     hitting a watchpoint) other than breakpoint creation.  It should
+     be possible to clean this up and at the same time replace the
+     random calls to breakpoint_changed with this hook, as has already
+     been done for deprecated_delete_breakpoint_hook and so on.  */
+  if (deprecated_create_breakpoint_hook)
+    deprecated_create_breakpoint_hook (b);
   breakpoint_create_event (b->number);
 
   if (b->ops != NULL && b->ops->print_mention != NULL)
@@ -4619,7 +4793,7 @@ mention (struct breakpoint *b)
     switch (b->type)
       {
       case bp_none:
-       printf_filtered ("(apparently deleted?) Eventpoint %d: ", b->number);
+       printf_filtered (_("(apparently deleted?) Eventpoint %d: "), b->number);
        break;
       case bp_watchpoint:
        ui_out_text (uiout, "Watchpoint ");
@@ -4663,7 +4837,7 @@ mention (struct breakpoint *b)
            say_where = 0;
            break;
          }
-       printf_filtered ("Breakpoint %d", b->number);
+       printf_filtered (_("Breakpoint %d"), b->number);
        say_where = 1;
        break;
       case bp_hardware_breakpoint:
@@ -4672,12 +4846,12 @@ mention (struct breakpoint *b)
            say_where = 0;
            break;
          }
-       printf_filtered ("Hardware assisted breakpoint %d", b->number);
+       printf_filtered (_("Hardware assisted breakpoint %d"), b->number);
        say_where = 1;
        break;
       case bp_catch_load:
       case bp_catch_unload:
-       printf_filtered ("Catchpoint %d (%s %s)",
+       printf_filtered (_("Catchpoint %d (%s %s)"),
                         b->number,
                         (b->type == bp_catch_load) ? "load" : "unload",
                         (b->dll_pathname != NULL) ? 
@@ -4685,17 +4859,17 @@ mention (struct breakpoint *b)
        break;
       case bp_catch_fork:
       case bp_catch_vfork:
-       printf_filtered ("Catchpoint %d (%s)",
+       printf_filtered (_("Catchpoint %d (%s)"),
                         b->number,
                         (b->type == bp_catch_fork) ? "fork" : "vfork");
        break;
       case bp_catch_exec:
-       printf_filtered ("Catchpoint %d (exec)",
+       printf_filtered (_("Catchpoint %d (exec)"),
                         b->number);
        break;
       case bp_catch_catch:
       case bp_catch_throw:
-       printf_filtered ("Catchpoint %d (%s)",
+       printf_filtered (_("Catchpoint %d (%s)"),
                         b->number,
                         (b->type == bp_catch_catch) ? "catch" : "throw");
        break;
@@ -4716,14 +4890,23 @@ mention (struct breakpoint *b)
 
   if (say_where)
     {
-      if (addressprint || b->source_file == NULL)
+      /* i18n: cagney/2005-02-11: Below needs to be merged into a
+        single string.  */
+      if (b->pending)
        {
-         printf_filtered (" at ");
-         print_address_numeric (b->loc->address, 1, gdb_stdout);
+         printf_filtered (_(" (%s) pending."), b->addr_string);
+       }
+      else
+       {
+         if (addressprint || b->source_file == NULL)
+           {
+             printf_filtered (" at ");
+             deprecated_print_address_numeric (b->loc->address, 1, gdb_stdout);
+           }
+         if (b->source_file)
+           printf_filtered (": file %s, line %d.",
+                            b->source_file, b->line_number);
        }
-      if (b->source_file)
-       printf_filtered (": file %s, line %d.",
-                        b->source_file, b->line_number);
     }
   do_cleanups (old_chain);
   if (ui_out_is_mi_like_p (uiout))
@@ -4736,6 +4919,11 @@ mention (struct breakpoint *b)
    SALS.sal[i] breakpoint, include the corresponding ADDR_STRING[i],
    COND[i] and COND_STRING[i] values.
 
+   The parameter PENDING_BP points to a pending breakpoint that is
+   the basis of the breakpoints currently being created.  The pending
+   breakpoint may contain a separate condition string or commands
+   that were added after the initial pending breakpoint was created.
+
    NOTE: If the function succeeds, the caller is expected to cleanup
    the arrays ADDR_STRING, COND_STRING, COND and SALS (but not the
    array contents).  If the function fails (error() is called), the
@@ -4746,7 +4934,8 @@ static void
 create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
                    struct expression **cond, char **cond_string,
                    enum bptype type, enum bpdisp disposition,
-                   int thread, int ignore_count, int from_tty)
+                   int thread, int ignore_count, int from_tty,
+                   struct breakpoint *pending_bp)
 {
   if (type == bp_hardware_breakpoint)
     {
@@ -4755,9 +4944,9 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
        TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint, 
                                            i + sals.nelts, 0);
       if (target_resources_ok == 0)
-       error ("No hardware breakpoint support in the target.");
+       error (_("No hardware breakpoint support in the target."));
       else if (target_resources_ok < 0)
-       error ("Hardware breakpoints used exceeds limit.");
+       error (_("Hardware breakpoints used exceeds limit."));
     }
 
   /* Now set all the breakpoints.  */
@@ -4781,11 +4970,35 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
        else
          /* addr_string has to be used or breakpoint_re_set will delete
             me.  */
-         xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
+         b->addr_string = xstrprintf ("*0x%s", paddr (b->loc->address));
        b->cond_string = cond_string[i];
        b->ignore_count = ignore_count;
        b->enable_state = bp_enabled;
        b->disposition = disposition;
+       /* If resolving a pending breakpoint, a check must be made to see if
+          the user has specified a new condition or commands for the 
+          breakpoint.  A new condition will override any condition that was 
+          initially specified with the initial breakpoint command.  */
+       if (pending_bp)
+         {
+           char *arg;
+           if (pending_bp->cond_string)
+             {
+               arg = pending_bp->cond_string;
+               b->cond_string = savestring (arg, strlen (arg));
+               b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0);
+               if (*arg)
+                 error (_("Junk at end of pending breakpoint condition expression"));
+             }
+           /* If there are commands associated with the breakpoint, they should 
+              be copied too.  */
+           if (pending_bp->commands)
+             b->commands = copy_command_lines (pending_bp->commands);
+           
+           /* We have to copy over the ignore_count and thread as well.  */
+           b->ignore_count = pending_bp->ignore_count;
+           b->thread = pending_bp->thread;
+         }
        mention (b);
       }
   }    
@@ -4799,7 +5012,8 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
 static void
 parse_breakpoint_sals (char **address,
                       struct symtabs_and_lines *sals,
-                      char ***addr_string)
+                      char ***addr_string,
+                      int *not_found_ptr)
 {
   char *addr_start = *address;
   *addr_string = NULL;
@@ -4822,7 +5036,7 @@ parse_breakpoint_sals (char **address,
          sals->nelts = 1;
        }
       else
-       error ("No default breakpoint address now.");
+       error (_("No default breakpoint address now."));
     }
   else
     {
@@ -4840,9 +5054,11 @@ parse_breakpoint_sals (char **address,
              || ((strchr ("+-", (*address)[0]) != NULL)
                  && ((*address)[1] != '['))))
        *sals = decode_line_1 (address, 1, default_breakpoint_symtab,
-                              default_breakpoint_line, addr_string);
+                              default_breakpoint_line, addr_string, 
+                              not_found_ptr);
       else
-       *sals = decode_line_1 (address, 1, (struct symtab *) NULL, 0, addr_string);
+       *sals = decode_line_1 (address, 1, (struct symtab *) NULL, 0,
+                              addr_string, not_found_ptr);
     }
   /* For any SAL that didn't have a canonical string, fill one in. */
   if (sals->nelts > 0 && *addr_string == NULL)
@@ -4885,37 +5101,56 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
 
          Give the target a chance to bless sals.sals[i].pc before we
          try to make a breakpoint for it. */
-      if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
+#ifdef DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE
+      if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
        {
          if (address == NULL)
-           error ("Cannot break without a running program.");
+           error (_("Cannot break without a running program."));
          else
-           error ("Cannot break on %s without a running program."
+           error (_("Cannot break on %s without a running program.")
                   address);
        }
+#endif
     }
 }
 
+static void
+do_captured_parse_breakpoint (struct ui_out *ui, void *data)
+{
+  struct captured_parse_breakpoint_args *args = data;
+  
+  parse_breakpoint_sals (args->arg_p, args->sals_p, args->addr_string_p, 
+                        args->not_found_ptr);
+}
+
 /* Set a breakpoint according to ARG (function, linenum or *address)
    flag: first bit  : 0 non-temporary, 1 temporary.
-   second bit : 0 normal breakpoint, 1 hardware breakpoint. */
+   second bit : 0 normal breakpoint, 1 hardware breakpoint. 
 
-static void
-break_command_1 (char *arg, int flag, int from_tty)
+   PENDING_BP is non-NULL when this function is being called to resolve
+   a pending breakpoint.  */
+
+static int
+break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_bp)
 {
+  struct gdb_exception e;
   int tempflag, hardwareflag;
   struct symtabs_and_lines sals;
   struct expression **cond = 0;
-  /* Pointers in arg to the start, and one past the end, of the
-     condition.  */
+  struct symtab_and_line pending_sal;
   char **cond_string = (char **) NULL;
+  char *copy_arg;
+  char *err_msg;
   char *addr_start = arg;
   char **addr_string;
   struct cleanup *old_chain;
   struct cleanup *breakpoint_chain = NULL;
+  struct captured_parse_breakpoint_args parse_args;
   int i;
+  int pending = 0;
   int thread = -1;
   int ignore_count = 0;
+  int not_found = 0;
 
   hardwareflag = flag & BP_HARDWAREFLAG;
   tempflag = flag & BP_TEMPFLAG;
@@ -4923,19 +5158,75 @@ break_command_1 (char *arg, int flag, int from_tty)
   sals.sals = NULL;
   sals.nelts = 0;
   addr_string = NULL;
-  parse_breakpoint_sals (&arg, &sals, &addr_string);
 
-  if (!sals.nelts)
-    return;
+  parse_args.arg_p = &arg;
+  parse_args.sals_p = &sals;
+  parse_args.addr_string_p = &addr_string;
+  parse_args.not_found_ptr = &not_found;
+
+  e = catch_exception (uiout, do_captured_parse_breakpoint, 
+                      &parse_args, RETURN_MASK_ALL);
+
+  /* If caller is interested in rc value from parse, set value.  */
+  switch (e.reason)
+    {
+    case RETURN_QUIT:
+      exception_print (gdb_stderr, e);
+      return e.reason;
+    case RETURN_ERROR:
+      switch (e.error)
+       {
+       case NOT_FOUND_ERROR:
+         /* If called to resolve pending breakpoint, just return
+            error code.  */
+         if (pending_bp)
+           return e.reason;
+
+         exception_print (gdb_stderr, e);
+
+         /* If pending breakpoint support is turned off, throw
+            error.  */
+
+         if (pending_break_support == AUTO_BOOLEAN_FALSE)
+           deprecated_throw_reason (RETURN_ERROR);
+
+          /* If pending breakpoint support is auto query and the user
+            selects no, then simply return the error code.  */
+         if (pending_break_support == AUTO_BOOLEAN_AUTO && 
+             !nquery ("Make breakpoint pending on future shared library load? "))
+           return e.reason;
+
+         /* At this point, either the user was queried about setting
+            a pending breakpoint and selected yes, or pending
+            breakpoint behavior is on and thus a pending breakpoint
+            is defaulted on behalf of the user.  */
+         copy_arg = xstrdup (addr_start);
+         addr_string = &copy_arg;
+         sals.nelts = 1;
+         sals.sals = &pending_sal;
+         pending_sal.pc = 0;
+         pending = 1;
+         break;
+       default:
+         exception_print (gdb_stderr, e);
+         return e.reason;
+       }
+    default:
+      if (!sals.nelts)
+       return GDB_RC_FAIL;
+    }
 
   /* Create a chain of things that always need to be cleaned up. */
   old_chain = make_cleanup (null_cleanup, 0);
 
-  /* Make sure that all storage allocated to SALS gets freed.  */
-  make_cleanup (xfree, sals.sals);
-
-  /* Cleanup the addr_string array but not its contents. */
-  make_cleanup (xfree, addr_string);
+  if (!pending)
+    {
+      /* Make sure that all storage allocated to SALS gets freed.  */
+      make_cleanup (xfree, sals.sals);
+      
+      /* Cleanup the addr_string array but not its contents. */
+      make_cleanup (xfree, addr_string);
+    }
 
   /* Allocate space for all the cond expressions. */
   cond = xcalloc (sals.nelts, sizeof (struct expression *));
@@ -4962,72 +5253,104 @@ break_command_1 (char *arg, int flag, int from_tty)
 
   /* Resolve all line numbers to PC's and verify that the addresses
      are ok for the target.  */
-  breakpoint_sals_to_pc (&sals, addr_start);
+  if (!pending)
+    breakpoint_sals_to_pc (&sals, addr_start);
 
   /* Verify that condition can be parsed, before setting any
      breakpoints.  Allocate a separate condition expression for each
      breakpoint. */
   thread = -1;                 /* No specific thread yet */
-  for (i = 0; i < sals.nelts; i++)
+  if (!pending)
     {
-      char *tok = arg;
-      while (tok && *tok)
+      for (i = 0; i < sals.nelts; i++)
        {
-         char *end_tok;
-         int toklen;
-         char *cond_start = NULL;
-         char *cond_end = NULL;
-         while (*tok == ' ' || *tok == '\t')
-           tok++;
-
-         end_tok = tok;
-
-         while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
-           end_tok++;
-
-         toklen = end_tok - tok;
-
-         if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
+         char *tok = arg;
+         while (tok && *tok)
            {
-             tok = cond_start = end_tok + 1;
-             cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
-             make_cleanup (xfree, cond[i]);
-             cond_end = tok;
-             cond_string[i] = savestring (cond_start, cond_end - cond_start);
-             make_cleanup (xfree, cond_string[i]);
-           }
-         else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
-           {
-             char *tmptok;
-
-             tok = end_tok + 1;
-             tmptok = tok;
-             thread = strtol (tok, &tok, 0);
-             if (tok == tmptok)
-               error ("Junk after thread keyword.");
-             if (!valid_thread_id (thread))
-               error ("Unknown thread %d\n", thread);
+             char *end_tok;
+             int toklen;
+             char *cond_start = NULL;
+             char *cond_end = NULL;
+             while (*tok == ' ' || *tok == '\t')
+               tok++;
+             
+             end_tok = tok;
+             
+             while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
+               end_tok++;
+             
+             toklen = end_tok - tok;
+             
+             if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
+               {
+                 tok = cond_start = end_tok + 1;
+                 cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 
+                                        0);
+                 make_cleanup (xfree, cond[i]);
+                 cond_end = tok;
+                 cond_string[i] = savestring (cond_start, 
+                                              cond_end - cond_start);
+                 make_cleanup (xfree, cond_string[i]);
+               }
+             else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
+               {
+                 char *tmptok;
+                 
+                 tok = end_tok + 1;
+                 tmptok = tok;
+                 thread = strtol (tok, &tok, 0);
+                 if (tok == tmptok)
+                   error (_("Junk after thread keyword."));
+                 if (!valid_thread_id (thread))
+                   error (_("Unknown thread %d."), thread);
+               }
+             else
+               error (_("Junk at end of arguments."));
            }
-         else
-           error ("Junk at end of arguments.");
        }
+      create_breakpoints (sals, addr_string, cond, cond_string,
+                         hardwareflag ? bp_hardware_breakpoint 
+                         : bp_breakpoint,
+                         tempflag ? disp_del : disp_donttouch,
+                         thread, ignore_count, from_tty,
+                         pending_bp);
     }
-
-  create_breakpoints (sals, addr_string, cond, cond_string,
-                     hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
-                     tempflag ? disp_del : disp_donttouch,
-                     thread, ignore_count, from_tty);
-
-  if (sals.nelts > 1)
+  else
     {
-      warning ("Multiple breakpoints were set.");
-      warning ("Use the \"delete\" command to delete unwanted breakpoints.");
+      struct symtab_and_line sal;
+      struct breakpoint *b;
+
+      sal.symtab = NULL;
+      sal.pc = 0;
+
+      make_cleanup (xfree, copy_arg);
+
+      b = set_raw_breakpoint (sal, hardwareflag ? bp_hardware_breakpoint 
+                             : bp_breakpoint);
+      set_breakpoint_count (breakpoint_count + 1);
+      b->number = breakpoint_count;
+      b->cond = *cond;
+      b->thread = thread;
+      b->addr_string = *addr_string;
+      b->cond_string = *cond_string;
+      b->ignore_count = ignore_count;
+      b->pending = 1;
+      b->disposition = tempflag ? disp_del : disp_donttouch;
+      b->from_tty = from_tty;
+      b->flag = flag;
+      mention (b);
     }
+  
+  if (sals.nelts > 1)
+    warning (_("Multiple breakpoints were set.\n"
+              "Use the \"delete\" command to delete unwanted breakpoints."));
   /* That's it. Discard the cleanups for data inserted into the
      breakpoint. */
   discard_cleanups (breakpoint_chain);
   /* But cleanup everything else. */
   do_cleanups (old_chain);
+
+  return GDB_RC_OK;
 }
 
 /* Set a breakpoint of TYPE/DISPOSITION according to ARG (function,
@@ -5044,7 +5367,7 @@ struct captured_breakpoint_args
   };
 
 static int
-do_captured_breakpoint (void *data)
+do_captured_breakpoint (struct ui_out *uiout, void *data)
 {
   struct captured_breakpoint_args *args = data;
   struct symtabs_and_lines sals;
@@ -5064,7 +5387,7 @@ do_captured_breakpoint (void *data)
   sals.nelts = 0;
   address_end = args->address;
   addr_string = NULL;
-  parse_breakpoint_sals (&address_end, &sals, &addr_string);
+  parse_breakpoint_sals (&address_end, &sals, &addr_string, 0);
 
   if (!sals.nelts)
     return GDB_RC_NONE;
@@ -5105,7 +5428,7 @@ do_captured_breakpoint (void *data)
      address. That way cleanups can take care of freeing any
      memory. */
   if (*address_end != '\0')
-    error ("Garbage %s following breakpoint address", address_end);
+    error (_("Garbage %s following breakpoint address"), address_end);
 
   /* Resolve all line numbers to PC's.  */
   breakpoint_sals_to_pc (&sals, args->address);
@@ -5119,7 +5442,7 @@ do_captured_breakpoint (void *data)
          char *tok = args->condition;
          cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
          if (*tok != '\0')
-           error ("Garbage %s follows condition", tok);
+           error (_("Garbage %s follows condition"), tok);
          make_cleanup (xfree, cond[i]);
          cond_string[i] = xstrdup (args->condition);
        }
@@ -5128,7 +5451,8 @@ do_captured_breakpoint (void *data)
   create_breakpoints (sals, addr_string, cond, cond_string,
                      args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
                      args->tempflag ? disp_del : disp_donttouch,
-                     args->thread, args->ignore_count, 0/*from-tty*/);
+                     args->thread, args->ignore_count, 0/*from-tty*/, 
+                     NULL/*pending_bp*/);
 
   /* That's it. Discard the cleanups for data inserted into the
      breakpoint. */
@@ -5141,7 +5465,8 @@ do_captured_breakpoint (void *data)
 enum gdb_rc
 gdb_breakpoint (char *address, char *condition,
                int hardwareflag, int tempflag,
-               int thread, int ignore_count)
+               int thread, int ignore_count,
+               char **error_message)
 {
   struct captured_breakpoint_args args;
   args.address = address;
@@ -5150,171 +5475,8 @@ gdb_breakpoint (char *address, char *condition,
   args.tempflag = tempflag;
   args.thread = thread;
   args.ignore_count = ignore_count;
-  return catch_errors (do_captured_breakpoint, &args,
-                      NULL, RETURN_MASK_ALL);
-}
-
-
-static void
-break_at_finish_at_depth_command_1 (char *arg, int flag, int from_tty)
-{
-  struct frame_info *frame;
-  CORE_ADDR low, high, selected_pc = 0;
-  char *extra_args = NULL;
-  char *level_arg;
-  int extra_args_len = 0, if_arg = 0;
-
-  if (!arg ||
-      (arg[0] == 'i' && arg[1] == 'f' && (arg[2] == ' ' || arg[2] == '\t')))
-    {
-
-      if (default_breakpoint_valid)
-       {
-         if (deprecated_selected_frame)
-           {
-             selected_pc = get_frame_pc (deprecated_selected_frame);
-             if (arg)
-               if_arg = 1;
-           }
-         else
-           error ("No selected frame.");
-       }
-      else
-       error ("No default breakpoint address now.");
-    }
-  else
-    {
-      extra_args = strchr (arg, ' ');
-      if (extra_args)
-       {
-         extra_args++;
-         extra_args_len = strlen (extra_args);
-         level_arg = (char *) xmalloc (extra_args - arg);
-         strncpy (level_arg, arg, extra_args - arg - 1);
-         level_arg[extra_args - arg - 1] = '\0';
-       }
-      else
-       {
-         level_arg = (char *) xmalloc (strlen (arg) + 1);
-         strcpy (level_arg, arg);
-       }
-
-      frame = parse_frame_specification (level_arg);
-      if (frame)
-       selected_pc = get_frame_pc (frame);
-      else
-       selected_pc = 0;
-    }
-  if (if_arg)
-    {
-      extra_args = arg;
-      extra_args_len = strlen (arg);
-    }
-
-  if (selected_pc)
-    {
-      if (find_pc_partial_function (selected_pc, (char **) NULL, &low, &high))
-       {
-         char *addr_string;
-         if (extra_args_len)
-           addr_string = xstrprintf ("*0x%s %s", paddr_nz (high), extra_args);
-         else
-           addr_string = xstrprintf ("*0x%s", paddr_nz (high));
-         break_command_1 (addr_string, flag, from_tty);
-         xfree (addr_string);
-       }
-      else
-       error ("No function contains the specified address");
-    }
-  else
-    error ("Unable to set breakpoint at procedure exit");
-}
-
-
-static void
-break_at_finish_command_1 (char *arg, int flag, int from_tty)
-{
-  char *addr_string, *break_string, *beg_addr_string;
-  CORE_ADDR low, high;
-  struct symtabs_and_lines sals;
-  struct symtab_and_line sal;
-  struct cleanup *old_chain;
-  char *extra_args = NULL;
-  int extra_args_len = 0;
-  int i, if_arg = 0;
-
-  if (!arg ||
-      (arg[0] == 'i' && arg[1] == 'f' && (arg[2] == ' ' || arg[2] == '\t')))
-    {
-      if (default_breakpoint_valid)
-       {
-         if (deprecated_selected_frame)
-           {
-             addr_string = xstrprintf ("*0x%s",
-                                       paddr_nz (get_frame_pc (deprecated_selected_frame)));
-             if (arg)
-               if_arg = 1;
-           }
-         else
-           error ("No selected frame.");
-       }
-      else
-       error ("No default breakpoint address now.");
-    }
-  else
-    {
-      addr_string = (char *) xmalloc (strlen (arg) + 1);
-      strcpy (addr_string, arg);
-    }
-
-  if (if_arg)
-    {
-      extra_args = arg;
-      extra_args_len = strlen (arg);
-    }
-  else if (arg)
-    {
-      /* get the stuff after the function name or address */
-      extra_args = strchr (arg, ' ');
-      if (extra_args)
-       {
-         extra_args++;
-         extra_args_len = strlen (extra_args);
-       }
-    }
-
-  sals.sals = NULL;
-  sals.nelts = 0;
-
-  beg_addr_string = addr_string;
-  sals = decode_line_1 (&addr_string, 1, (struct symtab *) NULL, 0,
-                       (char ***) NULL);
-
-  xfree (beg_addr_string);
-  old_chain = make_cleanup (xfree, sals.sals);
-  for (i = 0; (i < sals.nelts); i++)
-    {
-      sal = sals.sals[i];
-      if (find_pc_partial_function (sal.pc, (char **) NULL, &low, &high))
-       {
-         break_string;
-         if (extra_args_len)
-           break_string = xstrprintf ("*0x%s %s", paddr_nz (high),
-                                      extra_args);
-         else
-           break_string = xstrprintf ("*0x%s", paddr_nz (high));
-         break_command_1 (break_string, flag, from_tty);
-         xfree (break_string);
-       }
-      else
-       error ("No function contains the specified address");
-    }
-  if (sals.nelts > 1)
-    {
-      warning ("Multiple breakpoints were set.\n");
-      warning ("Use the \"delete\" command to delete unwanted breakpoints.");
-    }
-  do_cleanups (old_chain);
+  return catch_exceptions_with_msg (uiout, do_captured_breakpoint, &args,
+                                   error_message, RETURN_MASK_ALL);
 }
 
 
@@ -5328,7 +5490,7 @@ resolve_sal_pc (struct symtab_and_line *sal)
   if (sal->pc == 0 && sal->symtab != NULL)
     {
       if (!find_line_pc (sal->symtab, sal->line, &pc))
-       error ("No line %d in file \"%s\".",
+       error (_("No line %d in file \"%s\"."),
               sal->line, sal->symtab->filename);
       sal->pc = pc;
     }
@@ -5370,51 +5532,33 @@ resolve_sal_pc (struct symtab_and_line *sal)
 void
 break_command (char *arg, int from_tty)
 {
-  break_command_1 (arg, 0, from_tty);
-}
-
-void
-break_at_finish_command (char *arg, int from_tty)
-{
-  break_at_finish_command_1 (arg, 0, from_tty);
-}
-
-void
-break_at_finish_at_depth_command (char *arg, int from_tty)
-{
-  break_at_finish_at_depth_command_1 (arg, 0, from_tty);
+  break_command_1 (arg, 0, from_tty, NULL);
 }
 
 void
 tbreak_command (char *arg, int from_tty)
 {
-  break_command_1 (arg, BP_TEMPFLAG, from_tty);
-}
-
-void
-tbreak_at_finish_command (char *arg, int from_tty)
-{
-  break_at_finish_command_1 (arg, BP_TEMPFLAG, from_tty);
+  break_command_1 (arg, BP_TEMPFLAG, from_tty, NULL);
 }
 
 static void
 hbreak_command (char *arg, int from_tty)
 {
-  break_command_1 (arg, BP_HARDWAREFLAG, from_tty);
+  break_command_1 (arg, BP_HARDWAREFLAG, from_tty, NULL);
 }
 
 static void
 thbreak_command (char *arg, int from_tty)
 {
-  break_command_1 (arg, (BP_TEMPFLAG | BP_HARDWAREFLAG), from_tty);
+  break_command_1 (arg, (BP_TEMPFLAG | BP_HARDWAREFLAG), from_tty, NULL);
 }
 
 static void
 stop_command (char *arg, int from_tty)
 {
-  printf_filtered ("Specify the type of breakpoint to set.\n\
+  printf_filtered (_("Specify the type of breakpoint to set.\n\
 Usage: stop in <function | address>\n\
-       stop at <line>\n");
+       stop at <line>\n"));
 }
 
 static void
@@ -5445,9 +5589,9 @@ stopin_command (char *arg, int from_tty)
     }
 
   if (badInput)
-    printf_filtered ("Usage: stop in <function | address>\n");
+    printf_filtered (_("Usage: stop in <function | address>\n"));
   else
-    break_command_1 (arg, 0, from_tty);
+    break_command_1 (arg, 0, from_tty, NULL);
 }
 
 static void
@@ -5477,9 +5621,9 @@ stopat_command (char *arg, int from_tty)
     }
 
   if (badInput)
-    printf_filtered ("Usage: stop at <line>\n");
+    printf_filtered (_("Usage: stop at <line>\n"));
   else
-    break_command_1 (arg, 0, from_tty);
+    break_command_1 (arg, 0, from_tty, NULL);
 }
 
 /* accessflag:  hw_write:  watch write, 
@@ -5517,7 +5661,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
   mark = value_mark ();
   val = evaluate_expression (exp);
   release_value (val);
-  if (VALUE_LAZY (val))
+  if (value_lazy (val))
     value_fetch_lazy (val);
 
   tok = arg;
@@ -5536,7 +5680,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
       cond_end = tok;
     }
   if (*tok)
-    error ("Junk at end of command.");
+    error (_("Junk at end of command."));
 
   if (accessflag == hw_read)
     bp_type = bp_read_watchpoint;
@@ -5547,7 +5691,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
 
   mem_cnt = can_use_hardware_watchpoint (val);
   if (mem_cnt == 0 && bp_type != bp_hardware_watchpoint)
-    error ("Expression cannot be implemented with read/access watchpoint.");
+    error (_("Expression cannot be implemented with read/access watchpoint."));
   if (mem_cnt != 0)
     {
       i = hw_watchpoint_used_count (bp_type, &other_type_used);
@@ -5555,10 +5699,10 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
        TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_type, i + mem_cnt, 
                                            other_type_used);
       if (target_resources_ok == 0 && bp_type != bp_hardware_watchpoint)
-       error ("Target does not support this type of hardware watchpoint.");
+       error (_("Target does not support this type of hardware watchpoint."));
 
       if (target_resources_ok < 0 && bp_type != bp_hardware_watchpoint)
-       error ("Target can only support one kind of HW watchpoint at a time.");
+       error (_("Target can only support one kind of HW watchpoint at a time."));
     }
 
 #if defined(HPUXHPPA)
@@ -5578,7 +5722,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
      set watches after getting the program started. */
   if (!target_has_execution)
     {
-      warning ("can't do that without a running program; try \"break main\", \"run\" first");
+      warning (_("can't do that without a running program; try \"break main\"), \"run\" first");
       return;
     }
 #endif /* HPUXHPPA */
@@ -5637,7 +5781,8 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
          scope_breakpoint->loc->requested_address
            = get_frame_pc (prev_frame);
          scope_breakpoint->loc->address
-           = adjust_breakpoint_address (scope_breakpoint->loc->requested_address);
+           = adjust_breakpoint_address (scope_breakpoint->loc->requested_address,
+                                        scope_breakpoint->type);
 
          /* The scope breakpoint is related to the watchpoint.  We
             will need to act on them together.  */
@@ -5652,16 +5797,6 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
    in hardware.  If the watchpoint can not be handled
    in hardware return zero.  */
 
-#if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
-#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(BYTE_SIZE) \
-    ((BYTE_SIZE) <= (DEPRECATED_REGISTER_SIZE))
-#endif
-
-#if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT)
-#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \
-     (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN))
-#endif
-
 static int
 can_use_hardware_watchpoint (struct value *v)
 {
@@ -5691,11 +5826,11 @@ can_use_hardware_watchpoint (struct value *v)
      function calls are special in any way.  So this function may not
      notice that an expression involving an inferior function call
      can't be watched with hardware watchpoints.  FIXME.  */
-  for (; v; v = v->next)
+  for (; v; v = value_next (v))
     {
       if (VALUE_LVAL (v) == lval_memory)
        {
-         if (VALUE_LAZY (v))
+         if (value_lazy (v))
            /* A lazy memory lvalue is one that GDB never needed to fetch;
               we either just used its address (e.g., `a' in `a.b') or
               we never needed it at all (e.g., `a' in `a,b').  */
@@ -5704,7 +5839,7 @@ can_use_hardware_watchpoint (struct value *v)
            {
              /* Ahh, memory we actually used!  Check if we can cover
                  it with hardware watchpoints.  */
-             struct type *vtype = check_typedef (VALUE_TYPE (v));
+             struct type *vtype = check_typedef (value_type (v));
 
              /* We only watch structs and arrays if user asked for it
                 explicitly, never if they just happen to appear in a
@@ -5713,8 +5848,8 @@ can_use_hardware_watchpoint (struct value *v)
                  || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
                      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
                {
-                 CORE_ADDR vaddr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
-                 int       len   = TYPE_LENGTH (VALUE_TYPE (v));
+                 CORE_ADDR vaddr = VALUE_ADDRESS (v) + value_offset (v);
+                 int       len   = TYPE_LENGTH (value_type (v));
 
                  if (!TARGET_REGION_OK_FOR_HW_WATCHPOINT (vaddr, len))
                    return 0;
@@ -5723,9 +5858,10 @@ can_use_hardware_watchpoint (struct value *v)
                }
            }
        }
-      else if (v->lval != not_lval && v->modifiable == 0)
+      else if (VALUE_LVAL (v) != not_lval
+              && deprecated_value_modifiable (v) == 0)
        return 0;       /* ??? What does this represent? */
-      else if (v->lval == lval_register)
+      else if (VALUE_LVAL (v) == lval_register)
        return 0;       /* cannot watch a register with a HW watchpoint */
     }
 
@@ -5805,19 +5941,19 @@ until_break_command (char *arg, int from_tty, int anywhere)
 
   if (default_breakpoint_valid)
     sals = decode_line_1 (&arg, 1, default_breakpoint_symtab,
-                         default_breakpoint_line, (char ***) NULL);
+                         default_breakpoint_line, (char ***) NULL, NULL);
   else
     sals = decode_line_1 (&arg, 1, (struct symtab *) NULL, 
-                         0, (char ***) NULL);
+                         0, (char ***) NULL, NULL);
 
   if (sals.nelts != 1)
-    error ("Couldn't get information on specified line.");
+    error (_("Couldn't get information on specified line."));
 
   sal = sals.sals[0];
   xfree (sals.sals);   /* malloc'd, so freed */
 
   if (*arg)
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   resolve_sal_pc (&sal);
 
@@ -5832,7 +5968,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
                                           get_frame_id (deprecated_selected_frame),
                                           bp_until);
 
-  if (!event_loop_p || !target_can_async_p ())
+  if (!target_can_async_p ())
     old_chain = make_cleanup_delete_breakpoint (breakpoint);
   else
     old_chain = make_exec_cleanup_delete_breakpoint (breakpoint);
@@ -5844,7 +5980,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
      where we get a chance to do that is in fetch_inferior_event, so
      we must set things up for that. */
 
-  if (event_loop_p && target_can_async_p ())
+  if (target_can_async_p ())
     {
       /* In this case the arg for the continuation is just the point
          in the exec_cleanups chain from where to start doing
@@ -5866,7 +6002,7 @@ until_break_command (char *arg, int from_tty, int anywhere)
       sal.pc = get_frame_pc (prev_frame);
       breakpoint = set_momentary_breakpoint (sal, get_frame_id (prev_frame),
                                             bp_until);
-      if (!event_loop_p || !target_can_async_p ())
+      if (!target_can_async_p ())
        make_cleanup_delete_breakpoint (breakpoint);
       else
        make_exec_cleanup_delete_breakpoint (breakpoint);
@@ -5875,34 +6011,10 @@ until_break_command (char *arg, int from_tty, int anywhere)
   proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
   /* Do the cleanups now, anly if we are not running asynchronously,
      of if we are, but the target is still synchronous. */
-  if (!event_loop_p || !target_can_async_p ())
+  if (!target_can_async_p ())
     do_cleanups (old_chain);
 }
 
-#if 0
-/* These aren't used; I don't konw what they were for.  */
-/* Set a breakpoint at the catch clause for NAME.  */
-static int
-catch_breakpoint (char *name)
-{
-}
-
-static int
-disable_catch_breakpoint (void)
-{
-}
-
-static int
-delete_catch_breakpoint (void)
-{
-}
-
-static int
-enable_catch_breakpoint (void)
-{
-}
-#endif /* 0 */
-
 static void
 ep_skip_leading_whitespace (char **s)
 {
@@ -6017,10 +6129,6 @@ typedef enum
 }
 catch_fork_kind;
 
-#if defined(CHILD_INSERT_FORK_CATCHPOINT) || defined(CHILD_INSERT_VFORK_CATCHPOINT)
-static void catch_fork_command_1 (catch_fork_kind fork_kind,
-                                 char *arg, int tempflag, int from_tty);
-
 static void
 catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag,
                      int from_tty)
@@ -6037,7 +6145,7 @@ catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag,
   cond_string = ep_parse_optional_if_clause (&arg);
 
   if ((*arg != '\0') && !isspace (*arg))
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   /* If this target supports it, create a fork or vfork catchpoint
      and enable reporting of such events. */
@@ -6050,13 +6158,11 @@ catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag,
       create_vfork_event_catchpoint (tempflag, cond_string);
       break;
     default:
-      error ("unsupported or unknown fork kind; cannot catch it");
+      error (_("unsupported or unknown fork kind; cannot catch it"));
       break;
     }
 }
-#endif
 
-#if defined(CHILD_INSERT_EXEC_CATCHPOINT)
 static void
 catch_exec_command_1 (char *arg, int tempflag, int from_tty)
 {
@@ -6072,15 +6178,13 @@ catch_exec_command_1 (char *arg, int tempflag, int from_tty)
   cond_string = ep_parse_optional_if_clause (&arg);
 
   if ((*arg != '\0') && !isspace (*arg))
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   /* If this target supports it, create an exec catchpoint
      and enable reporting of such events. */
   create_exec_event_catchpoint (tempflag, cond_string);
 }
-#endif
 
-#if defined(SOLIB_ADD)
 static void
 catch_load_command_1 (char *arg, int tempflag, int from_tty)
 {
@@ -6114,7 +6218,7 @@ catch_load_command_1 (char *arg, int tempflag, int from_tty)
     }
 
   if ((*arg != '\0') && !isspace (*arg))
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   /* Create a load breakpoint that only triggers when a load of
      the specified dll (or any dll, if no pathname was specified)
@@ -6156,7 +6260,7 @@ catch_unload_command_1 (char *arg, int tempflag, int from_tty)
     }
 
   if ((*arg != '\0') && !isspace (*arg))
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   /* Create an unload breakpoint that only triggers when an unload of
      the specified dll (or any dll, if no pathname was specified)
@@ -6164,7 +6268,6 @@ catch_unload_command_1 (char *arg, int tempflag, int from_tty)
   SOLIB_CREATE_CATCH_UNLOAD_HOOK (PIDGET (inferior_ptid), tempflag, 
                                  dll_pathname, cond_string);
 }
-#endif /* SOLIB_ADD */
 
 /* Commands to deal with catching exceptions.  */
 
@@ -6192,7 +6295,7 @@ create_exception_catchpoint (int tempflag, char *cond_string,
       bptype = bp_catch_catch;
       break;
     default:                   /* error condition */
-      error ("Internal error -- invalid catchpoint kind");
+      error (_("Internal error -- invalid catchpoint kind"));
     }
 
   b = set_raw_breakpoint (*sal, bptype);
@@ -6214,10 +6317,10 @@ print_exception_catchpoint (struct breakpoint *b)
   annotate_catchpoint (b->number);
 
   if (strstr (b->addr_string, "throw") != NULL)
-    printf_filtered ("\nCatchpoint %d (exception thrown)\n",
+    printf_filtered (_("\nCatchpoint %d (exception thrown)\n"),
                     b->number);
   else
-    printf_filtered ("\nCatchpoint %d (exception caught)\n",
+    printf_filtered (_("\nCatchpoint %d (exception caught)\n"),
                     b->number);
 
   return PRINT_SRC_AND_LOC;
@@ -6243,9 +6346,9 @@ static void
 print_mention_exception_catchpoint (struct breakpoint *b)
 {
   if (strstr (b->addr_string, "throw") != NULL)
-    printf_filtered ("Catchpoint %d (throw)", b->number);
+    printf_filtered (_("Catchpoint %d (throw)"), b->number);
   else
-    printf_filtered ("Catchpoint %d (catch)", b->number);
+    printf_filtered (_("Catchpoint %d (catch)"), b->number);
 }
 
 static struct breakpoint_ops gnu_v3_exception_catchpoint_ops = {
@@ -6268,7 +6371,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
     trigger_func_name = xstrdup ("__cxa_throw");
 
   nameptr = trigger_func_name;
-  sals = decode_line_1 (&nameptr, 1, NULL, 0, NULL);
+  sals = decode_line_1 (&nameptr, 1, NULL, 0, NULL, NULL);
   if (sals.nelts == 0)
     {
       xfree (trigger_func_name);
@@ -6306,11 +6409,11 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
   cond_string = ep_parse_optional_if_clause (&arg);
 
   if ((*arg != '\0') && !isspace (*arg))
-    error ("Junk at end of arguments.");
+    error (_("Junk at end of arguments."));
 
   if ((ex_event != EX_EVENT_THROW) &&
       (ex_event != EX_EVENT_CATCH))
-    error ("Unsupported or unknown exception event; cannot catch it");
+    error (_("Unsupported or unknown exception event; cannot catch it"));
 
   if (handle_gnu_v3_exceptions (tempflag, cond_string, ex_event, from_tty))
     return;
@@ -6328,7 +6431,7 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
        return;         /* something went wrong with setting up callbacks */
     }
 
-  warning ("Unsupported with this platform/compiler combination.");
+  warning (_("Unsupported with this platform/compiler combination."));
 }
 
 /* Cover routine to allow wrapping target_enable_exception_catchpoints
@@ -6368,18 +6471,18 @@ catch_command_1 (char *arg, int tempflag, int from_tty)
       /* catch_throw_command_1 (arg1_start, tempflag, from_tty); */
       /* return; */
       /* Now, this is not allowed */
-      error ("Catch requires an event name.");
+      error (_("Catch requires an event name."));
 
     }
   arg1_end = ep_find_event_name_end (arg1_start);
   if (arg1_end == NULL)
-    error ("catch requires an event");
+    error (_("catch requires an event"));
   arg1_length = arg1_end + 1 - arg1_start;
 
   /* Try to match what we found against known event names. */
   if (strncmp (arg1_start, "signal", arg1_length) == 0)
     {
-      error ("Catch of signal not yet implemented");
+      error (_("Catch of signal not yet implemented"));
     }
   else if (strncmp (arg1_start, "catch", arg1_length) == 0)
     {
@@ -6393,67 +6496,47 @@ catch_command_1 (char *arg, int tempflag, int from_tty)
     }
   else if (strncmp (arg1_start, "thread_start", arg1_length) == 0)
     {
-      error ("Catch of thread_start not yet implemented");
+      error (_("Catch of thread_start not yet implemented"));
     }
   else if (strncmp (arg1_start, "thread_exit", arg1_length) == 0)
     {
-      error ("Catch of thread_exit not yet implemented");
+      error (_("Catch of thread_exit not yet implemented"));
     }
   else if (strncmp (arg1_start, "thread_join", arg1_length) == 0)
     {
-      error ("Catch of thread_join not yet implemented");
+      error (_("Catch of thread_join not yet implemented"));
     }
   else if (strncmp (arg1_start, "start", arg1_length) == 0)
     {
-      error ("Catch of start not yet implemented");
+      error (_("Catch of start not yet implemented"));
     }
   else if (strncmp (arg1_start, "exit", arg1_length) == 0)
     {
-      error ("Catch of exit not yet implemented");
+      error (_("Catch of exit not yet implemented"));
     }
   else if (strncmp (arg1_start, "fork", arg1_length) == 0)
     {
-#if defined(CHILD_INSERT_FORK_CATCHPOINT)
       catch_fork_command_1 (catch_fork, arg1_end + 1, tempflag, from_tty);
-#else
-      error ("Catch of fork not yet implemented");
-#endif
     }
   else if (strncmp (arg1_start, "vfork", arg1_length) == 0)
     {
-#if defined(CHILD_INSERT_VFORK_CATCHPOINT)
       catch_fork_command_1 (catch_vfork, arg1_end + 1, tempflag, from_tty);
-#else
-      error ("Catch of vfork not yet implemented");
-#endif
     }
   else if (strncmp (arg1_start, "exec", arg1_length) == 0)
     {
-#if defined(CHILD_INSERT_EXEC_CATCHPOINT)
       catch_exec_command_1 (arg1_end + 1, tempflag, from_tty);
-#else
-      error ("Catch of exec not yet implemented");
-#endif
     }
   else if (strncmp (arg1_start, "load", arg1_length) == 0)
     {
-#if defined(SOLIB_ADD)
       catch_load_command_1 (arg1_end + 1, tempflag, from_tty);
-#else
-      error ("Catch of load not implemented");
-#endif
     }
   else if (strncmp (arg1_start, "unload", arg1_length) == 0)
     {
-#if defined(SOLIB_ADD)
       catch_unload_command_1 (arg1_end + 1, tempflag, from_tty);
-#else
-      error ("Catch of load not implemented");
-#endif
     }
   else if (strncmp (arg1_start, "stop", arg1_length) == 0)
     {
-      error ("Catch of stop not yet implemented");
+      error (_("Catch of stop not yet implemented"));
     }
 
   /* This doesn't appear to be an event name */
@@ -6464,7 +6547,7 @@ catch_command_1 (char *arg, int tempflag, int from_tty)
          as the name of an exception */
       /* catch_throw_command_1 (arg1_start, tempflag, from_tty); */
       /* Now this is not allowed */
-      error ("Unknown event kind specified for catch");
+      error (_("Unknown event kind specified for catch"));
 
     }
 }
@@ -6483,30 +6566,6 @@ set_breakpoint_sal (struct symtab_and_line sal)
   return b;
 }
 
-#if 0
-/* These aren't used; I don't know what they were for.  */
-/* Disable breakpoints on all catch clauses described in ARGS.  */
-static void
-disable_catch (char *args)
-{
-  /* Map the disable command to catch clauses described in ARGS.  */
-}
-
-/* Enable breakpoints on all catch clauses described in ARGS.  */
-static void
-enable_catch (char *args)
-{
-  /* Map the disable command to catch clauses described in ARGS.  */
-}
-
-/* Delete breakpoints on all catch clauses in the active scope.  */
-static void
-delete_catch (char *args)
-{
-  /* Map the delete command to catch clauses described in ARGS.  */
-}
-#endif /* 0 */
-
 static void
 catch_command (char *arg, int from_tty)
 {
@@ -6546,7 +6605,7 @@ clear_command (char *arg, int from_tty)
       sal.symtab = default_breakpoint_symtab;
       sal.pc = default_breakpoint_address;
       if (sal.symtab == 0)
-       error ("No source file specified.");
+       error (_("No source file specified."));
 
       sals.sals[0] = sal;
       sals.nelts = 1;
@@ -6624,15 +6683,20 @@ clear_command (char *arg, int from_tty)
   if (found == 0)
     {
       if (arg)
-       error ("No breakpoint at %s.", arg);
+       error (_("No breakpoint at %s."), arg);
       else
-       error ("No breakpoint at this line.");
+       error (_("No breakpoint at this line."));
     }
 
   if (found->next)
     from_tty = 1;              /* Always report if deleted more than one */
   if (from_tty)
-    printf_unfiltered ("Deleted breakpoint%s ", found->next ? "s" : "");
+    {
+      if (!found->next)
+       printf_unfiltered (_("Deleted breakpoint "));
+      else
+       printf_unfiltered (_("Deleted breakpoints "));
+    }
   breakpoints_changed ();
   while (found)
     {
@@ -6677,9 +6741,7 @@ delete_breakpoint (struct breakpoint *bpt)
   bpstat bs;
   struct bp_location *loc;
 
-  if (bpt == NULL)
-    error ("Internal error (attempted to delete a NULL breakpoint)");
-
+  gdb_assert (bpt != NULL);
 
   /* Has this bp already been deleted?  This can happen because multiple
      lists can hold pointers to bp's.  bpstat lists are especial culprits.
@@ -6693,17 +6755,19 @@ delete_breakpoint (struct breakpoint *bpt)
      A real solution to this problem might involve reference counts in bp's,
      and/or giving them pointers back to their referencing bpstat's, and
      teaching delete_breakpoint to only free a bp's storage when no more
-     references were extent.  A cheaper bandaid was chosen. */
+     references were extent.  A cheaper bandaid was chosen.  */
   if (bpt->type == bp_none)
     return;
 
-  if (delete_breakpoint_hook)
-    delete_breakpoint_hook (bpt);
+  if (deprecated_delete_breakpoint_hook)
+    deprecated_delete_breakpoint_hook (bpt);
   breakpoint_delete_event (bpt->number);
 
   if (bpt->loc->inserted)
     remove_breakpoint (bpt->loc, mark_inserted);
 
+  free_valchain (bpt->loc);
+
   if (breakpoint_chain == bpt)
     breakpoint_chain = bpt->next;
 
@@ -6715,7 +6779,7 @@ delete_breakpoint (struct breakpoint *bpt)
      isn't actually running.  target_enable_exception_callback for a
      null target ops vector gives an undesirable error message, so we
      check here and avoid it. Since currently (1997-09-17) only HP-UX aCC's
-     exceptions are supported in this way, it's OK for now. FIXME */
+     exceptions are supported in this way, it's OK for now.  FIXME */
   if (ep_is_exception_catchpoint (bpt) && target_has_execution)
     {
       /* Format possible error msg */
@@ -6763,6 +6827,7 @@ delete_breakpoint (struct breakpoint *bpt)
            && !b->loc->duplicate
            && b->enable_state != bp_disabled
            && b->enable_state != bp_shlib_disabled
+           && !b->pending
            && b->enable_state != bp_call_disabled)
        {
          int val;
@@ -6773,13 +6838,15 @@ delete_breakpoint (struct breakpoint *bpt)
             always be the only one inserted.  */
          if (b->enable_state == bp_permanent)
            internal_error (__FILE__, __LINE__,
-                           "another breakpoint was inserted on top of "
-                           "a permanent breakpoint");
+                           _("another breakpoint was inserted on top of "
+                           "a permanent breakpoint"));
 
+         memset (&b->loc->target_info, 0, sizeof (b->loc->target_info));
+         b->loc->target_info.placed_address = b->loc->address;
          if (b->type == bp_hardware_breakpoint)
-           val = target_insert_hw_breakpoint (b->loc->address, b->loc->shadow_contents);
+           val = target_insert_hw_breakpoint (&b->loc->target_info);
          else
-           val = target_insert_breakpoint (b->loc->address, b->loc->shadow_contents);
+           val = target_insert_breakpoint (&b->loc->target_info);
 
          /* If there was an error in the insert, print a message, then stop execution.  */
          if (val != 0)
@@ -6799,7 +6866,7 @@ delete_breakpoint (struct breakpoint *bpt)
                  {
                    fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
                    fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
-                   print_address_numeric (b->loc->address, 1, tmp_error_stream);
+                   deprecated_print_address_numeric (b->loc->address, 1, tmp_error_stream);
                    fprintf_filtered (tmp_error_stream, ": %s.\n",
                                      safe_strerror (val));
                  }
@@ -6897,7 +6964,7 @@ delete_command (char *arg, int from_tty)
 
       /* Ask user only if there are some breakpoints to delete.  */
       if (!from_tty
-         || (breaks_to_delete && query ("Delete all breakpoints? ")))
+         || (breaks_to_delete && query (_("Delete all breakpoints? "))))
        {
          ALL_BREAKPOINTS_SAFE (b, temp)
          {
@@ -6925,6 +6992,8 @@ breakpoint_re_set_one (void *bint)
   struct breakpoint *b = (struct breakpoint *) bint;
   struct value *mark;
   int i;
+  int not_found;
+  int *not_found_ptr = NULL;
   struct symtabs_and_lines sals;
   char *s;
   enum enable_state save_enable;
@@ -6932,7 +7001,7 @@ breakpoint_re_set_one (void *bint)
   switch (b->type)
     {
     case bp_none:
-      warning ("attempted to reset apparently deleted breakpoint #%d?",
+      warning (_("attempted to reset apparently deleted breakpoint #%d?"),
               b->number);
       return 0;
     case bp_breakpoint:
@@ -6968,14 +7037,26 @@ breakpoint_re_set_one (void *bint)
          shlib_disabled breakpoint though.  There's a fair chance we
          can't re-set it if the shared library it's in hasn't been
          loaded yet.  */
+
+      if (b->pending)
+       break;
+
       save_enable = b->enable_state;
       if (b->enable_state != bp_shlib_disabled)
         b->enable_state = bp_disabled;
+      else
+       /* If resetting a shlib-disabled breakpoint, we don't want to
+          see an error message if it is not found since we will expect
+          this to occur until the shared library is finally reloaded.
+          We accomplish this by giving decode_line_1 a pointer to use
+          for silent notification that the symbol is not found.  */
+       not_found_ptr = &not_found;
 
       set_language (b->language);
       input_radix = b->input_radix;
       s = b->addr_string;
-      sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL);
+      sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL,
+                           not_found_ptr);
       for (i = 0; i < sals.nelts; i++)
        {
          resolve_sal_pc (&sals.sals[i]);
@@ -6986,7 +7067,12 @@ breakpoint_re_set_one (void *bint)
            {
              s = b->cond_string;
              if (b->cond)
-               xfree (b->cond);
+               {
+                 xfree (b->cond);
+                 /* Avoid re-freeing b->exp if an error during the call
+                    to parse_exp_1.  */
+                 b->cond = NULL;
+               }
              b->cond = parse_exp_1 (&s, block_for_pc (sals.sals[i].pc), 0);
            }
 
@@ -7015,7 +7101,8 @@ breakpoint_re_set_one (void *bint)
              b->line_number = sals.sals[i].line;
              b->loc->requested_address = sals.sals[i].pc;
              b->loc->address
-               = adjust_breakpoint_address (b->loc->requested_address);
+               = adjust_breakpoint_address (b->loc->requested_address,
+                                            b->type);
 
              /* Used to check for duplicates here, but that can
                 cause trouble, as it doesn't check for disabled
@@ -7054,25 +7141,40 @@ breakpoint_re_set_one (void *bint)
 
       /* So for now, just use a global context.  */
       if (b->exp)
-       xfree (b->exp);
+       {
+         xfree (b->exp);
+         /* Avoid re-freeing b->exp if an error during the call to
+             parse_expression.  */
+         b->exp = NULL;
+       }
       b->exp = parse_expression (b->exp_string);
       b->exp_valid_block = innermost_block;
       mark = value_mark ();
       if (b->val)
-       value_free (b->val);
+       {
+         value_free (b->val);
+         /* Avoid re-freeing b->val if an error during the call to
+             evaluate_expression.  */
+         b->val = NULL;
+       }
       b->val = evaluate_expression (b->exp);
       release_value (b->val);
-      if (VALUE_LAZY (b->val) && b->enable_state == bp_enabled)
+      if (value_lazy (b->val) && breakpoint_enabled (b))
        value_fetch_lazy (b->val);
 
       if (b->cond_string != NULL)
        {
          s = b->cond_string;
          if (b->cond)
-           xfree (b->cond);
+           {
+             xfree (b->cond);
+             /* Avoid re-freeing b->exp if an error during the call
+                to parse_exp_1.  */
+             b->cond = NULL;
+           }
          b->cond = parse_exp_1 (&s, (struct block *) 0, 0);
        }
-      if (b->enable_state == bp_enabled)
+      if (breakpoint_enabled (b))
        mention (b);
       value_free_to_mark (mark);
       break;
@@ -7088,7 +7190,7 @@ breakpoint_re_set_one (void *bint)
       break;
 
     default:
-      printf_filtered ("Deleting unknown breakpoint type %d\n", b->type);
+      printf_filtered (_("Deleting unknown breakpoint type %d\n"), b->type);
       /* fall through */
       /* Delete longjmp and overlay event breakpoints; they will be
          reset later by breakpoint_re_set.  */
@@ -7188,13 +7290,13 @@ set_ignore_count (int bptnum, int count, int from_tty)
       if (from_tty)
        {
          if (count == 0)
-           printf_filtered ("Will stop next time breakpoint %d is reached.",
+           printf_filtered (_("Will stop next time breakpoint %d is reached."),
                             bptnum);
          else if (count == 1)
-           printf_filtered ("Will ignore next crossing of breakpoint %d.",
+           printf_filtered (_("Will ignore next crossing of breakpoint %d."),
                             bptnum);
          else
-           printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
+           printf_filtered (_("Will ignore next %d crossings of breakpoint %d."),
                             count, bptnum);
        }
       breakpoints_changed ();
@@ -7202,7 +7304,7 @@ set_ignore_count (int bptnum, int count, int from_tty)
       return;
     }
 
-  error ("No breakpoint number %d.", bptnum);
+  error (_("No breakpoint number %d."), bptnum);
 }
 
 /* Clear the ignore counts of all breakpoints.  */
@@ -7224,13 +7326,13 @@ ignore_command (char *args, int from_tty)
   int num;
 
   if (p == 0)
-    error_no_arg ("a breakpoint number");
+    error_no_arg (_("a breakpoint number"));
 
   num = get_number (&p);
   if (num == 0)
-    error ("bad breakpoint number: '%s'", args);
+    error (_("bad breakpoint number: '%s'"), args);
   if (*p == 0)
-    error ("Second argument (specified ignore-count) is missing.");
+    error (_("Second argument (specified ignore-count) is missing."));
 
   set_ignore_count (num,
                    longest_to_int (value_as_long (parse_and_eval (p))),
@@ -7252,7 +7354,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *))
   int match;
 
   if (p == 0)
-    error_no_arg ("one or more breakpoint numbers");
+    error_no_arg (_("one or more breakpoint numbers"));
 
   while (*p)
     {
@@ -7262,7 +7364,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *))
       num = get_number_or_range (&p1);
       if (num == 0)
        {
-         warning ("bad breakpoint number at or near '%s'", p);
+         warning (_("bad breakpoint number at or near '%s'"), p);
        }
       else
        {
@@ -7277,7 +7379,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *))
                break;
              }
          if (match == 0)
-           printf_unfiltered ("No breakpoint number %d.\n", num);
+           printf_unfiltered (_("No breakpoint number %d.\n"), num);
        }
       p = p1;
     }
@@ -7304,8 +7406,8 @@ disable_breakpoint (struct breakpoint *bpt)
 
   check_duplicates (bpt);
 
-  if (modify_breakpoint_hook)
-    modify_breakpoint_hook (bpt);
+  if (deprecated_modify_breakpoint_hook)
+    deprecated_modify_breakpoint_hook (bpt);
   breakpoint_modify_event (bpt->number);
 }
 
@@ -7318,7 +7420,7 @@ disable_command (char *args, int from_tty)
       switch (bpt->type)
       {
       case bp_none:
-       warning ("attempted to disable apparently deleted breakpoint #%d?",
+       warning (_("attempted to disable apparently deleted breakpoint #%d?"),
                 bpt->number);
        continue;
       case bp_breakpoint:
@@ -7345,8 +7447,6 @@ disable_command (char *args, int from_tty)
 static void
 do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
 {
-  struct frame_info *save_selected_frame = NULL;
-  int save_selected_frame_level = -1;
   int target_resources_ok, other_type_used;
   struct value *mark;
 
@@ -7358,77 +7458,97 @@ do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
        TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint, 
                                            i + 1, 0);
       if (target_resources_ok == 0)
-       error ("No hardware breakpoint support in the target.");
+       error (_("No hardware breakpoint support in the target."));
       else if (target_resources_ok < 0)
-       error ("Hardware breakpoints used exceeds limit.");
+       error (_("Hardware breakpoints used exceeds limit."));
     }
 
-  if (bpt->enable_state != bp_permanent)
-    bpt->enable_state = bp_enabled;
-  bpt->disposition = disposition;
-  check_duplicates (bpt);
-  breakpoints_changed ();
-
-  if (bpt->type == bp_watchpoint || 
-      bpt->type == bp_hardware_watchpoint ||
-      bpt->type == bp_read_watchpoint || 
-      bpt->type == bp_access_watchpoint)
+  if (bpt->pending)
     {
-      if (bpt->exp_valid_block != NULL)
+      if (bpt->enable_state != bp_enabled)
        {
-         struct frame_info *fr =
-         fr = frame_find_by_id (bpt->watchpoint_frame);
-         if (fr == NULL)
+         /* When enabling a pending breakpoint, we need to check if the breakpoint
+            is resolvable since shared libraries could have been loaded
+            after the breakpoint was disabled.  */
+         breakpoints_changed ();
+         if (resolve_pending_breakpoint (bpt) == GDB_RC_OK)
            {
-             printf_filtered ("\
-Cannot enable watchpoint %d because the block in which its expression\n\
-is valid is not currently in scope.\n", bpt->number);
-             bpt->enable_state = bp_disabled;
+             delete_breakpoint (bpt);
              return;
            }
-
-         save_selected_frame = deprecated_selected_frame;
-         save_selected_frame_level = frame_relative_level (deprecated_selected_frame);
-         select_frame (fr);
+         bpt->enable_state = bp_enabled;
+         bpt->disposition = disposition;
        }
-
-      value_free (bpt->val);
-      mark = value_mark ();
-      bpt->val = evaluate_expression (bpt->exp);
-      release_value (bpt->val);
-      if (VALUE_LAZY (bpt->val))
-       value_fetch_lazy (bpt->val);
-
-      if (bpt->type == bp_hardware_watchpoint ||
-         bpt->type == bp_read_watchpoint ||
+    }
+  else  /* Not a pending breakpoint.  */
+    {
+      if (bpt->enable_state != bp_permanent)
+       bpt->enable_state = bp_enabled;
+      bpt->disposition = disposition;
+      check_duplicates (bpt);
+      breakpoints_changed ();
+      
+      if (bpt->type == bp_watchpoint || 
+         bpt->type == bp_hardware_watchpoint ||
+         bpt->type == bp_read_watchpoint || 
          bpt->type == bp_access_watchpoint)
        {
-         int i = hw_watchpoint_used_count (bpt->type, &other_type_used);
-         int mem_cnt = can_use_hardware_watchpoint (bpt->val);
-
-         /* Hack around 'unused var' error for some targets here */
-         (void) mem_cnt, i;
-         target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT (
-                                  bpt->type, i + mem_cnt, other_type_used);
-         /* we can consider of type is bp_hardware_watchpoint, convert to 
-            bp_watchpoint in the following condition */
-         if (target_resources_ok < 0)
+         struct frame_id saved_frame_id;
+
+         saved_frame_id = get_frame_id (get_selected_frame (NULL));
+         if (bpt->exp_valid_block != NULL)
            {
-             printf_filtered ("\
+             struct frame_info *fr =
+               fr = frame_find_by_id (bpt->watchpoint_frame);
+             if (fr == NULL)
+               {
+                 printf_filtered (_("\
+Cannot enable watchpoint %d because the block in which its expression\n\
+is valid is not currently in scope.\n"), bpt->number);
+                 bpt->enable_state = bp_disabled;
+                 return;
+               }
+             select_frame (fr);
+           }
+         
+         value_free (bpt->val);
+         mark = value_mark ();
+         bpt->val = evaluate_expression (bpt->exp);
+         release_value (bpt->val);
+         if (value_lazy (bpt->val))
+           value_fetch_lazy (bpt->val);
+         
+         if (bpt->type == bp_hardware_watchpoint ||
+             bpt->type == bp_read_watchpoint ||
+             bpt->type == bp_access_watchpoint)
+           {
+             int i = hw_watchpoint_used_count (bpt->type, &other_type_used);
+             int mem_cnt = can_use_hardware_watchpoint (bpt->val);
+             
+             /* Hack around 'unused var' error for some targets here */
+             (void) mem_cnt, i;
+             target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT (
+                                                                       bpt->type, i + mem_cnt, other_type_used);
+             /* we can consider of type is bp_hardware_watchpoint, convert to 
+                bp_watchpoint in the following condition */
+             if (target_resources_ok < 0)
+               {
+                 printf_filtered (_("\
 Cannot enable watchpoint %d because target watch resources\n\
-have been allocated for other watchpoints.\n", bpt->number);
-             bpt->enable_state = bp_disabled;
-             value_free_to_mark (mark);
-             return;
+have been allocated for other watchpoints.\n"), bpt->number);
+                 bpt->enable_state = bp_disabled;
+                 value_free_to_mark (mark);
+                 return;
+               }
            }
+         
+         select_frame (frame_find_by_id (saved_frame_id));
+         value_free_to_mark (mark);
        }
-
-      if (save_selected_frame_level >= 0)
-       select_frame (save_selected_frame);
-      value_free_to_mark (mark);
     }
-  if (modify_breakpoint_hook)
-    modify_breakpoint_hook (bpt);
+
+  if (deprecated_modify_breakpoint_hook)
+    deprecated_modify_breakpoint_hook (bpt);
   breakpoint_modify_event (bpt->number);
 }
 
@@ -7440,7 +7560,7 @@ enable_breakpoint (struct breakpoint *bpt)
 
 /* The enable command enables the specified breakpoints (or all defined
    breakpoints) so they once again become (or continue to be) effective
-   in stopping the inferior. */
+   in stopping the inferior.  */
 
 static void
 enable_command (char *args, int from_tty)
@@ -7451,7 +7571,7 @@ enable_command (char *args, int from_tty)
       switch (bpt->type)
       {
       case bp_none:
-       warning ("attempted to enable apparently deleted breakpoint #%d?",
+       warning (_("attempted to enable apparently deleted breakpoint #%d?"),
                 bpt->number);
        continue;
       case bp_breakpoint:
@@ -7499,6 +7619,16 @@ enable_delete_command (char *args, int from_tty)
   map_breakpoint_numbers (args, enable_delete_breakpoint);
 }
 \f
+static void
+set_breakpoint_cmd (char *args, int from_tty)
+{
+}
+
+static void
+show_breakpoint_cmd (char *args, int from_tty)
+{
+}
+
 /* Use default_breakpoint_'s, or nothing if they aren't valid.  */
 
 struct symtabs_and_lines
@@ -7506,181 +7636,294 @@ decode_line_spec_1 (char *string, int funfirstline)
 {
   struct symtabs_and_lines sals;
   if (string == 0)
-    error ("Empty line specification.");
+    error (_("Empty line specification."));
   if (default_breakpoint_valid)
     sals = decode_line_1 (&string, funfirstline,
                          default_breakpoint_symtab,
                          default_breakpoint_line,
-                         (char ***) NULL);
+                         (char ***) NULL, NULL);
   else
     sals = decode_line_1 (&string, funfirstline,
-                         (struct symtab *) NULL, 0, (char ***) NULL);
+                         (struct symtab *) NULL, 0, (char ***) NULL, NULL);
   if (*string)
-    error ("Junk at end of line specification: %s", string);
+    error (_("Junk at end of line specification: %s"), string);
   return sals;
 }
+
+/* Create and insert a raw software breakpoint at PC.  Return an
+   identifier, which should be used to remove the breakpoint later.
+   In general, places which call this should be using something on the
+   breakpoint chain instead; this function should be eliminated
+   someday.  */
+
+void *
+deprecated_insert_raw_breakpoint (CORE_ADDR pc)
+{
+  struct bp_target_info *bp_tgt;
+
+  bp_tgt = xmalloc (sizeof (struct bp_target_info));
+  memset (bp_tgt, 0, sizeof (struct bp_target_info));
+
+  bp_tgt->placed_address = pc;
+  if (target_insert_breakpoint (bp_tgt) != 0)
+    {
+      /* Could not insert the breakpoint.  */
+      xfree (bp_tgt);
+      return NULL;
+    }
+
+  return bp_tgt;
+}
+
+/* Remove a breakpoint BP inserted by deprecated_insert_raw_breakpoint.  */
+
+int
+deprecated_remove_raw_breakpoint (void *bp)
+{
+  struct bp_target_info *bp_tgt = bp;
+  int ret;
+
+  ret = target_remove_breakpoint (bp_tgt);
+  xfree (bp_tgt);
+
+  return ret;
+}
+
+/* One (or perhaps two) breakpoints used for software single stepping.  */
+
+static void *single_step_breakpoints[2];
+
+/* Create and insert a breakpoint for software single step.  */
+
+void
+insert_single_step_breakpoint (CORE_ADDR next_pc)
+{
+  void **bpt_p;
+
+  if (single_step_breakpoints[0] == NULL)
+    bpt_p = &single_step_breakpoints[0];
+  else
+    {
+      gdb_assert (single_step_breakpoints[1] == NULL);
+      bpt_p = &single_step_breakpoints[1];
+    }
+
+  /* NOTE drow/2006-04-11: A future improvement to this function would be
+     to only create the breakpoints once, and actually put them on the
+     breakpoint chain.  That would let us use set_raw_breakpoint.  We could
+     adjust the addresses each time they were needed.  Doing this requires
+     corresponding changes elsewhere where single step breakpoints are
+     handled, however.  So, for now, we use this.  */
+
+  *bpt_p = deprecated_insert_raw_breakpoint (next_pc);
+  if (*bpt_p == NULL)
+    error (_("Could not insert single-step breakpoint at 0x%s"),
+            paddr_nz (next_pc));
+}
+
+/* Remove and delete any breakpoints used for software single step.  */
+
+void
+remove_single_step_breakpoints (void)
+{
+  gdb_assert (single_step_breakpoints[0] != NULL);
+
+  /* See insert_single_step_breakpoint for more about this deprecated
+     call.  */
+  deprecated_remove_raw_breakpoint (single_step_breakpoints[0]);
+  single_step_breakpoints[0] = NULL;
+
+  if (single_step_breakpoints[1] != NULL)
+    {
+      deprecated_remove_raw_breakpoint (single_step_breakpoints[1]);
+      single_step_breakpoints[1] = NULL;
+    }
+}
+
 \f
+/* This help string is used for the break, hbreak, tbreak and thbreak commands.
+   It is defined as a macro to prevent duplication.
+   COMMAND should be a string constant containing the name of the command.  */
+#define BREAK_ARGS_HELP(command) \
+command" [LOCATION] [thread THREADNUM] [if CONDITION]\n\
+LOCATION may be a line number, function name, or \"*\" and an address.\n\
+If a line number is specified, break at start of code for that line.\n\
+If a function is specified, break at start of code for that function.\n\
+If an address is specified, break at that exact address.\n\
+With no LOCATION, uses current execution address of selected stack frame.\n\
+This is useful for breaking on return to a stack frame.\n\
+\n\
+THREADNUM is the number from \"info threads\".\n\
+CONDITION is a boolean expression.\n\
+\n\
+Multiple breakpoints at one place are permitted, and useful if conditional.\n\
+\n\
+Do \"help breakpoints\" for info on other commands dealing with breakpoints."
+
 void
 _initialize_breakpoint (void)
 {
+  static struct cmd_list_element *breakpoint_set_cmdlist;
+  static struct cmd_list_element *breakpoint_show_cmdlist;
   struct cmd_list_element *c;
 
+  observer_attach_solib_unloaded (disable_breakpoints_in_unloaded_shlib);
+
   breakpoint_chain = 0;
   /* Don't bother to call set_breakpoint_count.  $bpnum isn't useful
      before a breakpoint is set.  */
   breakpoint_count = 0;
 
-  add_com ("ignore", class_breakpoint, ignore_command,
-          "Set ignore-count of breakpoint number N to COUNT.\n\
-Usage is `ignore N COUNT'.");
+  add_com ("ignore", class_breakpoint, ignore_command, _("\
+Set ignore-count of breakpoint number N to COUNT.\n\
+Usage is `ignore N COUNT'."));
   if (xdb_commands)
     add_com_alias ("bc", "ignore", class_breakpoint, 1);
 
-  add_com ("commands", class_breakpoint, commands_command,
-          "Set commands to be executed when a breakpoint is hit.\n\
+  add_com ("commands", class_breakpoint, commands_command, _("\
+Set commands to be executed when a breakpoint is hit.\n\
 Give breakpoint number as argument after \"commands\".\n\
 With no argument, the targeted breakpoint is the last one set.\n\
 The commands themselves follow starting on the next line.\n\
 Type a line containing \"end\" to indicate the end of them.\n\
 Give \"silent\" as the first line to make the breakpoint silent;\n\
-then no output is printed when it is hit, except what the commands print.");
+then no output is printed when it is hit, except what the commands print."));
 
-  add_com ("condition", class_breakpoint, condition_command,
-          "Specify breakpoint number N to break only if COND is true.\n\
+  add_com ("condition", class_breakpoint, condition_command, _("\
+Specify breakpoint number N to break only if COND is true.\n\
 Usage is `condition N COND', where N is an integer and COND is an\n\
-expression to be evaluated whenever breakpoint N is reached.");
+expression to be evaluated whenever breakpoint N is reached."));
 
-  c = add_com ("tbreak", class_breakpoint, tbreak_command,
-              "Set a temporary breakpoint.  Args like \"break\" command.\n\
+  c = add_com ("tbreak", class_breakpoint, tbreak_command, _("\
+Set a temporary breakpoint.\n\
 Like \"break\" except the breakpoint is only temporary,\n\
 so it will be deleted when hit.  Equivalent to \"break\" followed\n\
-by using \"enable delete\" on the breakpoint number.");
+by using \"enable delete\" on the breakpoint number.\n\
+\n"
+BREAK_ARGS_HELP ("tbreak")));
   set_cmd_completer (c, location_completer);
 
-  c = add_com ("hbreak", class_breakpoint, hbreak_command,
-              "Set a hardware assisted  breakpoint. Args like \"break\" command.\n\
+  c = add_com ("hbreak", class_breakpoint, hbreak_command, _("\
+Set a hardware assisted  breakpoint.\n\
 Like \"break\" except the breakpoint requires hardware support,\n\
-some target hardware may not have this support.");
+some target hardware may not have this support.\n\
+\n"
+BREAK_ARGS_HELP ("hbreak")));
   set_cmd_completer (c, location_completer);
 
-  c = add_com ("thbreak", class_breakpoint, thbreak_command,
-              "Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\
+  c = add_com ("thbreak", class_breakpoint, thbreak_command, _("\
+Set a temporary hardware assisted breakpoint.\n\
 Like \"hbreak\" except the breakpoint is only temporary,\n\
-so it will be deleted when hit.");
+so it will be deleted when hit.\n\
+\n"
+BREAK_ARGS_HELP ("thbreak")));
   set_cmd_completer (c, location_completer);
 
-  add_prefix_cmd ("enable", class_breakpoint, enable_command,
-                 "Enable some breakpoints.\n\
+  add_prefix_cmd ("enable", class_breakpoint, enable_command, _("\
+Enable some breakpoints.\n\
 Give breakpoint numbers (separated by spaces) as arguments.\n\
 With no subcommand, breakpoints are enabled until you command otherwise.\n\
 This is used to cancel the effect of the \"disable\" command.\n\
-With a subcommand you can enable temporarily.",
+With a subcommand you can enable temporarily."),
                  &enablelist, "enable ", 1, &cmdlist);
   if (xdb_commands)
-    add_com ("ab", class_breakpoint, enable_command,
-            "Enable some breakpoints.\n\
+    add_com ("ab", class_breakpoint, enable_command, _("\
+Enable some breakpoints.\n\
 Give breakpoint numbers (separated by spaces) as arguments.\n\
 With no subcommand, breakpoints are enabled until you command otherwise.\n\
 This is used to cancel the effect of the \"disable\" command.\n\
-With a subcommand you can enable temporarily.");
+With a subcommand you can enable temporarily."));
 
   add_com_alias ("en", "enable", class_breakpoint, 1);
 
-  add_abbrev_prefix_cmd ("breakpoints", class_breakpoint, enable_command,
-                        "Enable some breakpoints.\n\
+  add_abbrev_prefix_cmd ("breakpoints", class_breakpoint, enable_command, _("\
+Enable some breakpoints.\n\
 Give breakpoint numbers (separated by spaces) as arguments.\n\
 This is used to cancel the effect of the \"disable\" command.\n\
-May be abbreviated to simply \"enable\".\n",
+May be abbreviated to simply \"enable\".\n"),
                   &enablebreaklist, "enable breakpoints ", 1, &enablelist);
 
-  add_cmd ("once", no_class, enable_once_command,
-          "Enable breakpoints for one hit.  Give breakpoint numbers.\n\
-If a breakpoint is hit while enabled in this fashion, it becomes disabled.",
+  add_cmd ("once", no_class, enable_once_command, _("\
+Enable breakpoints for one hit.  Give breakpoint numbers.\n\
+If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
           &enablebreaklist);
 
-  add_cmd ("delete", no_class, enable_delete_command,
-          "Enable breakpoints and delete when hit.  Give breakpoint numbers.\n\
-If a breakpoint is hit while enabled in this fashion, it is deleted.",
+  add_cmd ("delete", no_class, enable_delete_command, _("\
+Enable breakpoints and delete when hit.  Give breakpoint numbers.\n\
+If a breakpoint is hit while enabled in this fashion, it is deleted."),
           &enablebreaklist);
 
-  add_cmd ("delete", no_class, enable_delete_command,
-          "Enable breakpoints and delete when hit.  Give breakpoint numbers.\n\
-If a breakpoint is hit while enabled in this fashion, it is deleted.",
+  add_cmd ("delete", no_class, enable_delete_command, _("\
+Enable breakpoints and delete when hit.  Give breakpoint numbers.\n\
+If a breakpoint is hit while enabled in this fashion, it is deleted."),
           &enablelist);
 
-  add_cmd ("once", no_class, enable_once_command,
-          "Enable breakpoints for one hit.  Give breakpoint numbers.\n\
-If a breakpoint is hit while enabled in this fashion, it becomes disabled.",
+  add_cmd ("once", no_class, enable_once_command, _("\
+Enable breakpoints for one hit.  Give breakpoint numbers.\n\
+If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
           &enablelist);
 
-  add_prefix_cmd ("disable", class_breakpoint, disable_command,
-                 "Disable some breakpoints.\n\
+  add_prefix_cmd ("disable", class_breakpoint, disable_command, _("\
+Disable some breakpoints.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
 To disable all breakpoints, give no argument.\n\
-A disabled breakpoint is not forgotten, but has no effect until reenabled.",
+A disabled breakpoint is not forgotten, but has no effect until reenabled."),
                  &disablelist, "disable ", 1, &cmdlist);
   add_com_alias ("dis", "disable", class_breakpoint, 1);
   add_com_alias ("disa", "disable", class_breakpoint, 1);
   if (xdb_commands)
-    add_com ("sb", class_breakpoint, disable_command,
-            "Disable some breakpoints.\n\
+    add_com ("sb", class_breakpoint, disable_command, _("\
+Disable some breakpoints.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
 To disable all breakpoints, give no argument.\n\
-A disabled breakpoint is not forgotten, but has no effect until reenabled.");
+A disabled breakpoint is not forgotten, but has no effect until reenabled."));
 
-  add_cmd ("breakpoints", class_alias, disable_command,
-          "Disable some breakpoints.\n\
+  add_cmd ("breakpoints", class_alias, disable_command, _("\
+Disable some breakpoints.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
 To disable all breakpoints, give no argument.\n\
 A disabled breakpoint is not forgotten, but has no effect until reenabled.\n\
-This command may be abbreviated \"disable\".",
+This command may be abbreviated \"disable\"."),
           &disablelist);
 
-  add_prefix_cmd ("delete", class_breakpoint, delete_command,
-                 "Delete some breakpoints or auto-display expressions.\n\
+  add_prefix_cmd ("delete", class_breakpoint, delete_command, _("\
+Delete some breakpoints or auto-display expressions.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
 To delete all breakpoints, give no argument.\n\
 \n\
 Also a prefix command for deletion of other GDB objects.\n\
-The \"unset\" command is also an alias for \"delete\".",
+The \"unset\" command is also an alias for \"delete\"."),
                  &deletelist, "delete ", 1, &cmdlist);
   add_com_alias ("d", "delete", class_breakpoint, 1);
+  add_com_alias ("del", "delete", class_breakpoint, 1);
   if (xdb_commands)
-    add_com ("db", class_breakpoint, delete_command,
-            "Delete some breakpoints.\n\
+    add_com ("db", class_breakpoint, delete_command, _("\
+Delete some breakpoints.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
-To delete all breakpoints, give no argument.\n");
+To delete all breakpoints, give no argument.\n"));
 
-  add_cmd ("breakpoints", class_alias, delete_command,
-          "Delete some breakpoints or auto-display expressions.\n\
+  add_cmd ("breakpoints", class_alias, delete_command, _("\
+Delete some breakpoints or auto-display expressions.\n\
 Arguments are breakpoint numbers with spaces in between.\n\
 To delete all breakpoints, give no argument.\n\
-This command may be abbreviated \"delete\".",
+This command may be abbreviated \"delete\"."),
           &deletelist);
 
-  add_com ("clear", class_breakpoint, clear_command,
-          concat ("Clear breakpoint at specified line or function.\n\
+  add_com ("clear", class_breakpoint, clear_command, _("\
+Clear breakpoint at specified line or function.\n\
 Argument may be line number, function name, or \"*\" and an address.\n\
 If line number is specified, all breakpoints in that line are cleared.\n\
 If function is specified, breakpoints at beginning of function are cleared.\n\
-If an address is specified, breakpoints at that address are cleared.\n\n",
-                  "With no argument, clears all breakpoints in the line that the selected frame\n\
+If an address is specified, breakpoints at that address are cleared.\n\
+\n\
+With no argument, clears all breakpoints in the line that the selected frame\n\
 is executing in.\n\
 \n\
-See also the \"delete\" command which clears breakpoints by number.", NULL));
+See also the \"delete\" command which clears breakpoints by number."));
 
-  c = add_com ("break", class_breakpoint, break_command,
-              concat ("Set breakpoint at specified line or function.\n\
-Argument may be line number, function name, or \"*\" and an address.\n\
-If line number is specified, break at start of code for that line.\n\
-If function is specified, break at start of code for that function.\n\
-If an address is specified, break at that exact address.\n",
-                  "With no arg, uses current execution address of selected stack frame.\n\
-This is useful for breaking on return to a stack frame.\n\
-\n\
-Multiple breakpoints at one place are permitted, and useful if conditional.\n\
-\n\
-Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL));
+  c = add_com ("break", class_breakpoint, break_command, _("\
+Set breakpoint at specified line or function.\n"
+BREAK_ARGS_HELP ("break")));
   set_cmd_completer (c, location_completer);
 
   add_com_alias ("b", "break", class_run, 1);
@@ -7696,78 +7939,83 @@ Do \"help breakpoints\" for info on other commands dealing with breakpoints.", N
 
   if (dbx_commands)
     {
-      add_abbrev_prefix_cmd ("stop", class_breakpoint, stop_command,
-       "Break in function/address or break at a line in the current file.",
+      add_abbrev_prefix_cmd ("stop", class_breakpoint, stop_command, _("\
+Break in function/address or break at a line in the current file."),
                             &stoplist, "stop ", 1, &cmdlist);
       add_cmd ("in", class_breakpoint, stopin_command,
-              "Break in function or address.\n", &stoplist);
+              _("Break in function or address."), &stoplist);
       add_cmd ("at", class_breakpoint, stopat_command,
-              "Break at a line in the current file.\n", &stoplist);
-      add_com ("status", class_info, breakpoints_info,
-              concat ("Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
+              _("Break at a line in the current file."), &stoplist);
+      add_com ("status", class_info, breakpoints_info, _("\
+Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
 The \"Type\" column indicates one of:\n\
 \tbreakpoint     - normal breakpoint\n\
 \twatchpoint     - watchpoint\n\
 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
 the disposition of the breakpoint after it gets hit.  \"dis\" means that the\n\
 breakpoint will be disabled.  The \"Address\" and \"What\" columns indicate the\n\
-address and file/line number respectively.\n\n",
-                      "Convenience variable \"$_\" and default examine address for \"x\"\n\
+address and file/line number respectively.\n\
+\n\
+Convenience variable \"$_\" and default examine address for \"x\"\n\
 are set to the address of the last breakpoint listed.\n\n\
 Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set.", NULL));
+breakpoint set."));
     }
 
-  add_info ("breakpoints", breakpoints_info,
-           concat ("Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
+  add_info ("breakpoints", breakpoints_info, _("\
+Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
 The \"Type\" column indicates one of:\n\
 \tbreakpoint     - normal breakpoint\n\
 \twatchpoint     - watchpoint\n\
 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
 the disposition of the breakpoint after it gets hit.  \"dis\" means that the\n\
 breakpoint will be disabled.  The \"Address\" and \"What\" columns indicate the\n\
-address and file/line number respectively.\n\n",
-                   "Convenience variable \"$_\" and default examine address for \"x\"\n\
+address and file/line number respectively.\n\
+\n\
+Convenience variable \"$_\" and default examine address for \"x\"\n\
 are set to the address of the last breakpoint listed.\n\n\
 Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set.", NULL));
+breakpoint set."));
 
   if (xdb_commands)
-    add_com ("lb", class_breakpoint, breakpoints_info,
-            concat ("Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
+    add_com ("lb", class_breakpoint, breakpoints_info, _("\
+Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
 The \"Type\" column indicates one of:\n\
 \tbreakpoint     - normal breakpoint\n\
 \twatchpoint     - watchpoint\n\
 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
 the disposition of the breakpoint after it gets hit.  \"dis\" means that the\n\
 breakpoint will be disabled.  The \"Address\" and \"What\" columns indicate the\n\
-address and file/line number respectively.\n\n",
-                    "Convenience variable \"$_\" and default examine address for \"x\"\n\
+address and file/line number respectively.\n\
+\n\
+Convenience variable \"$_\" and default examine address for \"x\"\n\
 are set to the address of the last breakpoint listed.\n\n\
 Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set.", NULL));
+breakpoint set."));
 
-  add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints,
-          concat ("Status of all breakpoints, or breakpoint number NUMBER.\n\
+  add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints, _("\
+Status of all breakpoints, or breakpoint number NUMBER.\n\
 The \"Type\" column indicates one of:\n\
 \tbreakpoint     - normal breakpoint\n\
 \twatchpoint     - watchpoint\n\
 \tlongjmp        - internal breakpoint used to step through longjmp()\n\
 \tlongjmp resume - internal breakpoint at the target of longjmp()\n\
 \tuntil          - internal breakpoint used by the \"until\" command\n\
-\tfinish         - internal breakpoint used by the \"finish\" command\n",
-                  "The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
+\tfinish         - internal breakpoint used by the \"finish\" command\n\
+The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
 the disposition of the breakpoint after it gets hit.  \"dis\" means that the\n\
 breakpoint will be disabled.  The \"Address\" and \"What\" columns indicate the\n\
-address and file/line number respectively.\n\n",
-                  "Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed.\n\n\
+address and file/line number respectively.\n\
+\n\
+Convenience variable \"$_\" and default examine address for \"x\"\n\
+are set to the address of the last breakpoint listed.\n\
+\n\
 Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set.", NULL),
+breakpoint set."),
           &maintenanceinfolist);
 
-  add_com ("catch", class_breakpoint, catch_command,
-          "Set catchpoints to catch events.\n\
+  add_com ("catch", class_breakpoint, catch_command, _("\
+Set catchpoints to catch events.\n\
 Raised signals may be caught:\n\
 \tcatch signal              - all signals\n\
 \tcatch signal <signame>    - a particular signal\n\
@@ -7799,46 +8047,78 @@ C++ exceptions may be caught:\n\
 \n\
 Do \"help set follow-fork-mode\" for info on debugging your program\n\
 after a fork or vfork is caught.\n\n\
-Do \"help breakpoints\" for info on other commands dealing with breakpoints.");
+Do \"help breakpoints\" for info on other commands dealing with breakpoints."));
 
-  add_com ("tcatch", class_breakpoint, tcatch_command,
-          "Set temporary catchpoints to catch events.\n\
+  add_com ("tcatch", class_breakpoint, tcatch_command, _("\
+Set temporary catchpoints to catch events.\n\
 Args like \"catch\" command.\n\
 Like \"catch\" except the catchpoint is only temporary,\n\
 so it will be deleted when hit.  Equivalent to \"catch\" followed\n\
-by using \"enable delete\" on the catchpoint number.");
+by using \"enable delete\" on the catchpoint number."));
 
-  c = add_com ("watch", class_breakpoint, watch_command,
-              "Set a watchpoint for an expression.\n\
+  c = add_com ("watch", class_breakpoint, watch_command, _("\
+Set a watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
-an expression changes.");
+an expression changes."));
   set_cmd_completer (c, location_completer);
 
-  c = add_com ("rwatch", class_breakpoint, rwatch_command,
-              "Set a read watchpoint for an expression.\n\
+  c = add_com ("rwatch", class_breakpoint, rwatch_command, _("\
+Set a read watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
-an expression is read.");
+an expression is read."));
   set_cmd_completer (c, location_completer);
 
-  c = add_com ("awatch", class_breakpoint, awatch_command,
-              "Set a watchpoint for an expression.\n\
+  c = add_com ("awatch", class_breakpoint, awatch_command, _("\
+Set a watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
-an expression is either read or written.");
+an expression is either read or written."));
   set_cmd_completer (c, location_completer);
 
   add_info ("watchpoints", breakpoints_info,
-           "Synonym for ``info breakpoints''.");
+           _("Synonym for ``info breakpoints''."));
 
 
-  c = add_set_cmd ("can-use-hw-watchpoints", class_support, var_zinteger,
-                  (char *) &can_use_hw_watchpoints,
-                  "Set debugger's willingness to use watchpoint hardware.\n\
+  /* XXX: cagney/2005-02-23: This should be a boolean, and should
+     respond to changes - contrary to the description.  */
+  add_setshow_zinteger_cmd ("can-use-hw-watchpoints", class_support,
+                           &can_use_hw_watchpoints, _("\
+Set debugger's willingness to use watchpoint hardware."), _("\
+Show debugger's willingness to use watchpoint hardware."), _("\
 If zero, gdb will not use hardware for new watchpoints, even if\n\
 such is available.  (However, any hardware watchpoints that were\n\
 created before setting this to nonzero, will continue to use watchpoint\n\
-hardware.)",
-                  &setlist);
-  add_show_from_set (c, &showlist);
+hardware.)"),
+                           NULL,
+                           show_can_use_hw_watchpoints,
+                           &setlist, &showlist);
 
   can_use_hw_watchpoints = 1;
+
+  add_prefix_cmd ("breakpoint", class_maintenance, set_breakpoint_cmd, _("\
+Breakpoint specific settings\n\
+Configure various breakpoint-specific variables such as\n\
+pending breakpoint behavior"),
+                 &breakpoint_set_cmdlist, "set breakpoint ",
+                 0/*allow-unknown*/, &setlist);
+  add_prefix_cmd ("breakpoint", class_maintenance, show_breakpoint_cmd, _("\
+Breakpoint specific settings\n\
+Configure various breakpoint-specific variables such as\n\
+pending breakpoint behavior"),
+                 &breakpoint_show_cmdlist, "show breakpoint ",
+                 0/*allow-unknown*/, &showlist);
+
+  add_setshow_auto_boolean_cmd ("pending", no_class,
+                               &pending_break_support, _("\
+Set debugger's behavior regarding pending breakpoints."), _("\
+Show debugger's behavior regarding pending breakpoints."), _("\
+If on, an unrecognized breakpoint location will cause gdb to create a\n\
+pending breakpoint.  If off, an unrecognized breakpoint location results in\n\
+an error.  If auto, an unrecognized breakpoint location results in a\n\
+user-query to see if a pending breakpoint should be created."),
+                               NULL,
+                               show_pending_break_support,
+                               &breakpoint_set_cmdlist,
+                               &breakpoint_show_cmdlist);
+
+  pending_break_support = AUTO_BOOLEAN_AUTO;
 }
This page took 0.08861 seconds and 4 git commands to generate.