#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. */
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);
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;
}
}
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
{
shadow contents, not the breakpoints themselves. From breakpoint.c. */
int
-deprecated_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;
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;
"breakpoint #%d\n", bpt->owner->number);
}
else
-#endif
{
#ifdef ONE_PROCESS_WRITETEXT
*process_warning = 1;
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));
}
}
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;
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;
|| bpt->owner->type == bp_catch_vfork
|| bpt->owner->type == bp_catch_exec)
{
- struct exception e = catch_exception (uiout, insert_catchpoint,
- bpt->owner, RETURN_MASK_ERROR);
+ 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)
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;
/* 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;
(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;
}
(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;
}
{
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 = ");
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 = ");
{
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 = ");
{
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 = ");
}
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;
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\
/* 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;
/* 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;
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 (!b->pending && (!overlay_debugging || b->loc->section == 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");
}
}
if (rc == GDB_RC_OK)
/* Pending breakpoint has been resolved. */
- printf_filtered ("Pending breakpoint \"%s\" resolved\n", b->addr_string);
+ printf_filtered (_("Pending breakpoint \"%s\" resolved\n"), b->addr_string);
do_cleanups (old_chain);
return rc;
}
-#ifdef SOLIB_ADD
void
remove_solib_event_breakpoints (void)
{
/* 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)) &&
- breakpoint_enabled (b) &&
- !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)
warning (_("breakpoint #%d "), b->number);
}
}
-#endif
}
}
struct breakpoint *b;
int disabled_shlib_breaks = 0;
-#if defined (PC_SOLIB)
/* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
ALL_BREAKPOINTS (b)
{
if ((b->loc->loc_type == bp_loc_hardware_breakpoint
|| b->loc->loc_type == bp_loc_software_breakpoint)
- && breakpoint_enabled (b)
- && !b->loc->duplicate)
+ && breakpoint_enabled (b) && !b->loc->duplicate)
{
+#ifdef PC_SOLIB
char *so_name = PC_SOLIB (b->loc->address);
- if (so_name
- && !strcmp (so_name, solib->so_name))
+#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
}
}
}
-#endif
}
/* Try to reenable any breakpoints in shared libraries. */
{
if (b->enable_state == bp_shlib_disabled)
{
- char buf[1], *lib;
+ gdb_byte buf[1];
+ char *lib;
- /* Do not reenable the breakpoint if the shared library
- is still not mapped in. */
+ /* 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;
}
}
}
-#endif
-
static void
solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname,
char *cond_string, enum bptype bp_kind)
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 ");
say_where = 0;
break;
}
- printf_filtered ("Breakpoint %d", b->number);
+ printf_filtered (_("Breakpoint %d"), b->number);
say_where = 1;
break;
case bp_hardware_breakpoint:
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) ?
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;
if (say_where)
{
+ /* i18n: cagney/2005-02-11: Below needs to be merged into a
+ single string. */
if (b->pending)
{
- printf_filtered (" (%s) pending.", b->addr_string);
+ printf_filtered (_(" (%s) pending."), b->addr_string);
}
else
{
if (addressprint || b->source_file == NULL)
{
printf_filtered (" at ");
- print_address_numeric (b->loc->address, 1, gdb_stdout);
+ deprecated_print_address_numeric (b->loc->address, 1, gdb_stdout);
}
if (b->source_file)
printf_filtered (": file %s, line %d.",
static int
break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_bp)
{
- struct exception e;
+ struct gdb_exception e;
int tempflag, hardwareflag;
struct symtabs_and_lines sals;
struct expression **cond = 0;
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
}
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, NULL);
}
}
if (badInput)
- printf_filtered ("Usage: stop at <line>\n");
+ printf_filtered (_("Usage: stop at <line>\n"));
else
break_command_1 (arg, 0, from_tty, NULL);
}
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;
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 = {
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)
{
{
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));
}
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. */
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 ();
break;
}
if (match == 0)
- printf_unfiltered ("No breakpoint number %d.\n", num);
+ printf_unfiltered (_("No breakpoint number %d.\n"), num);
}
p = p1;
}
fr = frame_find_by_id (bpt->watchpoint_frame);
if (fr == NULL)
{
- printf_filtered ("\
+ printf_filtered (_("\
Cannot enable watchpoint %d because the block in which its expression\n\
-is valid is not currently in scope.\n", bpt->number);
+is valid is not currently in scope.\n"), bpt->number);
bpt->enable_state = bp_disabled;
return;
}
bp_watchpoint in the following condition */
if (target_resources_ok < 0)
{
- printf_filtered ("\
+ printf_filtered (_("\
Cannot enable watchpoint %d because target watch resources\n\
-have been allocated for other watchpoints.\n", bpt->number);
+have been allocated for other watchpoints.\n"), bpt->number);
bpt->enable_state = bp_disabled;
value_free_to_mark (mark);
return;
static struct cmd_list_element *breakpoint_show_cmdlist;
struct cmd_list_element *c;
-#ifdef SOLIB_ADD
observer_attach_solib_unloaded (disable_breakpoints_in_unloaded_shlib);
-#endif
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. Args like \"break\" command.\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."));
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. Args like \"break\" command.\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."));
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. Args like \"break\" command.\n\
Like \"hbreak\" except the breakpoint is only temporary,\n\
-so it will be deleted when hit.");
+so it will be deleted when hit."));
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);
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\
+ c = add_com ("break", class_breakpoint, break_command, _("\
+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\
+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));
+Do \"help breakpoints\" for info on other commands dealing with breakpoints."));
set_cmd_completer (c, location_completer);
add_com_alias ("b", "break", class_run, 1);
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\
\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);
- deprecated_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, "\
+ add_prefix_cmd ("breakpoint", class_maintenance, set_breakpoint_cmd, _("\
Breakpoint specific settings\n\
Configure various breakpoint-specific variables such as\n\
-pending breakpoint behavior",
+pending breakpoint behavior"),
&breakpoint_set_cmdlist, "set breakpoint ",
0/*allow-unknown*/, &setlist);
- add_prefix_cmd ("breakpoint", class_maintenance, show_breakpoint_cmd, "\
+ add_prefix_cmd ("breakpoint", class_maintenance, show_breakpoint_cmd, _("\
Breakpoint specific settings\n\
Configure various breakpoint-specific variables such as\n\
-pending breakpoint behavior",
+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.", "\
+ 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, /* PRINT: Debugger's behavior regarding pending breakpoints is %s. */
- NULL, NULL,
+user-query to see if a pending breakpoint should be created."),
+ NULL,
+ show_pending_break_support,
&breakpoint_set_cmdlist,
&breakpoint_show_cmdlist);