diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-22 10:28:37 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-12-24 10:32:14 -0700 |
commit | 64b7cc507b77224eeefa64f6c66a9c8e0321b26a (patch) | |
tree | 28cbf1b56bda90741cd1c79b21dbc9cbcc8ca2d8 /gdb/psymtab.c | |
parent | 34b965f7c006e64dbd5546575744daa642d4856f (diff) | |
download | gdb-64b7cc507b77224eeefa64f6c66a9c8e0321b26a.zip gdb-64b7cc507b77224eeefa64f6c66a9c8e0321b26a.tar.gz gdb-64b7cc507b77224eeefa64f6c66a9c8e0321b26a.tar.bz2 |
Remove gdb_print_host_address
gdb_print_host_address is just a simple wrapper around
fprintf_filtered. However, it is readily replaced in all callers by a
combination of %s and call to host_address_to_string. This also
simplifies the code, so I think it's worthwhile to remove this
function.
Regression tested on x86-64 Fedora 64.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index e09537d..d0821b3 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -766,21 +766,17 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, fprintf_filtered (outfile, "\nPartial symtab for source file %s ", psymtab->filename); } - fprintf_filtered (outfile, "(object "); - gdb_print_host_address (psymtab, outfile); - fprintf_filtered (outfile, ")\n\n"); - fprintf_filtered (outfile, " Read from object file %s (", - objfile_name (objfile)); - gdb_print_host_address (objfile, outfile); - fprintf_filtered (outfile, ")\n"); + fprintf_filtered (outfile, "(object %s)\n\n", + host_address_to_string (psymtab)); + fprintf_filtered (outfile, " Read from object file %s (%s)\n", + objfile_name (objfile), + host_address_to_string (objfile)); if (psymtab->readin_p (objfile)) - { - fprintf_filtered (outfile, - " Full symtab was read (at "); - gdb_print_host_address (psymtab->get_compunit_symtab (objfile), outfile); - fprintf_filtered (outfile, ")\n"); - } + fprintf_filtered + (outfile, + " Full symtab was read (at %s)\n", + host_address_to_string (psymtab->get_compunit_symtab (objfile))); fprintf_filtered (outfile, " Symbols cover text addresses "); fputs_filtered (paddress (gdbarch, psymtab->text_low (objfile)), outfile); @@ -792,18 +788,11 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n", psymtab->number_of_dependencies); for (i = 0; i < psymtab->number_of_dependencies; i++) - { - fprintf_filtered (outfile, " %d ", i); - gdb_print_host_address (psymtab->dependencies[i], outfile); - fprintf_filtered (outfile, " %s\n", - psymtab->dependencies[i]->filename); - } + fprintf_filtered (outfile, " %d %s\n", i, + host_address_to_string (psymtab->dependencies[i])); if (psymtab->user != NULL) - { - fprintf_filtered (outfile, " Shared partial symtab with user "); - gdb_print_host_address (psymtab->user, outfile); - fprintf_filtered (outfile, "\n"); - } + fprintf_filtered (outfile, " Shared partial symtab with user %s\n", + host_address_to_string (psymtab->user)); if (!psymtab->global_psymbols.empty ()) { print_partial_symbols @@ -881,12 +870,9 @@ psymbol_functions::dump (struct objfile *objfile) for (psymtab = m_partial_symtabs->psymtabs; psymtab != NULL; psymtab = psymtab->next) - { - printf_filtered ("%s at ", - psymtab->filename); - gdb_print_host_address (psymtab, gdb_stdout); - printf_filtered ("\n"); - } + printf_filtered ("%s at %s\n", + psymtab->filename, + host_address_to_string (psymtab)); printf_filtered ("\n\n"); } } |