From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: int to bool in struct entry_info
Date: Fri, 17 Apr 2026 09:16:42 -0600 [thread overview]
Message-ID: <87fr4tty5h.fsf@tromey.com> (raw)
In-Reply-To: <7eb31f3cc02d146b7c16a1115dd4f5603d2eeb33.1776284661.git.aburgess@redhat.com> (Andrew Burgess's message of "Wed, 15 Apr 2026 21:25:56 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> Convert 'struct entry_info' to use bool for flag fields. The places
Andrew> where these flags are set are updated too.
Andrew> There should be no user visible changes after this commit.
Andrew> - /* Set to 1 iff ENTRY_POINT contains a valid value. */
Andrew> - unsigned entry_point_p : 1;
Andrew> + /* Set to true iff ENTRY_POINT contains a valid value. */
Andrew> + bool entry_point_p : 1;
Andrew> - /* Set to 1 iff this object was initialized. */
Andrew> - unsigned initialized : 1;
Andrew> + /* Set to true iff this object was initialized. */
Andrew> + bool initialized : 1;
I think we should only use bit fields where space is at a premium.
Perhaps when using 'unsigned' here this was done to convey that these
are 1-bit entities? I am not sure. But anyway I think removing the ":
1" would be an improvement, and since you're touching this line anyway
updating it would be good.
thanks,
Tom
next prev parent reply other threads:[~2026-04-17 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 20:25 [PATCH 0/2] Internal error for shared library with no .text section Andrew Burgess
2026-04-15 20:25 ` [PATCH 1/2] gdb: int to bool in struct entry_info Andrew Burgess
2026-04-17 15:16 ` Tom Tromey [this message]
2026-04-17 15:30 ` Andrew Burgess
2026-04-17 17:10 ` Tom Tromey
2026-04-15 20:25 ` [PATCH 2/2] gdb: don't use .text as default entry point section Andrew Burgess
2026-04-17 15:24 ` Tom Tromey
2026-04-17 20:44 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fr4tty5h.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox