mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 20:14:06 +08:00
* utils.c (gdb_print_host_address): Adjust implementation to
reuse host_address_to_string. Move comment explaining the conversion from host address to string from here... (host_address_to_string): ... to there.
This commit is contained in:
parent
301d2c47d9
commit
ea8992ce76
@ -1,3 +1,10 @@
|
||||
2009-01-07 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* utils.c (gdb_print_host_address): Adjust implementation to
|
||||
reuse host_address_to_string. Move comment explaining the conversion
|
||||
from host address to string from here...
|
||||
(host_address_to_string): ... to there.
|
||||
|
||||
2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
|
||||
|
||||
* MAINTAINERS: Add myself for write after approval privileges.
|
||||
|
11
gdb/utils.c
11
gdb/utils.c
@ -1261,12 +1261,7 @@ print_spaces (int n, struct ui_file *file)
|
||||
void
|
||||
gdb_print_host_address (const void *addr, struct ui_file *stream)
|
||||
{
|
||||
|
||||
/* We could use the %p conversion specifier to fprintf 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. */
|
||||
|
||||
fprintf_filtered (stream, "0x%lx", (unsigned long) addr);
|
||||
fprintf_filtered (stream, "%s", host_address_to_string (addr));
|
||||
}
|
||||
|
||||
|
||||
@ -3075,6 +3070,10 @@ const char *
|
||||
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);
|
||||
return str;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user