Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2005 12:47:11 GMT
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 82496 for review
Message-ID:  <200508241247.j7OClB1F042654@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=82496

Change 82496 by cognet@cognet on 2005/08/24 12:46:18

	kgdb bits for arm.

Affected files ...

.. //depot/projects/arm/gnu-arm.diff#5 edit

Differences ...

==== //depot/projects/arm/gnu-arm.diff#5 (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	13 Jul 2005 22:44:44 -0000
-@@ -0,0 +1,67 @@
++++ gnu/usr.bin/gdb/kgdb/trgt_arm.c	24 Aug 2005 11:14:23 -0000
+@@ -0,0 +1,81 @@
 +/*
 + * Copyright (c) 2004 Marcel Moolenaar
 + * All rights reserved.
@@ -1050,7 +1050,7 @@
 +{
 +	struct kthr *kt;
 +	struct pcb pcb;
-+	int i;
++	int i, reg;
 +	
 +	kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid));
 +	if (kt == NULL)
@@ -1059,8 +1059,22 @@
 +		warnx("kvm_read: %s", kvm_geterr(kvm));
 +		memset(&pcb, 0, sizeof(pcb));
 +	}
-+	for (i = ARM_A1_REGNUM + 9; i <= ARM_PC_REGNUM; i++)
-+		supply_register(i, (char *)&pcb + i * 4);
++	for (i = ARM_A1_REGNUM + 8; i <= ARM_SP_REGNUM; i++) {
++		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,
++		    &reg, 4) != 4) {
++			warnx("kvm_read: %s", kvm_geterr(kvm));
++			break;
++		}
++		supply_register(ARM_A1_REGNUM + 4 + i, (char *)&reg);
++	}
++	if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, &reg, 4) != 4)
++		warnx("kvm_read :%s", kvm_geterr(kvm));
++	else
++		supply_register(ARM_PC_REGNUM, (char *)&reg);
 +}
 +
 +void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508241247.j7OClB1F042654>