27 #ifdef HAVE_TKILL_SYSCALL
29 #include <sys/syscall.h>
31 #include <sys/ptrace.h>
44 #include <sys/procfs.h>
55 #include <sys/types.h>
73 #define SPUFS_MAGIC 0x23c9b64e
165 #define O_LARGEFILE 0
228 #define linux_is_async_p() (linux_nat_event_pipe[0] != -1)
240 ret =
read (linux_nat_event_pipe[0], &buf, 1);
242 while (ret >= 0 || (ret == -1 && errno == EINTR));
261 ret = write (linux_nat_event_pipe[1],
"+", 1);
263 while (ret == -1 && errno == EINTR);
269 static int kill_lwp (
int lwpid,
int signo);
343 new_pid->
next = *listp;
352 for (p = list; p != NULL; p = p->
next)
363 for (p = listp; *p != NULL; p = &(*p)->
next)
364 if ((*p)->pid == pid)
429 for (lp = lwp_list; lp; lp = lp->
next)
457 int status = W_STOPCODE (0);
460 ptid_t parent_ptid, child_ptid;
461 int parent_pid, child_pid;
497 if (
ptrace (PTRACE_SINGLESTEP, child_pid, 0, 0) < 0)
511 ptrace (PTRACE_DETACH, child_pid, 0, signo);
536 "LCFF: waiting for VFORK_DONE on %d\n",
578 "LCFF: no VFORK_DONE "
579 "support, sleeping a bit\n");
652 int pid,
int needed,
int any_count,
653 int table_size,
int *table)
723 if (!sigismember (&blocked_mask, SIGCHLD))
724 sigaddset (&blocked_mask, SIGCHLD);
726 sigprocmask (SIG_BLOCK, &blocked_mask, prev_mask);
735 sigprocmask (SIG_SETMASK, prev_mask, NULL);
744 int numsigs,
unsigned char *pass_signals)
748 sigemptyset (&pass_mask);
750 for (signo = 1; signo < NSIG; signo++)
753 if (target_signo < numsigs && pass_signals[target_signo])
754 sigaddset (&pass_mask, signo);
782 struct lwp_info *lp, *lpprev, *lpnext;
786 for (lp = lwp_list; lp; lp = lpnext)
827 memset (lp, 0,
sizeof (
struct lwp_info));
871 for (lp = lwp_list; lp; lpprev = lp, lp = lp->
next)
900 for (lp = lwp_list; lp; lp = lp->
next)
916 for (lp = lwp_list; lp; lp = lpnext)
922 if ((*callback) (lp, data) != 0)
988 "LNPAW: Attaching to a stopped process\n");
1007 ptrace (PTRACE_CONT, pid, 0, 0);
1014 if (new_pid == -1 && errno == ECHILD)
1029 if (debug_linux_nat)
1038 if (debug_linux_nat)
1040 "LNPAW: Received %s after attaching\n",
1073 if (
ptrace (PTRACE_ATTACH, lwpid, 0, 0) < 0)
1087 if (debug_linux_nat)
1089 "LLAL: attach failed, but already seen "
1090 "this thread %s stop\n",
1099 if (debug_linux_nat)
1101 "LLAL: attach failed, and haven't seen "
1102 "this thread %s stop yet\n",
1111 if (new_pid == -1 && errno == ECHILD)
1119 if (debug_linux_nat)
1121 "LLAL: child hasn't "
1126 if (debug_linux_nat)
1128 "LLAL: adding to stopped_pids\n");
1146 if (debug_linux_nat)
1148 "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n",
1168 if (debug_linux_nat)
1171 "LLAL: waitpid %s received %s\n",
1182 char *exec_file,
char *allargs,
char **env,
1214 if (
ptrace (PTRACE_ATTACH, lwpid, 0, 0) < 0)
1226 if (debug_linux_nat)
1229 "Cannot attach to lwp %d: "
1230 "thread is gone (%d: %s)\n",
1236 warning (
_(
"Cannot attach to lwp %d: %s"),
1244 if (debug_linux_nat)
1246 "PTRACE_ATTACH %s, 0, 0 (OK)\n",
1278 linux_ops->
to_attach (ops, args, from_tty);
1284 char *message, *buffer_s;
1286 message = xstrdup (ex.message);
1296 if (*buffer_s !=
'\0')
1297 throw_error (ex.error,
"warning: %s\n%s", buffer_s, message);
1324 error (
_(
"Unable to attach: program exited normally."));
1326 error (
_(
"Unable to attach: program exited with code %d."),
1331 enum gdb_signal signo;
1337 error (
_(
"Unable to attach: program terminated with signal "
1344 _(
"unexpected status %d for PID %ld"),
1352 if (debug_linux_nat)
1354 "LNA: waitpid %ld, saving status %s\n",
1377 enum gdb_signal signo = GDB_SIGNAL_0;
1401 signo = GDB_SIGNAL_0;
1427 if (signo == GDB_SIGNAL_0)
1429 if (debug_linux_nat)
1431 "GPT: lwp %s has no pending signal\n",
1436 if (debug_linux_nat)
1438 "GPT: lwp %s had signal %s, "
1439 "but it is in no pass state\n",
1447 if (debug_linux_nat)
1449 "GPT: lwp %s has pending signal %s\n",
1462 if (debug_linux_nat && lp->
status)
1470 if (debug_linux_nat)
1472 "DC: Sending SIGCONT to %s\n",
1496 if (debug_linux_nat)
1498 "PTRACE_DETACH (%s, %s, 0) (OK)\n",
1535 if ((args == NULL || *args ==
'\0')
1546 if (debug_linux_nat)
1548 "LND: Sending signal %s to %s\n",
1566 linux_ops->
to_detach (ops, args, from_tty);
1574 enum gdb_signal signo)
1666 if (debug_linux_nat)
1668 "RC: Not resuming %s (vfork parent)\n",
1673 if (debug_linux_nat)
1675 "RC: Resuming sibling %s, %s, %s\n",
1677 (signo != GDB_SIGNAL_0
1680 step ?
"step" :
"resume");
1686 if (debug_linux_nat)
1688 "RC: Not resuming sibling %s (has pending)\n",
1694 if (debug_linux_nat)
1696 "RC: Not resuming sibling %s (not stopped)\n",
1707 enum gdb_signal signo = GDB_SIGNAL_0;
1746 ptid_t ptid,
int step,
enum gdb_signal signo)
1751 if (debug_linux_nat)
1753 "LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
1754 step ?
"step" :
"resume",
1756 (signo != GDB_SIGNAL_0
1792 if (debug_linux_nat)
1794 "LLR: Not short circuiting for ignored "
1795 "status 0x%x\n", lp->
status);
1811 if (debug_linux_nat)
1813 "LLR: Short circuiting for status 0x%x\n",
1828 if (debug_linux_nat)
1830 "LLR: %s %s, %s (resume event thread)\n",
1831 step ?
"PTRACE_SINGLESTEP" :
"PTRACE_CONT",
1833 (signo != GDB_SIGNAL_0
1850 #ifdef HAVE_TKILL_SYSCALL
1852 static int tkill_failed;
1859 ret =
syscall (__NR_tkill, lwpid, signo);
1860 if (errno != ENOSYS)
1867 return kill (lwpid, signo);
1905 if (debug_linux_nat)
1907 "LHST: ignoring syscall %d "
1908 "for LWP %ld (stopping threads), "
1909 "resuming with PTRACE_CONT for SIGSTOP\n",
1936 if (debug_linux_nat)
1938 "LHST: stopping for %s of syscall %d"
1942 ?
"entry" :
"return",
1948 if (debug_linux_nat)
1950 "LHST: ignoring %s of syscall %d "
1953 ?
"entry" :
"return",
1975 if (debug_linux_nat)
1977 "LHST: caught syscall event "
1978 "with no syscall catchpoints."
1979 " %d for LWP %ld, ignoring\n",
2012 unsigned long new_pid;
2026 else if (ret != new_pid)
2028 _(
"wait returned unexpected PID %d"), ret);
2031 _(
"wait returned unexpected status 0x%x"), status);
2041 if (linux_nat_new_fork != NULL)
2079 if (debug_linux_nat)
2081 "LHEW: Got clone event "
2082 "from LWP %d, new child is LWP %ld\n",
2123 if (debug_linux_nat)
2125 "LHEW: waitpid of new LWP %ld, "
2126 "saving status %s\n",
2140 if (debug_linux_nat)
2142 "LHEW: Got exec event from LWP %ld\n",
2160 if (debug_linux_nat)
2162 "LHEW: Got expected PTRACE_EVENT_"
2163 "VFORK_DONE from LWP %ld: stopping\n",
2170 if (debug_linux_nat)
2172 "LHEW: Got PTRACE_EVENT_VFORK_DONE "
2173 "from LWP %ld: ignoring\n",
2179 _(
"unknown ptrace event %d"), event);
2190 int thread_dead = 0;
2205 if (pid == -1 && errno == ECHILD)
2207 if (pid == -1 && errno == ECHILD)
2215 if (debug_linux_nat)
2241 if (debug_linux_nat)
2243 "WL: Thread group leader %s vanished.\n",
2255 if (debug_linux_nat)
2257 sigsuspend (&suspend_mask);
2266 if (debug_linux_nat)
2269 "WL: waitpid %s received %s\n",
2279 if (debug_linux_nat)
2292 if (debug_linux_nat)
2323 status = W_STOPCODE (SIGTRAP);
2332 if (debug_linux_nat)
2334 "WL: Handling extended status 0x%06x\n",
2352 if (debug_linux_nat)
2355 "SC: kill %s **<SIGSTOP>**\n",
2360 if (debug_linux_nat)
2363 "SC: lwp kill %d %s\n",
2410 sigset_t
pending, blocked, ignored;
2414 if (sigismember (&pending, SIGINT)
2415 && !sigismember (&ignored, SIGINT))
2451 if (debug_linux_nat)
2453 "MCIS: Clearing bogus flag for %s\n",
2564 int (*status_is_event) (
int status))
2597 if (debug_linux_nat)
2599 "PTRACE_CONT %s, 0, 0 (%s) "
2600 "(discarding SIGINT)\n",
2613 if (debug_linux_nat)
2615 "SWC: Pending event %s in %s\n",
2629 if (debug_linux_nat)
2631 "SWC: Expected SIGSTOP caught for %s.\n",
2670 if (debug_linux_nat)
2672 "SC: PC of %s changed. was=%s, now=%s\n",
2679 #if !USE_SIGTRAP_SIGINFO
2682 if (debug_linux_nat)
2684 "SC: previous breakpoint of %s, at %s gone\n",
2694 if (debug_linux_nat)
2696 "SC: pending event of %s cancelled.\n",
2767 if ((*selector)-- == 0)
2792 #if USE_SIGTRAP_SIGINFO
2799 #if USE_SIGTRAP_SIGINFO
2802 if (siginfo.si_signo == SIGTRAP)
2806 if (debug_linux_nat)
2808 "CSBB: %s stopped by software "
2822 if (debug_linux_nat)
2824 "CSBB: %s stopped by hardware "
2825 "breakpoint/watchpoint\n",
2832 else if (siginfo.si_code == TRAP_TRACE)
2834 if (debug_linux_nat)
2836 "CSBB: %s stopped by trace\n",
2848 if (debug_linux_nat)
2850 "CSBB: %s stopped by software breakpoint\n",
2864 if (debug_linux_nat)
2866 "CSBB: stopped by hardware breakpoint %s\n",
2926 int random_selector;
2945 if (event_lp != NULL)
2947 if (debug_linux_nat)
2949 "SEL: Select single-step %s\n",
2954 if (event_lp == NULL)
2964 random_selector = (
int)
2965 ((num_events * (
double) rand ()) / (RAND_MAX + 1.0));
2967 if (debug_linux_nat && num_events > 1)
2969 "SEL: Found %d events, selecting #%d\n",
2970 num_events, random_selector);
2977 if (event_lp != NULL)
2980 *orig_lp = event_lp;
2981 *status = event_lp->
status;
2985 (*orig_lp)->status = 0;
3020 if (debug_linux_nat)
3022 "SARC: core wanted LWP %ld stopped "
3023 "(leaving SIGSTOP pending)\n",
3025 lp->
status = W_STOPCODE (SIGSTOP);
3030 if (debug_linux_nat)
3032 "SARC: re-resuming LWP %ld\n",
3038 if (debug_linux_nat)
3040 "SARC: not re-resuming LWP %ld "
3077 if (debug_linux_nat)
3079 "LLW: Re-adding thread group leader LWP %d.\n",
3090 if (debug_linux_nat)
3092 "LHEW: saving LWP %ld status %s in stopped_pids list\n",
3125 status = W_STOPCODE (SIGTRAP);
3134 if (debug_linux_nat)
3136 "LLW: Handling extended status 0x%06x\n",
3163 if (debug_linux_nat)
3165 "LLW: %s exited.\n",
3180 if (debug_linux_nat)
3182 "Process %ld exited\n",
3208 if (debug_linux_nat)
3210 "LLW: %s exited.\n",
3231 if (debug_linux_nat)
3233 "LLW: resume_stop SIGSTOP caught for %s.\n",
3240 if (debug_linux_nat)
3242 "LLW: %s %s, 0, 0 (discard delayed SIGSTOP)\n",
3244 "PTRACE_SINGLESTEP" :
"PTRACE_CONT",
3258 if (debug_linux_nat)
3260 "LLW: Delayed SIGINT caught for %s.\n",
3267 if (debug_linux_nat)
3269 "LLW: %s %s, 0, 0 (discard SIGINT)\n",
3271 "PTRACE_SINGLESTEP" :
"PTRACE_CONT",
3317 if (debug_linux_nat)
3319 "LLW: %s %s, %s (preempt 'handle')\n",
3321 "PTRACE_SINGLESTEP" :
"PTRACE_CONT",
3323 (signo != GDB_SIGNAL_0
3353 if (leader_lp != NULL
3359 if (debug_linux_nat)
3361 "CZL: Thread group leader %d zombie "
3362 "(it exited, or another thread execd).\n",
3393 if (debug_linux_nat)
3395 "CZL: Thread group leader %d vanished.\n",
3412 if (debug_linux_nat)
3436 if (debug_linux_nat)
3438 "LLW: Using pending wait status %s for %s.\n",
3472 if (lwpid == 0 || (lwpid == -1 && errno == ECHILD))
3475 if (debug_linux_nat)
3477 "LNW: waitpid(-1, ...) returned %d, %s\n",
3482 if (debug_linux_nat)
3485 "LLW: waitpid %ld received %s\n",
3514 if (debug_linux_nat)
3530 if (debug_linux_nat)
3542 if (debug_linux_nat)
3544 sigsuspend (&suspend_mask);
3610 if (debug_linux_nat)
3612 "LLW: trap ptid is %s.\n",
3624 if (debug_linux_nat)
3636 ourstatus->
value.
sig = GDB_SIGNAL_0;
3658 if (debug_linux_nat)
3660 "RSRL: NOT resuming LWP %s, not stopped\n",
3665 if (debug_linux_nat)
3667 "RSRL: NOT resuming LWP %s, not resumed\n",
3672 if (debug_linux_nat)
3674 "RSRL: NOT resuming LWP %s, has pending status\n",
3685 int leave_stopped = 0;
3697 if (debug_linux_nat)
3699 "RSRL: resuming stopped-resumed LWP %s at "
3726 if (debug_linux_nat)
3728 char *options_string;
3732 "linux_nat_wait: [%s], [%s]\n",
3735 xfree (options_string);
3773 if (debug_linux_nat)
3775 int save_errno = errno;
3778 "KC: kill (SIGKILL) %s, 0, 0 (%s)\n",
3787 if (debug_linux_nat)
3789 int save_errno = errno;
3792 "KC: PTRACE_KILL %s, 0, 0 (%s)\n",
3817 if (pid != (pid_t) -1)
3819 if (debug_linux_nat)
3821 "KWC: wait %s received unknown.\n",
3839 if (pid != (pid_t) -1)
3841 if (debug_linux_nat)
3843 "KWC: wait %s received unk.\n",
3938 memcpy (siginfo, inf_siginfo,
sizeof (siginfo_t));
3940 memcpy (inf_siginfo, siginfo,
sizeof (siginfo_t));
3946 const char *annex, gdb_byte *readbuf,
3952 gdb_byte inf_siginfo[
sizeof (siginfo_t)];
3961 if (offset >
sizeof (siginfo))
3977 if (offset + len >
sizeof (siginfo))
3978 len =
sizeof (siginfo) - offset;
3980 if (readbuf != NULL)
3981 memcpy (readbuf, inf_siginfo + offset, len);
3984 memcpy (inf_siginfo + offset, writebuf, len);
4001 const char *annex, gdb_byte *readbuf,
4002 const gdb_byte *writebuf,
4010 offset, len, xfered_len);
4023 xfer = linux_ops->
to_xfer_partial (ops,
object, annex, readbuf, writebuf,
4024 offset, len, xfered_len);
4042 if (debug_linux_nat)
4044 "LLTA: KILL(SIG0) %s (%s)\n",
4080 static char buf[64];
4086 snprintf (buf,
sizeof (buf),
"LWP %ld",
ptid_get_lwp (ptid));
4098 #define FORMAT "/proc/%d/task/%ld/comm"
4099 char buf[
sizeof (
FORMAT) + 30];
4101 char *result = NULL;
4103 snprintf (buf,
sizeof (buf),
FORMAT, pid, lwp);
4111 if (fgets (line,
sizeof (line), comm_file))
4113 char *nl = strchr (line,
'\n');
4146 const char *annex, gdb_byte *readbuf,
4147 const gdb_byte *writebuf,
4158 if (len < 3 *
sizeof (
long))
4163 xsnprintf (filename,
sizeof filename,
"/proc/%d/mem",
4174 if (pread64 (fd, readbuf, len, offset) != len)
4176 if (lseek (fd, offset,
SEEK_SET) == -1 ||
read (fd, readbuf, len) != len)
4203 struct dirent *entry;
4205 xsnprintf (path,
sizeof path,
"/proc/%d/fd", pid);
4206 dir = opendir (path);
4211 while ((entry = readdir (dir)) != NULL)
4217 fd = atoi (entry->d_name);
4221 xsnprintf (path,
sizeof path,
"/proc/%d/fd/%d", pid, fd);
4222 if (stat (path, &st) != 0)
4224 if (!S_ISDIR (st.st_mode))
4227 if (statfs (path, &stfs) != 0)
4232 if (pos >= offset && pos + 4 <= offset + len)
4249 const char *annex, gdb_byte *readbuf,
4250 const gdb_byte *writebuf,
4278 xsnprintf (buf,
sizeof buf,
"/proc/%d/fd/%s", pid, annex);
4284 && lseek (fd, (off_t) offset,
SEEK_SET) != (off_t) offset)
4291 ret = write (fd, writebuf, (
size_t) len);
4293 ret =
read (fd, readbuf, (
size_t) len);
4314 int len = strlen (line) - 1;
4318 if (line[len] !=
'\n')
4319 error (
_(
"Could not parse signal set: %s"), line);
4327 if (*p >=
'0' && *p <=
'9')
4329 else if (*p >=
'a' && *p <=
'f')
4330 digit = *p -
'a' + 10;
4332 error (
_(
"Could not parse signal set: %s"), line);
4337 sigaddset (sigs, signum + 1);
4339 sigaddset (sigs, signum + 2);
4341 sigaddset (sigs, signum + 3);
4343 sigaddset (sigs, signum + 4);
4354 sigset_t *blocked, sigset_t *ignored)
4357 char buffer[PATH_MAX], fname[PATH_MAX];
4360 sigemptyset (pending);
4361 sigemptyset (blocked);
4362 sigemptyset (ignored);
4363 xsnprintf (fname,
sizeof fname,
"/proc/%d/status", pid);
4365 if (procfile == NULL)
4366 error (
_(
"Could not open %s"), fname);
4369 while (fgets (buffer, PATH_MAX, procfile) != NULL)
4394 const char *annex, gdb_byte *readbuf,
4401 if (*xfered_len == 0)
4409 const char *annex, gdb_byte *readbuf,
4417 offset, len, xfered_len);
4421 offset, len, xfered_len);
4425 offset, len, xfered_len);
4438 offset &= ((
ULONGEST) 1 << addr_bit) - 1;
4442 offset, len, xfered_len);
4447 offset, len, xfered_len);
4462 linux_child_static_tracepoint_markers_by_strid (
struct target_ops *
self,
4476 memcpy (s,
"qTfSTM",
sizeof (
"qTfSTM"));
4477 s[
sizeof (
"qTfSTM")] = 0;
4493 if (strid == NULL || strcmp (strid, marker->
str_id) == 0)
4502 memset (marker, 0,
sizeof (*marker));
4505 while (*p++ ==
',');
4507 memcpy (s,
"qTsSTM",
sizeof (
"qTsSTM"));
4508 s[
sizeof (
"qTsSTM")] = 0;
4539 t->to_static_tracepoint_markers_by_strid
4540 = linux_child_static_tracepoint_markers_by_strid;
4593 int linux_multi_process = 1;
4604 #ifdef HAVE_PERSONALITY
4611 static int async_terminal_is_ours = 1;
4634 if (!async_terminal_is_ours)
4638 async_terminal_is_ours = 0;
4659 if (async_terminal_is_ours)
4664 async_terminal_is_ours = 1;
4675 int old_errno = errno;
4677 if (debug_linux_nat)
4679 "sigchld\n",
sizeof (
"sigchld\n") - 1);
4681 if (signo == SIGCHLD
4682 && linux_nat_event_pipe[0] != -1)
4704 if (previous != enable)
4716 "creating event pipe failed.");
4718 fcntl (linux_nat_event_pipe[0], F_SETFL, O_NONBLOCK);
4719 fcntl (linux_nat_event_pipe[1], F_SETFL, O_NONBLOCK);
4723 close (linux_nat_event_pipe[0]);
4724 close (linux_nat_event_pipe[1]);
4725 linux_nat_event_pipe[0] = -1;
4726 linux_nat_event_pipe[1] = -1;
4767 if (debug_linux_nat)
4769 "LNSL: running -> suspending %s\n",
4775 if (debug_linux_nat)
4777 "linux-nat: already stopping LWP %ld at "
4790 if (debug_linux_nat)
4794 "LNSL: already stopped/stop_requested %s\n",
4798 "LNSL: already stopped/no "
4799 "stop_requested yet %s\n",
4812 linux_ops->
to_stop (linux_ops, ptid);
4907 int flags,
int mode,
int warn_if_slow,
4917 *target_errno = FILEIO_EINVAL;
4922 filename, nat_flags, nat_mode);
4941 filename, buf,
sizeof (buf));
4949 memcpy (ret, buf, len);
5056 linux_nat_new_fork = new_fork;
5066 linux_nat_forget_process_hook = fn;
5074 if (linux_nat_forget_process_hook != NULL)
5095 void (*prepare_to_resume) (
struct lwp_info *))
5116 memset (siginfo, 0,
sizeof (*siginfo));
5138 &debug_linux_nat,
_(
"\
5139 Set debugging of GNU/Linux lwp module."),
_(
"\
5140 Show debugging of GNU/Linux lwp module."),
_(
"\
5141 Enables printf debugging output."),
5148 Set debugging of GNU/Linux namespaces module."),
_(
"\
5149 Show debugging of GNU/Linux namespaces module."),
_(
"\
5150 Enables printf debugging output."),
5156 sigprocmask (SIG_SETMASK, NULL, &normal_mask);
5167 sigprocmask (SIG_SETMASK, NULL, &suspend_mask);
5168 sigdelset (&suspend_mask, SIGCHLD);
5170 sigemptyset (&blocked_mask);
5193 sizeof (signo)) != 0)
5204 struct sigaction action;
5205 int restart, cancel;
5207 sigemptyset (&blocked_mask);
5210 restart =
get_signo (
"__pthread_sig_restart");
5211 cancel =
get_signo (
"__pthread_sig_cancel");
5219 restart = __SIGRTMIN;
5222 cancel = __SIGRTMIN + 1;
5224 sigaddset (set, restart);
5225 sigaddset (set, cancel);
5234 sigemptyset (&action.sa_mask);
5235 action.sa_flags = SA_RESTART;
5236 sigaction (cancel, &action, NULL);
5239 sigaddset (&blocked_mask, cancel);
5240 sigprocmask (SIG_BLOCK, &blocked_mask, NULL);
5243 sigdelset (&suspend_mask, cancel);
void get_last_target_status(ptid_t *ptidp, struct target_waitstatus *status)
struct gdbarch * target_gdbarch(void)
void linux_unstop_all_lwps(void)
#define target_can_async_p()
int gdbarch_software_single_step_p(struct gdbarch *gdbarch)
struct address_space *(* to_thread_address_space)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_thread_address_space)
struct arch_lwp_info * arch_private
void add_target(struct target_ops *t)
static int get_signo(const char *name)
void target_terminal_ours(void)
ssize_t read(int fd, void *buf, size_t count)
#define PTRACE_GETEVENTMSG
void release_static_tracepoint_marker(struct static_tracepoint_marker *marker)
static void save_sigtrap(struct lwp_info *lp)
struct thread_info * add_thread(ptid_t ptid)
struct thread_info * find_thread_ptid(ptid_t ptid)
int(* to_supports_stopped_by_hw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
int catch_syscall_enabled(void)
int(* to_supports_disable_randomization)(struct target_ops *)
static sigset_t blocked_mask
static void delete_lwp_cleanup(void *lp_voidp)
int(* to_is_async_p)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
static void sigchld_handler(int signo)
void target_stop(ptid_t ptid)
int ptid_is_pid(ptid_t ptid)
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)
static enum target_xfer_status linux_proc_xfer_spu(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)
struct arch_lwp_info * lwp_arch_private_info(struct lwp_info *lwp)
static int linux_child_remove_fork_catchpoint(struct target_ops *self, int pid)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
void lin_thread_get_thread_signals(sigset_t *set)
static struct lwp_info * add_lwp(ptid_t ptid)
void linux_proc_pending_signals(int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored)
struct lwp_info * lwp_list
static struct target_ops linux_ops_saved
struct regcache * get_thread_regcache(ptid_t ptid)
void linux_stop_lwp(struct lwp_info *lwp)
void delete_thread(ptid_t)
static void block_child_signals(sigset_t *prev_mask)
int linux_fork_checkpointing_p(int pid)
static int kill_wait_callback(struct lwp_info *lp, void *data)
static void linux_nat_create_inferior(struct target_ops *ops, char *exec_file, char *allargs, char **env, int from_tty)
void set_running(ptid_t ptid, int running)
static int linux_nat_event_pipe[2]
static int linux_nat_resume_callback(struct lwp_info *lp, void *except)
struct target_waitstatus pending_follow
#define PTRACE_EVENT_EXEC
static sigset_t normal_mask
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
void linux_nat_set_new_thread(struct target_ops *t, void(*new_thread)(struct lwp_info *))
#define BMSYMBOL_VALUE_ADDRESS(symbol)
int hardware_breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
void warning(const char *fmt,...)
struct sigaction sigchld_action
static int resume_stopped_resumed_lwps(struct lwp_info *lp, void *data)
int fileio_to_host_mode(int fileio_mode, mode_t *mode_p)
static void add_line_to_sigset(const char *line, sigset_t *sigs)
char *(* to_pid_to_str)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_pid_to_str)
static void linux_nat_attach(struct target_ops *ops, const char *args, int from_tty)
int linux_wstatus_maybe_breakpoint(int wstat)
int lin_lwp_attach_lwp(ptid_t ptid)
int disable_randomization
static struct address_space * linux_nat_thread_address_space(struct target_ops *t, ptid_t ptid)
int gdb_pipe_cloexec(int filedes[2])
static int linux_child_remove_vfork_catchpoint(struct target_ops *self, int pid)
int linux_is_extended_waitstatus(int wstat)
static int pull_pid_from_list(struct simple_pid_list **listp, int pid, int *statusp)
static void linux_nat_detach(struct target_ops *ops, const char *args, int from_tty)
int thread_db_notice_clone(ptid_t parent, ptid_t child)
void linux_fork_killall(void)
static linux_nat_forget_process_ftype * linux_nat_forget_process_hook
static void add_to_pid_list(struct simple_pid_list **listp, int pid, int status)
int(* to_core_of_thread)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(-1)
static void linux_nat_mourn_inferior(struct target_ops *ops)
int(* to_follow_fork)(struct target_ops *, int, int) TARGET_DEFAULT_FUNC(default_follow_fork)
int ptid_match(ptid_t ptid, ptid_t filter)
void internal_error(const char *file, int line, const char *fmt,...)
struct thread_info * inferior_thread(void)
static int linux_nat_has_pending_sigint(int pid)
void(* to_close)(struct target_ops *)
void parse_static_tracepoint_marker_definition(char *line, char **pp, struct static_tracepoint_marker *marker)
static int linux_nat_stopped_by_hw_breakpoint(struct target_ops *ops)
enum target_stop_reason lwp_stop_reason(struct lwp_info *lwp)
#define linux_is_async_p()
static enum target_xfer_status linux_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)
#define GDB_ARCH_TRAP_BRKPT
static enum target_xfer_status linux_xfer_siginfo(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 linux_fork_mourn_inferior(void)
static sigset_t pass_mask
void set_sigint_trap(void)
void child_terminal_inferior(struct target_ops *self)
#define VEC_safe_push(T, V, O)
#define target_post_attach(pid)
struct inferior * find_inferior_ptid(ptid_t ptid)
FILE * gdb_fopen_cloexec(const char *filename, const char *opentype)
ptid_t(* to_wait)(struct target_ops *, ptid_t, struct target_waitstatus *, int TARGET_DEBUG_PRINTER(target_debug_print_options)) TARGET_DEFAULT_NORETURN(noprocess())
static void resume_lwp(struct lwp_info *lp, int step, enum gdb_signal signo)
char * target_pid_to_str(ptid_t ptid)
static int attach_proc_task_lwp_callback(ptid_t ptid)
static int linux_nat_core_of_thread(struct target_ops *ops, ptid_t ptid)
static int linux_nat_post_attach_wait(ptid_t ptid, int first, int *cloned, int *signalled)
enum gdb_signal stop_signal
struct target_ops * inf_ptrace_target(void)
static int set_ignore_sigint(struct lwp_info *lp, void *data)
static struct target_ops * linux_ops
void linux_nat_set_siginfo_fixup(struct target_ops *t, int(*siginfo_fixup)(siginfo_t *, gdb_byte *, int))
static int resume_clear_callback(struct lwp_info *lp, void *data)
int linux_nat_get_siginfo(ptid_t ptid, siginfo_t *siginfo)
static void linux_nat_terminal_inferior(struct target_ops *self)
static void restore_personality(void *arg)
void regcache_write_pc(struct regcache *regcache, CORE_ADDR pc)
static int select_singlestep_lwp_callback(struct lwp_info *lp, void *data)
static void handle_target_event(int error, gdb_client_data client_data)
void linux_nat_set_new_fork(struct target_ops *t, linux_nat_new_fork_ftype *new_fork)
void child_terminal_ours(struct target_ops *self)
struct target_ops * inf_ptrace_trad_target(CORE_ADDR(*register_u_offset)(struct gdbarch *, int, int))
static int running_callback(struct lwp_info *lp, void *data)
void( linux_nat_new_fork_ftype)(struct lwp_info *parent, pid_t child_pid)
static int resumed_callback(struct lwp_info *lp, void *data)
static int select_event_lwp_callback(struct lwp_info *lp, void *data)
static target_xfer_partial_ftype * super_xfer_partial
static void linux_nat_stop(struct target_ops *self, ptid_t ptid)
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
ptid_t ptid_of_lwp(struct lwp_info *lwp)
int breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
#define PTRACE_EVENT_VFORK_DONE
static void linux_nat_close(struct target_ops *self)
void add_file_handler(int fd, handler_func *proc, gdb_client_data client_data)
int(* to_remove_exec_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
void linux_ptrace_attach_fail_reason(pid_t pid, struct buffer *buffer)
ptid_t ptid_build(int pid, long lwp, long tid)
struct target_waitstatus waitstatus
int must_set_ptrace_flags
static int detach_callback(struct lwp_info *lp, void *data)
int debug_linux_namespaces
int fileio_to_host_openflags(int fileio_open_flags, int *open_flags_p)
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
static int linux_nat_filesystem_is_local(struct target_ops *ops)
static void linux_nat_pass_signals(struct target_ops *self, int numsigs, unsigned char *pass_signals)
static int linux_handle_extended_wait(struct lwp_info *lp, int status)
#define PTRACE_EVENT_FORK
int(* to_remove_fork_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
static struct lwp_info * linux_nat_filter_event(int lwpid, int status)
struct cleanup * save_inferior_ptid(void)
CORE_ADDR gdbarch_decr_pc_after_break(struct gdbarch *gdbarch)
static void(* super_close)(struct target_ops *)
static char * linux_child_pid_to_exec_file(struct target_ops *self, int pid)
static int linux_nat_fileio_unlink(struct target_ops *self, struct inferior *inf, const char *filename, int *target_errno)
static void linux_resume_one_lwp_throw(struct lwp_info *lp, int step, enum gdb_signal signo)
static int linux_child_remove_exec_catchpoint(struct target_ops *self, int pid)
void linux_ptrace_init_warnings(void)
static int linux_nat_fileio_open(struct target_ops *self, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
#define CATCH(EXCEPTION, MASK)
char * target_options_to_string(int target_options)
enum tribool have_ptrace_getregset
struct address_space * aspace
char *(* to_thread_name)(struct target_ops *, struct thread_info *) TARGET_DEFAULT_RETURN(NULL)
char * linux_ptrace_attach_fail_reason_string(ptid_t ptid, int err)
static void linux_nat_async(struct target_ops *ops, int enable)
static void async_file_mark(void)
int linux_supports_traceclone(void)
static void cleanup_target_stop(void *arg)
void inferior_event_handler(enum inferior_event_type event_type, gdb_client_data client_data)
struct target_ops current_target
int detach_breakpoints(ptid_t ptid)
static void(* linux_nat_prepare_to_resume)(struct lwp_info *)
void initialize_file_ftype(void)
struct fork_info * add_fork(pid_t pid)
static enum target_xfer_status linux_nat_xfer_osdata(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)
int linux_ns_same(pid_t pid, enum linux_ns_type type)
static int get_pending_status(struct lwp_info *lp, int *status)
void linux_fork_detach(const char *args, int from_tty)
static int status_callback(struct lwp_info *lp, void *data)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void free_current_marker(void *arg)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
void ui_file_write_async_safe(struct ui_file *file, const char *buf, long length_buf)
#define PTRACE_O_TRACEVFORKDONE
static void(* linux_nat_new_thread)(struct lwp_info *)
static void linux_init_ptrace(pid_t pid, int attached)
struct simple_pid_list * next
static LONGEST spu_enumerate_spu_ids(int pid, gdb_byte *buf, ULONGEST offset, ULONGEST len)
#define PTRACE_O_TRACEVFORK
int(* to_remove_vfork_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
void target_resume(ptid_t ptid, int step, enum gdb_signal signal)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
int(* to_supports_stopped_by_sw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
void(* to_resume)(struct target_ops *, ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
int linux_ptrace_get_extended_event(int wstat)
static int linux_nat_can_async_p(struct target_ops *ops)
static int linux_async_pipe(int enable)
enum resume_kind last_resume_kind
static int num_lwps(int pid)
static void linux_resume_one_lwp(struct lwp_info *lp, int step, enum gdb_signal signo)
static char * linux_nat_fileio_readlink(struct target_ops *self, struct inferior *inf, const char *filename, int *target_errno)
#define PTRACE_EVENT_CLONE
ptid_t pid_to_ptid(int pid)
int host_to_fileio_error(int error)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int(* to_insert_exec_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
void linux_nat_set_prepare_to_resume(struct target_ops *t, void(*prepare_to_resume)(struct lwp_info *))
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
void store_waitstatus(struct target_waitstatus *ourstatus, int hoststatus)
int catching_syscall_number(int syscall_number)
union target_waitstatus::@161 value
ptid_t current_lwp_ptid(void)
static pid_t linux_nat_fileio_pid_of(struct inferior *inf)
static int(* linux_nat_status_is_event)(int status)
static void async_file_flush(void)
struct inferior * find_inferior_pid(int pid)
static void purge_lwp_list(int pid)
int gdb_signal_to_host(enum gdb_signal)
enum gdb_signal gdb_signal_from_host(int)
int linux_proc_pid_is_stopped(pid_t pid)
char * linux_proc_pid_to_exec_file(int pid)
static void maybe_clear_ignore_sigint(struct lwp_info *lp)
static int linux_nat_supports_stopped_by_hw_breakpoint(struct target_ops *ops)
static sigset_t suspend_mask
enum target_xfer_status target_xfer_partial_ftype(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 target_mourn_inferior(void)
static VEC(static_tracepoint_marker_p)
void thread_change_ptid(ptid_t old_ptid, ptid_t new_ptid)
static int linux_child_follow_fork(struct target_ops *ops, int follow_child, int detach_fork)
int linux_common_core_of_thread(ptid_t ptid)
int(* to_insert_fork_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
#define target_is_async_p()
static int startswith(const char *string, const char *pattern)
void linux_nat_add_target(struct target_ops *t)
struct cleanup * maybe_disable_address_space_randomization(int disable_randomization)
int agent_run_command(int pid, const char *cmd, int len)
static unsigned int debug_linux_nat
int gdbarch_addr_bit(struct gdbarch *gdbarch)
const char * gdb_signal_to_name(enum gdb_signal)
static int linux_nat_stopped_by_sw_breakpoint(struct target_ops *ops)
static enum target_xfer_status linux_nat_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 linux_stop_and_wait_all_lwps(void)
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)
static int linux_nat_stopped_data_address(struct target_ops *ops, CORE_ADDR *addr_p)
#define PTRACE_O_TRACEFORK
static int(* linux_nat_siginfo_fixup)(siginfo_t *, gdb_byte *, int)
static struct thread_info * new_thread(ptid_t ptid)
void printf_unfiltered(const char *format,...)
struct cmd_list_element * setdebuglist
static int stop_and_resume_callback(struct lwp_info *lp, void *data)
void(* to_detach)(struct target_ops *ops, const char *, int) TARGET_DEFAULT_IGNORE()
char * status_to_str(int status)
#define PTRACE_O_TRACEEXEC
void(* to_async)(struct target_ops *, int) TARGET_DEFAULT_NORETURN(tcomplain())
int software_breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
static ptid_t linux_nat_wait(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int target_options)
struct target_ops * linux_target(void)
static int linux_child_insert_fork_catchpoint(struct target_ops *self, int pid)
struct ui_file * gdb_stdlog
static int sigtrap_is_event(int status)
static void check_zombie_leaders(void)
struct inferior * vfork_child
char *(* to_pid_to_exec_file)(struct target_ops *, int pid) TARGET_DEFAULT_RETURN(NULL)
int linux_supports_tracefork(void)
int lwp_is_stopped(struct lwp_info *lwp)
char * normal_pid_to_str(ptid_t ptid)
int linux_mntns_unlink(pid_t pid, const char *filename)
CORE_ADDR stopped_data_address
static int linux_nat_ptrace_options(int attached)
LONGEST linux_common_xfer_osdata(const char *annex, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
static int linux_nat_supports_multi_process(struct target_ops *self)
static int linux_nat_stop_lwp(struct lwp_info *lwp, void *data)
int ptid_get_pid(ptid_t ptid)
#define PTRACE_GETSIGINFO
static ptid_t linux_nat_wait_1(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int target_options)
int signal_pass_state(int signo)
#define USE_SIGTRAP_SIGINFO
int(* to_fileio_open)(struct target_ops *, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
static char * linux_nat_pid_to_str(struct target_ops *ops, ptid_t ptid)
struct cleanup * make_cleanup_fclose(FILE *file)
static void siginfo_fixup(siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
static void linux_nat_kill(struct target_ops *ops)
void throw_exception(struct gdb_exception exception)
#define buffer_grow_str0(BUFFER, STRING)
const char const char int
static enum target_xfer_status linux_proc_xfer_partial(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len)
void linux_nat_set_status_is_event(struct target_ops *t, int(*status_is_event)(int status))
static int lwp_status_pending_p(struct lwp_info *lp)
int linux_proc_pid_is_gone(pid_t pid)
void(* to_mourn_inferior)(struct target_ops *) TARGET_DEFAULT_FUNC(default_mourn_inferior)
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
void buffer_init(struct buffer *buffer)
struct simple_pid_list * stopped_pids
static void show_debug_linux_nat(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int linux_nat_supports_stopped_by_sw_breakpoint(struct target_ops *ops)
static int linux_child_insert_vfork_catchpoint(struct target_ops *self, int pid)
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 int linux_nat_supports_non_stop(struct target_ops *self)
void registers_changed_ptid(ptid_t ptid)
int xsnprintf(char *str, size_t size, const char *format,...)
static int linux_nat_is_async_p(struct target_ops *ops)
int target_async_permitted
static struct lwp_info * add_initial_lwp(ptid_t ptid)
enum target_waitkind kind
static int linux_nat_thread_alive(struct target_ops *ops, ptid_t ptid)
void(* to_kill)(struct target_ops *) TARGET_DEFAULT_NORETURN(noprocess())
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
#define PTRACE_SETSIGINFO
static void linux_target_install_ops(struct target_ops *t)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
void linux_enable_event_reporting(pid_t pid, int options)
#define PTRACE_EVENT_VFORK
struct minimal_symbol * minsym
static int check_ptrace_stopped_lwp_gone(struct lwp_info *lp)
char * safe_strerror(int)
int(* to_stopped_by_sw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
void linux_disable_event_reporting(pid_t pid)
int linux_supports_tracevforkdone(void)
void registers_changed(void)
void(* to_post_attach)(struct target_ops *, int) TARGET_DEFAULT_IGNORE()
int(* to_can_async_p)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
static void linux_nat_update_thread_list(struct target_ops *ops)
static void linux_child_post_attach(struct target_ops *self, int pid)
void(* to_create_inferior)(struct target_ops *, char *, char *, char **, int)
static struct lwp_info * find_lwp_pid(ptid_t ptid)
struct thread_suspend_state suspend
LONGEST gdbarch_get_syscall_number(struct gdbarch *gdbarch, ptid_t ptid)
int parse_pid_to_attach(const char *args)
static int kill_callback(struct lwp_info *lp, void *data)
int(* to_stopped_by_watchpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
struct address_space * get_regcache_aspace(const struct regcache *regcache)
int linux_proc_pid_is_zombie(pid_t pid)
void stdin_event_handler(int error, gdb_client_data client_data)
static int linux_nat_stopped_by_watchpoint(struct target_ops *ops)
static int linux_handle_syscall_trap(struct lwp_info *lp, int stopping)
void(* to_terminal_ours)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int gdb_open_cloexec(const char *filename, int flags, unsigned long mode)
int(* to_stopped_by_hw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
enum target_stop_reason stop_reason
struct inferior * current_inferior(void)
void(* to_terminal_inferior)(struct target_ops *) TARGET_DEFAULT_IGNORE()
static void linux_nat_resume(struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signo)
static void restore_child_signals_mask(sigset_t *prev_mask)
void delete_exited_threads(void)
unsigned long long ULONGEST
static void linux_nat_terminal_ours(struct target_ops *self)
static int kill_lwp(int lwpid, int signo)
initialize_file_ftype _initialize_linux_nat
static void lwp_free(struct lwp_info *lp)
int my_waitpid(int pid, int *status, int flags)
void clear_sigint_trap(void)
#define PTRACE_O_TRACESYSGOOD
int linux_mntns_open_cloexec(pid_t pid, const char *filename, int flags, mode_t mode)
static void delete_lwp(ptid_t ptid)
int(* to_supports_non_stop)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
long ptid_get_lwp(ptid_t ptid)
const char * gdb_signal_to_string(enum gdb_signal)
void linux_nat_switch_fork(ptid_t new_ptid)
static int check_stopped_by_watchpoint(struct lwp_info *lp)
void lwp_set_arch_private_info(struct lwp_info *lwp, struct arch_lwp_info *info)
struct cmd_list_element * showdebuglist
int(* to_fileio_unlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
void linux_proc_attach_tgid_threads(pid_t pid, linux_proc_attach_lwp_func attach_lwp)
static void exit_lwp(struct lwp_info *lp)
static int wait_lwp(struct lwp_info *lp)
ssize_t linux_mntns_readlink(pid_t pid, const char *filename, char *buf, size_t bufsiz)
struct fork_info * find_fork_pid(pid_t pid)
static int check_stopped_by_breakpoint(struct lwp_info *lp)
static int linux_thread_alive(ptid_t ptid)
static int linux_child_set_syscall_catchpoint(struct target_ops *self, int pid, int needed, int any_count, int table_size, int *table)
int(* to_insert_vfork_catchpoint)(struct target_ops *, int) TARGET_DEFAULT_RETURN(1)
int to_has_thread_control
int(* to_thread_alive)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(0)
static int stop_callback(struct lwp_info *lp, void *data)
static int linux_nat_supports_disable_randomization(struct target_ops *self)
void linux_nat_set_forget_process(struct target_ops *t, linux_nat_forget_process_ftype *fn)
void(* to_attach)(struct target_ops *ops, const char *, int)
static linux_nat_new_fork_ftype * linux_nat_new_fork
int(* to_stopped_data_address)(struct target_ops *, CORE_ADDR *) TARGET_DEFAULT_RETURN(0)
static int in_pid_list_p(struct simple_pid_list *list, int pid)
static int linux_child_insert_exec_catchpoint(struct target_ops *self, int pid)
int(* to_set_syscall_catchpoint)(struct target_ops *, int, int, int, int, int *) TARGET_DEFAULT_RETURN(1)
static void select_event_lwp(ptid_t filter, struct lwp_info **orig_lp, int *status)
void(* to_update_thread_list)(struct target_ops *) TARGET_DEFAULT_IGNORE()
#define target_async(ENABLE)
struct lwp_info * iterate_over_lwps(ptid_t filter, iterate_over_lwps_ftype callback, void *data)
int stopped_data_address_p
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
#define target_thread_architecture(ptid)
char * buffer_finish(struct buffer *buffer)
#define PTRACE_O_EXITKILL
void set_executing(ptid_t ptid, int executing)
static int count_events_callback(struct lwp_info *lp, void *data)
int ptid_lwp_p(ptid_t ptid)
void error(const char *fmt,...)
void delete_file_handler(int fd)
int( iterate_over_lwps_ftype)(struct lwp_info *lwp, void *arg)
int linux_supports_tracesysgood(void)
char *(* to_fileio_readlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
static char * linux_nat_thread_name(struct target_ops *self, struct thread_info *thr)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
static int stop_wait_callback(struct lwp_info *lp, void *data)
void throw_error(enum errors error, const char *fmt,...)
void( linux_nat_forget_process_ftype)(pid_t pid)
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)
int is_executing(ptid_t ptid)
void linux_nat_forget_process(pid_t pid)
int(* to_filesystem_is_local)(struct target_ops *) TARGET_DEFAULT_RETURN(1)
target_xfer_partial_ftype memory_xfer_auxv
int(* to_supports_multi_process)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
void(* to_post_startup_inferior)(struct target_ops *, ptid_t) TARGET_DEFAULT_IGNORE()
struct target_ops * linux_trad_target(CORE_ADDR(*register_u_offset)(struct gdbarch *, int, int))
const ULONGEST const LONGEST len
static int resume_set_callback(struct lwp_info *lp, void *data)
int linux_proc_pid_is_trace_stopped_nowarn(pid_t pid)
static void linux_child_post_startup_inferior(struct target_ops *self, ptid_t ptid)
void check_for_thread_db(void)