diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2022-04-21 21:45:21 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2022-04-28 11:47:11 +0100 |
commit | 44c70fb01ff2ec9bced4676cdde0fa7e49328003 (patch) | |
tree | 7d5f9908c32960c1bca67c8bd2ae29f8826501bd /include | |
parent | 0e12331a9bf980f24e6fe4aa1b22b431950883ba (diff) | |
download | gdb-44c70fb01ff2ec9bced4676cdde0fa7e49328003.zip gdb-44c70fb01ff2ec9bced4676cdde0fa7e49328003.tar.gz gdb-44c70fb01ff2ec9bced4676cdde0fa7e49328003.tar.bz2 |
libctf: add a comment explaining how to use ctf_*open
Specifically, tell users what to pass to those functions that accept raw
section content, since it's fairly involved and easy to get wrong.
(.dynsym / .dynstr when CTF_F_DYNSTR is set, otherwise .symtab / .strtab).
include/ChangeLog:
* ctf-api.h (ctf_*open): Improve comment.
Diffstat (limited to 'include')
-rw-r--r-- | include/ctf-api.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ctf-api.h b/include/ctf-api.h index a3f4528..153e012 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -314,7 +314,13 @@ extern ctf_next_t *ctf_next_copy (ctf_next_t *); archives: so they can be used to open both. CTF files will appear to be an archive with one member named '.ctf'. The low-level functions ctf_simple_open and ctf_bufopen return ctf_dict_t's directly, and cannot - be used on CTF archives. */ + be used on CTF archives. + + Some of these functions take raw symtab and strtab section content in the + form of ctf_sect_t structures. For CTF in ELF files, these should be + extracted from .dynsym and its associated string table (usually .dynsym) + whenever the CTF_F_DYNSTR flag is set in the CTF preamble (which it almost + always will be for linked objects, but not for .o files). */ extern ctf_archive_t *ctf_bfdopen (struct bfd *, int *); extern ctf_archive_t *ctf_bfdopen_ctfsect (struct bfd *, const ctf_sect_t *, |