diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-08 17:39:18 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-08 17:39:18 +0000 |
commit | 6a70753cea0174e99894351a1333aa15432da2d8 (patch) | |
tree | 35f7deea658af9928e58ab3f4c08644eee09ddfd | |
parent | ba803f158faf28e05a52dd2cf968f6925e85586e (diff) |
Make a good attempt to find the registers for the first frame.
-rw-r--r-- | usr.bin/pmdb/arch/sparc/sparc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/pmdb/arch/sparc/sparc.c b/usr.bin/pmdb/arch/sparc/sparc.c index dbbb2e72df4..a9b957d341d 100644 --- a/usr.bin/pmdb/arch/sparc/sparc.c +++ b/usr.bin/pmdb/arch/sparc/sparc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sparc.c,v 1.5 2002/07/22 02:54:23 art Exp $ */ +/* $OpenBSD: sparc.c,v 1.6 2002/08/08 17:39:17 art Exp $ */ /* * Copyright (c) 2002 Federico Schwindt <fgsch@openbsd.org> * All rights reserved. @@ -58,14 +58,15 @@ md_getframe(struct pstate *ps, int frame, struct md_frame *fram) return (-1); if (frame == 0) { - fram->pc = r.r_pc; - fram->fp = r.r_out[6]; - return (0); + pc = r.r_pc; + fp = r.r_out[6]; + if (process_read(ps, fp, &fr, sizeof(fr)) < 0) + return (-1); + } else { + fp = r.r_out[6]; + pc = r.r_out[7]; } - fp = r.r_out[6]; - pc = r.r_out[7]; - for (i = 1; i < frame; i++) { if (fp < 8192 || (fp & 7) != 0) return (-1); |