From: Peter Schauer Date: Sat, 26 Oct 1996 14:22:35 +0000 (+0000) Subject: * procfs.c (proc_set_exec_trap): Under Alpha OSF/1-4.0, tracing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cb1b16cfbe804c50c10954649ca7c45e68baff3;p=binutils-gdb.git * procfs.c (proc_set_exec_trap): Under Alpha OSF/1-4.0, tracing the entry to the exit system call to detect termination of the inferior stopped working. Trace termination of the inferior via PRFS_STOPTERM instead. (procfs_init_inferior): Do not trace entry to exit system call if PIOCSSPCACT is defined. (procfs_wait): Handle PR_DEAD event, which signals the termination of the inferior if PRFS_STOPTERM is set. * mdebugread.c (parse_partial_symbols): Ignore stNil section start address symbols. * sparc-tdep.c (get_saved_register): Get saved PC from the frame info if not in innermost frame. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07974d7d239..9b12e85e8ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,31 @@ +Sat Oct 26 07:15:14 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * config/alpha/alpha-osf3.mh (XM_CLIBS): Add -lm for OSF/1-4.0. + + * procfs.c (proc_set_exec_trap): Under Alpha OSF/1-4.0, tracing + the entry to the exit system call to detect termination of the + inferior stopped working. Trace termination of the inferior via + PRFS_STOPTERM instead. + (procfs_init_inferior): Do not trace entry to exit system call + if PIOCSSPCACT is defined. + (procfs_wait): Handle PR_DEAD event, which signals the termination + of the inferior if PRFS_STOPTERM is set. + + * mdebugread.c (parse_partial_symbols): Ignore stNil section + start address symbols. + + * sparc-tdep.c (get_saved_register): Get saved PC from the + frame info if not in innermost frame. + +Thu Oct 24 10:51:45 1996 Mark Alexander + + * dbxread.c (process_one_symbol): Interpret end-of-function + markers correctly; this fixes problem on Vr5000 where all + functions in a module had the same address. + * configure.in, configure.tgt, configure.host, gdbserver/configure.in: + Correct for pc-linux-gnu problem in config.guess. + * configure: Regenerate. + Thu Oct 24 10:06:58 1996 Stu Grossman (grossman@critters.cygnus.com) * dbxread.c: Don't swap symbols in place, since internal and diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 3f67503e151..c86fb6db06c 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -2448,9 +2448,12 @@ parse_partial_symbols (objfile, section_offsets) } break; case stLocal: + case stNil: /* The alpha has the section start addresses in stLocal symbols whose name starts with a `.'. Skip those but complain for all - other stLocal symbols. */ + other stLocal symbols. + Irix6 puts the section start addresses in stNil symbols, skip + those too. */ if (name[0] == '.') continue; /* Fall through. */ diff --git a/gdb/procfs.c b/gdb/procfs.c index 8a2eda47fbe..f5e93fc5f9d 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1818,10 +1818,10 @@ procfs_init_inferior (pid) pip = create_procinfo (pid); +#ifndef PIOCSSPCACT procfs_set_syscall_trap (pip, SYS_exit, PROCFS_SYSCALL_ENTRY, procfs_exit_handler); -#ifndef PRFS_STOPEXEC #ifdef SYS_exec procfs_set_syscall_trap (pip, SYS_exec, PROCFS_SYSCALL_EXIT, procfs_exec_handler); @@ -1834,7 +1834,7 @@ procfs_init_inferior (pid) procfs_set_syscall_trap (pip, SYS_execve, PROCFS_SYSCALL_EXIT, procfs_exec_handler); #endif -#endif /* PRFS_STOPEXEC */ +#endif /* PIOCSSPCACT */ /* Setup traps on exit from sproc() */ @@ -1982,7 +1982,10 @@ proc_set_exec_trap () #ifdef PIOCSSPCACT /* Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace - exits from exec system calls because of the user level loader. */ + exits from exec system calls because of the user level loader. + Starting with OSF/1-4.0, tracing the entry to the exit system + call no longer works. So we have to use PRFS_STOPTERM to trace + termination of the inferior. */ { int prfs_flags; @@ -1992,7 +1995,7 @@ proc_set_exec_trap () gdb_flush (gdb_stderr); _exit (127); } - prfs_flags |= PRFS_STOPEXEC; + prfs_flags |= PRFS_STOPEXEC | PRFS_STOPTERM; if (ioctl (fd, PIOCSSPCACT, &prfs_flags) < 0) { perror (procname); @@ -2000,7 +2003,7 @@ proc_set_exec_trap () _exit (127); } } -#else +#else /* PIOCSSPCACT */ /* GW: Rationale... Not all systems with /proc have all the exec* syscalls with the same names. On the SGI, for example, there is no SYS_exec, but there @@ -2022,7 +2025,6 @@ proc_set_exec_trap () gdb_flush (gdb_stderr); _exit (127); } -#endif praddset (&entryset, SYS_exit); @@ -2032,6 +2034,7 @@ proc_set_exec_trap () gdb_flush (gdb_stderr); _exit (126); } +#endif /* PIOCSSPCACT */ /* Turn off inherit-on-fork flag so that all grand-children of gdb start with tracing flags cleared. */ @@ -2644,6 +2647,27 @@ procfs_wait (pid, ourstatus) error ("PR_SYSEXIT, unhandled system call %d", what); } break; +#ifdef PR_DEAD + case (short)PR_DEAD: + { + int dummy; + + /* The inferior process is about to terminate. + pr_what has the process's exit or return value. + A PIOCRUN ioctl must be used to restart the process so it + can finish exiting. */ + + pi->prrun.pr_flags = PRCFAULT; + + if (ioctl (pi->fd, PIOCRUN, &pi->prrun) != 0) + perror_with_name (pi->pathname); + + if (wait (&dummy) < 0) + rtnval = -1; + statval = pi->prstatus.pr_what; + } + break; +#endif case PR_REQUESTED: statval = (SIGSTOP << 8) | 0177; break;