libctf: lowest-level memory allocation and debug-dumping wrappers
authorNick Alcock <nick.alcock@oracle.com>
Tue, 23 Apr 2019 17:55:27 +0000 (18:55 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 28 May 2019 16:07:15 +0000 (17:07 +0100)
commit60da9d955964759b1f52690bff587ad32a198507
treee3d9dd8f6667916ef29c557e62c2d0f3fba6f6c0
parent2e94b05630514109994abb77ee2dae730f17c263
libctf: lowest-level memory allocation and debug-dumping wrappers

The memory-allocation wrappers are simple things to allow malloc
interposition: they are only used inconsistently at present, usually
where malloc debugging was required in the past.

These provide a default implementation that is environment-variable
triggered (initialized on the first call to the libctf creation and
file-opening functions, the first functions people will use), and
a ctf_setdebug()/ctf_getdebug() pair that allows the caller to
explicitly turn debugging off and on.  If ctf_setdebug() is called,
the automatic setting from an environment variable is skipped.

libctf/
* ctf-impl.h: New file.
* ctf-subr.c: New file.

include/
* ctf-api.h (ctf_setdebug): New.
(ctf_getdebug): Likewise.
include/ChangeLog
include/ctf-api.h
libctf/ChangeLog [new file with mode: 0644]
libctf/ctf-impl.h [new file with mode: 0644]
libctf/ctf-subr.c [new file with mode: 0644]