From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123915 invoked by alias); 29 Mar 2017 02:25:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 121892 invoked by uid 89); 29 Mar 2017 02:25:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-16.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=804 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Mar 2017 02:24:59 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35E754E4CA for ; Wed, 29 Mar 2017 02:24:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 35E754E4CA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 35E754E4CA Received: from cascais.lan (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC35217ADD for ; Wed, 29 Mar 2017 02:24:58 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/5] dwarf2read.c: Some C++fycation Date: Wed, 29 Mar 2017 02:25:00 -0000 Message-Id: <1490754298-9455-1-git-send-email-palves@redhat.com> X-SW-Source: 2017-03/txt/msg00493.txt.bz2 While working on: https://sourceware.org/ml/gdb-patches/2017-03/msg00444.html after looking at: https://sourceware.org/ml/gdb-patches/2017-03/msg00427.html I noticed several things in gdb/dwarf2read.c that could be cleaned up. This is the result. This also serves as an earlier justification for adding several bits that I'd like for another (larger) series I'm working on (e.g., the gdb::optional changes). :-) Tested on x86_64 Fedora 23. Pedro Alves (5): dwarf2read.c: Some C++fycation, use std::vector, std::unique_ptr gdb::optional: Add observers dwarf2read.c: Make dir_index and file_name_index strong typedefs Make sect_offset and cu_offset strong typedefs instead of structs dwarf2read.c: C++fy lnp_state_machine gdb/Makefile.in | 6 +- gdb/common/gdb_optional.h | 29 + gdb/common/offset-type.h | 149 ++++ gdb/common/preprocessor.h | 31 + gdb/common/traits.h | 34 + gdb/common/underlying.h | 32 + gdb/common/valid-expr.h | 108 +++ gdb/dwarf2expr.c | 45 +- gdb/dwarf2expr.h | 16 +- gdb/dwarf2loc.c | 37 +- gdb/dwarf2read.c | 1494 +++++++++++++++++---------------- gdb/gdbtypes.h | 14 +- gdb/unittests/offset-type-selftests.c | 178 ++++ 13 files changed, 1369 insertions(+), 804 deletions(-) create mode 100644 gdb/common/offset-type.h create mode 100644 gdb/common/preprocessor.h create mode 100644 gdb/common/traits.h create mode 100644 gdb/common/underlying.h create mode 100644 gdb/common/valid-expr.h create mode 100644 gdb/unittests/offset-type-selftests.c -- 2.5.5