public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 1/4] dwarf2read: Use bool for dwarf2_section_info fields
Date: Fri, 21 Jun 2019 11:58:00 -0000	[thread overview]
Message-ID: <20190621115816.14841-2-simon.marchi@efficios.com> (raw)
In-Reply-To: <20190621115816.14841-1-simon.marchi@efficios.com>

From: Simon Marchi <simon.marchi@polymtl.ca>

Use bool instead of char where applicable in dwarf2_section_info.

No functional changes intended.

gdb/ChangeLog:

	* dwarf2read.h (struct dwarf2_section_info) <readin,
	is_virtual>: Change type to bool.
	* dwarf2read.c (dwarf2_read_section, create_dwp_v2_section): Use
	true instead of 1.
---
 gdb/dwarf2read.c | 4 ++--
 gdb/dwarf2read.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9cf513b582a5..bfc362480f26 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2474,7 +2474,7 @@ dwarf2_read_section (struct objfile *objfile, dwarf2_section_info *info)
   if (info->readin)
     return;
   info->buffer = NULL;
-  info->readin = 1;
+  info->readin = true;
 
   if (dwarf2_section_empty_p (info))
     return;
@@ -12513,7 +12513,7 @@ create_dwp_v2_section (struct dwarf2_per_objfile *dwarf2_per_objfile,
 
   memset (&result, 0, sizeof (result));
   result.s.containing_section = section;
-  result.is_virtual = 1;
+  result.is_virtual = true;
 
   if (size == 0)
     return result;
diff --git a/gdb/dwarf2read.h b/gdb/dwarf2read.h
index 7113cfd38482..c06093c99794 100644
--- a/gdb/dwarf2read.h
+++ b/gdb/dwarf2read.h
@@ -67,10 +67,10 @@ struct dwarf2_section_info
      Only valid if is_virtual.  */
   bfd_size_type virtual_offset;
   /* True if we have tried to read this section.  */
-  char readin;
+  bool readin;
   /* True if this is a virtual section, False otherwise.
      This specifies which of s.section and s.containing_section to use.  */
-  char is_virtual;
+  bool is_virtual;
 };
 
 typedef struct dwarf2_section_info dwarf2_section_info_def;
-- 
2.22.0

  parent reply	other threads:[~2019-06-21 11:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 11:58 [PATCH 0/4] C++-fication of dwo_file and removal of a VEC Simon Marchi
2019-06-21 11:58 ` [PATCH 2/4] dwarf2read: C++ify dwo_file Simon Marchi
2019-06-21 11:58 ` [PATCH 4/4] dwarf2read: Get rid of VEC (dwarf2_section_info_def) Simon Marchi
2019-06-21 11:58 ` Simon Marchi [this message]
2019-06-21 12:05 ` [PATCH 3/4] dwarf2read: Make dwo_file::dbfd a gdb_bfd_ref_ptr Simon Marchi
2019-06-21 16:33 ` [PATCH 0/4] C++-fication of dwo_file and removal of a VEC Tom Tromey
2019-06-21 18:16   ` 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=20190621115816.14841-2-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).