diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2023-10-02 15:37:17 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-04-19 16:14:45 +0100 |
commit | 6364617120e3886b79e0ba89f2c1506766ed4e98 (patch) | |
tree | 0db4df971a23fec985dd064960cb5e568bddef1a /libctf | |
parent | 0e6747d2a638693ad2f20e7929c8364913c87279 (diff) | |
download | gdb-6364617120e3886b79e0ba89f2c1506766ed4e98.zip gdb-6364617120e3886b79e0ba89f2c1506766ed4e98.tar.gz gdb-6364617120e3886b79e0ba89f2c1506766ed4e98.tar.bz2 |
binutils, objdump: Add --ctf-parent-section
This lets you examine CTF where the parent and child dicts are in entirely
different sections, rather than in a CTF archive with members with different
names. The linker doesn't emit ELF objects structured like this, but some
third-party linkers may; it's also useful for objcopy-constructed files
in some cases.
(This is what the objdump --ctf-parent option used to do before commit
80b56fad5c99a8c9 in 2021. The new semantics of that option are much more
useful, but that doesn't mean the old ones are never useful at all, so let's
bring them back.)
(I was specifically driven to add this by DTrace's obscure "ctypes" and
"dtypes" options, which dump its internal, dynamically-generated dicts out
to files for debugging purposes: there are two, one the parent of the other.
Since they're in two separate files rather than a CTF archive and we have no
tools that paste files together into archives, objdump wouldn't show them --
and even pasting them together into an ELF executable with objcopy didn't
help, since objdump had no options that could be used to look in specific
sections for the parent dict. With --ctf-parent-section, this sort of
obscure use case becomes possible again. You'll never need it for the
output of the normal linker.)
binutils/
* doc/ctf.options.texi: Add --ctf-parent-section=.
* objdump.c (dump_ctf): Implement it.
(dump_bfd): Likewise.
(main): Likewise.
Diffstat (limited to 'libctf')
0 files changed, 0 insertions, 0 deletions