From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30342 invoked by alias); 9 Aug 2005 16:37:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30332 invoked by uid 22791); 9 Aug 2005 16:37:20 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 09 Aug 2005 16:37:20 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j79GbD8d019742 for ; Tue, 9 Aug 2005 12:37:18 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j79GbDV05963; Tue, 9 Aug 2005 12:37:13 -0400 Received: from [172.16.50.48] (vpn50-48.rdu.redhat.com [172.16.50.48]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j79GbDN7016779; Tue, 9 Aug 2005 12:37:13 -0400 Message-ID: <42F8DBBF.5000300@gnu.org> Date: Tue, 09 Aug 2005 17:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [ob] Some i386 gdb_byte tweaks Content-Type: multipart/mixed; boundary="------------090504020200010506010305" X-SW-Source: 2005-08/txt/msg00096.txt.bz2 This is a multi-part message in MIME format. --------------090504020200010506010305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 23 FYI, committed, Andrew --------------090504020200010506010305 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3294 2005-08-09 Andrew Cagney * linux-nat.h (linux_proc_xfer_memory): Change type of "myaddr" a "gdb_byte" pointer. * linux-nat.c (linux_proc_xfer_memory): Update. (get_signo): Cast signo to a "gdb_byte" pointer. * i386-linux-nat.c (child_resume): Make "buf" a gdb_byte, delete redundant casts. (child_resume): Cast eflags to a "gdb_byte" pointer. Index: i386-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v retrieving revision 1.64 diff -p -u -r1.64 i386-linux-nat.c --- i386-linux-nat.c 28 May 2005 16:44:28 -0000 1.64 +++ i386-linux-nat.c 9 Aug 2005 16:33:36 -0000 @@ -770,7 +770,7 @@ child_resume (ptid_t ptid, int step, enu if (step) { CORE_ADDR pc = read_pc_pid (pid_to_ptid (pid)); - unsigned char buf[LINUX_SYSCALL_LEN]; + gdb_byte buf[LINUX_SYSCALL_LEN]; request = PTRACE_SINGLESTEP; @@ -783,7 +783,7 @@ child_resume (ptid_t ptid, int step, enu that's about to be restored, and set the trace flag there. */ /* First check if PC is at a system call. */ - if (deprecated_read_memory_nobpt (pc, (char *) buf, LINUX_SYSCALL_LEN) == 0 + if (deprecated_read_memory_nobpt (pc, buf, LINUX_SYSCALL_LEN) == 0 && memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0) { int syscall = read_register_pid (LINUX_SYSCALL_REGNUM, @@ -802,9 +802,9 @@ child_resume (ptid_t ptid, int step, enu /* Set the trace flag in the context that's about to be restored. */ addr += LINUX_SIGCONTEXT_EFLAGS_OFFSET; - read_memory (addr, (char *) &eflags, 4); + read_memory (addr, (gdb_byte *) &eflags, 4); eflags |= 0x0100; - write_memory (addr, (char *) &eflags, 4); + write_memory (addr, (gdb_byte *) &eflags, 4); } } } Index: linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/linux-nat.c,v retrieving revision 1.30 diff -p -u -r1.30 linux-nat.c --- linux-nat.c 28 May 2005 16:44:29 -0000 1.30 +++ linux-nat.c 9 Aug 2005 16:33:37 -0000 @@ -2946,7 +2946,7 @@ linux_nat_info_proc_cmd (char *args, int } int -linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, int write, +linux_proc_xfer_memory (CORE_ADDR addr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target) { int fd, ret; @@ -3128,7 +3128,7 @@ get_signo (const char *name) if (ms == NULL) return 0; - if (target_read_memory (SYMBOL_VALUE_ADDRESS (ms), (char *) &signo, + if (target_read_memory (SYMBOL_VALUE_ADDRESS (ms), (gdb_byte *) &signo, sizeof (signo)) != 0) return 0; Index: linux-nat.h =================================================================== RCS file: /cvs/src/src/gdb/linux-nat.h,v retrieving revision 1.6 diff -p -u -r1.6 linux-nat.h --- linux-nat.h 29 Mar 2004 18:07:14 -0000 1.6 +++ linux-nat.h 9 Aug 2005 16:33:37 -0000 @@ -68,7 +68,7 @@ struct lwp_info struct mem_attrib; struct target_ops; -extern int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, +extern int linux_proc_xfer_memory (CORE_ADDR addr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target); --------------090504020200010506010305--