mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 06:15:09 +08:00
ARI fix: Do not use %p, replace by call to host_address_to_string
for host pointers. * darwin-nat.c (darwin_xfer_partial): Apply change. * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto. * gnu-nat.h (proc_debug): Ditto. * symmisc.c (maintenance_info_symtabs): Ditto. (maintenance_info_psymtabs): Ditto. * windows-nat.c (handle_load_dll): Ditto. (handle_unload_dll, info_w32_command, handle_exception): Ditto. * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
This commit is contained in:
@ -1,3 +1,16 @@
|
|||||||
|
2009-04-17 Pierre Muller <muller.u-strasbg.fr>
|
||||||
|
|
||||||
|
ARI fix: Do not use %p, replace by call to host_address_to_string
|
||||||
|
for host pointers.
|
||||||
|
* darwin-nat.c (darwin_xfer_partial): Apply change.
|
||||||
|
* gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
|
||||||
|
* gnu-nat.h (proc_debug): Ditto.
|
||||||
|
* symmisc.c (maintenance_info_symtabs): Ditto.
|
||||||
|
(maintenance_info_psymtabs): Ditto.
|
||||||
|
* windows-nat.c (handle_load_dll): Ditto.
|
||||||
|
(handle_unload_dll, info_w32_command, handle_exception): Ditto.
|
||||||
|
* xtensa-tdep.c (xtensa_unwind_pc): Ditto.
|
||||||
|
|
||||||
2009-04-17 Joseph Myers <joseph@codesourcery.com>
|
2009-04-17 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
|
* configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
|
||||||
|
@ -1197,8 +1197,10 @@ darwin_xfer_partial (struct target_ops *ops,
|
|||||||
gdb_byte *readbuf, const gdb_byte *writebuf,
|
gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
ULONGEST offset, LONGEST len)
|
ULONGEST offset, LONGEST len)
|
||||||
{
|
{
|
||||||
inferior_debug (8, _("darwin_xfer_partial(%s, %d, rbuf=%p, wbuf=%p)\n"),
|
inferior_debug (8, _("darwin_xfer_partial(%s, %d, rbuf=%s, wbuf=%s)\n"),
|
||||||
core_addr_to_string (offset), (int)len, readbuf, writebuf);
|
core_addr_to_string (offset), (int)len,
|
||||||
|
host_address_to_string (readbuf),
|
||||||
|
host_address_to_string (writebuf));
|
||||||
|
|
||||||
if (object != TARGET_OBJECT_MEMORY)
|
if (object != TARGET_OBJECT_MEMORY)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -113,7 +113,8 @@ void inf_continue (struct inf *inf);
|
|||||||
|
|
||||||
#define inf_debug(_inf, msg, args...) \
|
#define inf_debug(_inf, msg, args...) \
|
||||||
do { struct inf *__inf = (_inf); \
|
do { struct inf *__inf = (_inf); \
|
||||||
debug ("{inf %d %p}: " msg, __inf->pid, __inf , ##args); } while (0)
|
debug ("{inf %d %s}: " msg, __inf->pid, \
|
||||||
|
host_address_to_string (__inf) , ##args); } while (0)
|
||||||
|
|
||||||
void proc_abort (struct proc *proc, int force);
|
void proc_abort (struct proc *proc, int force);
|
||||||
struct proc *make_proc (struct inf *inf, mach_port_t port, int tid);
|
struct proc *make_proc (struct inf *inf, mach_port_t port, int tid);
|
||||||
@ -2490,9 +2491,9 @@ gnu_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
|
|||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inf_debug (gnu_current_inf, "%s %p[%d] %s %p",
|
inf_debug (gnu_current_inf, "%s %s[%d] %s %s",
|
||||||
write ? "writing" : "reading", (void *) memaddr, len,
|
write ? "writing" : "reading", paddr (memaddr), len,
|
||||||
write ? "<--" : "-->", myaddr);
|
write ? "<--" : "-->", host_address_to_string (myaddr));
|
||||||
if (write)
|
if (write)
|
||||||
return gnu_write_inferior (task, memaddr, myaddr, len);
|
return gnu_write_inferior (task, memaddr, myaddr, len);
|
||||||
else
|
else
|
||||||
|
@ -88,8 +88,9 @@ extern char *proc_string (struct proc *proc);
|
|||||||
|
|
||||||
#define proc_debug(_proc, msg, args...) \
|
#define proc_debug(_proc, msg, args...) \
|
||||||
do { struct proc *__proc = (_proc); \
|
do { struct proc *__proc = (_proc); \
|
||||||
debug ("{proc %d/%d %p}: " msg, \
|
debug ("{proc %d/%d %s}: " msg, \
|
||||||
__proc_pid (__proc), __proc->tid, __proc , ##args); } while (0)
|
__proc_pid (__proc), __proc->tid,
|
||||||
|
host_address_to_string (__proc) , ##args); } while (0)
|
||||||
|
|
||||||
extern int gnu_debug_flag;
|
extern int gnu_debug_flag;
|
||||||
|
|
||||||
|
@ -948,22 +948,24 @@ maintenance_info_symtabs (char *regexp, int from_tty)
|
|||||||
{
|
{
|
||||||
printf_filtered ("{ objfile %s ", objfile->name);
|
printf_filtered ("{ objfile %s ", objfile->name);
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered ("((struct objfile *) %p)\n", objfile);
|
printf_filtered ("((struct objfile *) %s)\n",
|
||||||
|
host_address_to_string (objfile));
|
||||||
printed_objfile_start = 1;
|
printed_objfile_start = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf_filtered (" { symtab %s ", symtab->filename);
|
printf_filtered (" { symtab %s ", symtab->filename);
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered ("((struct symtab *) %p)\n", symtab);
|
printf_filtered ("((struct symtab *) %s)\n",
|
||||||
|
host_address_to_string (symtab));
|
||||||
printf_filtered (" dirname %s\n",
|
printf_filtered (" dirname %s\n",
|
||||||
symtab->dirname ? symtab->dirname : "(null)");
|
symtab->dirname ? symtab->dirname : "(null)");
|
||||||
printf_filtered (" fullname %s\n",
|
printf_filtered (" fullname %s\n",
|
||||||
symtab->fullname ? symtab->fullname : "(null)");
|
symtab->fullname ? symtab->fullname : "(null)");
|
||||||
printf_filtered (" blockvector ((struct blockvector *) %p)%s\n",
|
printf_filtered (" blockvector ((struct blockvector *) %s)%s\n",
|
||||||
symtab->blockvector,
|
host_address_to_string (symtab->blockvector),
|
||||||
symtab->primary ? " (primary)" : "");
|
symtab->primary ? " (primary)" : "");
|
||||||
printf_filtered (" linetable ((struct linetable *) %p)\n",
|
printf_filtered (" linetable ((struct linetable *) %s)\n",
|
||||||
symtab->linetable);
|
host_address_to_string (symtab->linetable));
|
||||||
printf_filtered (" debugformat %s\n", symtab->debugformat);
|
printf_filtered (" debugformat %s\n", symtab->debugformat);
|
||||||
printf_filtered (" }\n");
|
printf_filtered (" }\n");
|
||||||
}
|
}
|
||||||
@ -1003,13 +1005,16 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
|
|||||||
{
|
{
|
||||||
printf_filtered ("{ objfile %s ", objfile->name);
|
printf_filtered ("{ objfile %s ", objfile->name);
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered ("((struct objfile *) %p)\n", objfile);
|
printf_filtered ("((struct objfile *) %s)\n",
|
||||||
|
host_address_to_string (objfile));
|
||||||
printed_objfile_start = 1;
|
printed_objfile_start = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf_filtered (" { psymtab %s ", psymtab->filename);
|
printf_filtered (" { psymtab %s ", psymtab->filename);
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
printf_filtered ("((struct partial_symtab *) %p)\n", psymtab);
|
printf_filtered ("((struct partial_symtab *) %s)\n",
|
||||||
|
host_address_to_string (psymtab));
|
||||||
|
|
||||||
printf_filtered (" readin %s\n",
|
printf_filtered (" readin %s\n",
|
||||||
psymtab->readin ? "yes" : "no");
|
psymtab->readin ? "yes" : "no");
|
||||||
printf_filtered (" fullname %s\n",
|
printf_filtered (" fullname %s\n",
|
||||||
@ -1051,8 +1056,9 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
|
|||||||
|
|
||||||
/* Note the string concatenation there --- no comma. */
|
/* Note the string concatenation there --- no comma. */
|
||||||
printf_filtered (" psymtab %s "
|
printf_filtered (" psymtab %s "
|
||||||
"((struct partial_symtab *) %p)\n",
|
"((struct partial_symtab *) %s)\n",
|
||||||
dep->filename, dep);
|
dep->filename,
|
||||||
|
host_address_to_string (dep));
|
||||||
}
|
}
|
||||||
printf_filtered (" }\n");
|
printf_filtered (" }\n");
|
||||||
}
|
}
|
||||||
|
@ -740,8 +740,8 @@ handle_load_dll (void *dummy)
|
|||||||
solib_end->next = windows_make_so (dll_name, event->lpBaseOfDll);
|
solib_end->next = windows_make_so (dll_name, event->lpBaseOfDll);
|
||||||
solib_end = solib_end->next;
|
solib_end = solib_end->next;
|
||||||
|
|
||||||
DEBUG_EVENTS (("gdb: Loading dll \"%s\" at %p.\n", solib_end->so_name,
|
DEBUG_EVENTS (("gdb: Loading dll \"%s\" at %s.\n", solib_end->so_name,
|
||||||
solib_end->lm_info->load_addr));
|
host_address_to_string (solib_end->lm_info->load_addr)));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -774,7 +774,8 @@ handle_unload_dll (void *dummy)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
error (_("Error: dll starting at %p not found."), lpBaseOfDll);
|
error (_("Error: dll starting at %s not found."),
|
||||||
|
host_address_to_string (lpBaseOfDll));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -986,8 +987,9 @@ info_w32_command (char *args, int from_tty)
|
|||||||
|
|
||||||
|
|
||||||
#define DEBUG_EXCEPTION_SIMPLE(x) if (debug_exceptions) \
|
#define DEBUG_EXCEPTION_SIMPLE(x) if (debug_exceptions) \
|
||||||
printf_unfiltered ("gdb: Target exception %s at %p\n", x, \
|
printf_unfiltered ("gdb: Target exception %s at %s\n", x, \
|
||||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress)
|
host_address_to_string (\
|
||||||
|
current_event.u.Exception.ExceptionRecord.ExceptionAddress))
|
||||||
|
|
||||||
static int
|
static int
|
||||||
handle_exception (struct target_waitstatus *ourstatus)
|
handle_exception (struct target_waitstatus *ourstatus)
|
||||||
@ -1098,9 +1100,10 @@ handle_exception (struct target_waitstatus *ourstatus)
|
|||||||
/* Treat unhandled first chance exceptions specially. */
|
/* Treat unhandled first chance exceptions specially. */
|
||||||
if (current_event.u.Exception.dwFirstChance)
|
if (current_event.u.Exception.dwFirstChance)
|
||||||
return -1;
|
return -1;
|
||||||
printf_unfiltered ("gdb: unknown target exception 0x%08lx at %p\n",
|
printf_unfiltered ("gdb: unknown target exception 0x%08lx at %s\n",
|
||||||
current_event.u.Exception.ExceptionRecord.ExceptionCode,
|
current_event.u.Exception.ExceptionRecord.ExceptionCode,
|
||||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress);
|
host_address_to_string (
|
||||||
|
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
|
||||||
ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
|
ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1018,7 +1018,8 @@ xtensa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
|||||||
gdb_byte buf[8];
|
gdb_byte buf[8];
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
|
|
||||||
DEBUGTRACE ("xtensa_unwind_pc (next_frame = %p)\n", next_frame);
|
DEBUGTRACE ("xtensa_unwind_pc (next_frame = %s)\n",
|
||||||
|
host_address_to_string (next_frame));
|
||||||
|
|
||||||
frame_unwind_register (next_frame, gdbarch_pc_regnum (gdbarch), buf);
|
frame_unwind_register (next_frame, gdbarch_pc_regnum (gdbarch), buf);
|
||||||
pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
|
pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
|
||||||
|
Reference in New Issue
Block a user