Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request From: steve@mullian.ee.mu.oz.au (Steve Mabbs) Newsgroups: comp.sys.sun Subject: ptrace(2) on Sun 4 Keywords: Miscellaneous Message-ID: <2150@brazos.Rice.edu> Date: 12 Oct 89 02:42:01 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 27 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 161, message 16 of 17 I'm using ptrace(2) to trace memory references on a sun4 during program execution. Ptrace allows you to read the registers into a structure, which is defined in reg.h, as follows: #include machine/reg.h struct regs registers; ptrace(GETREGS, pid, ®isters); etc..... It seems, though, (looking at reg.h) that only the global registers and the 'out' registers of the current window can be read by this ptrace call. I need to be able to look at all the registers to form the effective addresses of the memory load/stores. Is there any easy way of examining the contents of the 'ins' and 'locals' either by using ptrace(GETREGS) or ptrace(PEEKDATA)? (There is already a structure called rwindow defined in reg.h, but there is no mention of this in the ptrace manual page. Also, gdb declares a structure (local_and_ins) as rwindow in sparc-dep.c, but doesn't seem to use it anywhere) Stephen A. Mabbs Dept of Electrical and Electronic Engineering University of Melbourne PARKVILLE VIC 3052 AUSTRALIA INTERNET/ARPANET: steve@mullian.ee.mu.OZ.AU