From: Nick Alcock Date: Tue, 2 Apr 2024 12:46:53 +0000 (+0100) Subject: libctf: fix tiny dumping error X-Git-Tag: gdb-15-branchpoint~324 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb244227d83c81fa17ec2f5ddc933945b14217fd;p=thirdparty%2Fbinutils-gdb.git libctf: fix tiny dumping error Without this, you might get things like this in the output: Flags: 0xa (CTF_F_NEWFUNCINFO, , CTF_F_DYNSTR) Note the spurious comma. libctf/ * ctf-dump.c (ctf_dump_header): Fix comma emission. --- diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 474c4e00cea..2213d09dc29 100644 --- a/libctf/ctf-dump.c +++ b/libctf/ctf-dump.c @@ -333,13 +333,12 @@ ctf_dump_header (ctf_dict_t *fp, ctf_dump_state_t *state) ? ", " : "", fp->ctf_openflags & CTF_F_NEWFUNCINFO ? "CTF_F_NEWFUNCINFO" : "", - (fp->ctf_openflags & (CTF_F_COMPRESS | CTF_F_NEWFUNCINFO)) + (fp->ctf_openflags & (CTF_F_NEWFUNCINFO)) && (fp->ctf_openflags & ~(CTF_F_COMPRESS | CTF_F_NEWFUNCINFO)) ? ", " : "", fp->ctf_openflags & CTF_F_IDXSORTED ? "CTF_F_IDXSORTED" : "", - fp->ctf_openflags & (CTF_F_COMPRESS | CTF_F_NEWFUNCINFO - | CTF_F_IDXSORTED) + fp->ctf_openflags & (CTF_F_IDXSORTED) && (fp->ctf_openflags & ~(CTF_F_COMPRESS | CTF_F_NEWFUNCINFO | CTF_F_IDXSORTED)) ? ", " : "",