gdbarch.py: Fix indentation in the generated gdbarch_dump function

Use tab for the first eight spaces of indentation, and align the gdb_printf
arguments to the open parenthesis of the function call.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Thiago Jung Bauermann 2022-12-01 16:40:13 +00:00
parent 63b999f80b
commit 53e03d92a6
2 changed files with 556 additions and 560 deletions

File diff suppressed because it is too large Load diff

View file

@ -396,23 +396,21 @@ with open("gdbarch.c", "w") as f:
print(" gdb_nm_file = GDB_NM_FILE;", file=f)
print("#endif", file=f)
print(" gdb_printf (file,", file=f)
print(""" "gdbarch_dump: GDB_NM_FILE = %s\\n",""", file=f)
print(" gdb_nm_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(" gdb_printf (file,", file=f)
print(
f""" "gdbarch_dump: gdbarch_{c.name}_p() = %d\\n",""",
f""" "gdbarch_dump: gdbarch_{c.name}_p() = %d\\n",""",
file=f,
)
print(f" gdbarch_{c.name}_p (gdbarch));", file=f)
print(f" gdbarch_{c.name}_p (gdbarch));", file=f)
if isinstance(c, Function):
print(" gdb_printf (file,", file=f)
print(f""" "gdbarch_dump: {c.name} = <%s>\\n",""", file=f)
print(
f""" "gdbarch_dump: {c.name} = <%s>\\n",""", file=f
)
print(
f" host_address_to_string (gdbarch->{c.name}));",
f" host_address_to_string (gdbarch->{c.name}));",
file=f,
)
else:
@ -423,10 +421,8 @@ with open("gdbarch.c", "w") as f:
else:
printer = f"plongest (gdbarch->{c.name})"
print(" gdb_printf (file,", file=f)
print(
f""" "gdbarch_dump: {c.name} = %s\\n",""", file=f
)
print(f" {printer});", file=f)
print(f""" "gdbarch_dump: {c.name} = %s\\n",""", file=f)
print(f" {printer});", file=f)
print(" if (gdbarch->dump_tdep != NULL)", file=f)
print(" gdbarch->dump_tdep (gdbarch, file);", file=f)
print("}", file=f)