diff options
author | Petr Machata <pmachata@redhat.com> | 2013-10-23 00:39:23 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-10-23 00:39:23 +0200 |
commit | 82f748d1bc2b95d594327ad15f3a6908070dd5c3 (patch) | |
tree | bca73acc5b6bfd5390e800d678a3868993f489ed /prototype.h | |
parent | 71025328700158770edf84cbce64d977298b6e88 (diff) | |
download | ltrace-82f748d1bc2b95d594327ad15f3a6908070dd5c3.tar.gz |
System calls are now part of dedicated symbol library
- This symbol library is still special in that symbols are created on
demand and never actually added. It just serves as a link to
protolibrary with system call prototypes, and has a name (SYS).
- Prototypes for system calls were moved to a dedicated prototype
library called syscalls.conf.
- Because it's undesirable to look up syscall prototypes in anything
but the dedicated syscall protolib, prototype.c/.h now understand
that some lookups shouldn't be done recursively (and so we never
pick the definition from -F file that just happens to have the same
name as a system call). The good thing is that now libraries can
actually use symbols named SYS_something without clashing with
system call prototypes.
- One test case needed to be updated, because we now display system
calls as something@SYS instead of SYS_something.
Diffstat (limited to 'prototype.h')
-rw-r--r-- | prototype.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/prototype.h b/prototype.h index e6a4c21..26c3098 100644 --- a/prototype.h +++ b/prototype.h @@ -21,6 +21,8 @@ #ifndef _PROTOTYPE_H_ #define _PROTOTYPE_H_ +#include <stdbool.h> + #include "forward.h" #include "dict.h" #include "vect.h" @@ -122,21 +124,21 @@ int protolib_add_named_type(struct protolib *plib, const char *name, int own_name, struct named_type *named); -/* Lookup prototype named NAME in PLIB. If none is found, look - * recursively in each of the imports. Returns the corresponding - * prototype, or NULL if none was found. */ +/* Lookup prototype named NAME in PLIB. If none is found and IMPORTS + * is true, look recursively in each of the imports. Returns the + * corresponding prototype, or NULL if none was found. */ struct prototype *protolib_lookup_prototype(struct protolib *plib, - const char *name); + const char *name, bool imports); /* Add a named type NAMED to PLIB. Returns 0 on success or a negative * value on failure. */ int protolib_add_type(struct protolib *plib, struct named_type *named); -/* Lookup type named NAME in PLIB. If none is found, look recursively - * in each of the imports. Returns the corresponding type, or NULL if - * none was found. */ +/* Lookup type named NAME in PLIB. If none is found and IMPORTS is + * true, look recursively in each of the imports. Returns the + * corresponding type, or NULL if none was found. */ struct named_type *protolib_lookup_type(struct protolib *plib, - const char *name); + const char *name, bool imports); /* A cache of prototype libraries. Can load prototype libraries on * demand. |