public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] libctf: fix tiny dumping error
@ 2024-04-19 15:52 Nick Alcock
  0 siblings, 0 replies; only message in thread
From: Nick Alcock @ 2024-04-19 15:52 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eb244227d83c81fa17ec2f5ddc933945b14217fd

commit eb244227d83c81fa17ec2f5ddc933945b14217fd
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Tue Apr 2 13:46:53 2024 +0100

    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:
---
 libctf/ctf-dump.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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))
 		    ? ", " : "",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-19 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 15:52 [binutils-gdb] libctf: fix tiny dumping error Nick Alcock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).