/* Select target systems and architectures at runtime for GDB.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
static void target_info (char *, int);
-static void maybe_kill_then_create_inferior (char *, char *, char **);
-
static void maybe_kill_then_attach (char *, int);
static void kill_or_be_killed (int);
static void nosupport_runtime (void);
-static void normal_target_post_startup_inferior (ptid_t ptid);
-
static LONGEST default_xfer_partial (struct target_ops *ops,
enum target_object object,
- const char *annex, const void *writebuf,
- void *readbuf, ULONGEST offset,
- LONGEST len);
+ const char *annex, void *readbuf,
+ const void *writebuf,
+ ULONGEST offset, LONGEST len);
/* Transfer LEN bytes between target address MEMADDR and GDB address
MYADDR. Returns 0 for success, errno code for failure (which
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_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);
static int debug_to_lookup_symbol (char *, CORE_ADDR *);
-static void debug_to_create_inferior (char *, char *, char **);
-
static void debug_to_mourn_inferior (void);
static int debug_to_can_run (void);
static void debug_to_stop (void);
+/* NOTE: cagney/2004-09-29: Many targets reference this variable in
+ 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 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
array. */
}
static void
-maybe_kill_then_create_inferior (char *exec, char *args, char **env)
+maybe_kill_then_create_inferior (char *exec, char *args, char **env,
+ int from_tty)
{
kill_or_be_killed (0);
- target_create_inferior (exec, args, env);
+ target_create_inferior (exec, args, env, from_tty);
}
/* Go through the target stack from top to bottom, copying over zero
INHERIT (to_disconnect, t);
INHERIT (to_resume, t);
INHERIT (to_wait, t);
- INHERIT (to_post_wait, t);
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_wait,
(ptid_t (*) (ptid_t, struct target_waitstatus *))
noprocess);
- de_fault (to_post_wait,
- (void (*) (ptid_t, int))
- target_ignore);
de_fault (to_fetch_registers,
(void (*) (int))
target_ignore);
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);
struct target_ops **cur;
struct target_ops *tmp;
- target_close (t, 0);
-
/* Look for the specified target. Note that we assume that a target
can only occur once in the target stack. */
if ((*cur) == NULL)
return 0; /* Didn't find target_ops, quit now */
+ /* NOTE: cagney/2003-12-06: In '94 the close call was made
+ unconditional by moving it to before the above check that the
+ target was in the target stack (something about "Change the way
+ pushing and popping of targets work to support target overlays
+ and inheritance"). This doesn't make much sense - only open
+ targets should be closed. */
+ target_close (t, 0);
+
/* Unchain the target */
tmp = (*cur);
(*cur) = (*cur)->beneath;
tlen = MIN (len, 4 - (memaddr & 3));
offset = memaddr & 3;
- errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0);
+ errcode = target_read_memory (memaddr & ~3, buf, 4);
if (errcode != 0)
{
/* The transfer request might have crossed the boundary to an
a single byte. */
tlen = 1;
offset = 0;
- errcode = target_xfer_memory (memaddr, buf, 1, 0);
+ errcode = target_read_memory (memaddr, buf, 1);
if (errcode != 0)
goto done;
}
return NULL;
}
+/* Return non-zero when the target vector has supplied an xfer_partial
+ method and it, rather than xfer_memory, should be used. */
+static int
+target_xfer_partial_p (void)
+{
+ return (target_stack != NULL
+ && 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
+ returned.
+
+ The inferior is formed from several layers. In the case of
+ corefiles, inf-corefile is layered above inf-exec and a request for
+ text (corefiles do not include text pages) will be first sent to
+ the core-stratum, fail, and then sent to the object-file where it
+ will succeed.
+
+ NOTE: cagney/2004-09-30:
+
+ The old code tried to use four separate mechanisms for mapping an
+ object:offset:len tuple onto an inferior and its address space: the
+ target stack; the inferior's TO_SECTIONS; solib's SO_LIST;
+ overlays.
+
+ This is stupid.
+
+ The code below is instead using a single mechanism (currently
+ strata). If that mechanism proves insufficient then re-factor it
+ implementing another singluar mechanism (for instance, a generic
+ object:annex onto inferior:object:annex say). */
+
+static LONGEST
+xfer_using_stratum (enum target_object object, const char *annex,
+ ULONGEST offset, LONGEST len, void *readbuf,
+ const void *writebuf)
+{
+ LONGEST xfered;
+ struct target_ops *target;
+
+ /* Always successful. */
+ if (len == 0)
+ return 0;
+ /* Never successful. */
+ if (target_stack == NULL)
+ return EIO;
+
+ target = target_stack;
+ while (1)
+ {
+ xfered = target_xfer_partial (target, object, annex,
+ readbuf, writebuf, offset, len);
+ if (xfered > 0)
+ {
+ /* The partial xfer succeeded, update the counts, check that
+ the xfer hasn't finished and if it hasn't set things up
+ for the next round. */
+ 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)
+ {
+ /* Something totally screwed up, abandon the attempt to
+ xfer. */
+ if (errno)
+ return errno;
+ else
+ return EIO;
+ }
+ else
+ {
+ /* This "stratum" didn't work, try the next one down. */
+ target = target->beneath;
+ if (target == NULL)
+ return EIO;
+ }
+ }
+}
+
/* Read LEN bytes of target memory at address MEMADDR, placing the results in
GDB's memory at MYADDR. Returns either 0 for success or an errno value
if any error occurs.
int
target_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
- return target_xfer_memory (memaddr, myaddr, len, 0);
+ if (target_xfer_partial_p ())
+ return xfer_using_stratum (TARGET_OBJECT_MEMORY, NULL,
+ memaddr, len, myaddr, NULL);
+ else
+ return target_xfer_memory (memaddr, myaddr, len, 0);
}
int
target_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
- return target_xfer_memory (memaddr, myaddr, len, 1);
+ if (target_xfer_partial_p ())
+ return xfer_using_stratum (TARGET_OBJECT_MEMORY, NULL,
+ memaddr, len, NULL, myaddr);
+ else
+ return target_xfer_memory (memaddr, myaddr, 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;
/* Move memory to or from the targets. The top target gets priority;
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)
int
target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
{
- return target_xfer_memory_partial (memaddr, buf, len, 0, err);
+ if (target_xfer_partial_p ())
+ return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY, NULL,
+ buf, NULL, memaddr, len);
+ else
+ return target_xfer_memory_partial (memaddr, buf, len, 0, err);
}
int
target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
{
- return target_xfer_memory_partial (memaddr, buf, len, 1, err);
+ if (target_xfer_partial_p ())
+ return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY, NULL,
+ NULL, buf, memaddr, len);
+ else
+ return target_xfer_memory_partial (memaddr, buf, len, 1, err);
}
/* More generic transfers. */
static LONGEST
-default_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex, const void *writebuf,
- void *readbuf, ULONGEST offset, LONGEST len)
+default_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, void *readbuf,
+ 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,
- writebuf, readbuf, 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, NULL, buf, 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, buf, NULL, offset, len);
+ return target_xfer_partial (ops, object, annex, NULL, buf, offset, len);
}
/* Wrappers to perform the full transfer. */
if (symfile_objfile != NULL)
printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name);
-#ifdef FILES_INFO_HOOK
- if (FILES_INFO_HOOK ())
- return;
-#endif
-
for (t = target_stack; t != NULL; t = t->beneath)
{
if (!t->to_has_memory)
void
target_detach (char *args, int from_tty)
{
- /* Handle any optimized stores to the inferior. */
-#ifdef DO_DEFERRED_STORES
- DO_DEFERRED_STORES;
-#endif
(current_target.to_detach) (args, from_tty);
}
void
target_disconnect (char *args, int from_tty)
{
- /* Handle any optimized stores to the inferior. */
-#ifdef DO_DEFERRED_STORES
- DO_DEFERRED_STORES;
-#endif
(current_target.to_disconnect) (args, from_tty);
}
void
target_link (char *modname, CORE_ADDR *t_reloc)
{
- if (STREQ (current_target.to_shortname, "rombug"))
+ if (DEPRECATED_STREQ (current_target.to_shortname, "rombug"))
{
(current_target.to_lookup_symbol) (modname, t_reloc);
if (*t_reloc == 0)
}
void
-find_default_create_inferior (char *exec_file, char *allargs, char **env)
+find_default_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct target_ops *t;
t = find_default_run_target ("run");
- (t->to_create_inferior) (exec_file, allargs, env);
+ (t->to_create_inferior) (exec_file, allargs, env, from_tty);
return;
}
static int
default_region_size_ok_for_hw_watchpoint (int byte_count)
{
- return (byte_count <= DEPRECATED_REGISTER_SIZE);
+ return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr));
}
static int
(*t)->to_sections_end = target->to_sections_end;
}
}
+ /* There is a flattened view of the target stack in current_target,
+ so its to_sections pointer might also need updating. */
+ if (current_target.to_sections == old_value)
+ {
+ current_target.to_sections = target->to_sections;
+ current_target.to_sections_end = target->to_sections_end;
+ }
}
return old_count;
breakpoint_init_inferior (inf_exited);
registers_changed ();
-#ifdef CLEAR_DEFERRED_STORES
- /* Delete any pending stores to the inferior... */
- CLEAR_DEFERRED_STORES;
-#endif
-
reopen_exec_file ();
reinit_frame_cache ();
if (!show_breakpoint_hit_counts)
breakpoint_clear_ignore_counts ();
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
\f
/* Helper function for child_wait and the Lynx derivatives of child_wait.
return buf;
}
-/* Some targets (such as ttrace-based HPUX) don't allow us to request
- notification of inferior events such as fork and vork immediately
- after the inferior is created. (This because of how gdb gets an
- inferior created via invoking a shell to do it. In such a scenario,
- if the shell init file has commands in it, the shell will fork and
- exec for each of those commands, and we will see each such fork
- event. Very bad.)
-
- This function is used by all targets that allow us to request
- notification of forks, etc at inferior creation time; e.g., in
- target_acknowledge_forked_child.
- */
-static void
-normal_target_post_startup_inferior (ptid_t ptid)
-{
- /* This space intentionally left blank. */
-}
-
/* Error-catcher for target_find_memory_regions */
static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2)
{
dummy_target.to_magic = OPS_MAGIC;
}
\f
-
-static struct target_ops debug_target;
-
static void
debug_to_open (char *args, int from_tty)
{
return retval;
}
-static void
-debug_to_post_wait (ptid_t ptid, int status)
-{
- debug_target.to_post_wait (ptid, status);
-
- fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
- PIDGET (ptid), status);
-}
-
static void
debug_print_register (const char * func, int regno)
{
unsigned char buf[MAX_REGISTER_SIZE];
deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
- for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++)
+ for (i = 0; i < register_size (current_gdbarch, regno); i++)
{
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
}
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST))
+ if (register_size (current_gdbarch, regno) <= sizeof (LONGEST))
{
fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
paddr_nz (read_register (regno)),
}
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",
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
-
-
if (retval > 0)
{
int i;
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
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;
}
}
static void
-debug_to_create_inferior (char *exec_file, char *args, char **env)
+debug_to_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
- debug_target.to_create_inferior (exec_file, args, env);
+ debug_target.to_create_inferior (exec_file, args, env, from_tty);
- fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n",
- exec_file, args);
+ fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx, %d)\n",
+ exec_file, args, from_tty);
}
static void
fprintf_unfiltered (gdb_stdlog, "target_stop ()\n");
}
-static LONGEST
-debug_to_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex, const void *writebuf,
- void *readbuf, ULONGEST offset, LONGEST len)
-{
- LONGEST retval;
-
- retval = debug_target.to_xfer_partial (&debug_target, object, annex,
- writebuf, readbuf, 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) writebuf, (long) readbuf, 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_disconnect = debug_to_disconnect;
current_target.to_resume = debug_to_resume;
current_target.to_wait = debug_to_wait;
- current_target.to_post_wait = debug_to_post_wait;
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;
add_info ("target", target_info, targ_desc);
add_info ("files", target_info, targ_desc);
- add_show_from_set
+ deprecated_add_show_from_set
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
-When non-zero, target debugging is enabled.", &setdebuglist),
+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);
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
&trust_readonly, "\
-Set mode for reading from readonly sections.\n\
+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.", "\
-Show mode for reading from readonly sections.\n",
+Mode for reading from readonly sections is %s.",
NULL, NULL,
&setlist, &showlist);