diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 7 | ||||
-rw-r--r-- | include/ctf-api.h | 12 |
2 files changed, 12 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 0508376..1f216b3 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,10 @@ +2019-05-29 Nick Alcock <nick.alcock@oracle.com> + + * ctf-api.h (ctf_sect_t): Drop cts_type, cts_flags, and cts_offset. + (ctf_id_t): This is now an unsigned type. + (CTF_ERR): Cast it to ctf_id_t. Note that it should only be used + for ctf_id_t-returning functions. + 2019-05-28 Nick Alcock <nick.alcock@oracle.com> * ctf-api.h (ctf_dump_decorate_f): New. diff --git a/include/ctf-api.h b/include/ctf-api.h index 822b3bf..3acbc91 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -43,7 +43,7 @@ extern "C" typedef struct ctf_file ctf_file_t; typedef struct ctf_archive_internal ctf_archive_t; -typedef long ctf_id_t; +typedef unsigned long ctf_id_t; /* This opaque definition allows libctf to accept BFD data structures without importing all the BFD noise into users' namespaces. */ @@ -60,12 +60,9 @@ struct bfd; typedef struct ctf_sect { const char *cts_name; /* Section name (if any). */ - unsigned long cts_type; /* Section type (ELF SHT_... value). */ - unsigned long cts_flags; /* Section flags (ELF SHF_... value). */ const void *cts_data; /* Pointer to section data. */ size_t cts_size; /* Size of data in bytes. */ size_t cts_entsize; /* Size of each section entry (symtab only). */ - off64_t cts_offset; /* File offset of this section (if any). */ } ctf_sect_t; /* Symbolic names for CTF sections. */ @@ -125,9 +122,10 @@ typedef struct ctf_snapshot_id #define CTF_FUNC_VARARG 0x1 /* Function arguments end with varargs. */ -/* Functions that return integer status or a ctf_id_t use the following value - to indicate failure. ctf_errno() can be used to obtain an error code. */ -#define CTF_ERR (-1L) +/* Functions that return a ctf_id_t use the following value to indicate failure. + ctf_errno() can be used to obtain an error code. Functions that return + a straight integral -1 also use ctf_errno(). */ +#define CTF_ERR ((ctf_id_t) -1L) #define ECTF_BASE 1000 /* Base value for libctf errnos. */ |