aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.py
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:46:15 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commit6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a (patch)
tree641a6a86240919fe4ba9219fbbbe15bc6331c22d /gdb/gdbarch.py
parenta11ac3b3e8ff6769badcf0041894f6c5acc1b94f (diff)
downloadgdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.zip
gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.gz
gdb-6cb06a8cdaaf30f5d879f24d37100cf1d25c6a3a.tar.bz2
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.
Diffstat (limited to 'gdb/gdbarch.py')
-rwxr-xr-xgdb/gdbarch.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py
index cc96ccd..8956a9c 100755
--- a/gdb/gdbarch.py
+++ b/gdb/gdbarch.py
@@ -391,19 +391,19 @@ with open("gdbarch.c", "w") as f:
print("#if defined (GDB_NM_FILE)", file=f)
print(" gdb_nm_file = GDB_NM_FILE;", file=f)
print("#endif", file=f)
- print(" fprintf_filtered (file,", file=f)
+ print(" gdb_printf (file,", file=f)
print(""" "gdbarch_dump: GDB_NM_FILE = %s\\n",""", file=f)
print(" gdb_nm_file);", file=f)
for c in components:
if c.predicate:
- print(" fprintf_filtered (file,", file=f)
+ print(" gdb_printf (file,", file=f)
print(
f""" "gdbarch_dump: gdbarch_{c.name}_p() = %d\\n",""",
file=f,
)
print(f" gdbarch_{c.name}_p (gdbarch));", file=f)
if isinstance(c, Function):
- print(" fprintf_filtered (file,", file=f)
+ print(" gdb_printf (file,", file=f)
print(
f""" "gdbarch_dump: {c.name} = <%s>\\n",""", file=f
)
@@ -418,7 +418,7 @@ with open("gdbarch.c", "w") as f:
printer = f"core_addr_to_string_nz (gdbarch->{c.name})"
else:
printer = f"plongest (gdbarch->{c.name})"
- print(" fprintf_filtered (file,", file=f)
+ print(" gdb_printf (file,", file=f)
print(
f""" "gdbarch_dump: {c.name} = %s\\n",""", file=f
)
@@ -454,7 +454,7 @@ with open("gdbarch.c", "w") as f:
)
print(" if (gdbarch_debug >= 2)", file=f)
print(
- f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
+ f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
file=f,
)
print(" ", file=f, end="")
@@ -488,7 +488,7 @@ with open("gdbarch.c", "w") as f:
print(f" gdb_assert (gdbarch->{c.name} != {c.predefault});", file=f)
print(" if (gdbarch_debug >= 2)", file=f)
print(
- f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
+ f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
file=f,
)
print(f" return gdbarch->{c.name};", file=f)
@@ -509,7 +509,7 @@ with open("gdbarch.c", "w") as f:
print(" gdb_assert (gdbarch != NULL);", file=f)
print(" if (gdbarch_debug >= 2)", file=f)
print(
- f""" fprintf_unfiltered (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
+ f""" gdb_printf (gdb_stdlog, "gdbarch_{c.name} called\\n");""",
file=f,
)
print(f" return gdbarch->{c.name};", file=f)