From: Tom Tromey Date: Wed, 22 Oct 2025 13:33:35 +0000 (-0600) Subject: Fix formatting of attributes in dwarf-to-dwarf-assembler output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb55fe0da56b40679e07eea6474720b94e574abb;p=thirdparty%2Fbinutils-gdb.git Fix formatting of attributes in dwarf-to-dwarf-assembler output This updates dwarf-to-dwarf-assembler.py to reflect the changes made to how attributes are parsed; see commit c44edec047d (Make location expressions be code in DWARF assembler). Approved-By: Andrew Burgess --- diff --git a/gdb/contrib/dwarf-to-dwarf-assembler.py b/gdb/contrib/dwarf-to-dwarf-assembler.py index 58fb6cbe549..8813de5041a 100755 --- a/gdb/contrib/dwarf-to-dwarf-assembler.py +++ b/gdb/contrib/dwarf-to-dwarf-assembler.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # pyright: strict -# Copyright 2024 Free Software Foundation, Inc. +# Copyright 2024, 2025 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -195,7 +195,7 @@ class DWARFAttribute: dwarf_operations dictionary, and replaced with their names where applicable. """ - s = lbrace + s = "" if isinstance(self.name, int): s += "DW_AT_" + hex(self.name) else: @@ -207,7 +207,6 @@ class DWARFAttribute: if self.form not in [None, "DW_FORM_ref4", "DW_FORM_ref_addr"]: s += " " + self.form - s += rbrace return indent(s, indent_count)