[ltrace-commits] 01/04: Type umovebytes properly

Petr Machata pmachata-guest at moszumanska.debian.org
Fri Jan 10 19:26:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

pmachata-guest pushed a commit to branch master
in repository ltrace.

commit 79e64bcb176442b0eef89764d5ea7f07972dd240
Author: Petr Machata <pmachata at redhat.com>
Date:   Fri Jan 10 20:02:12 2014 +0100

    Type umovebytes properly
---
 backend.h                 | 3 ++-
 sysdeps/linux-gnu/trace.c | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/backend.h b/backend.h
index dc94d5f..e25daa0 100644
--- a/backend.h
+++ b/backend.h
@@ -171,7 +171,8 @@ void os_ltrace_exiting(void);
 
 /* Should copy COUNT bytes from address ADDR of process PROC to local
  * buffer BUF.  */
-size_t umovebytes(struct process *proc, void *addr, void *buf, size_t count);
+size_t umovebytes(struct process *proc, arch_addr_t addr,
+		  void *buf, size_t count);
 
 /* Find out an address of symbol SYM in process PROC, and return.
  * Returning NULL delays breakpoint insertion and enables heaps of
diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
index 0abb545..3fa2039 100644
--- a/sysdeps/linux-gnu/trace.c
+++ b/sysdeps/linux-gnu/trace.c
@@ -1,6 +1,6 @@
 /*
  * This file is part of ltrace.
- * Copyright (C) 2007,2011,2012,2013 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2007,2011,2012,2013,2014 Petr Machata, Red Hat Inc.
  * Copyright (C) 2010 Joe Damato
  * Copyright (C) 1998,2002,2003,2004,2008,2009 Juan Cespedes
  * Copyright (C) 2006 Ian Wienand
@@ -1194,7 +1194,7 @@ os_ltrace_exiting_sighandler(void)
 }
 
 size_t
-umovebytes(struct process *proc, void *addr, void *laddr, size_t len)
+umovebytes(struct process *proc, arch_addr_t addr, void *buf, size_t len)
 {
 
 	union {
@@ -1215,11 +1215,11 @@ umovebytes(struct process *proc, void *addr, void *laddr, size_t len)
 		started = 1;
 
 		if (len - offset >= sizeof(long)) {
-			memcpy(laddr + offset, &a.c[0], sizeof(long));
+			memcpy(buf + offset, &a.c[0], sizeof(long));
 			bytes_read += sizeof(long);
 		}
 		else {
-			memcpy(laddr + offset, &a.c[0], len - offset);
+			memcpy(buf + offset, &a.c[0], len - offset);
 			bytes_read += (len - offset);
 		}
 		offset += sizeof(long);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git



More information about the ltrace-commits mailing list