From ba4a8bdd81e55d45b97cdf9b91eb111a7ac0d3f9 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Sat, 14 May 2011 06:06:36 +0000 Subject: 2011-05-14 Yao Qi * gdb.trace/tfile.c(add_memory_block): Store address in unsigned type. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/tfile.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 06a493f..ba3c9f3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-14 Yao Qi + + * gdb.trace/tfile.c(add_memory_block): Store address in unsigned + type. + 2011-05-13 Doug Evans * gdb.python/py-objfile-script.exp: New file. diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c index e9c1831..11c79d9 100644 --- a/gdb/testsuite/gdb.trace/tfile.c +++ b/gdb/testsuite/gdb.trace/tfile.c @@ -49,13 +49,13 @@ void add_memory_block (char *addr, int size) { short short_x; - long long ll_x; + unsigned long long ll_x; *((char *) trptr) = 'M'; trptr += 1; - ll_x = (long) addr; - memcpy (trptr, &ll_x, sizeof (long long)); - trptr += sizeof (long long); + ll_x = (unsigned long) addr; + memcpy (trptr, &ll_x, sizeof (unsigned long long)); + trptr += sizeof (unsigned long long); short_x = size; memcpy (trptr, &short_x, 2); trptr += 2; -- cgit v1.1