public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Change linetable_entry::is_stmt to bool
Date: Sat, 11 Mar 2023 15:56:21 +0000 (GMT)	[thread overview]
Message-ID: <20230311155621.3EECE3858C2D@sourceware.org> (raw)

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

commit ddc6677b170be399dfcc7d81325870ff022ba875
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Mar 7 18:26:06 2023 -0700

    Change linetable_entry::is_stmt to bool
    
    This changes linetable_entry::is_stmt to type bool, rather than
    unsigned.
    
    Approved-By: Simon Marchi <simon.marchi@efficios.com>

Diff:
---
 gdb/jit.c           | 2 +-
 gdb/record-btrace.c | 2 +-
 gdb/symtab.h        | 2 +-
 gdb/xcoffread.c     | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/jit.c b/gdb/jit.c
index eb2e8adf519..a93813b3f7f 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -493,7 +493,7 @@ jit_symtab_line_mapping_add_impl (struct gdb_symbol_callbacks *cb,
     {
       stab->linetable->item[i].set_raw_pc ((CORE_ADDR) map[i].pc);
       stab->linetable->item[i].line = map[i].line;
-      stab->linetable->item[i].is_stmt = 1;
+      stab->linetable->item[i].is_stmt = true;
     }
 }
 
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 5b6e33f78fe..3e71c6c9a10 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -738,7 +738,7 @@ btrace_find_line_range (CORE_ADDR pc)
 	 change was made I was unsure how to test this so chose to go with
 	 maintaining the existing experience.  */
       if ((lines[i].raw_pc () == pc) && (lines[i].line != 0)
-	  && (lines[i].is_stmt == 1))
+	  && lines[i].is_stmt)
 	range = btrace_line_range_add (range, lines[i].line);
     }
 
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 9fc9527d21d..005b64b5a08 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1575,7 +1575,7 @@ struct linetable_entry
   int line;
 
   /* True if this PC is a good location to place a breakpoint for LINE.  */
-  unsigned is_stmt : 1;
+  bool is_stmt : 1;
 
   /* True if this location is a good location to place a breakpoint after a
      function prologue.  */
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0642fb555c7..72c0a0db49a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -422,7 +422,7 @@ arrange_linetable (std::vector<linetable_entry> &old_linetable)
 
   for (int ii = 0; ii < old_linetable.size (); ++ii)
     {
-      if (old_linetable[ii].is_stmt == 0)
+      if (!old_linetable[ii].is_stmt)
 	continue;
 
       if (old_linetable[ii].line == 0)
@@ -431,7 +431,7 @@ arrange_linetable (std::vector<linetable_entry> &old_linetable)
 	  fentries.emplace_back ();
 	  linetable_entry &e = fentries.back ();
 	  e.line = ii;
-	  e.is_stmt = 1;
+	  e.is_stmt = true;
 	  e.set_raw_pc (old_linetable[ii].raw_pc ());
 	}
     }

                 reply	other threads:[~2023-03-11 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230311155621.3EECE3858C2D@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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).