diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-22 01:20:51 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-22 01:20:51 +0000 |
commit | 70ad029eac1ceb8d16242199f124cb7bdc7e8221 (patch) | |
tree | b50502c708f4b8d115d5dd4a935bc26de800806c /usr.bin/pmdb/arch/i386 | |
parent | 291224293de9c77cfbdd8071972cbf028c60880b (diff) |
Support for reading from core files.
From Jean-Francois Brousseau <krapht@secureops.com>
Diffstat (limited to 'usr.bin/pmdb/arch/i386')
-rw-r--r-- | usr.bin/pmdb/arch/i386/i386.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/pmdb/arch/i386/i386.c b/usr.bin/pmdb/arch/i386/i386.c index 7b565481487..bb8056c0651 100644 --- a/usr.bin/pmdb/arch/i386/i386.c +++ b/usr.bin/pmdb/arch/i386/i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i386.c,v 1.3 2002/03/19 21:32:10 fgsch Exp $ */ +/* $OpenBSD: i386.c,v 1.4 2002/07/22 01:20:50 art Exp $ */ /* * Copyright (c) 2002 Federico Schwindt <fgsch@openbsd.org> * All rights reserved. @@ -58,13 +58,13 @@ md_getframe(struct pstate *ps, int frame, struct md_frame *fram) struct reg r; int count; - if (ptrace(PT_GETREGS, ps->ps_pid, (caddr_t)&r, 0) != 0) + if (process_getregs(ps, &r) != 0) return (-1); fr.fp = r.r_ebp; fr.pc = r.r_eip; for (count = 0; count < frame; count++) { - if (read_from_pid(ps->ps_pid, fr.fp, &fr, sizeof(fr)) < 0) + if (process_read(ps, fr.fp, &fr, sizeof(fr)) < 0) return (-1); if (fr.pc < 0x1000) @@ -82,7 +82,7 @@ md_getregs(struct pstate *ps, reg *regs) { struct reg r; - if (ptrace(PT_GETREGS, ps->ps_pid, (caddr_t)&r, 0) != 0) + if (process_getregs(ps, &r) != 0) return (-1); memcpy(regs, &r, sizeof(r)); |