Unify gdb printf functions
Now that filtered and unfiltered output can be treated identically, we can unify the printf family of functions. This is done under the name "gdb_printf". Most of this patch was written by script.
This commit is contained in:
parent
a11ac3b3e8
commit
6cb06a8cda
249 changed files with 8449 additions and 8463 deletions
|
@ -481,24 +481,24 @@ display_one_tib (ptid_t ptid)
|
|||
|
||||
if (target_get_tib_address (ptid, &thread_local_base) == 0)
|
||||
{
|
||||
printf_filtered (_("Unable to get thread local base for %s\n"),
|
||||
target_pid_to_str (ptid).c_str ());
|
||||
gdb_printf (_("Unable to get thread local base for %s\n"),
|
||||
target_pid_to_str (ptid).c_str ());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (target_read (current_inferior ()->top_target (), TARGET_OBJECT_MEMORY,
|
||||
NULL, tib, thread_local_base, tib_size) != tib_size)
|
||||
{
|
||||
printf_filtered (_("Unable to read thread information "
|
||||
"block for %s at address %s\n"),
|
||||
target_pid_to_str (ptid).c_str (),
|
||||
paddress (target_gdbarch (), thread_local_base));
|
||||
gdb_printf (_("Unable to read thread information "
|
||||
"block for %s at address %s\n"),
|
||||
target_pid_to_str (ptid).c_str (),
|
||||
paddress (target_gdbarch (), thread_local_base));
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf_filtered (_("Thread Information Block %s at %s\n"),
|
||||
target_pid_to_str (ptid).c_str (),
|
||||
paddress (target_gdbarch (), thread_local_base));
|
||||
gdb_printf (_("Thread Information Block %s at %s\n"),
|
||||
target_pid_to_str (ptid).c_str (),
|
||||
paddress (target_gdbarch (), thread_local_base));
|
||||
|
||||
index = (gdb_byte *) tib;
|
||||
|
||||
|
@ -508,10 +508,10 @@ display_one_tib (ptid_t ptid)
|
|||
{
|
||||
val = extract_unsigned_integer (index, size, byte_order);
|
||||
if (i < max_name)
|
||||
printf_filtered (_("%s is 0x%s\n"), TIB_NAME[i], phex (val, size));
|
||||
gdb_printf (_("%s is 0x%s\n"), TIB_NAME[i], phex (val, size));
|
||||
else if (val != 0)
|
||||
printf_filtered (_("TIB[0x%s] is 0x%s\n"), phex (i * size, 2),
|
||||
phex (val, size));
|
||||
gdb_printf (_("TIB[0x%s] is 0x%s\n"), phex (i * size, 2),
|
||||
phex (val, size));
|
||||
index += size;
|
||||
}
|
||||
return 1;
|
||||
|
@ -601,8 +601,8 @@ static void
|
|||
show_maint_show_all_tib (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("Show all non-zero elements of "
|
||||
"Thread Information Block is %s.\n"), value);
|
||||
gdb_printf (file, _("Show all non-zero elements of "
|
||||
"Thread Information Block is %s.\n"), value);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue