diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-04-11 05:43:33 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-04-11 05:43:33 +0000 |
commit | f0fce3b80b0f045dc926074f3378c7418e64757e (patch) | |
tree | 7991b9a36a8f9945f2c41d5f2a53e28a1b6a7051 /gdb/procfs.c | |
parent | baee3bc6e9db248118a7bb1bf571d8bd002ae6a5 (diff) | |
download | gdb-f0fce3b80b0f045dc926074f3378c7418e64757e.zip gdb-f0fce3b80b0f045dc926074f3378c7418e64757e.tar.gz gdb-f0fce3b80b0f045dc926074f3378c7418e64757e.tar.bz2 |
Fri Apr 10 22:36:28 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Update support for x86 Solaris 2.
* config/i386/tm-i386sol2.h, nm-i386sol2.h: New configuration
files for x86 Solaris 2.
* config/i386/i386sol2.mt, i386sol2.mh: Use them.
* config/sparc/tm-sun4sol2.h (PROCFS_GET_CARRY): New macro, extract
carry flag from a given regset.
(IS_STATIC_TRANSFORM_NAME): New macro, check if a symbol name
is a SunPro transformed name.
* i386-tdep.c (sunpro_static_transform_name): New function to
extract the source name from a SunPro transformed name.
* inferior.h (procfs_first_available, procfs_get_pid_fd):
Add prototypes.
* infrun.c (wait_for_inferior): Handle breakpoint hit in
signal handler without intervening stop in sigtramp.
* procfs.c (procfs_lwp_creation_handler): Use PROCFS_GET_CARRY
instead of direct access to the status register.
(procfs_get_pid_fd): New function, returns procfs fd for a given pid.
* sol-thread.c (ps_lgetLDT): New function, returns LDT for a given
lwpid.
(sol_find_new_threads): Handle failed libthread_db initialization
gracefully.
* stabsread.c (define_symbol): Use IS_STATIC_TRANSFORM_NAME
to check for a SunPro transformed symbol name.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index e8215a5..01fa4fd 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1,5 +1,5 @@ /* Machine independent support for SVR4 /proc (process file system) for GDB. - Copyright 1991, 1992-96, 1997 Free Software Foundation, Inc. + Copyright 1991, 1992-97, 1998 Free Software Foundation, Inc. Written by Fred Fish at Cygnus Support. Changes for sysv4.2mp procfs compatibility by Geoffrey Noer at Cygnus Solutions. @@ -5218,7 +5218,7 @@ procfs_lwp_creation_handler (pi, syscall_num, why, rtnvalp, statvalp) /* If lwp_create failed, then nothing interesting happened. Continue the process and go back to sleep. */ - if (pi->prstatus.pr_reg[R_PSR] & PS_FLAG_CARRY) + if (PROCFS_GET_CARRY (pi->prstatus.pr_reg)) { /* _lwp_create failed */ pi->prrun.pr_flags &= PRSTEP; pi->prrun.pr_flags |= PRCFAULT; @@ -5504,6 +5504,18 @@ procfs_first_available () return -1; } +int +procfs_get_pid_fd (pid) + int pid; +{ + struct procinfo *pi = find_procinfo (pid, 1); + + if (pi == NULL) + return -1; + + return pi->ctl_fd; +} + /* Send a SIGINT to the process group. This acts just like the user typed a ^C on the controlling terminal. |