[PATCH 10/59] libctf, create: empty dicts are dirty to start with

Nick Alcock nick.alcock@oracle.com
Tue Jun 30 23:30:57 GMT 2020


Without this, an empty dict that is written out immediately never gets
any content at all: even the header is left empty.

libctf/
	* ctf-create.c (ctf_create): Mark dirty.
---
 libctf/ctf-create.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index 5cbcfe0a702..1416d187fd9 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -126,6 +126,7 @@ ctf_create (int *errp)
   fp->ctf_dtoldid = 0;
   fp->ctf_snapshots = 1;
   fp->ctf_snapshot_lu = 0;
+  fp->ctf_flags |= LCTF_DIRTY;
 
   ctf_set_ctl_hashes (fp);
   ctf_setmodel (fp, CTF_MODEL_NATIVE);
-- 
2.27.0.247.g3dff7de930



More information about the Binutils mailing list