Debugging a hung SunOs5.3 system

Debugging a hung SunOs5.3 system

Post by Bob Barned x71 » Sat, 17 Sep 1994 04:34:11



Is there a way to find out where a SunOs5.3 kernel (on SPARC)
is when it hangs?  L1 A does not seem to work with this sort of hang.

If I hooked an RS232 device to the PROM monitor could I get
control after the hang?

Thank you for your help.

                                      Bob Barned

 
 
 

1. x86 debug registers under <= SunOS5.5

Hi,

It seems that the old ioctl-based procfs does
not support the setting of watchpoints in SunOS 5.5.

The earliest SunOS that does seems to be 5.7,
where the interface for the old ioctl based procfs is moved
to old_procfs.h, and the new procfs.h has watchpoint support.
old_procfs.h does not.  This watchpoint support comes in the
form of the PCWATCH request.

I tried the PIOCGXREG* request, which is also not
implemented under 5.5

The ptrace compatability option relies on a struct user that
does not even mention the fpregs let alone the debug registers.
(like in Linux).  ptrace.h lists some new PTRACE_* options, but
0-9 are historically the only reliable choices here.  These new
options are namely:

#if defined(i386) || defined(__i386)
#define PTRACE_SETWRBKPT        26      /* 26, set write breakpoint */
#define PTRACE_SETACBKPT        27      /* 27, set access breakpoint */
#define PTRACE_CLRDR7           28      /* 28, clear debug register 7 */
#else   /* defined(i386) || defined(__i386) */

This is the sort of stuff I need to do, but since the debug
registers are accessible only to the kernel, I have to rely
on procfs/ptrace.  I cannot rely on a .h file that has commented
at its beginning:

/*
 * XXX - SunOS 5.0 development version: 0-9 correspond to AT&T/SVID
defined
 * requests. The remainder are extensions as defined for SunOS 4.1.
Currently
 * only GETREGS, SETREGS, GETFPREGS, and SETFPREGS are implemented
 */

I need a solution that is reliable, accross SunOS versions.

Any suggestions?

Thanks for your time,

Peter Huerter.

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Reading is much more interesting than TV (0103/1708)

3. System hang debugging

4. [Corretion: .nslookuprc - a resource for nslookup(1M)]

5. Need help with system hang (RH5.0/2.0.32) & tips about kernel debugging

6. Linux BBS with Fidonet support

7. Sunos5.2: Questions about the lp-system.

8. New Java / Javascript Resource for Solaris

9. How to extend file system on Unix (SunOS5.7)

10. System hangs with unrecoverable SCSI bus or device hang.

11. HELP!: Solaris 2.4 hang with asppp debug level set to 9

12. debugging a hang ssh session

13. kernel debugging a hung process