libctf: debug dumping

This introduces ctf_dump(), an iterator which returns a series of
strings, each representing a debugging dump of one item from a given
section in the CTF file.  The items may be multiline: a callback is
provided to allow the caller to decorate each line as they desire before
the line is returned.

libctf/
	* ctf-dump.c: New.

include/
	* ctf-api.h (ctf_dump_decorate_f): New.
	(ctf_dump_state_t): new.
	(ctf_dump): New.
This commit is contained in:
Nick Alcock
2019-04-24 11:41:00 +01:00
parent 6dbf2b7340
commit a30b3e182a
4 changed files with 612 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (ctf_dump_decorate_f): New.
(ctf_dump_state_t): new.
(ctf_dump): New.
2019-05-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (ctf_label_f): New.