[Ltrace-devel] [PATCH RESEND] Add POSIX Threads prototypes
Petr Machata
pmachata at redhat.com
Wed Mar 11 21:25:36 UTC 2015
Роман Донченко <dpb at corrigendum.ru> writes:
> Hmm... maybe. Could you point me to what you mean by the existing
> low-level functionality? I'm thinking I could add a new type of line
> (e.g. "include") and recursively call read_config_file when handling
> one. Is there anything that's already done for me?
What I had in mind is this:
int protolib_add_import(struct protolib *plib, struct protolib *import);
Also, you don't want to simply call read_config_file recursively, as
that would re-read the file every time it's included. You also still
want to allow the full suite of overrides that ltrace admits,
i.e. looking through XDG_CONFIG_DIRS et.al.
The right way about it is to go through protolib cache, which handles
all this stuff. So read_config_file would need to get an argument of
the type struct protolib_cache *. An include line would trigger a call
to protolib_cache_load. The result would be added to the currently
loaded protolib by protolib_add_import.
Thanks,
Petr
More information about the Ltrace-devel
mailing list