From owner-p4-projects@FreeBSD.ORG Thu Jul 5 13:21:04 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A67BE16A481; Thu, 5 Jul 2007 13:21:04 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83EF116A47E for ; Thu, 5 Jul 2007 13:21:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5215B13C4C7 for ; Thu, 5 Jul 2007 13:21:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l65DL262072718 for ; Thu, 5 Jul 2007 13:21:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l65DL2pU072714 for perforce@freebsd.org; Thu, 5 Jul 2007 13:21:02 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 5 Jul 2007 13:21:02 GMT Message-Id: <200707051321.l65DL2pU072714@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 122949 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2007 13:21:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=122949 Change 122949 by gonzo@gonzo_jeeves on 2007/07/05 13:20:28 o Enable kdbpeek_X routines family for db_read_bytes. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/db_interface.c#5 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/db_interface.c#5 (text+ko) ==== @@ -61,19 +61,12 @@ static void kdbpoke_4(db_addr_t addr, int newval); static void kdbpoke_2(db_addr_t addr, short newval); static void kdbpoke_1(db_addr_t addr, char newval); -/* - * XXXMIPS: - */ -#if 0 static short kdbpeek_2(db_addr_t addr); static char kdbpeek_1(db_addr_t addr); +#if 0 static db_addr_t MachEmulateBranch(struct frame *, db_addr_t, unsigned long, int); #endif -/* - * XXXMIPS: - */ -#if 0 int kdbpeek(db_addr_t addr) { @@ -96,7 +89,6 @@ return *(char *)addr; } -#endif /* * kdbpoke -- write a value to a kernel virtual address. @@ -286,18 +278,16 @@ int db_read_bytes(vm_offset_t addr, size_t size, char *data) { - -/* - * XXXMIPS: warning: use of cast expressions as lvalues is deprecated - */ -#if 0 + int *int_ptr = (int *)data; + short *short_ptr = (short *)data; + char *char_ptr = data; while (size >= 4) - *((int*)data)++ = kdbpeek(addr), addr += 4, size -= 4; + *(int_ptr)++ = kdbpeek(addr), addr += 4, size -= 4; while (size >= 2) - *((short*)data)++ = kdbpeek_2(addr), addr += 2, size -= 2; + *(short_ptr)++ = kdbpeek_2(addr), addr += 2, size -= 2; if (size == 1) - *((char*)data)++ = kdbpeek_1(addr); -#endif + *(char_ptr)++ = kdbpeek_1(addr); + return (0); }