[Pushed,as,obvious,3/3] gdb: boolify the 'in_g_packet' field of remote's 'packet_reg'

Message ID 20250115163020.3292754-3-tankut.baris.aktemur@intel.com
State New
Headers
Series [Pushed,as,obvious,1/3] gdbserver: remove forward declaration of struct tracepoint_hit_ctx |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Aktemur, Tankut Baris Jan. 15, 2025, 4:30 p.m. UTC
  Boolify the 'in_g_packet' of the 'packet_reg' struct that is used in
remote.c.
---
 gdb/remote.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/remote.c b/gdb/remote.c
index 79d91d6251a..64622dbfcdf 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -466,7 +466,7 @@  struct packet_reg
   long offset; /* Offset into G packet.  */
   long regnum; /* GDB's internal register number.  */
   LONGEST pnum; /* Remote protocol register number.  */
-  int in_g_packet; /* Always part of G packet.  */
+  bool in_g_packet; /* Always part of G packet.  */
   /* long size in bytes;  == register_size (arch, regnum);
      at present.  */
   /* char *name; == gdbarch_register_name (arch, regnum);
@@ -1924,7 +1924,7 @@  map_regcache_remote_table (struct gdbarch *gdbarch, struct packet_reg *regs)
 
   for (regnum = 0, offset = 0; regnum < num_remote_regs; regnum++)
     {
-      remote_regs[regnum]->in_g_packet = 1;
+      remote_regs[regnum]->in_g_packet = true;
       remote_regs[regnum]->offset = offset;
       offset += register_size (gdbarch, remote_regs[regnum]->regnum);
     }
@@ -8997,11 +8997,11 @@  remote_target::process_g_packet (struct regcache *regcache)
 	    continue;
 
 	  if (offset >= sizeof_g_packet)
-	    rsa->regs[i].in_g_packet = 0;
+	    rsa->regs[i].in_g_packet = false;
 	  else if (offset + reg_size > sizeof_g_packet)
 	    error (_("Truncated register %d in remote 'g' packet"), i);
 	  else
-	    rsa->regs[i].in_g_packet = 1;
+	    rsa->regs[i].in_g_packet = true;
 	}
 
       /* Looks valid enough, we can assume this is the correct length