2011-05-14 Yao Qi <yao@codesourcery.com>

* gdb.trace/tfile.c(add_memory_block): Store address in unsigned
	type.
This commit is contained in:
Yao Qi 2011-05-14 06:06:36 +00:00
parent 9f7bc58762
commit ba4a8bdd81
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2011-05-14 Yao Qi <yao@codesourcery.com>
* gdb.trace/tfile.c(add_memory_block): Store address in unsigned
type.
2011-05-13 Doug Evans <dje@google.com>
* gdb.python/py-objfile-script.exp: New file.

View File

@ -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;