From: Nick Alcock Date: Tue, 2 Jun 2020 19:39:15 +0000 (+0100) Subject: libctf, create: empty dicts are dirty to start with X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dd987f004301f6a737fcd431a9ae14d2fc2675bf;p=deliverable%2Fbinutils-gdb.git libctf, create: empty dicts are dirty to start with 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. --- diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 671df68542..0aee504f3e 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,7 @@ +2020-07-22 Nick Alcock + + * ctf-create.c (ctf_create): Mark dirty. + 2020-07-22 Nick Alcock * ctf-create.c (membcmp) Skip nameless members. diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index 5cbcfe0a70..1416d187fd 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);