[OB] Rename some more variables called 'tmp' from i386_process_record
Mark Kettenis
mark.kettenis@xs4all.nl
Mon Mar 8 09:21:00 GMT 2010
> Date: Sun, 07 Mar 2010 16:54:45 -0800
> From: Michael Snyder <msnyder@vmware.com>
>
> Rename tmpu16, tmpu32 and tmpu64.
Whoa there! Looking at how these variables are used, I just noticed
that this code is broken:
> + uint32_t addr32;
> +
> + if (target_read_memory (ir.addr, (gdb_byte *) &addr32, 4))
You're reading from target memory (which is little endian) into a
32-bit variable in host memory (which is big endian). That's wrong!
And the process record stuff is full of it.
Please fix this by reading into a gdb_byte buffer and using
extract_{signed|unsigned}_integer(), or use
read_memeory_{unsigned_}integer().
More information about the Gdb-patches
mailing list