From patchwork Fri Jun 21 11:58:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 33248 Received: (qmail 28655 invoked by alias); 21 Jun 2019 11:58:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28630 invoked by uid 89); 21 Jun 2019 11:58:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HDKIM-Filter:v2.10.3 X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Jun 2019 11:58:32 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id E1855259CF7; Fri, 21 Jun 2019 07:58:30 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id lBtbf0xDpUGl; Fri, 21 Jun 2019 07:58:30 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 7F56F259CDF; Fri, 21 Jun 2019 07:58:30 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 7F56F259CDF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1561118310; bh=VnEPru9wkJth9VUCdFJItkN2r6H7c+kgOW4/6WHfLr4=; h=From:To:Date:Message-Id:MIME-Version; b=ZL+6Cw4+QO2cck2TAfKbxKFm0bJe7/Eytb0gsxV5G6G95aCc8zSqtqKejWegxhfgk zubtRknah7YbfAvimezPXiu5zZFVBLMhPYdLaCtRuUXTVZCvQJFPgBbPJr0DTU9dhg +DeyIAXVod0rMSj3kLteBn6W1/oOuXTj52TZ72/aqlZLYIO44WqpQKHEOSLy5KHcev rSjko8OygPIM9UKxM19+2dqKgJGkf1KsHNhFJ38bnxjRFPAtRtH3dT13ij1nET7Y8e Q3sx7TGrSjhmJ5f8YcVPNcWKuT+oA2CNkldbMY5iUTEanjKAwODrMdiAw4pNEuVlCU dAXUadUddWepg== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id oJLMSOzNGnto; Fri, 21 Jun 2019 07:58:30 -0400 (EDT) Received: from smarchi-efficios.internal.efficios.com (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id 5D157259CD2; Fri, 21 Jun 2019 07:58:30 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/4] dwarf2read: Use bool for dwarf2_section_info fields Date: Fri, 21 Jun 2019 07:58:13 -0400 Message-Id: <20190621115816.14841-2-simon.marchi@efficios.com> In-Reply-To: <20190621115816.14841-1-simon.marchi@efficios.com> References: <20190621115816.14841-1-simon.marchi@efficios.com> MIME-Version: 1.0 From: Simon Marchi Use bool instead of char where applicable in dwarf2_section_info. No functional changes intended. gdb/ChangeLog: * dwarf2read.h (struct dwarf2_section_info) : 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;