[binutils-gdb] gdb: change target_desc_info::fetched to bool

Simon Marchi simark@sourceware.org
Fri May 7 20:29:43 GMT 2021


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

commit 820c449092aaee52e96676ffd7c9760126b85ad7
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri May 7 16:28:56 2021 -0400

    gdb: change target_desc_info::fetched to bool
    
    gdb/ChangeLog:
    
            * target-descriptions.c (struct target_desc_info) <fetched>:
            bool.
            (target_find_description): Adjust.
            (target_clear_description): Adjust.
    
    Change-Id: Ib69e097b38cf270e674f1249105d535a312954e1

Diff:
---
 gdb/ChangeLog             | 7 +++++++
 gdb/target-descriptions.c | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5eff687b319..604403c59cd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2021-05-07  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* target-descriptions.c (struct target_desc_info) <fetched>:
+	bool.
+	(target_find_description): Adjust.
+	(target_clear_description): Adjust.
+
 2021-05-07  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* target-descriptions.c (struct target_desc_info) <tdesc>:
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 7bd05231cce..78dc89ac99f 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;


More information about the Gdb-cvs mailing list