mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
libctf: error handling
CTF functions return zero on success or an extended errno value which can be translated into a string via the functions in this commit. The errno numbers start at -CTF_BASE. libctf/ * ctf-error.c: New file. include/ * ctf-api.h (ctf_errno): New declaration. (ctf_errmsg): Likewise.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* ctf-api.h (ctf_errno): New declaration.
|
||||
(ctf_errmsg): Likewise.
|
||||
|
||||
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* ctf-api.h (ctf_setdebug): New.
|
||||
|
@ -122,6 +122,8 @@ enum
|
||||
#define CTF_ADD_NONROOT 0 /* Type only visible in nested scope. */
|
||||
#define CTF_ADD_ROOT 1 /* Type visible at top-level scope. */
|
||||
|
||||
extern int ctf_errno (ctf_file_t *);
|
||||
extern const char *ctf_errmsg (int);
|
||||
|
||||
extern void ctf_setdebug (int debug);
|
||||
extern int ctf_getdebug (void);
|
||||
|
Reference in New Issue
Block a user