mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 13:57:12 +08:00
* utils.c (host_address_to_string): Reimplement in a way that
avoids the cast of the address to long.
This commit is contained in:
@ -3071,10 +3071,7 @@ host_address_to_string (const void *addr)
|
||||
{
|
||||
char *str = get_cell ();
|
||||
|
||||
/* We could use the %p conversion specifier to sprintf if we had any
|
||||
way of knowing whether this host supports it. But the following
|
||||
should work on the Alpha and on 32 bit machines. */
|
||||
sprintf (str, "0x%lx", (unsigned long) addr);
|
||||
xsnprintf (str, CELLSIZE, "0x%s", phex_nz ((uintptr_t) addr, sizeof (addr)));
|
||||
return str;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user