aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-08-02 06:25:36 +0000
committerStu Grossman <grossman@cygnus>1993-08-02 06:25:36 +0000
commit25286543da71d927d59a7479e7e1bd0a1b9e1321 (patch)
tree1894f048a9b518449080492cc866479a027dffae /gdb/procfs.c
parent3481ad9a11c96e070c8c29ae19bb2269a7fb7584 (diff)
downloadgdb-25286543da71d927d59a7479e7e1bd0a1b9e1321.zip
gdb-25286543da71d927d59a7479e7e1bd0a1b9e1321.tar.gz
gdb-25286543da71d927d59a7479e7e1bd0a1b9e1321.tar.bz2
Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com)
* Makefile.in (CLIBS): Reorder to make Lynx ld happy. * (HFILES): New file thread.h. * (OBS): New file thread.c. * configure.in: Host config for Lynx/386. * fork-child.c (fork_inferior): Call init_thread_list(). * infrun.c (resume): Add pid to invocation of target_resume(). * (wait_for_inferior): Pay attention to pid from target_wait(). Multi-threading code now uses this to determine what to do. * inftarg.c (child_wait): Conditionalize based on CHILD_WAIT macro. Use target_pid_to_str() macro throughout when printing pid. * inferior.h (child_resume): Add pid to prototype. * hppab-nat.c hppah-nat.c infptrace.c (child_resume): Pass in pid as argument, instead of using inferior_pid. * procfs.c (procfs_resume): Pass in pid as argument. Ignored for now. Use target_pid_to_str() macro throughout for printing process id. * remote-adapt.c (adapt_resume): Pass in pid as argument. * remote-eb.c (eb_resume): Pass in pid as argument. * remote-es.c (es1800_resume): Pass in pid as argument. * remote-hms.c (hms_resume): Pass in pid as argument. * remote-mips.c (mips_resume): Pass in pid as argument. * remote-mm.c (mm_resume): Pass in pid as argument. * remote-monitor.c (monitor_resume): Pass in pid as argument. * remote-nindy.c (nindy_resume): Pass in pid as argument. * remote-sa.sparc.c (remote_resume): Pass in pid as argument. * remote-sim.c (rem_resume): Pass in pid as argument. * remote-sp64sim.c (simif_resume): Pass in pid as argument. * remote-st.c (st2000_resume): Pass in pid as argument. * remote-udi.c (udi_resume): Pass in pid as argument. * remote-vx.c (vx_resume): Pass in pid as argument. * remote-z8k.c (rem_resume): Pass in pid as argument. * remote.c (remote_resume): Pass in pid as argument. * solib.c (solid_create_inferior_hook): Pass inferior_pid to target_resume(). * target.c (normal_pid_to_str): New routine to print out process ID normally. * target.h (struct target_ops): Add pid to prototype at to_resume(). (target_resume): Add pid argument. * (target_pid_to_str): Default definition for normal type pids. * thread.c, thread.c: New modules for multi thread/process control.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 72a9c69..4c8ab5c 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -1599,9 +1599,9 @@ procfs_attach (args, from_tty)
exec_file = (char *) get_exec_file (0);
if (exec_file)
- printf ("Attaching program `%s', pid %d\n", exec_file, pid);
+ printf ("Attaching to program `%s', %s\n", exec_file, target_pid_to_str (pid));
else
- printf ("Attaching pid %d\n", pid);
+ printf ("Attaching to %s\n", target_pid_to_str (pid));
fflush (stdout);
}
@@ -1632,8 +1632,8 @@ procfs_detach (args, from_tty)
char *exec_file = get_exec_file (0);
if (exec_file == 0)
exec_file = "";
- printf ("Detaching program: %s pid %d\n",
- exec_file, inferior_pid);
+ printf ("Detaching from program: %s %s\n",
+ exec_file, target_pid_to_str (inferior_pid));
fflush (stdout);
}
if (args)
@@ -1664,8 +1664,8 @@ static void
procfs_files_info (ignore)
struct target_ops *ignore;
{
- printf ("\tUsing the running image of %s process %d via /proc.\n",
- attach_flag? "attached": "child", inferior_pid);
+ printf ("\tUsing the running image of %s %s via /proc.\n",
+ attach_flag? "attached": "child", target_pid_to_str (inferior_pid));
}
/* ARGSUSED */
@@ -1761,7 +1761,7 @@ do_attach (pid)
}
else
{
- printf ("Ok, gdb will wait for process %u to stop.\n", pid);
+ printf ("Ok, gdb will wait for %s to stop.\n", target_pid_to_str (pid));
}
}
@@ -2150,12 +2150,13 @@ set_proc_siginfo (pip, signo)
}
}
-/* Resume execution of the inferior process. If STEP is nozero, then
+/* Resume execution of process PID. If STEP is nozero, then
just single step it. If SIGNAL is nonzero, restart it with that
signal activated. */
static void
-procfs_resume (step, signo)
+procfs_resume (pid, step, signo)
+ int pid;
int step;
int signo;
{
@@ -2552,7 +2553,8 @@ info_proc_siginfo (pip, summary)
}
if (sip -> si_code <= 0)
{
- printf_filtered ("sent by pid %d, uid %d ", sip -> si_pid,
+ printf_filtered ("sent by %s, uid %d ",
+ target_pid_to_str (sip -> si_pid),
sip -> si_uid);
}
else
@@ -2567,8 +2569,8 @@ info_proc_siginfo (pip, summary)
}
else if ((sip -> si_signo == SIGCHLD))
{
- printf_filtered ("child pid %u, status %u ",
- sip -> si_pid,
+ printf_filtered ("child %s, status %u ",
+ target_pid_to_str (sip -> si_pid),
sip -> si_status);
}
else if ((sip -> si_signo == SIGPOLL))
@@ -2590,7 +2592,7 @@ info_proc_siginfo (pip, summary)
}
if (sip -> si_code <= 0)
{
- printf_filtered ("\t%-16u %s\n", sip -> si_pid,
+ printf_filtered ("\t%-16u %s\n", sip -> si_pid, /* XXX need target_pid_to_str() */
"PID of process sending signal");
printf_filtered ("\t%-16u %s\n", sip -> si_uid,
"UID of process sending signal");
@@ -2613,7 +2615,7 @@ info_proc_siginfo (pip, summary)
}
else if ((sip -> si_signo == SIGCHLD))
{
- printf_filtered ("\t%-16u %s.\n", sip -> si_pid,
+ printf_filtered ("\t%-16u %s.\n", sip -> si_pid, /* XXX need target_pid_to_str() */
"Child process ID");
printf_filtered ("\t%-16u %s.\n", sip -> si_status,
"Child process exit value or signal");