From owner-cvs-src@FreeBSD.ORG Wed Dec 1 06:40:35 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7F1916A4CE; Wed, 1 Dec 2004 06:40:35 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93FBB43D49; Wed, 1 Dec 2004 06:40:35 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iB16eZeK059385; Wed, 1 Dec 2004 06:40:35 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iB16eZsA059383; Wed, 1 Dec 2004 06:40:35 GMT (envelope-from marcel) Message-Id: <200412010640.iB16eZsA059383@repoman.freebsd.org> From: Marcel Moolenaar Date: Wed, 1 Dec 2004 06:40:35 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/alpha/alpha gdb_machdep.c src/sys/alpha/include gdb_machdep.h src/sys/amd64/amd64 gdb_machdep.c src/sys/amd64/include gdb_machdep.h src/sys/gdb gdb_main.c... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2004 06:40:35 -0000 marcel 2004-12-01 06:40:35 UTC FreeBSD src repository Modified files: sys/alpha/alpha gdb_machdep.c sys/alpha/include gdb_machdep.h sys/amd64/amd64 gdb_machdep.c sys/amd64/include gdb_machdep.h sys/gdb gdb_main.c sys/i386/i386 gdb_machdep.c sys/i386/include gdb_machdep.h sys/ia64/ia64 gdb_machdep.c sys/ia64/include gdb_machdep.h sys/sparc64/include gdb_machdep.h sys/sparc64/sparc64 gdb_machdep.c Log: Change gdb_cpu_setreg() to not take the value to which to set the specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64 Revision Changes Path 1.2 +1 -1 src/sys/alpha/alpha/gdb_machdep.c 1.2 +1 -1 src/sys/alpha/include/gdb_machdep.h 1.3 +3 -4 src/sys/amd64/amd64/gdb_machdep.c 1.2 +1 -1 src/sys/amd64/include/gdb_machdep.h 1.3 +24 -10 src/sys/gdb/gdb_main.c 1.3 +3 -4 src/sys/i386/i386/gdb_machdep.c 1.2 +1 -1 src/sys/i386/include/gdb_machdep.h 1.3 +1 -1 src/sys/ia64/ia64/gdb_machdep.c 1.3 +1 -1 src/sys/ia64/include/gdb_machdep.h 1.2 +1 -1 src/sys/sparc64/include/gdb_machdep.h 1.2 +1 -1 src/sys/sparc64/sparc64/gdb_machdep.c