aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-01-05 13:25:56 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-01-05 14:53:39 +0000
commit57f97d0e6dd4dfbb54f2f39c5e59d5860040d0b6 (patch)
tree8761b8146292351d0056509f56eb08a73b082804 /ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
parentb09ad6eae985c6cf3138775de8e712bc116b4166 (diff)
downloadgdb-57f97d0e6dd4dfbb54f2f39c5e59d5860040d0b6.zip
gdb-57f97d0e6dd4dfbb54f2f39c5e59d5860040d0b6.tar.gz
gdb-57f97d0e6dd4dfbb54f2f39c5e59d5860040d0b6.tar.bz2
libctf, ld: CTF dumper changes for consistency
In most places in CTF dumper output, we emit 0x... for hex strings, but in three places (top-level type IDs, string table offsets, and the file magic number) we don't emit the 0x. This is very confusing if by chance there are no hex digits in the output. Add 0x consistently to everything, and adjust tests accordingly. While we're at it, improve the indentation of the output so that subsequent lines in aggregate output are indented by at least as many columns as the colon in the type output. (Subsequent indentation is still 4 spaces at a time.) ld/ChangeLog 2021-01-05 Nick Alcock <nick.alcock@oracle.com> * testsuite/ld-ctf/array.d: Adjust for dumper changes. * testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise. * testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise. * testsuite/ld-ctf/conflicting-enums.d: Likewise. * testsuite/ld-ctf/conflicting-typedefs.d: Likewise. * testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise. * testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise. * testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise. * testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise. * testsuite/ld-ctf/cycle-1.d: Likewise. * testsuite/ld-ctf/cycle-2.A.d: Likewise. * testsuite/ld-ctf/cycle-2.B.d: Likewise. * testsuite/ld-ctf/cycle-2.C.d: Likewise. * testsuite/ld-ctf/data-func-conflicted.d: Likewise. * testsuite/ld-ctf/diag-cttname-null.d: Likewise. * testsuite/ld-ctf/diag-cuname.d: Likewise. * testsuite/ld-ctf/diag-parlabel.d: Likewise. * testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Likewise. * testsuite/ld-ctf/function.d: Likewise. * testsuite/ld-ctf/slice.d: Likewise. * testsuite/ld-ctf/super-sub-cycles.d: Likewise. libctf/ChangeLog 2021-01-05 Nick Alcock <nick.alcock@oracle.com> * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs. (ctf_dump_header): Add 0x to the hex magic number. (ctf_dump_str): Add 0x to the hex string offsets. (ctf_dump_membstate_t) <cdm_toplevel_indent>: New. (ctf_dump_type): Adjust. Free it when we're done. (type_hex_digits): New. (ctf_dump_member): Align output depending on the width of the type ID being generated. Use printf padding, not a loop, to generate indentation.
Diffstat (limited to 'ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d')
-rw-r--r--ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d12
1 files changed, 6 insertions, 6 deletions
diff --git a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
index 48078b9..df61153 100644
--- a/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
+++ b/ld/testsuite/ld-ctf/conflicting-cycle-3.C-1.d
@@ -15,7 +15,7 @@
CTF archive member: .*/C.c:
Header:
- Magic number: dff2
+ Magic number: 0xdff2
Version: 4 \(CTF_VERSION_3\)
#...
Parent name: .*
@@ -28,13 +28,13 @@ CTF archive member: .*/C.c:
Function objects:
Variables:
- c -> 80000001: struct C \(size 0x[0-9a-f]*\)
+ c -> 0x80000001: struct C \(size 0x[0-9a-f]*\)
Types:
- 8[0-9a-f]*: struct C \(size 0x[0-9a-f]*\)
- \[0x0\] \(ID 0x8[0-9a-f]*\) \(kind 6\) struct C \(aligned at 0x[0-9a-f]*\)
- \[0x0\] \(ID 0x[0-9a-f]*\) \(kind 3\) struct A \* a \(aligned at 0x[0-9a-f]*\)
+ 0x8[0-9a-f]*: struct C \(size 0x[0-9a-f]*\)
+ *\[0x0\] \(ID 0x8[0-9a-f]*\) \(kind 6\) struct C \(aligned at 0x[0-9a-f]*\)
+ *\[0x0\] \(ID 0x[0-9a-f]*\) \(kind 3\) struct A \* a \(aligned at 0x[0-9a-f]*\)
Strings:
- 0:
+ 0x0:
#...