{
sysset_t *ret;
int size = sysset_t_size (pi);
+
ret = xmalloc (size);
#ifdef DYNAMIC_SYSCALLS
ret->pr_size = ((pi->num_syscalls + (8 * sizeof (uint64_t) - 1))
find_syscall (procinfo *pi, char *name)
{
int i;
+
for (i = 0; i < pi->num_syscalls; i++)
{
if (pi->syscall_names[i] && strcmp (name, pi->syscall_names[i]) == 0)
{
#ifdef NEW_PROC_API
procfs_ctl_t cmd = PCSTOP;
+
win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
#else /* ioctl method */
win = (ioctl (pi->ctl_fd, PIOCSTOP, &pi->prstatus) >= 0);
#ifdef NEW_PROC_API
{
procfs_ctl_t cmd = PCWSTOP;
+
win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd));
/* We been runnin' and we stopped -- need to update status. */
pi->status_valid = 0;
#ifdef NEW_PROC_API
{
procfs_ctl_t cmd = PCCFAULT;
+
win = (write (pi->ctl_fd, (void *) &cmd, sizeof (cmd)) == sizeof (cmd));
}
#else
#ifdef DYNAMIC_SYSCALLS
{
int callnum = find_syscall (pi, "_exit");
+
if (callnum >= 0)
gdb_praddsysset (traced_syscall_entries, callnum);
}
#ifdef DYNAMIC_SYSCALLS
{
int callnum = find_syscall (pi, "execve");
+
if (callnum >= 0)
gdb_praddsysset (traced_syscall_exits, callnum);
callnum = find_syscall (pi, "ra_execve");
static int
syscall_is_lwp_exit (procinfo *pi, int scall)
{
-
#ifdef SYS_lwp_exit
if (scall == SYS_lwp_exit)
return 1;
procfs_files_info (struct target_ops *ignore)
{
struct inferior *inf = current_inferior ();
+
printf_filtered (_("\tUsing the running image of %s %s via /proc.\n"),
inf->attach_flag? "attached": "child",
target_pid_to_str (inferior_ptid));
will be generated when the host and target pointer sizes are
different. */
struct type *ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
+
if (sizeof (void *) != TYPE_LENGTH (ptr_type))
return 0;
if (pi != NULL)
{
ptid_t ptid = MERGEPID (pi->pid, thread->tid);
+
args->note_data = procfs_do_thread_registers (args->obfd, ptid,
args->note_data,
args->note_size,