This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/4] dwarf2read: Use bool for dwarf2_section_info fields
- From: Simon Marchi <simon dot marchi at efficios dot com>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Fri, 21 Jun 2019 07:58:13 -0400
- Subject: [PATCH 1/4] dwarf2read: Use bool for dwarf2_section_info fields
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.efficios.com 7F56F259CDF
- References: <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