public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/4] gdb: change target_desc_info::fetched to bool
Date: Thu,  6 May 2021 12:49:55 -0400	[thread overview]
Message-ID: <20210506164957.101572-2-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20210506164957.101572-1-simon.marchi@polymtl.ca>

gdb/ChangeLog:

	* target-descriptions.c (struct target_desc_info) <fetched>:
	bool.
	(target_find_description): Adjust.
	(target_clear_description): Adjust.

Change-Id: Ib69e097b38cf270e674f1249105d535a312954e1
---
 gdb/target-descriptions.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index fd9e5a9d115d..aee1478301b6 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -446,7 +446,7 @@ struct target_desc_info
   /* A flag indicating that a description has already been fetched
      from the target, so it should not be queried again.  */
 
-  int fetched;
+  bool fetched;
 
   /* The description fetched from the target, or NULL if the target
      did not supply any description.  Only valid when
@@ -577,7 +577,7 @@ target_find_description (void)
 
   /* Now that we know this description is usable, record that we
      fetched it.  */
-  tdesc_info->fetched = 1;
+  tdesc_info->fetched = true;
 }
 
 /* Discard any description fetched from the current target, and switch
@@ -591,7 +591,7 @@ target_clear_description (void)
   if (!tdesc_info->fetched)
     return;
 
-  tdesc_info->fetched = 0;
+  tdesc_info->fetched = false;
   tdesc_info->tdesc = nullptr;
 
   gdbarch_info info;
-- 
2.30.1


  reply	other threads:[~2021-05-06 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 16:49 [PATCH 1/4] gdb: remove target description macros Simon Marchi
2021-05-06 16:49 ` Simon Marchi [this message]
2021-05-07 10:18   ` [PATCH 2/4] gdb: change target_desc_info::fetched to bool Andrew Burgess
2021-05-06 16:49 ` [PATCH 3/4] gdb: (de-)allocate target_desc_info with new/delete Simon Marchi
2021-05-07 10:20   ` Andrew Burgess
2021-05-06 16:49 ` [PATCH 4/4] gdb: make target_desc_info::filename an std::string Simon Marchi
2021-05-07 10:22   ` Andrew Burgess
2021-05-07 20:31     ` Simon Marchi
2021-05-07 10:17 ` [PATCH 1/4] gdb: remove target description macros Andrew Burgess
2021-05-07 19:42   ` Simon Marchi

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=20210506164957.101572-2-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).