42 #include "gdb/fileio.h"
54 CORE_ADDR, CORE_ADDR,
int);
74 CORE_ADDR *found_addrp);
81 (struct target_ops *self, ptid_t ptid);
83 static
void tcomplain (
void) ATTRIBUTE_NORETURN;
101 bfd *ignore1,
int *ignore2);
106 (struct target_ops *self);
108 static struct target_ops debug_target;
110 #include "target-delegates.c"
117 typedef struct target_ops *target_ops_p;
119 static VEC (target_ops_p) *target_structs;
124 static struct target_ops dummy_target;
128 static struct target_ops *target_stack;
142 static int trust_readonly = 0;
147 static int show_memory_breakpoints = 0;
153 int may_write_registers = 1;
155 int may_write_memory = 1;
157 int may_insert_breakpoints = 1;
159 int may_insert_tracepoints = 1;
161 int may_insert_fast_tracepoints = 1;
167 static unsigned int targetdebug = 0;
189 fputs_filtered (
"Argument required (target name). Try `help target'\n",
250 struct target_ops *t;
262 struct target_ops *t;
274 struct target_ops *t;
286 struct target_ops *t;
298 struct target_ops *t;
369 completer_ftype *completer)
377 if (targetlist == NULL)
379 Connect to a target machine or process.\n\
380 The first argument is the type or protocol of the target machine.\n\
381 Remaining arguments are interpreted by the target protocol. For more\n\
382 information on the arguments for a particular protocol, type\n\
383 `help target ' followed by the protocol name."),
384 &targetlist,
"target ", 0, &
cmdlist);
388 if (completer != NULL)
516 struct target_ops *t;
534 enum terminal_state *previous_state = arg;
536 switch (*previous_state)
555 enum terminal_state *ts =
xmalloc (
sizeof (*ts));
565 error (
_(
"You can't do that when your target is `%s'"),
572 error (
_(
"You can't do that without a process to debug."));
602 to_execution_direction must be implemented for reverse async");
620 struct target_ops *t;
630 #define INHERIT(FIELD, TARGET) \
631 if (!current_target.FIELD) \
632 current_target.FIELD = (TARGET)->FIELD
636 for (t = target_stack; t; t = t->
beneath)
666 struct target_ops **cur;
673 "Magic number of %s target struct wrong\n",
676 _(
"failed internal consistency check"));
680 for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->
beneath)
682 if ((
int) (t->
to_stratum) >= (
int) (*cur)->to_stratum)
689 while ((*cur) != NULL && t->
to_stratum == (*cur)->to_stratum)
693 struct target_ops *tmp = (*cur);
695 (*cur) = (*cur)->beneath;
713 struct target_ops **cur;
714 struct target_ops *tmp;
718 _(
"Attempt to unpush the dummy target"));
723 for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->
beneath)
757 "pop_all_targets couldn't find target %s\n",
760 _(
"failed internal consistency check"));
777 struct target_ops *cur;
784 "Magic number of %s target struct wrong\n",
787 _(
"failed internal consistency check"));
790 for (cur = target_stack; cur != NULL; cur = cur->
beneath)
803 _(
"Cannot find thread-local variables on this target"));
811 volatile CORE_ADDR addr = 0;
838 error (
_(
"Cannot find thread-local variables "
839 "in this thread library."));
842 if (objfile_is_library)
843 error (
_(
"Cannot find shared library `%s' in dynamic"
846 error (
_(
"Cannot find executable file `%s' in dynamic"
850 if (objfile_is_library)
851 error (
_(
"The inferior has not yet allocated storage for"
852 " thread-local variables in\n"
853 "the shared library `%s'\n"
857 error (
_(
"The inferior has not yet allocated storage for"
858 " thread-local variables in\n"
859 "the executable `%s'\n"
864 if (objfile_is_library)
865 error (
_(
"Cannot find thread-local storage for %s, "
866 "shared library %s:\n%s"),
870 error (
_(
"Cannot find thread-local storage for %s, "
871 "executable file %s:\n%s"),
885 error (
_(
"Cannot find thread-local variables on this target"));
893 #define CASE(X) case X: return #X
906 #define MIN(A, B) (((A) <= (B)) ? (A) : (B))
921 int buffer_allocated;
923 unsigned int nbytes_read = 0;
928 buffer_allocated = 4;
929 buffer =
xmalloc (buffer_allocated);
934 tlen =
MIN (len, 4 - (memaddr & 3));
935 offset = memaddr & 3;
950 if (bufptr - buffer + tlen > buffer_allocated)
954 bytes = bufptr - buffer;
955 buffer_allocated *= 2;
956 buffer =
xrealloc (buffer, buffer_allocated);
957 bufptr = buffer + bytes;
960 for (i = 0; i < tlen; i++)
962 *bufptr++ = buf[i +
offset];
963 if (buf[i + offset] ==
'\000')
965 nbytes_read += i + 1;
998 for (secp = table->
sections; secp < table->sections_end; secp++)
1025 if (region_p != NULL)
1031 if (writebuf != NULL)
1036 if (readbuf != NULL)
1042 if (writebuf != NULL)
1043 error (
_(
"Writing to flash memory forbidden in this context"));
1051 if (memaddr + len < region->
hi || region->
hi == 0)
1054 *reg_len = region->
hi - memaddr;
1073 readbuf, writebuf, memaddr, len,
1089 while (ops != NULL);
1096 if (writebuf != NULL
1105 dcache_update (dcache, res, memaddr, writebuf, *xfered_len);
1138 memaddr, len, xfered_len,
1146 if (readbuf != NULL && trust_readonly)
1159 memaddr, len, xfered_len,
1190 reg_len, xfered_len);
1228 if (readbuf != NULL)
1246 len =
min (4096, len);
1250 memcpy (buf, writebuf, len);
1265 show_memory_breakpoints = (uintptr_t) arg;
1271 int current = show_memory_breakpoints;
1273 show_memory_breakpoints = show;
1275 (
void *) (uintptr_t) current);
1295 if (writebuf && !may_write_memory)
1296 error (
_(
"Writing to memory is not allowed (addr %s, len %s)"),
1307 writebuf, offset, len, xfered_len);
1326 writebuf, offset, len, xfered_len);
1330 const unsigned char *myaddr = NULL;
1333 "%s:target_xfer_partial "
1334 "(%d, %s, %s, %s, %s, %s) = %d, %s",
1337 (annex ? annex :
"(null)"),
1353 for (i = 0; i < *xfered_len; i++)
1355 if ((((intptr_t) &(myaddr[i])) & 0xf) == 0)
1357 if (targetdebug < 2 && i > 0)
1399 myaddr, memaddr, len) == len)
1431 myaddr, memaddr, len) == len)
1446 myaddr, memaddr, len) == len)
1461 myaddr, memaddr, len) == len)
1479 myaddr, memaddr, len) == len)
1497 myaddr, memaddr, len) == len)
1506 target_memory_map (
void)
1511 struct target_ops *t;
1529 if (last_one && last_one->
hi > this_one->
lo)
1531 warning (
_(
"Overlapping regions in memory map: ignoring"));
1535 last_one = this_one;
1558 _(
"Mode for reading from readonly sections is %s.\n"),
1578 const char *annex,
const gdb_byte *buf,
1606 while (xfered_total < len)
1612 buf + xfered_total * unit_size,
1613 offset + xfered_total, len - xfered_total,
1618 return xfered_total;
1621 xfered_total += xfered_partial;
1666 if (end - begin <= 1)
1682 buf + (end - begin) - 1, end - 1, 1,
1699 while (current_end - current_begin > 1)
1701 ULONGEST first_half_begin, first_half_end;
1702 ULONGEST second_half_begin, second_half_end;
1704 ULONGEST middle = current_begin + (current_end - current_begin) / 2;
1708 first_half_begin = current_begin;
1709 first_half_end = middle;
1710 second_half_begin = middle;
1711 second_half_end = current_end;
1715 first_half_begin = middle;
1716 first_half_end = current_end;
1717 second_half_begin = current_begin;
1718 second_half_end = middle;
1722 buf + (first_half_begin - begin) * unit_size,
1724 first_half_end - first_half_begin);
1726 if (xfer == first_half_end - first_half_begin)
1730 current_begin = second_half_begin;
1731 current_end = second_half_end;
1741 current_begin = first_half_begin;
1742 current_end = first_half_end;
1750 r.
end = current_begin;
1756 LONGEST region_len = end - current_end;
1759 memcpy (r.
data, buf + (current_end - begin) * unit_size,
1760 region_len * unit_size);
1761 r.
begin = current_end;
1783 read_memory_robust (
struct target_ops *ops,
1790 while (xfered_total < len)
1798 if (region->
hi == 0)
1799 region_len = len - xfered_total;
1808 xfered_total += region_len;
1812 LONGEST to_read =
min (len - xfered_total, region_len);
1818 offset + xfered_total, to_read);
1820 if (xfered_partial <= 0)
1826 offset + xfered_total + to_read, &result);
1827 xfered_total += to_read;
1833 r.
begin = offset + xfered_total;
1836 xfered_total += xfered_partial;
1850 const char *annex,
const gdb_byte *buf,
1852 void (*progress) (
ULONGEST,
void *),
void *baton)
1867 (*progress) (0, baton);
1869 while (xfered_total < len)
1875 buf + xfered_total * unit_size,
1876 offset + xfered_total, len - xfered_total,
1883 (*progress) (xfered_partial, baton);
1885 xfered_total += xfered_partial;
1896 const char *annex,
const gdb_byte *buf,
1911 const char *annex,
gdb_byte **buf_p,
int padding)
1913 size_t buf_alloc, buf_pos;
1934 buf_pos, buf_alloc - buf_pos - padding,
1953 buf_pos += xfered_len;
1956 if (buf_alloc < buf_pos * 2)
1972 const char *annex,
gdb_byte **buf_p)
1992 bufstr = (
char *) buffer;
1994 if (transferred < 0)
1997 if (transferred == 0)
1998 return xstrdup (
"");
2000 bufstr[transferred] = 0;
2003 for (i = strlen (bufstr); i < transferred; i++)
2006 warning (
_(
"target object %d, annex %s, "
2007 "contained unexpected null characters"),
2008 (
int)
object, annex ? annex :
"(none)");
2032 int len,
enum bfd_endian byte_order)
2047 if (!may_insert_breakpoints)
2049 warning (
_(
"May not insert breakpoints"));
2067 if (!may_insert_breakpoints)
2069 warning (
_(
"May not remove breakpoints"));
2080 struct target_ops *t;
2081 int has_all_mem = 0;
2087 for (t = target_stack; t != NULL; t = t->
beneath)
2096 "GDB does not access memory from...\n"));
2179 ||
query (
_(
"A program is being debugged already. Kill it? ")))
2182 error (
_(
"Program not killed."));
2199 struct target_ops* t;
2247 struct target_ops *t;
2270 numsigs, program_signals);
2279 _(
"could not find a target to follow fork"));
2289 follow_child, detach_fork);
2296 _(
"could not find a target to follow mourn inferior"));
2307 bfd_cache_close_all ();
2325 CORE_ADDR start_addr,
ULONGEST search_space_len,
2327 CORE_ADDR *found_addrp)
2330 #define SEARCH_CHUNK_SIZE 16000
2334 unsigned search_buf_size;
2337 search_buf_size = chunk_size + pattern_len - 1;
2340 if (search_space_len < search_buf_size)
2341 search_buf_size = search_space_len;
2343 search_buf = malloc (search_buf_size);
2344 if (search_buf == NULL)
2345 error (
_(
"Unable to allocate memory to perform the search."));
2351 search_buf, start_addr, search_buf_size) != search_buf_size)
2353 warning (
_(
"Unable to access %s bytes of target "
2354 "memory at %s, halting search."),
2366 while (search_space_len >= pattern_len)
2369 unsigned nr_search_bytes =
min (search_space_len, search_buf_size);
2371 found_ptr = memmem (search_buf, nr_search_bytes,
2372 pattern, pattern_len);
2374 if (found_ptr != NULL)
2376 CORE_ADDR found_addr = start_addr + (found_ptr - search_buf);
2378 *found_addrp = found_addr;
2386 if (search_space_len >= chunk_size)
2387 search_space_len -= chunk_size;
2389 search_space_len = 0;
2391 if (search_space_len >= pattern_len)
2393 unsigned keep_len = search_buf_size - chunk_size;
2394 CORE_ADDR read_addr = start_addr + chunk_size + keep_len;
2400 memcpy (search_buf, search_buf + chunk_size, keep_len);
2402 nr_to_read =
min (search_space_len - keep_len, chunk_size);
2405 search_buf + keep_len, read_addr,
2406 nr_to_read) != nr_to_read)
2408 warning (
_(
"Unable to access %s bytes of target "
2409 "memory at %s, halting search."),
2416 start_addr += chunk_size;
2430 CORE_ADDR start_addr,
ULONGEST search_space_len,
2432 CORE_ADDR *found_addrp)
2436 start_addr, search_space_len,
2437 pattern, pattern_len, found_addrp);
2450 CORE_ADDR *found_addrp)
2454 pattern, pattern_len, found_addrp);
2464 struct target_ops *t;
2466 for (t = target_stack; t != NULL; t = t->
beneath)
2483 error (
_(
"The \"%s\" target does not support \"run\". "
2484 "Try \"help target\" or \"continue\"."),
2496 static int auto_connect_native_target = 1;
2503 _(
"Whether GDB may automatically connect to the "
2504 "native target is %s.\n"),
2515 static struct target_ops *
2518 struct target_ops *runable = NULL;
2520 if (auto_connect_native_target)
2522 struct target_ops *t;
2526 for (i = 0;
VEC_iterate (target_ops_p, target_structs, i, t); ++i)
2539 if (runable == NULL)
2542 error (
_(
"Don't know how to %s. Try \"help target\"."), do_mesg);
2555 struct target_ops *t;
2576 struct target_ops *t;
2597 struct target_ops *t;
2607 for (; t != NULL; t = t->
beneath)
2615 "target_info_proc (\"%s\", %d)\n", args, what);
2627 struct target_ops *t;
2638 struct target_ops *t;
2650 struct target_ops *t;
2674 if (inf == NULL || inf->
aspace == NULL)
2676 _(
"Can't determine the current "
2677 "address space of thread %s\n"),
2699 static struct target_ops *
2715 struct target_ops *
t;
2731 #define is_closed_fileio_fh(fd) ((fd) < 0)
2736 static int lowest_closed_fd;
2741 acquire_fileio_fd (
struct target_ops *t,
int fd)
2750 lowest_closed_fd, fh);
2765 return lowest_closed_fd++;
2774 lowest_closed_fd =
min (lowest_closed_fd, fd);
2779 #define fileio_fd_to_fh(fd) \
2780 VEC_index (fileio_fh_t, fileio_fhandles, (fd))
2787 int flags,
int mode,
int warn_if_slow,
2790 struct target_ops *t;
2797 warn_if_slow, target_errno);
2802 fd = acquire_fileio_fd (t, fd);
2806 "target_fileio_open (%d,%s,0x%x,0%o,%d)"
2808 inf == NULL ? 0 : inf->
num,
2809 filename, flags, mode,
2811 fd != -1 ? 0 : *target_errno);
2816 *target_errno = FILEIO_ENOSYS;
2824 int flags,
int mode,
int *target_errno)
2834 const char *filename,
2835 int flags,
int mode,
int *target_errno)
2845 ULONGEST offset,
int *target_errno)
2851 *target_errno = EBADF;
2854 len, offset, target_errno);
2858 "target_fileio_pwrite (%d,...,%d,%s) "
2861 ret, ret != -1 ? 0 : *target_errno);
2869 ULONGEST offset,
int *target_errno)
2875 *target_errno = EBADF;
2878 len, offset, target_errno);
2882 "target_fileio_pread (%d,...,%d,%s) "
2885 ret, ret != -1 ? 0 : *target_errno);
2898 *target_errno = EBADF;
2904 "target_fileio_fstat (%d) = %d (%d)\n",
2905 fd, ret, ret != -1 ? 0 : *target_errno);
2918 *target_errno = EBADF;
2927 "target_fileio_close (%d) = %d (%d)\n",
2928 fd, ret, ret != -1 ? 0 : *target_errno);
2938 struct target_ops *t;
2949 "target_fileio_unlink (%d,%s)"
2951 inf == NULL ? 0 : inf->
num, filename,
2952 ret, ret != -1 ? 0 : *target_errno);
2957 *target_errno = FILEIO_ENOSYS;
2967 struct target_ops *t;
2978 "target_fileio_readlink (%d,%s)"
2980 inf == NULL ? 0 : inf->
num,
2981 filename, ret? ret :
"(nil)",
2982 ret? 0 : *target_errno);
2987 *target_errno = FILEIO_ENOSYS;
2994 int fd = *(
int *) opaque;
3012 struct cleanup *close_cleanup;
3013 size_t buf_alloc, buf_pos;
3034 buf_alloc - buf_pos - padding, buf_pos,
3057 if (buf_alloc < buf_pos * 2)
3086 bufstr = (
char *) buffer;
3088 if (transferred < 0)
3091 if (transferred == 0)
3092 return xstrdup (
"");
3094 bufstr[transferred] = 0;
3097 for (i = strlen (bufstr); i < transferred; i++)
3101 "contained unexpected null characters"),
3112 CORE_ADDR addr,
int len)
3120 CORE_ADDR start,
int length)
3122 return addr >= start && addr < start + length;
3158 struct target_ops *t;
3209 static char buf[32];
3226 error (
_(
"Command not implemented for this target."));
3233 bfd *ignore1,
int *ignore2)
3235 error (
_(
"Command not implemented for this target."));
3245 dummy_target.to_shortname =
"None";
3246 dummy_target.to_longname =
"None";
3247 dummy_target.to_doc =
"";
3248 dummy_target.to_supports_disable_randomization
3293 warning (
_(
"May not interrupt or stop the target, ignoring attempt"));
3319 memset (&status, 0,
sizeof (status));
3340 return xstrdup (elem);
3342 return reconcat (list, list,
", ", elem, (
char *) NULL);
3352 int opt,
char *opt_str)
3354 if ((*target_options & opt) != 0)
3357 *target_options &= ~opt;
3368 #define DO_TARG_OPTION(OPT) \
3369 ret = do_option (&target_options, ret, OPT, #OPT)
3373 if (target_options != 0)
3403 for (i = 0; i <
size; i++)
3429 struct target_ops *t;
3431 if (!may_write_registers)
3432 error (
_(
"Writing to registers is not allowed (regno %d)"), regno);
3453 while (total_xfered < size)
3458 ULONGEST howmuch =
min (
sizeof (buf), size - total_xfered);
3461 buf, NULL, lma + total_xfered, howmuch,
3464 && memcmp (data + total_xfered, buf, xfered_len) == 0)
3466 total_xfered += xfered_len;
3483 data, memaddr, size);
3490 data, memaddr, size);
3603 struct target_ops *t;
3742 static char targ_desc[] =
3743 "Names of targets and files being debugged.\nShows the entire \
3744 stack of targets currently in use (including the exec-file,\n\
3745 core-file, and process, if any), as well as the symbol file name.";
3749 struct ui_file *output)
3751 error (
_(
"\"monitor\" command not supported by this target."));
3766 struct target_ops *t;
3770 for (t = target_stack; t != NULL; t = t->
beneath)
3778 int target_async_permitted = 1;
3782 static int target_async_permitted_1 = 1;
3791 error (
_(
"Cannot change this setting while the inferior is running."));
3803 _(
"Controlling the inferior in "
3804 "asynchronous mode is %s.\n"), value);
3809 static int may_write_registers_1 = 1;
3810 static int may_write_memory_1 = 1;
3811 static int may_insert_breakpoints_1 = 1;
3812 static int may_insert_tracepoints_1 = 1;
3813 static int may_insert_fast_tracepoints_1 = 1;
3814 static int may_stop_1 = 1;
3839 error (
_(
"Cannot change this setting while the inferior is running."));
3873 Set target debugging."),
_(
"\
3874 Show target debugging."),
_(
"\
3875 When non-zero, target debugging is enabled. Higher numbers are more\n\
3882 &trust_readonly,
_(
"\
3883 Set mode for reading from readonly sections."),
_(
"\
3884 Show mode for reading from readonly sections."),
_(
"\
3885 When this mode is on, memory reads from readonly sections (such as .text)\n\
3886 will be read from the object file instead of from the target. This will\n\
3887 result in significant performance improvement for remote targets."),
3893 _(
"Send a command to the remote monitor (remote targets only)."));
3896 _(
"Print the name of each layer of the internal target stack."),
3900 &target_async_permitted_1,
_(
"\
3901 Set whether gdb controls the inferior in asynchronous mode."),
_(
"\
3902 Show whether gdb controls the inferior in asynchronous mode."),
_(
"\
3903 Tells gdb whether to control the inferior in asynchronous mode."),
3910 &may_write_registers_1,
_(
"\
3911 Set permission to write into registers."),
_(
"\
3912 Show permission to write into registers."),
_(
"\
3913 When this permission is on, GDB may write into the target's registers.\n\
3914 Otherwise, any sort of write attempt will result in an error."),
3919 &may_write_memory_1,
_(
"\
3920 Set permission to write into target memory."),
_(
"\
3921 Show permission to write into target memory."),
_(
"\
3922 When this permission is on, GDB may write into the target's memory.\n\
3923 Otherwise, any sort of write attempt will result in an error."),
3928 &may_insert_breakpoints_1,
_(
"\
3929 Set permission to insert breakpoints in the target."),
_(
"\
3930 Show permission to insert breakpoints in the target."),
_(
"\
3931 When this permission is on, GDB may insert breakpoints in the program.\n\
3932 Otherwise, any sort of insertion attempt will result in an error."),
3937 &may_insert_tracepoints_1,
_(
"\
3938 Set permission to insert tracepoints in the target."),
_(
"\
3939 Show permission to insert tracepoints in the target."),
_(
"\
3940 When this permission is on, GDB may insert tracepoints in the program.\n\
3941 Otherwise, any sort of insertion attempt will result in an error."),
3946 &may_insert_fast_tracepoints_1,
_(
"\
3947 Set permission to insert fast tracepoints in the target."),
_(
"\
3948 Show permission to insert fast tracepoints in the target."),
_(
"\
3949 When this permission is on, GDB may insert fast tracepoints.\n\
3950 Otherwise, any sort of insertion attempt will result in an error."),
3956 Set permission to interrupt or signal the target."),
_(
"\
3957 Show permission to interrupt or signal the target."),
_(
"\
3958 When this permission is on, GDB may interrupt/stop the target's execution.\n\
3959 Otherwise, any attempt to interrupt or stop will be ignored."),
3964 &auto_connect_native_target,
_(
"\
3965 Set whether GDB may automatically connect to the native target."),
_(
"\
3966 Show whether GDB may automatically connect to the native target."),
_(
"\
3967 When on, and GDB is not connected to a target yet, GDB\n\
3968 attempts \"run\" and other commands with the native target."),
int target_supports_disable_randomization(void)
int(* to_fileio_pread)(struct target_ops *, int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *target_errno)
struct gdbarch * target_gdbarch(void)
#define target_can_async_p()
struct address_space *(* to_thread_address_space)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_thread_address_space)
enum target_xfer_status dcache_read_memory_partial(struct target_ops *ops, DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len, ULONGEST *xfered_len)
void(* deprecated_detach_hook)(void)
void target_goto_record_begin(void)
void set_cmd_context(struct cmd_list_element *cmd, void *context)
void add_target(struct target_ops *t)
int have_live_inferiors(void)
int default_child_has_stack(struct target_ops *ops)
void target_terminal_ours(void)
int target_thread_alive(ptid_t ptid)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
char * hex_string(LONGEST num)
void get_target_memory(struct target_ops *ops, CORE_ADDR addr, gdb_byte *buf, LONGEST len)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
void target_disable_btrace(struct btrace_target_info *btinfo)
struct cleanup * make_show_memory_breakpoints_cleanup(int show)
void reopen_exec_file(void)
int target_supports_terminal_ours(void)
#define target_can_execute_reverse
void(* to_delete_record)(struct target_ops *) TARGET_DEFAULT_NORETURN(tcomplain())
int(* to_supports_disable_randomization)(struct target_ops *)
const struct target_desc *(* to_read_description)(struct target_ops *ops) TARGET_DEFAULT_RETURN(NULL)
void(* to_program_signals)(struct target_ops *, int, unsigned char *TARGET_DEBUG_PRINTER(target_debug_print_signals)) TARGET_DEFAULT_IGNORE()
void target_stop(ptid_t ptid)
static void install_dummy_methods(struct target_ops *ops)
void * get_cmd_context(struct cmd_list_element *cmd)
void(* to_goto_record_begin)(struct target_ops *) TARGET_DEFAULT_NORETURN(tcomplain())
void target_teardown_btrace(struct btrace_target_info *btinfo)
static enum target_xfer_status memory_xfer_partial(struct target_ops *ops, enum target_object object, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
void add_setshow_zuinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void(* to_save_record)(struct target_ops *, const char *filename) TARGET_DEFAULT_NORETURN(tcomplain())
void clear_inline_frame_state(ptid_t ptid)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
const struct frame_unwind * target_get_tailcall_unwinder(void)
static int return_zero_has_execution(struct target_ops *ignore, ptid_t ignore2)
int(* to_fileio_close)(struct target_ops *, int fd, int *target_errno)
int target_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void fputs_unfiltered(const char *buf, struct ui_file *file)
void target_require_runnable(void)
int target_verify_memory(const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
int may_insert_fast_tracepoints
struct btrace_target_info * target_enable_btrace(ptid_t ptid, const struct btrace_config *conf)
struct target_section * sections_end
char * target_fileio_readlink(struct inferior *inf, const char *filename, int *target_errno)
int gdbarch_has_global_solist(struct gdbarch *gdbarch)
const struct frame_unwind * target_get_unwinder(void)
void no_shared_libraries(char *ignored, int from_tty)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
void(* to_xclose)(struct target_ops *targ)
struct bfd_section * the_bfd_section
int(* to_has_memory)(struct target_ops *)
void warning(const char *fmt,...)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
int target_supports_btrace(enum btrace_format format)
char *(* to_pid_to_str)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_pid_to_str)
void(* to_flash_done)(struct target_ops *) TARGET_DEFAULT_NORETURN(tcomplain())
struct type ** const(pascal_builtin_types[])
static void set_target_permissions(char *args, int from_tty, struct cmd_list_element *c)
int query(const char *ctlstr,...)
void(* to_stop_recording)(struct target_ops *) TARGET_DEFAULT_IGNORE()
static int target_fileio_open_1(struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
LONGEST target_write(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
int(* to_has_stack)(struct target_ops *)
static ptid_t default_get_ada_task_ptid(struct target_ops *self, long lwp, long tid)
void(* to_terminal_init)(struct target_ops *) TARGET_DEFAULT_IGNORE()
void push_target(struct target_ops *t)
int(* to_insert_breakpoint)(struct target_ops *, struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_FUNC(memory_insert_breakpoint)
char * plongest(LONGEST l)
LONGEST target_read_alloc(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte **buf_p)
void generic_mourn_inferior(void)
void target_detach(const char *args, int from_tty)
struct ui_file * gdb_stdout
void(* to_insn_history_from)(struct target_ops *, ULONGEST from, int size, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
int(* to_core_of_thread)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(-1)
int unpush_target(struct target_ops *t)
int(* to_follow_fork)(struct target_ops *, int, int) TARGET_DEFAULT_FUNC(default_follow_fork)
int target_supports_delete_record(void)
void internal_error(const char *file, int line, const char *fmt,...)
void(* to_terminal_ours_for_output)(struct target_ops *) TARGET_DEFAULT_IGNORE()
void(* to_call_history)(struct target_ops *, int size, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
void target_pass_signals(int numsigs, unsigned char *pass_signals)
#define target_can_run(t)
static enum target_xfer_status target_read_partial(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
struct address_space * target_thread_address_space(ptid_t ptid)
void(* to_close)(struct target_ops *)
void switch_to_thread(ptid_t ptid)
void initialize_targets(void)
char * target_thread_name(struct thread_info *info)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static int memory_xfer_check_region(gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *reg_len, struct mem_region **region_p)
DCACHE * target_dcache_get_or_init(void)
const struct frame_unwind *(* to_get_tailcall_unwinder)(struct target_ops *self) TARGET_DEFAULT_RETURN(NULL)
#define VEC_safe_push(T, V, O)
void set_cmd_sfunc(struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
struct inferior * find_inferior_ptid(ptid_t ptid)
struct cmd_list_element * cmdlist
void(* to_check_pending_interrupt)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int(* to_remove_breakpoint)(struct target_ops *, struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_FUNC(memory_remove_breakpoint)
struct inferior * iterate_over_inferiors(int(*callback)(struct inferior *, void *), void *data)
void target_prepare_to_generate_core(void)
int gdbarch_num_regs(struct gdbarch *gdbarch)
ptid_t(* to_wait)(struct target_ops *, ptid_t, struct target_waitstatus *, int TARGET_DEBUG_PRINTER(target_debug_print_options)) TARGET_DEFAULT_NORETURN(noprocess())
void target_fetch_registers(struct regcache *regcache, int regno)
char * target_pid_to_str(ptid_t ptid)
void target_insn_history_from(ULONGEST from, int size, int flags)
void target_call_history_from(ULONGEST begin, int size, int flags)
static CORE_ADDR lm_addr(struct so_list *so)
static struct target_ops * find_default_run_target(char *do_mesg)
int target_fileio_pwrite(int fd, const gdb_byte *write_buf, int len, ULONGEST offset, int *target_errno)
static struct target_ops * default_fileio_target(void)
#define fileio_fd_to_fh(fd)
int default_child_has_execution(struct target_ops *ops, ptid_t the_ptid)
static int default_follow_fork(struct target_ops *self, int follow_child, int detach_fork)
static char * default_pid_to_str(struct target_ops *ops, ptid_t ptid)
enum target_xfer_status section_table_xfer_memory_partial(gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len, struct target_section *sections, struct target_section *sections_end, const char *section_name)
const char * target_xfer_status_to_string(enum target_xfer_status status)
int target_has_execution_1(ptid_t the_ptid)
void target_program_signals(int numsigs, unsigned char *program_signals)
struct cmd_list_element * maintenance_set_cmdlist
int target_fileio_close(int fd, int *target_errno)
int may_insert_tracepoints
void printf_filtered(const char *format,...)
enum target_xfer_status target_xfer_partial(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
void(* to_insn_history_range)(struct target_ops *, ULONGEST begin, ULONGEST end, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
struct obj_section * find_pc_overlay(CORE_ADDR pc)
static void release_fileio_fd(int fd, fileio_fh_t *fh)
ptid_t ptid_build(int pid, long lwp, long tid)
void(* to_files_info)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int target_read_code(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int gdbarch_addressable_memory_unit_size(struct gdbarch *gdbarch)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
int target_record_is_replaying(void)
int default_child_has_memory(struct target_ops *ops)
void memory_error(enum target_xfer_status err, CORE_ADDR memaddr)
struct cmd_list_element * setlist
static int may_write_registers_1
#define VEC_iterate(T, V, I, P)
int target_has_all_memory_1(void)
static void default_terminal_info(struct target_ops *self, const char *args, int from_tty)
static char * do_option(int *target_options, char *ret, int opt, char *opt_str)
static int delegate_can_run(struct target_ops *self)
void target_flash_erase(ULONGEST address, LONGEST length)
void target_dcache_invalidate(void)
#define CATCH(EXCEPTION, MASK)
void(* to_prepare_to_generate_core)(struct target_ops *) TARGET_DEFAULT_IGNORE()
char * target_options_to_string(int target_options)
static void open_target(char *args, int from_tty, struct cmd_list_element *command)
#define DO_TARG_OPTION(OPT)
struct address_space * aspace
const struct target_desc * target_read_description(struct target_ops *target)
ULONGEST get_target_memory_unsigned(struct target_ops *ops, CORE_ADDR addr, int len, enum bfd_endian byte_order)
struct cleanup * make_cleanup_dtor(make_cleanup_ftype *function, void *arg, make_cleanup_dtor_ftype *dtor)
void(* to_call_history_range)(struct target_ops *, ULONGEST begin, ULONGEST end, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
char *(* to_thread_name)(struct target_ops *, struct thread_info *) TARGET_DEFAULT_RETURN(NULL)
void target_load(const char *arg, int from_tty)
static void set_write_memory_permission(char *args, int from_tty, struct cmd_list_element *c)
int fputc_unfiltered(int c, struct ui_file *stream)
struct target_ops current_target
static int default_region_ok_for_hw_watchpoint(struct target_ops *self, CORE_ADDR addr, int len)
static int find_default_supports_disable_randomization(struct target_ops *self)
void target_clear_description(void)
void complete_target_initialization(struct target_ops *t)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void target_check_pending_interrupt(void)
static enum target_xfer_status memory_xfer_partial_1(struct target_ops *ops, enum target_object object, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
void update_target_permissions(void)
char * target_get_osdata(const char *type)
int target_dcache_init_p(void)
struct mem_region * lookup_mem_region(CORE_ADDR addr)
static void generic_tls_error(void)
int simple_verify_memory(struct target_ops *ops, const gdb_byte *data, CORE_ADDR lma, ULONGEST size)
void target_terminal_inferior(void)
void target_resume(ptid_t ptid, int step, enum gdb_signal signal)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
static int may_insert_fast_tracepoints_1
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
void(* to_resume)(struct target_ops *, ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
static void read_whatever_is_readable(struct target_ops *ops, const ULONGEST begin, const ULONGEST end, int unit_size, VEC(memory_read_result_s)**result)
struct cmd_list_element * showlist
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
struct target_section_table *(* to_get_section_table)(struct target_ops *) TARGET_DEFAULT_RETURN(NULL)
static struct gdbarch * default_thread_architecture(struct target_ops *ops, ptid_t ptid)
#define gdb_assert_not_reached(message)
int target_has_stack_1(void)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
void free_current_contents(void *ptr)
int(* to_can_run)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
void update_observer_mode(void)
static int default_watchpoint_addr_within_range(struct target_ops *target, CORE_ADDR addr, CORE_ADDR start, int length)
CORE_ADDR(* to_get_thread_local_address)(struct target_ops *ops, ptid_t ptid, CORE_ADDR load_module_addr, CORE_ADDR offset) TARGET_DEFAULT_NORETURN(generic_tls_error())
int default_child_has_all_memory(struct target_ops *ops)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static void setup_target_debug(void)
int get_traceframe_number(void)
int target_write_raw_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
struct target_section * sections
struct btrace_target_info *(* to_enable_btrace)(struct target_ops *, ptid_t ptid, const struct btrace_config *conf) TARGET_DEFAULT_NORETURN(tcomplain())
char * pulongest(ULONGEST u)
int(* to_masked_watch_num_registers)(struct target_ops *, CORE_ADDR, CORE_ADDR) TARGET_DEFAULT_RETURN(-1)
void add_target_with_completer(struct target_ops *t, completer_ftype *completer)
int(* to_has_execution)(struct target_ops *, ptid_t)
static void do_monitor_command(char *cmd, int from_tty)
int gdbarch_has_global_breakpoints(struct gdbarch *gdbarch)
static void delegate_terminal_ours(struct target_ops *self)
int target_remove_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, int rw)
static struct address_space * default_thread_address_space(struct target_ops *self, ptid_t ptid)
char * target_read_stralloc(struct target_ops *ops, enum target_object object, const char *annex)
int(* to_fileio_fstat)(struct target_ops *, int fd, struct stat *sb, int *target_errno)
struct cmd_list_element * add_info(const char *name, cmd_cfunc_ftype *fun, const char *doc)
void pop_all_targets(void)
void target_mourn_inferior(void)
static int may_insert_tracepoints_1
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
void target_goto_record_end(void)
int target_read_uint32(CORE_ADDR memaddr, uint32_t *result)
void target_close(struct target_ops *targ)
static void show_targetdebug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void target_continue_no_signal(ptid_t ptid)
const struct btrace_config *(* to_btrace_conf)(struct target_ops *self, const struct btrace_target_info *) TARGET_DEFAULT_RETURN(NULL)
#define target_has_execution
enum target_xfer_status(* to_xfer_partial)(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) TARGET_DEFAULT_RETURN(TARGET_XFER_E_IO)
struct btrace_config conf
void target_goto_record(ULONGEST insn)
void exit_inferior(int pid)
struct target_ops * find_target_beneath(struct target_ops *t)
int(* to_search_memory)(struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp) TARGET_DEFAULT_FUNC(default_search_memory)
char * xstrprintf(const char *format,...)
int target_has_execution_current(void)
static char * str_comma_list_concat_elem(char *list, const char *elem)
void printf_unfiltered(const char *format,...)
struct cmd_list_element * setdebuglist
ptid_t target_wait(ptid_t ptid, struct target_waitstatus *status, int options)
LONGEST target_fileio_read_alloc(struct inferior *inf, const char *filename, gdb_byte **buf_p)
void(* to_detach)(struct target_ops *ops, const char *, int) TARGET_DEFAULT_IGNORE()
char * target_fileio_read_stralloc(struct inferior *inf, const char *filename)
struct bfd_section * the_bfd_section
const char * objfile_name(const struct objfile *objfile)
int target_fileio_unlink(struct inferior *inf, const char *filename, int *target_errno)
void target_save_record(const char *filename)
int target_has_memory_1(void)
static enum exec_direction_kind default_execution_direction(struct target_ops *self)
struct ui_file * gdb_stdlog
struct cmd_list_element * maintenanceprintlist
enum btrace_error target_read_btrace(struct btrace_data *btrace, struct btrace_target_info *btinfo, enum btrace_read_type type)
static void delegate_delete_record(struct target_ops *self)
void agent_capability_invalidate(void)
static void install_delegators(struct target_ops *ops)
void target_stop_recording(void)
int target_is_pushed(struct target_ops *t)
char * normal_pid_to_str(ptid_t ptid)
int(* to_remove_mask_watchpoint)(struct target_ops *, CORE_ADDR, CORE_ADDR, int) TARGET_DEFAULT_RETURN(1)
static int dummy_find_memory_regions(struct target_ops *self, find_memory_region_ftype ignore1, void *ignore2)
void(* to_disconnect)(struct target_ops *, const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
void breakpoint_xfer_memory(gdb_byte *readbuf, gdb_byte *writebuf, const gdb_byte *writebuf_org, ULONGEST memaddr, LONGEST len)
void target_call_history_range(ULONGEST begin, ULONGEST end, int flags)
int target_read_raw_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int ptid_get_pid(ptid_t ptid)
enum btrace_error(* to_read_btrace)(struct target_ops *self, struct btrace_data *data, struct btrace_target_info *btinfo, enum btrace_read_type type) TARGET_DEFAULT_NORETURN(tcomplain())
PTR xrealloc(PTR ptr, size_t size)
int(* to_verify_memory)(struct target_ops *, const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size) TARGET_DEFAULT_FUNC(default_verify_memory)
int(* to_fileio_open)(struct target_ops *, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
#define is_closed_fileio_fh(fd)
void target_terminal_init(void)
void throw_exception(struct gdb_exception exception)
static void default_mourn_inferior(struct target_ops *self)
void target_update_thread_list(void)
static enum target_xfer_status target_write_partial(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len)
int simple_search_memory(struct target_ops *ops, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
int target_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void(* to_flash_erase)(struct target_ops *, ULONGEST address, LONGEST length) TARGET_DEFAULT_NORETURN(tcomplain())
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
void(* to_mourn_inferior)(struct target_ops *) TARGET_DEFAULT_FUNC(default_mourn_inferior)
const struct frame_unwind *(* to_get_unwinder)(struct target_ops *self) TARGET_DEFAULT_RETURN(NULL)
int target_info_proc(const char *args, enum info_proc_what what)
static void cleanup_restore_target_terminal(void *arg)
void free_memory_read_result_vector(void *x)
static int default_search_memory(struct target_ops *self, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
int default_child_has_registers(struct target_ops *ops)
CORE_ADDR target_translate_tls_address(struct objfile *objfile, CORE_ADDR offset)
int may_insert_breakpoints
void target_pre_inferior(int from_tty)
int gdbarch_fetch_tls_load_module_address_p(struct gdbarch *gdbarch)
void(* to_pass_signals)(struct target_ops *, int, unsigned char *TARGET_DEBUG_PRINTER(target_debug_print_signals)) TARGET_DEFAULT_IGNORE()
void(* to_stop)(struct target_ops *, ptid_t) TARGET_DEFAULT_IGNORE()
static LONGEST target_fileio_read_alloc_1(struct inferior *inf, const char *filename, gdb_byte **buf_p, int padding)
void(* to_teardown_btrace)(struct target_ops *, struct btrace_target_info *tinfo) TARGET_DEFAULT_NORETURN(tcomplain())
void prepare_for_detach(void)
void registers_changed_ptid(ptid_t ptid)
int target_terminal_is_inferior(void)
int xsnprintf(char *str, size_t size, const char *format,...)
int target_async_permitted
int(* to_fileio_pwrite)(struct target_ops *, int fd, const gdb_byte *write_buf, int len, ULONGEST offset, int *target_errno)
#define INHERIT(FIELD, TARGET)
void(* to_kill)(struct target_ops *) TARGET_DEFAULT_NORETURN(noprocess())
static int dispose_inferior(struct inferior *inf, void *args)
struct ui_file * gdb_stderr
void breakpoint_init_inferior(enum inf_context context)
int target_search_memory(CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
void target_stop_and_wait(ptid_t ptid)
const char * host_address_to_string(const void *addr)
int remove_breakpoints(void)
void(* to_goto_record_end)(struct target_ops *) TARGET_DEFAULT_NORETURN(tcomplain())
static char * dummy_make_corefile_notes(struct target_ops *self, bfd *ignore1, int *ignore2)
void(* to_open)(const char *, int)
void pop_all_targets_above(enum strata above_stratum)
int(* to_ranged_break_num_registers)(struct target_ops *) TARGET_DEFAULT_RETURN(-1)
void(* to_call_history_from)(struct target_ops *, ULONGEST begin, int size, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
void registers_changed(void)
int target_has_registers_1(void)
struct target_section * target_section_by_addr(struct target_ops *target, CORE_ADDR addr)
static void update_current_target(void)
int(* to_can_async_p)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
#define target_rcmd(command, outbuf)
void target_call_history(int size, int flags)
void(* to_create_inferior)(struct target_ops *, char *, char *, char **, int)
#define VEC_address(T, V)
int to_have_steppable_watchpoint
void target_done_generating_core(void)
struct target_ops * find_run_target(void)
static void tdefault_terminal_ours(struct target_ops *self)
struct ui_file * gdb_stdtarg
#define SEARCH_CHUNK_SIZE
int target_core_of_thread(ptid_t ptid)
int target_fileio_pread(int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *target_errno)
void(* to_terminal_ours)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int target_ranged_break_num_registers(void)
static void show_auto_connect_native_target(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int default_verify_memory(struct target_ops *self, const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
void(* to_terminal_inferior)(struct target_ops *) TARGET_DEFAULT_IGNORE()
static void default_rcmd(struct target_ops *self, const char *command, struct ui_file *output)
const char * to_shortname
LONGEST target_write_with_progress(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len, void(*progress)(ULONGEST, void *), void *baton)
enum overlay_debugging_state overlay_debugging
void target_delete_record(void)
int to_have_continuable_watchpoint
static void maintenance_print_target_stack(char *cmd, int from_tty)
struct target_section_table * target_get_section_table(struct target_ops *target)
unsigned long long ULONGEST
void target_store_registers(struct regcache *regcache, int regno)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static void init_dummy_target(void)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
int register_size(struct gdbarch *gdbarch, int regnum)
void(* to_insn_history)(struct target_ops *, int size, int flags) TARGET_DEFAULT_NORETURN(tcomplain())
int(* to_record_is_replaying)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
int(* to_supports_non_stop)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
void target_disconnect(const char *args, int from_tty)
int target_insert_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, int rw)
int(* to_has_all_memory)(struct target_ops *)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
struct target_ops * find_attach_target(void)
void regcache_raw_collect(const struct regcache *regcache, int regnum, void *buf)
struct cmd_list_element * showdebuglist
int target_follow_fork(int follow_child, int detach_fork)
void(* to_done_generating_core)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int(* to_fileio_unlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
void target_terminal_ours_for_output(void)
int target_fileio_fstat(int fd, struct stat *sb, int *target_errno)
CORE_ADDR overlay_mapped_address(CORE_ADDR pc, struct obj_section *section)
int to_has_thread_control
int(* to_thread_alive)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(0)
void(* to_info_proc)(struct target_ops *, const char *, enum info_proc_what)
int target_fileio_open(struct inferior *inf, const char *filename, int flags, int mode, int *target_errno)
void(* to_attach)(struct target_ops *ops, const char *, int)
void target_preopen(int from_tty)
void reinit_frame_cache(void)
int code_cache_enabled_p(void)
int remove_breakpoints_pid(int pid)
static void init_debug_target(struct target_ops *ops)
CORE_ADDR gdbarch_fetch_tls_load_module_address(struct gdbarch *gdbarch, struct objfile *objfile)
int(* to_supports_btrace)(struct target_ops *, enum btrace_format) TARGET_DEFAULT_RETURN(0)
static int return_zero(struct target_ops *ignore)
static int target_async_permitted_1
void(* to_update_thread_list)(struct target_ops *) TARGET_DEFAULT_IGNORE()
static void restore_show_memory_breakpoints(void *arg)
static void maint_show_target_async_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
int(* find_memory_region_ftype)(CORE_ADDR addr, unsigned long size, int read, int write, int exec, int modified, void *data)
int(* to_has_registers)(struct target_ops *)
CORE_ADDR pc_in_unmapped_range(CORE_ADDR pc, struct obj_section *section)
const char * core_addr_to_string_nz(const CORE_ADDR addr)
struct cmd_list_element * maintenance_show_cmdlist
enum bfd_endian byte_order
int stack_cache_enabled_p(void)
int target_read_string(CORE_ADDR memaddr, char **string, int len, int *errnop)
static void target_command(char *arg, int from_tty)
static void tdefault_delete_record(struct target_ops *self)
void invalidate_target_mem_regions(void)
void dcache_update(DCACHE *dcache, enum target_xfer_status status, CORE_ADDR memaddr, const gdb_byte *myaddr, ULONGEST len)
static void tcomplain(void)
void target_insn_history_range(ULONGEST begin, ULONGEST end, int flags)
void target_insn_history(int size, int flags)
const struct btrace_config * target_btrace_conf(const struct btrace_target_info *btinfo)
static void show_trust_readonly(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
DCACHE * target_dcache_get(void)
int(* to_insert_mask_watchpoint)(struct target_ops *, CORE_ADDR, CORE_ADDR, int) TARGET_DEFAULT_RETURN(1)
void(* to_disable_btrace)(struct target_ops *, struct btrace_target_info *tinfo) TARGET_DEFAULT_NORETURN(tcomplain())
void set_executing(ptid_t ptid, int executing)
struct thread_info * any_thread_of_process(int pid)
int target_read_stack(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void error(const char *fmt,...)
static void debug_print_register(const char *func, struct regcache *regcache, int regno)
char *(* to_fileio_readlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc)
int target_fileio_open_warn_if_slow(struct inferior *inf, const char *filename, int flags, int mode, int *target_errno)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
void throw_error(enum errors error, const char *fmt,...)
int target_masked_watch_num_registers(CORE_ADDR addr, CORE_ADDR mask)
struct target_ops * beneath
static void target_info(char *, int)
void(* to_load)(struct target_ops *, const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cleanup * make_cleanup_restore_target_terminal(void)
void target_flash_done(void)
static int may_write_memory_1
enum target_xfer_status raw_memory_xfer_partial(struct target_ops *ops, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, LONGEST len, ULONGEST *xfered_len)
static int may_insert_breakpoints_1
static void target_fileio_close_cleanup(void *opaque)
int mem_region_cmp(const void *untyped_lhs, const void *untyped_rhs)
static LONGEST target_read_alloc_1(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte **buf_p, int padding)
void(* to_goto_record)(struct target_ops *, ULONGEST insn) TARGET_DEFAULT_NORETURN(tcomplain())
enum mem_access_mode mode
void mark_breakpoints_out(void)
static void maint_set_target_async_command(char *args, int from_tty, struct cmd_list_element *c)
const ULONGEST const LONGEST len
struct target_ops * find_target_at(enum strata stratum)
void add_deprecated_target_alias(struct target_ops *t, char *alias)