diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2024-04-02 13:46:53 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-04-19 16:14:47 +0100 |
commit | eb244227d83c81fa17ec2f5ddc933945b14217fd (patch) | |
tree | 7b8364c0fb243af54395d48726906323c8ae0647 | |
parent | 483546ce4f36a93d3fb711f2261b15b75871f3f9 (diff) | |
download | gdb-eb244227d83c81fa17ec2f5ddc933945b14217fd.zip gdb-eb244227d83c81fa17ec2f5ddc933945b14217fd.tar.gz gdb-eb244227d83c81fa17ec2f5ddc933945b14217fd.tar.bz2 |
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.
-rw-r--r-- | libctf/ctf-dump.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 474c4e0..2213d09 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)) ? ", " : "", |