Date: Thu, 25 Aug 2005 20:58:34 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 82559 for review Message-ID: <200508252058.j7PKwYru086883@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=82559 Change 82559 by cognet@cognet on 2005/08/25 20:58:32 Don't complain we can't read the process kernel stack if the stack pointer is 0. It will happen when debugging a live kernel, because then dumppcb will be all zeroed. Affected files ... .. //depot/projects/arm/gnu-arm.diff#6 edit Differences ... ==== //depot/projects/arm/gnu-arm.diff#6 (text+ko) ==== @@ -999,8 +999,8 @@ RCS file: gnu/usr.bin/gdb/kgdb/trgt_arm.c diff -N gnu/usr.bin/gdb/kgdb/trgt_arm.c --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 24 Aug 2005 11:14:23 -0000 -@@ -0,0 +1,81 @@ ++++ gnu/usr.bin/gdb/kgdb/trgt_arm.c 25 Aug 2005 20:54:50 -0000 +@@ -0,0 +1,83 @@ +/* + * Copyright (c) 2004 Marcel Moolenaar + * All rights reserved. @@ -1063,18 +1063,20 @@ + supply_register(i, (char *)&pcb.un_32.pcb32_r8 + + (i - (ARM_A1_REGNUM + 8 )) * 4); + } -+ for (i = 0; i < 4; i++) { -+ if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, -+ ®, 4) != 4) { -+ warnx("kvm_read: %s", kvm_geterr(kvm)); -+ break; ++ if (pcb.un_32.pcb32_sp != 0) { ++ for (i = 0; i < 4; i++) { ++ if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, ++ ®, 4) != 4) { ++ warnx("kvm_read: %s", kvm_geterr(kvm)); ++ break; ++ } ++ supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); + } -+ supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); ++ if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) ++ warnx("kvm_read :%s", kvm_geterr(kvm)); ++ else ++ supply_register(ARM_PC_REGNUM, (char *)®); + } -+ if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) -+ warnx("kvm_read :%s", kvm_geterr(kvm)); -+ else -+ supply_register(ARM_PC_REGNUM, (char *)®); +} + +void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508252058.j7PKwYru086883>