/* Select target systems and architectures at runtime for GDB.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Cygnus Support.
static void init_dummy_target (void);
+static struct target_ops debug_target;
+
static void debug_to_open (char *, int);
static void debug_to_close (int);
static void debug_to_prepare_to_store (void);
-static int debug_to_xfer_memory (CORE_ADDR, char *, int, int,
- struct mem_attrib *, struct target_ops *);
+static int deprecated_debug_xfer_memory (CORE_ADDR, char *, int, int,
+ struct mem_attrib *,
+ struct target_ops *);
static void debug_to_files_info (struct target_ops *);
-static int debug_to_insert_breakpoint (CORE_ADDR, char *);
+static int debug_to_insert_breakpoint (CORE_ADDR, bfd_byte *);
-static int debug_to_remove_breakpoint (CORE_ADDR, char *);
+static int debug_to_remove_breakpoint (CORE_ADDR, bfd_byte *);
static int debug_to_can_use_hw_breakpoint (int, int, int);
static int debug_to_stopped_by_watchpoint (void);
-static CORE_ADDR debug_to_stopped_data_address (void);
+static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
static int debug_to_region_size_ok_for_hw_watchpoint (int);
wierd and mysterious ways. Putting the variable here lets those
wierd and mysterious ways keep building while they are being
converted to the inferior inheritance structure. */
-struct target_ops child_ops;
+struct target_ops deprecated_child_ops;
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
/* Non-zero if we want to see trace of target level stuff. */
static int targetdebug = 0;
+static void
+show_targetdebug (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("Target debugging is %s.\n"), value);
+}
static void setup_target_debug (void);
target_structs[target_struct_size++] = t;
if (targetlist == NULL)
- add_prefix_cmd ("target", class_run, target_command,
- "Connect to a target machine or process.\n\
+ add_prefix_cmd ("target", class_run, target_command, _("\
+Connect to a target machine or process.\n\
The first argument is the type or protocol of the target machine.\n\
Remaining arguments are interpreted by the target protocol. For more\n\
information on the arguments for a particular protocol, type\n\
-`help target ' followed by the protocol name.",
+`help target ' followed by the protocol name."),
&targetlist, "target ", 0, &cmdlist);
add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist);
}
static void
tcomplain (void)
{
- error ("You can't do that when your target is `%s'",
+ error (_("You can't do that when your target is `%s'"),
current_target.to_shortname);
}
void
noprocess (void)
{
- error ("You can't do that without a process to debug.");
+ error (_("You can't do that without a process to debug."));
}
static int
if (ptid_equal (inferior_ptid, null_ptid))
noprocess ();
else
- error ("No run-time support for this");
+ error (_("No run-time support for this"));
}
static void
default_terminal_info (char *args, int from_tty)
{
- printf_unfiltered ("No saved terminal information.\n");
+ printf_unfiltered (_("No saved terminal information.\n"));
}
/* This is the default target_create_inferior and target_attach function.
{
if (target_has_execution)
{
- printf_unfiltered ("You are already running a program:\n");
+ printf_unfiltered (_("You are already running a program:\n"));
target_files_info ();
if (query ("Kill it? "))
{
target_kill ();
if (target_has_execution)
- error ("Killing the program did not help.");
+ error (_("Killing the program did not help."));
return;
}
else
{
- error ("Program not killed.");
+ error (_("Program not killed."));
}
}
tcomplain ();
INHERIT (to_fetch_registers, t);
INHERIT (to_store_registers, t);
INHERIT (to_prepare_to_store, t);
- INHERIT (to_xfer_memory, t);
+ INHERIT (deprecated_xfer_memory, t);
INHERIT (to_files_info, t);
INHERIT (to_insert_breakpoint, t);
INHERIT (to_remove_breakpoint, t);
de_fault (to_prepare_to_store,
(void (*) (void))
noprocess);
- de_fault (to_xfer_memory,
+ de_fault (deprecated_xfer_memory,
(int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *))
nomemory);
de_fault (to_files_info,
(int (*) (void))
return_zero);
de_fault (to_stopped_data_address,
- (CORE_ADDR (*) (void))
+ (int (*) (struct target_ops *, CORE_ADDR *))
return_zero);
de_fault (to_region_size_ok_for_hw_watchpoint,
default_region_size_ok_for_hw_watchpoint);
(void (*) (int))
target_ignore);
de_fault (to_insert_fork_catchpoint,
- (int (*) (int))
+ (void (*) (int))
tcomplain);
de_fault (to_remove_fork_catchpoint,
(int (*) (int))
tcomplain);
de_fault (to_insert_vfork_catchpoint,
- (int (*) (int))
+ (void (*) (int))
tcomplain);
de_fault (to_remove_vfork_catchpoint,
(int (*) (int))
(int (*) (int))
target_ignore);
de_fault (to_insert_exec_catchpoint,
- (int (*) (int))
+ (void (*) (int))
tcomplain);
de_fault (to_remove_exec_catchpoint,
(int (*) (int))
fprintf_unfiltered (gdb_stderr,
"Magic number of %s target struct wrong\n",
t->to_shortname);
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
+ internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
/* Find the proper stratum to install this target in. */
fprintf_unfiltered (gdb_stderr,
"pop_target couldn't find target %s\n",
current_target.to_shortname);
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
+ internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
#undef MIN
&& target_stack->to_xfer_partial != default_xfer_partial);
}
+static LONGEST
+target_xfer_partial (struct target_ops *ops,
+ enum target_object object, const char *annex,
+ void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len)
+{
+ LONGEST retval;
+
+ gdb_assert (ops->to_xfer_partial != NULL);
+ retval = ops->to_xfer_partial (ops, object, annex, readbuf, writebuf,
+ offset, len);
+ if (targetdebug)
+ {
+ const unsigned char *myaddr = NULL;
+
+ fprintf_unfiltered (gdb_stdlog,
+ "%s:target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s",
+ ops->to_shortname,
+ (int) object,
+ (annex ? annex : "(null)"),
+ (long) readbuf, (long) writebuf,
+ paddr_nz (offset), paddr_d (len), paddr_d (retval));
+
+ if (readbuf)
+ myaddr = readbuf;
+ if (writebuf)
+ myaddr = writebuf;
+ if (retval > 0 && myaddr != NULL)
+ {
+ int i;
+
+ fputs_unfiltered (", bytes =", gdb_stdlog);
+ for (i = 0; i < retval; i++)
+ {
+ if ((((long) &(myaddr[i])) & 0xf) == 0)
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
+ fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
+ }
+ }
+
+ fputc_unfiltered ('\n', gdb_stdlog);
+ }
+ return retval;
+}
+
/* Attempt a transfer all LEN bytes starting at OFFSET between the
inferior's KIND:ANNEX space and GDB's READBUF/WRITEBUF buffer. If
the transfer succeeds, return zero, otherwize the host ERRNO is
implementing another singluar mechanism (for instance, a generic
object:annex onto inferior:object:annex say). */
-static int
+static LONGEST
xfer_using_stratum (enum target_object object, const char *annex,
- CORE_ADDR memaddr, int len, void *readbuf,
+ ULONGEST offset, LONGEST len, void *readbuf,
const void *writebuf)
{
LONGEST xfered;
target = target_stack;
while (1)
{
- xfered = target->to_xfer_partial (target, object, annex,
- readbuf, writebuf, memaddr, len);
+ xfered = target_xfer_partial (target, object, annex,
+ readbuf, writebuf, offset, len);
if (xfered > 0)
{
/* The partial xfer succeeded, update the counts, check that
len -= xfered;
if (len <= 0)
return 0;
+ offset += xfered;
+ if (readbuf != NULL)
+ readbuf = (bfd_byte *) readbuf + xfered;
+ if (writebuf != NULL)
+ writebuf = (bfd_byte *) writebuf + xfered;
target = target_stack;
}
else if (xfered < 0)
deal with partial reads should call target_read_memory_partial. */
int
-target_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
+target_read_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len)
{
if (target_xfer_partial_p ())
return xfer_using_stratum (TARGET_OBJECT_MEMORY, NULL,
}
int
-target_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
+target_write_memory (CORE_ADDR memaddr, const bfd_byte *myaddr, int len)
{
+ bfd_byte *bytes = alloca (len);
+ memcpy (bytes, myaddr, len);
if (target_xfer_partial_p ())
return xfer_using_stratum (TARGET_OBJECT_MEMORY, NULL,
- memaddr, len, NULL, myaddr);
+ memaddr, len, NULL, bytes);
else
- return target_xfer_memory (memaddr, myaddr, len, 1);
+ return target_xfer_memory (memaddr, bytes, len, 1);
+}
+
+#ifndef target_stopped_data_address_p
+int
+target_stopped_data_address_p (struct target_ops *target)
+{
+ if (target->to_stopped_data_address
+ == (int (*) (struct target_ops *, CORE_ADDR *)) return_zero)
+ return 0;
+ if (target->to_stopped_data_address == debug_to_stopped_data_address
+ && (debug_target.to_stopped_data_address
+ == (int (*) (struct target_ops *, CORE_ADDR *)) return_zero))
+ return 0;
+ return 1;
}
+#endif
static int trust_readonly = 0;
+static void
+show_trust_readonly (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("\
+Mode for reading from readonly sections is %s.\n"),
+ value);
+}
/* Move memory to or from the targets. The top target gets priority;
if it cannot handle it, it is offered to the next one down, etc.
if (len == 0)
return 0;
- /* to_xfer_memory is not guaranteed to set errno, even when it returns
- 0. */
+ /* deprecated_xfer_memory is not guaranteed to set errno, even when
+ it returns 0. */
errno = 0;
if (!write && trust_readonly)
}
/* The quick case is that the top target can handle the transfer. */
- res = current_target.to_xfer_memory
+ res = current_target.deprecated_xfer_memory
(memaddr, myaddr, len, write, attrib, ¤t_target);
/* If res <= 0 then we call it again in the loop. Ah well. */
if (!t->to_has_memory)
continue;
- res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t);
+ res = t->deprecated_xfer_memory (memaddr, myaddr, len, write, attrib, t);
if (res > 0)
break; /* Handled all or part of xfer */
if (t->to_has_all_memory)
target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
{
if (target_xfer_partial_p ())
- return target_stack->to_xfer_partial (target_stack,
- TARGET_OBJECT_MEMORY, NULL,
- buf, NULL, memaddr, len);
+ {
+ int retval;
+
+ retval = target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY,
+ NULL, buf, NULL, memaddr, len);
+
+ if (retval <= 0)
+ {
+ if (errno)
+ *err = errno;
+ else
+ *err = EIO;
+ return -1;
+ }
+ else
+ {
+ *err = 0;
+ return retval;
+ }
+ }
else
return target_xfer_memory_partial (memaddr, buf, len, 0, err);
}
target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
{
if (target_xfer_partial_p ())
- return target_stack->to_xfer_partial (target_stack,
- TARGET_OBJECT_MEMORY, NULL,
- NULL, buf, memaddr, len);
+ {
+ int retval;
+
+ retval = target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY,
+ NULL, NULL, buf, memaddr, len);
+
+ if (retval <= 0)
+ {
+ if (errno)
+ *err = errno;
+ else
+ *err = EIO;
+ return -1;
+ }
+ else
+ {
+ *err = 0;
+ return retval;
+ }
+ }
else
return target_xfer_memory_partial (memaddr, buf, len, 1, err);
}
const void *writebuf, ULONGEST offset, LONGEST len)
{
if (object == TARGET_OBJECT_MEMORY
- && ops->to_xfer_memory != NULL)
- /* If available, fall back to the target's "to_xfer_memory"
- method. */
+ && ops->deprecated_xfer_memory != NULL)
+ /* If available, fall back to the target's
+ "deprecated_xfer_memory" method. */
{
int xfered = -1;
errno = 0;
void *buffer = xmalloc (len);
struct cleanup *cleanup = make_cleanup (xfree, buffer);
memcpy (buffer, writebuf, len);
- xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL,
- ops);
+ xfered = ops->deprecated_xfer_memory (offset, buffer, len,
+ 1/*write*/, NULL, ops);
do_cleanups (cleanup);
}
if (readbuf != NULL)
- xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL,
- ops);
+ xfered = ops->deprecated_xfer_memory (offset, readbuf, len, 0/*read*/,
+ NULL, ops);
if (xfered > 0)
return xfered;
else if (xfered == 0 && errno == 0)
- /* "to_xfer_memory" uses 0, cross checked against ERRNO as one
- indication of an error. */
+ /* "deprecated_xfer_memory" uses 0, cross checked against
+ ERRNO as one indication of an error. */
return 0;
else
return -1;
}
else if (ops->beneath != NULL)
- return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
- readbuf, writebuf, offset, len);
+ return target_xfer_partial (ops->beneath, object, annex,
+ readbuf, writebuf, offset, len);
else
return -1;
}
const char *annex, void *buf,
ULONGEST offset, LONGEST len)
{
- gdb_assert (ops->to_xfer_partial != NULL);
- return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len);
+ return target_xfer_partial (ops, object, annex, buf, NULL, offset, len);
}
LONGEST
const char *annex, const void *buf,
ULONGEST offset, LONGEST len)
{
- gdb_assert (ops->to_xfer_partial != NULL);
- return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len);
+ return target_xfer_partial (ops, object, annex, NULL, buf, offset, len);
}
/* Wrappers to perform the full transfer. */
int has_all_mem = 0;
if (symfile_objfile != NULL)
- printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name);
+ printf_unfiltered (_("Symbols from \"%s\".\n"), symfile_objfile->name);
for (t = target_stack; t != NULL; t = t->beneath)
{
if ((int) (t->to_stratum) <= (int) dummy_stratum)
continue;
if (has_all_mem)
- printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n");
+ printf_unfiltered (_("\tWhile running this, GDB does not access memory from...\n"));
printf_unfiltered ("%s:\n", t->to_longname);
(t->to_files_info) (t);
has_all_mem = t->to_has_all_memory;
if (target_has_execution)
{
if (!from_tty
- || query ("A program is being debugged already. Kill it? "))
+ || query (_("A program is being debugged already. Kill it? ")))
target_kill ();
else
- error ("Program not killed.");
+ error (_("Program not killed."));
}
/* Calling target_kill may remove the target from the stack. But if
{
(current_target.to_lookup_symbol) (modname, t_reloc);
if (*t_reloc == 0)
- error ("Unable to link to %s and get relocation in rombug", modname);
+ error (_("Unable to link to %s and get relocation in rombug"), modname);
}
else
*t_reloc = (CORE_ADDR) -1;
}
if (count != 1)
- error ("Don't know how to %s. Try \"help target\".", do_mesg);
+ error (_("Don't know how to %s. Try \"help target\"."), do_mesg);
return runable;
}
int (*target_activity_function) (void);
int target_activity_fd;
\f
-/* Convert a normal process ID to a string. Returns the string in a static
- buffer. */
+/* Convert a normal process ID to a string. Returns the string in a
+ static buffer. */
char *
normal_pid_to_str (ptid_t ptid)
{
- static char buf[30];
+ static char buf[32];
+ int size;
- sprintf (buf, "process %d", PIDGET (ptid));
+ size = snprintf (buf, sizeof buf, "process %d", ptid_get_pid (ptid));
+ gdb_assert (size < sizeof buf);
return buf;
}
/* Error-catcher for target_find_memory_regions */
static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2)
{
- error ("No target.");
+ error (_("No target."));
return 0;
}
/* Error-catcher for target_make_corefile_notes */
static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2)
{
- error ("No target.");
+ error (_("No target."));
return NULL;
}
dummy_target.to_magic = OPS_MAGIC;
}
\f
-
-static struct target_ops debug_target;
-
static void
debug_to_open (char *args, int from_tty)
{
}
static int
-debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
+deprecated_debug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+ int write, struct mem_attrib *attrib,
+ struct target_ops *target)
{
int retval;
- retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write,
- attrib, target);
+ retval = debug_target.deprecated_xfer_memory (memaddr, myaddr, len, write,
+ attrib, target);
fprintf_unfiltered (gdb_stdlog,
"target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d",
}
static int
-debug_to_insert_breakpoint (CORE_ADDR addr, char *save)
+debug_to_insert_breakpoint (CORE_ADDR addr, bfd_byte *save)
{
int retval;
}
static int
-debug_to_remove_breakpoint (CORE_ADDR addr, char *save)
+debug_to_remove_breakpoint (CORE_ADDR addr, bfd_byte *save)
{
int retval;
return retval;
}
-static CORE_ADDR
-debug_to_stopped_data_address (void)
+static int
+debug_to_stopped_data_address (struct target_ops *target, CORE_ADDR *addr)
{
- CORE_ADDR retval;
+ int retval;
- retval = debug_target.to_stopped_data_address ();
+ retval = debug_target.to_stopped_data_address (target, addr);
fprintf_unfiltered (gdb_stdlog,
- "target_stopped_data_address () = 0x%lx\n",
- (unsigned long) retval);
+ "target_stopped_data_address ([0x%lx]) = %ld\n",
+ (unsigned long)*addr,
+ (unsigned long)retval);
return retval;
}
pid);
}
-static int
+static void
debug_to_insert_fork_catchpoint (int pid)
{
- int retval;
+ debug_target.to_insert_fork_catchpoint (pid);
- retval = debug_target.to_insert_fork_catchpoint (pid);
-
- fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
- pid, retval);
-
- return retval;
+ fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d)\n",
+ pid);
}
static int
return retval;
}
-static int
+static void
debug_to_insert_vfork_catchpoint (int pid)
{
- int retval;
-
- retval = debug_target.to_insert_vfork_catchpoint (pid);
+ debug_target.to_insert_vfork_catchpoint (pid);
- fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n",
- pid, retval);
-
- return retval;
+ fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)\n",
+ pid);
}
static int
return retval;
}
-static int
+static void
debug_to_insert_exec_catchpoint (int pid)
{
- int retval;
-
- retval = debug_target.to_insert_exec_catchpoint (pid);
-
- fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
- pid, retval);
+ debug_target.to_insert_exec_catchpoint (pid);
- return retval;
+ fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d)\n",
+ pid);
}
static int
fprintf_unfiltered (gdb_stdlog, "target_stop ()\n");
}
-static LONGEST
-debug_to_xfer_partial (struct target_ops *ops, enum target_object object,
- const char *annex, void *readbuf, const void *writebuf,
- ULONGEST offset, LONGEST len)
-{
- LONGEST retval;
-
- retval = debug_target.to_xfer_partial (&debug_target, object, annex,
- readbuf, writebuf, offset, len);
-
- fprintf_unfiltered (gdb_stdlog,
- "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n",
- (int) object, (annex ? annex : "(null)"),
- (long) readbuf, (long) writebuf, paddr_nz (offset),
- paddr_d (len), paddr_d (retval));
-
- return retval;
-}
-
static void
debug_to_rcmd (char *command,
struct ui_file *outbuf)
current_target.to_fetch_registers = debug_to_fetch_registers;
current_target.to_store_registers = debug_to_store_registers;
current_target.to_prepare_to_store = debug_to_prepare_to_store;
- current_target.to_xfer_memory = debug_to_xfer_memory;
+ current_target.deprecated_xfer_memory = deprecated_debug_xfer_memory;
current_target.to_files_info = debug_to_files_info;
current_target.to_insert_breakpoint = debug_to_insert_breakpoint;
current_target.to_remove_breakpoint = debug_to_remove_breakpoint;
current_target.to_thread_alive = debug_to_thread_alive;
current_target.to_find_new_threads = debug_to_find_new_threads;
current_target.to_stop = debug_to_stop;
- current_target.to_xfer_partial = debug_to_xfer_partial;
current_target.to_rcmd = debug_to_rcmd;
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
|| (current_target.to_rcmd == debug_to_rcmd
&& (debug_target.to_rcmd
== (void (*) (char *, struct ui_file *)) tcomplain)))
- {
- error ("\"monitor\" command not supported by this target.\n");
- }
+ error (_("\"monitor\" command not supported by this target."));
target_rcmd (cmd, gdb_stdtarg);
}
add_info ("target", target_info, targ_desc);
add_info ("files", target_info, targ_desc);
- deprecated_add_show_from_set
- (add_set_cmd ("target", class_maintenance, var_zinteger,
- (char *) &targetdebug,
- "Set target debugging.\n\
+ add_setshow_zinteger_cmd ("target", class_maintenance, &targetdebug, _("\
+Set target debugging."), _("\
+Show target debugging."), _("\
When non-zero, target debugging is enabled. Higher numbers are more\n\
verbose. Changes do not take effect until the next \"run\" or \"target\"\n\
-command.", &setdebuglist),
- &showdebuglist);
+command."),
+ NULL,
+ show_targetdebug,
+ &setdebuglist, &showdebuglist);
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
- &trust_readonly, "\
-Set mode for reading from readonly sections.", "\
-Show mode for reading from readonly sections.", "\
+ &trust_readonly, _("\
+Set mode for reading from readonly sections."), _("\
+Show mode for reading from readonly sections."), _("\
When this mode is on, memory reads from readonly sections (such as .text)\n\
will be read from the object file instead of from the target. This will\n\
-result in significant performance improvement for remote targets.", "\
-Mode for reading from readonly sections is %s.",
- NULL, NULL,
+result in significant performance improvement for remote targets."),
+ NULL,
+ show_trust_readonly,
&setlist, &showlist);
add_com ("monitor", class_obscure, do_monitor_command,
- "Send a command to the remote monitor (remote targets only).");
+ _("Send a command to the remote monitor (remote targets only)."));
target_dcache = dcache_init ();
}