From patchwork Fri Dec 1 15:54:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 81132 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFA293858CDB for ; Fri, 1 Dec 2023 15:58:30 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9D041385AC3D for ; Fri, 1 Dec 2023 15:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9D041385AC3D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9D041385AC3D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701446204; cv=none; b=qIZSJ1xEtG+xF4FDMDj7pvdcVfISGxbBZMQ3jTALFHwO00JI6Yx4lB9Xxf9mozM7SArYd16GC/mrjU9JKelSKAI8HRBifKJYPbGT3tpZmi7ILTGtcIYxV5xvIGc4N15QCRXAfHH5dNeP43ha0tsidrpvNC0+a/L5Fmlt+KtxC1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701446204; c=relaxed/simple; bh=G0hLs0hKR5Fe5PgVGb3mS73zX3X91zmnRnD1fsnMO0c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=S3oxcF287JgXEa28g0Cyc52q5cNeDV5DJ4YLRkl/3NuU77fqfsHthZ8FjDis4mjwU+CSucL7vr2oo4Kku1YaxTDZFRzyiIvTFnWFljAFsFECPZfjjzc30nsWs2s2BXmvfluMLULtmNv67PmA5eM6Jxsp4skc8+GfIBhuC5cU/Nk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701446164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+8EPlIxTulC51EYl7tn/w/dO1XP3deZhybAd5aDgb0A=; b=ZPttbPGs7hlaeEHziLe2+fHx1W2f7/516m+RE7HKvWeG93acXBAgSUGCn0MsTs5lg3hLfP CUf+hv2LaEi74fLNo1lrXeGmD746J9ohT/gUvh7mcKfd5Ke7tKKxaDiJa8D6cMY1NeBJjI /vu9O2z0T7bUFCckTAJTkkqFvbmRbNc= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-h7ENpAqcMcC4l6CzsM2yuA-1; Fri, 01 Dec 2023 10:55:24 -0500 X-MC-Unique: h7ENpAqcMcC4l6CzsM2yuA-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-50bc433c9ccso2243862e87.0 for ; Fri, 01 Dec 2023 07:55:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701446122; x=1702050922; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NQZW1bln8bPaGgTBXVGKqoTGkiHLZJM888Z9UiMouHk=; b=vfGrpa4nTtDf6DckU2sm1RO6ygvcSEIIg6R7fYY5Xu5/n4JVhlNL3lhrWL4WIl4UZk U4++wB7yvao7hJ7+skiAP+OT0EgvfN04tQhb5pJFDPUQ9iU8wXzu9JZQzL2ruiDdv4oi cU4GUgCwiis7b5RC8Ztb36H/wXKRdCI5+J0zoBAXwbW+O6TwItA9UXyTyUrBHbdgP6Jp RwCAegZ2xX3W7xzLZjg3a2emOXbe6jKnbPALMjbdEVrFxose7ySjzuxDZ4k+NlL/PHXt wWDAPtvjXet21mJZjPFOUMLt79i5j3JgNpGbMokI6CpGmaiP2yd+4KimgJ67a5wz5zmG BWqg== X-Gm-Message-State: AOJu0YzzcEK2kX0TPlh+QbWEMy72k5fH9FOBostuL6Wq3NmIVONV7CI1 Bb0/OiRf6tz+FhRdDAgkARPUodI+Kf3ITrCivX+TfLC//SEZs+g2KaIh6MPhvrMdREnZJKBTtUt NDbFv4tOe67zUe9l/TAlKVh6i951V X-Received: by 2002:a19:430d:0:b0:50b:e03b:ebc7 with SMTP id q13-20020a19430d000000b0050be03bebc7mr178407lfa.20.1701446121271; Fri, 01 Dec 2023 07:55:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtQ4fySKoIE+NNHxLI/X7U/bKm+GXncQvlfu3SL95Qvmd51vOJ7gUXoQQwlVICDVHdcpHlIg== X-Received: by 2002:a19:430d:0:b0:50b:e03b:ebc7 with SMTP id q13-20020a19430d000000b0050be03bebc7mr178357lfa.20.1701446118398; Fri, 01 Dec 2023 07:55:18 -0800 (PST) Received: from localhost ([37.169.169.39]) by smtp.gmail.com with ESMTPSA id p23-20020a05600c1d9700b0040b3645a7c2sm9638987wms.40.2023.12.01.07.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:55:16 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 96EFD5077C43; Fri, 1 Dec 2023 16:54:54 +0100 (CET) From: Dodji Seketeli To: Dodji Seketeli Cc: libabigail@sourceware.org Subject: [PATCH 2/4, applied] Bug 30260 - Support pointer-to-member type Organization: Red Hat / France References: <87v89hncoo.fsf@redhat.com> X-Operating-System: AlmaLinux 9.2 X-URL: http://www.redhat.com Date: Fri, 01 Dec 2023 16:54:54 +0100 In-Reply-To: <87v89hncoo.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 01 Dec 2023 16:51:35 +0100") Message-ID: <87msutncj5.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, This adds support for C++ pointer-to-member types. Here is a screenshot of what this patch enables libabigail to do: $ cat -n test-ptr-to-mbr-v0.cc 1 struct X 2 { 3 void f(int); 4 int a; 5 }; 6 7 int X::* pmi = &X::a; 8 void (X::* pmf)(int) = &X::f; 9 $ diff -u test-ptr-to-mbr-v0.cc test-ptr-to-mbr-v1.cc --- test-ptr-to-mbr-v0.cc 2023-11-22 15:22:04.258260701 +0100 +++ test-ptr-to-mbr-v1.cc 2023-11-22 15:23:02.482621214 +0100 @@ -1,9 +1,8 @@ struct X { - void f(int); - int a; + void f(int, char); + char a; }; -int X::* pmi = &X::a; -void (X::* pmf)(int) = &X::f; - +auto pmi = &X::a; +auto pmf = &X::f; $ abidiff test-ptr-to-mbr-v0.o test-ptr-to-mbr-v1.o Functions changes summary: 0 Removed, 0 Changed, 0 Added function Variables changes summary: 0 Removed, 2 Changed, 0 Added variables 2 Changed variables: [C] 'void (X::* pmf)(int)' was changed to 'void (X::* pmf)(int, char)' at test-ptr-to-mbr-v1.cc:8:1: type of variable changed: pointer-to-member type changed from: 'void (X::*)(int) to: 'void (X::*)(int, char)' in containing type 'struct X' of pointed-to-member type 'void (X::*)(int)' at test-ptr-to-mbr-v1.cc:1:1: type size changed from 32 to 8 (in bits) 1 data member change: type of 'int a' changed: type name changed from 'int' to 'char' type size changed from 32 to 8 (in bits) [C] 'int X::* pmi' was changed to 'char X::* pmi' at test-ptr-to-mbr-v1.cc:7:1: type of variable changed: pointer-to-member type changed from: 'int X::* to: 'char X::*' in data member type 'int' of pointed-to-member type 'int X::*': type name changed from 'int' to 'char' type size changed from 32 to 8 (in bits) containing type of pointer-to-member 'struct X' changed at test-ptr-to-mbr-v0.cc:1:1, as reported earlier $ * include/abg-comparison.h (class ptr_to_mbr_diff): Declare new class. (ptr_to_mbr_diff_sptr): Declare new typedef. (compute_diff): Declare new overload for ptr_to_mbr_diff. (ptr_to_mbr_type_sptr): Declare new typedef. * src/abg-comparison-priv.h (struct ptr_to_mbr_diff::priv): Define * src/abg-comparison.cc (compute_diff_for_types): Support new ptr_to_mbr_type type. (ptr_to_mbr_diff::{ptr_to_mbr_diff, first_ptr_to_mbr_type, second_ptr_to_mbr_type, member_type_diff, containing_type_diff, has_changes, has_local_changes, get_pretty_representation, report, chain_into_hierarchy, ~ptr_to_mbr_diff}): Define member functions of class ptr_to_mbr_diff. (compute_diff): Define overload for ptr_to_mbr_type_sptr. * include/abg-fwd.h (ptr_to_mbr_type_sptr): Declare new typedef. (is_ptr_to_mbr_type, is_pointer_to_ptr_to_mbr_type) (is_typedef_of_maybe_qualified_class_or_union_type): Declare new functions. * include/abg-ir.h (type_maps::ptr_to_mbr_types): Declare new accessor. (POINTER_TO_MEMBER_TYPE): Add new enumerator to enum type_or_decl_base::type_or_decl_kind. (class ptr_to_mbr_type): Declare new class. (equals): Declare new overload for ptr_to_mbr_type. (ir_node_visitor::visit_{begin,end}): Declare new member functions. * src/abg-ir.cc (ptr_to_mbr_declaration_name) (ptr_to_mbr_declaration_name, add_outer_ptr_to_mbr_type_expr) (add_outer_pointer_to_ptr_to_mbr_type_expr): Define new static functions. (type_maps::priv::ptr_to_mbr_types_): Define new data member. (type_maps::ptr_to_mbr_types): Define new accessor. (is_ptr_to_mbr_type, is_pointer_to_ptr_to_mbr_type) (is_typedef_of_maybe_qualified_class_or_union_type): Define new functions. (maybe_update_types_lookup_map, equals): Define new overloads for ptr_to_mbr_type_sptr. (is_npaf_type): Use is_ptr_to_mbr_type. (maybe_update_types_lookup_map): In the overload for decl_base_sptr, call the new overload for ptr_to_mbr_type_sptr above. (struct ptr_to_mbr_type::priv): Define new struct. (ptr_to_mbr_type::{ptr_to_mbr_type, get_member_type, get_containing_type, operator==, get_qualified_name, traverse, ~ptr_to_mbr_type}): Define member functions of ptr_to_mbr_type. (types_have_similar_structure): Support the new ptr_to_mbr_type type. (ir_node_visitor::visit_{begin,end}): Add new member functions. (var_decl::get_pretty_representation): Support pretty-printing pointer-to-member types. (pointer_declaration_name, array_declaration_name): Likewise. * include/abg-reporter.h ({reporter_base, default_reporter, leaf_reporter}::report): Add an overload for ptr_to_mbr_diff. (default_reporter::report_local_ptr_to_mbr_type_changes): Declare a member function. private data class of ptr_to_mbr_diff. * src/abg-default-reporter.cc (default_reporter::report_local_ptr_to_mbr_type_changes): Define member functions. (default_reporter::report): Define an overload for ptr_to_mbr_diff. * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise. * src/abg-dwarf-reader.cc (build_ptr_to_mbr_type): Define new function. (build_ir_node_from_die): Use the new build_ptr_to_mbr_type function. * src/abg-reader.cc (build_ptr_to_mbr_type): Define new function. (build_type): Use the new build_ptr_to_mbr_type above. * src/abg-writer.cc (write_ptr_to_mbr_type): Define new function. (write_type, write_decl, write_member_type): Use the new write_ptr_to_mbr_type above. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt: Add new test material. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-output-1.txt: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.cc: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.o: Likewise. * tests/data/test-read-dwarf/test-pointer-to-member-1.cc: Likewise. * tests/data/test-read-dwarf/test-pointer-to-member-1.o: Likewise. * tests/data/test-read-dwarf/test-pointer-to-member-1.o.abi: Likewise. * tests/data/Makefile.am: Add the new test material above to source distribution. * tests/test-abidiff-exit.cc (in_out_specs): Add the test material above to this test harness. * tests/test-annotate.cc (in_out_specs): Likewise. * tests/test-read-dwarf.cc: Likewise. * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Adjust. * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise. Signed-off-by: Dodji Seketeli Applied to master. --- include/abg-comparison.h | 62 + include/abg-fwd.h | 21 + include/abg-ir.h | 75 +- include/abg-reporter.h | 18 + src/abg-comparison-priv.h | 13 + src/abg-comparison.cc | 161 + src/abg-default-reporter.cc | 94 + src/abg-dwarf-reader.cc | 91 +- src/abg-ir.cc | 749 +- src/abg-leaf-reporter.cc | 15 + src/abg-reader.cc | 85 + src/abg-writer.cc | 106 +- tests/data/Makefile.am | 29 + .../test-ptr-to-mbr1-output-1.txt | 18 + .../pointer-to-member/test-ptr-to-mbr1-v0.cc | 7 + .../pointer-to-member/test-ptr-to-mbr1-v0.o | Bin 0 -> 2624 bytes .../pointer-to-member/test-ptr-to-mbr1-v1.cc | 6 + .../pointer-to-member/test-ptr-to-mbr1-v1.o | Bin 0 -> 2656 bytes .../test-ptr-to-mbr2-output-1.txt | 13 + .../pointer-to-member/test-ptr-to-mbr2-v0.cc | 7 + .../pointer-to-member/test-ptr-to-mbr2-v0.o | Bin 0 -> 2624 bytes .../pointer-to-member/test-ptr-to-mbr2-v1.cc | 6 + .../pointer-to-member/test-ptr-to-mbr2-v1.o | Bin 0 -> 2624 bytes .../test-ptr-to-mbr3-output-1.txt | 20 + .../pointer-to-member/test-ptr-to-mbr3-v0.cc | 7 + .../pointer-to-member/test-ptr-to-mbr3-v0.o | Bin 0 -> 2624 bytes .../pointer-to-member/test-ptr-to-mbr3-v1.cc | 6 + .../pointer-to-member/test-ptr-to-mbr3-v1.o | Bin 0 -> 2664 bytes .../test-ptr-to-mbr4-output-1.txt | 12 + .../pointer-to-member/test-ptr-to-mbr4-v0.cc | 8 + .../pointer-to-member/test-ptr-to-mbr4-v0.o | Bin 0 -> 2688 bytes .../pointer-to-member/test-ptr-to-mbr4-v1.cc | 7 + .../pointer-to-member/test-ptr-to-mbr4-v1.o | Bin 0 -> 2696 bytes .../test-ptr-to-mbr5-output-1.txt | 0 .../pointer-to-member/test-ptr-to-mbr5-v0.cc | 8 + .../pointer-to-member/test-ptr-to-mbr5-v0.o | Bin 0 -> 2640 bytes .../pointer-to-member/test-ptr-to-mbr5-v1.cc | 7 + .../pointer-to-member/test-ptr-to-mbr5-v1.o | Bin 0 -> 2648 bytes .../test-pointer-to-member-1.o.annotated.abi | 99 + .../PR22015-libboost_iostreams.so.abi | 2729 +- .../test-pointer-to-member-1.cc | 30 + .../test-pointer-to-member-1.o | Bin 0 -> 4360 bytes .../test-pointer-to-member-1.o.abi | 59 + .../test-read-dwarf/test12-pr18844.so.abi | 24153 ++++++++-------- tests/test-abidiff-exit.cc | 75 + tests/test-annotate.cc | 5 + tests/test-read-dwarf.cc | 9 + 47 files changed, 15415 insertions(+), 13395 deletions(-) create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-output-1.txt create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.cc create mode 100644 tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.o create mode 100644 tests/data/test-annotate/test-pointer-to-member-1.o.annotated.abi create mode 100644 tests/data/test-read-dwarf/test-pointer-to-member-1.cc create mode 100644 tests/data/test-read-dwarf/test-pointer-to-member-1.o create mode 100644 tests/data/test-read-dwarf/test-pointer-to-member-1.o.abi new file mode 100644 index 00000000..3a536856 new file mode 100644 index 00000000..ad065c1a new file mode 100644 index 00000000..f9828109 new file mode 100644 index 00000000..939fae6c new file mode 100644 index 00000000..d9dabec6 new file mode 100644 index 00000000..617257b0 new file mode 100644 index 00000000..ba677741 new file mode 100644 index 00000000..e69de29b new file mode 100644 index 00000000..fc2cc13a new file mode 100644 index 00000000..02e54955 new file mode 100644 index 00000000..39980bcd diff --git a/include/abg-comparison.h b/include/abg-comparison.h index 9155cc54..f6e25e20 100644 --- a/include/abg-comparison.h +++ b/include/abg-comparison.h @@ -1416,6 +1416,68 @@ compute_diff(reference_type_def_sptr first, diff_context_sptr ctxt); +class ptr_to_mbr_diff; + +/// Typedef of a shared_ptr to @ref ptr_to_mbr_diff +typedef shared_ptr ptr_to_mbr_diff_sptr; + +/// The abstraction of a diff between two @ref ptr_to_mbr_type. +class ptr_to_mbr_diff : public type_diff_base +{ + struct priv; + std::unique_ptr priv_; + + ptr_to_mbr_diff() = default; + +protected: + ptr_to_mbr_diff(const ptr_to_mbr_type_sptr& first, + const ptr_to_mbr_type_sptr& second, + const diff_sptr& member_type_diff, + const diff_sptr& containing_type_diff, + diff_context_sptr ctxt); + +public: + + ptr_to_mbr_type_sptr + first_ptr_to_mbr_type() const; + + ptr_to_mbr_type_sptr + second_ptr_to_mbr_type() const; + + const diff_sptr + member_type_diff() const; + + const diff_sptr + containing_type_diff() const; + + virtual bool + has_changes() const; + + virtual enum change_kind + has_local_changes() const; + + virtual const string& + get_pretty_representation() const; + + virtual void + report(ostream&, const string& indent = "") const; + + virtual void + chain_into_hierarchy(); + + virtual ~ptr_to_mbr_diff(); + + friend ptr_to_mbr_diff_sptr + compute_diff(const ptr_to_mbr_type_sptr& first, + const ptr_to_mbr_type_sptr& second, + diff_context_sptr& ctxt); +}; // end class ptr_to_mbr_diff + +ptr_to_mbr_diff_sptr +compute_diff(const ptr_to_mbr_type_sptr& first, + const ptr_to_mbr_type_sptr& second, + diff_context_sptr& ctxt); + class subrange_diff; /// A convenience typedef for a shared pointer to subrange_diff type. diff --git a/include/abg-fwd.h b/include/abg-fwd.h index 3687d346..51043af2 100644 --- a/include/abg-fwd.h +++ b/include/abg-fwd.h @@ -231,6 +231,10 @@ class reference_type_def; /// Convenience typedef for a shared pointer on a @ref reference_type_def typedef shared_ptr reference_type_def_sptr; +class ptr_to_mbr_type; +/// Convenience typedef for a shared pointer to a @ref ptr_to_mbr_type +typedef shared_ptr ptr_to_mbr_type_sptr; + class array_type_def; /// Convenience typedef for a shared pointer on a @ref array_type_def @@ -553,12 +557,21 @@ is_pointer_to_function_type(const type_base_sptr&); pointer_type_def_sptr is_pointer_to_array_type(const type_base_sptr&); +pointer_type_def_sptr +is_pointer_to_ptr_to_mbr_type(const type_base_sptr&); + pointer_type_def_sptr is_pointer_to_npaf_type(const type_base_sptr&); bool is_typedef_ptr_or_ref_to_decl_only_class_or_union_type(const type_base* t); +bool +is_typedef_of_maybe_qualified_class_or_union_type(const type_base* t); + +bool +is_typedef_of_maybe_qualified_class_or_union_type(const type_base_sptr& t); + reference_type_def* is_reference_type(type_or_decl_base*, bool look_through_qualifiers=false); @@ -569,6 +582,14 @@ reference_type_def_sptr is_reference_type(const type_or_decl_base_sptr&, bool look_through_qualifiers=false); +const ptr_to_mbr_type* +is_ptr_to_mbr_type(const type_or_decl_base*, + bool look_through_qualifiers=false); + +ptr_to_mbr_type_sptr +is_ptr_to_mbr_type(const type_or_decl_base_sptr&, + bool look_through_qualifiers=false); + const type_base* is_void_pointer_type(const type_base*); diff --git a/include/abg-ir.h b/include/abg-ir.h index 8ed8d734..a500762a 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -637,6 +637,12 @@ public: const istring_type_base_wptrs_map_type& pointer_types() const; + istring_type_base_wptrs_map_type& + ptr_to_mbr_types(); + + const istring_type_base_wptrs_map_type& + ptr_to_mbr_types() const; + istring_type_base_wptrs_map_type& reference_types(); @@ -1382,13 +1388,14 @@ protected: QUALIFIED_TYPE = 1 << 12, POINTER_TYPE = 1 << 13, REFERENCE_TYPE = 1 << 14, - ARRAY_TYPE = 1 << 15, - ENUM_TYPE = 1 << 16, - TYPEDEF_TYPE = 1 << 17, - CLASS_TYPE = 1 << 18, - UNION_TYPE = 1 << 19, - FUNCTION_TYPE = 1 << 20, - METHOD_TYPE = 1 << 21, + POINTER_TO_MEMBER_TYPE = 1 << 15, + ARRAY_TYPE = 1 << 16, + ENUM_TYPE = 1 << 17, + TYPEDEF_TYPE = 1 << 18, + CLASS_TYPE = 1 << 19, + UNION_TYPE = 1 << 20, + FUNCTION_TYPE = 1 << 21, + METHOD_TYPE = 1 << 22, }; // end enum type_or_decl_kind enum type_or_decl_kind @@ -2444,6 +2451,57 @@ operator==(const reference_type_def_sptr&, const reference_type_def_sptr&); bool operator!=(const reference_type_def_sptr&, const reference_type_def_sptr&); +/// The abstraction of a pointer-to-member type. +class ptr_to_mbr_type : public virtual type_base, + public virtual decl_base +{ + struct priv; + std::unique_ptr priv_; + + // Forbidden + ptr_to_mbr_type() = delete; + + public: + ptr_to_mbr_type(const environment& env, + const type_base_sptr& member_type, + const type_base_sptr& containing_type, + size_t size_in_bits, + size_t alignment_in_bits, + const location& locus); + + const type_base_sptr& + get_member_type() const; + + const type_base_sptr& + get_containing_type() const; + + bool + operator==(const ptr_to_mbr_type&) const; + + virtual bool + operator==(const type_base&) const; + + virtual bool + operator==(const decl_base&) const; + + virtual void + get_qualified_name(interned_string& qualified_name, + bool internal = false) const; + + virtual const interned_string& + get_qualified_name(bool internal = false) const; + + virtual bool + traverse(ir_node_visitor& v); + + virtual ~ptr_to_mbr_type(); +}; // end class ptr_to_mbr_type + +bool +equals(const ptr_to_mbr_type&, + const ptr_to_mbr_type&, + change_kind*); + bool equals(const array_type_def&, const array_type_def&, change_kind*); @@ -4925,6 +4983,9 @@ public: virtual bool visit_begin(reference_type_def*); virtual bool visit_end(reference_type_def*); + virtual bool visit_begin(ptr_to_mbr_type*); + virtual bool visit_end(ptr_to_mbr_type*); + virtual bool visit_begin(array_type_def*); virtual bool visit_end(array_type_def*); diff --git a/include/abg-reporter.h b/include/abg-reporter.h index 8104c653..a701d9d7 100644 --- a/include/abg-reporter.h +++ b/include/abg-reporter.h @@ -32,6 +32,7 @@ class qualified_type_diff; class distinct_diff; class pointer_diff; class reference_diff; +class ptr_to_mbr_diff; class subrange_diff; class array_diff; class base_diff; @@ -89,6 +90,10 @@ public: report(const reference_diff& d, std::ostream& out, const std::string& indent = "") const = 0; + virtual void + report(const ptr_to_mbr_diff& d, std::ostream& out, + const std::string& indent = "") const = 0; + virtual void report(const array_diff& d, std::ostream& out, const std::string& indent = "") const = 0; @@ -200,6 +205,15 @@ public: report(const reference_diff& d, std::ostream& out, const std::string& indent = "") const; + bool + report_local_ptr_to_mbr_type_changes(const ptr_to_mbr_diff& d, + std::ostream& out, + const std::string& indent = "") const; + + virtual void + report(const ptr_to_mbr_diff& d, std::ostream& out, + const std::string& indent = "") const; + virtual void report(const fn_parm_diff& d, std::ostream& out, const std::string& indent = "") const; @@ -291,6 +305,10 @@ public: report(const reference_diff& d, std::ostream& out, const std::string& indent = "") const; + virtual void + report(const ptr_to_mbr_diff& d, std::ostream& out, + const std::string& indent = "") const; + virtual void report(const fn_parm_diff& d, std::ostream& out, const std::string& indent = "") const; diff --git a/src/abg-comparison-priv.h b/src/abg-comparison-priv.h index 9802e78f..3f86db5e 100644 --- a/src/abg-comparison-priv.h +++ b/src/abg-comparison-priv.h @@ -443,6 +443,19 @@ struct reference_diff::priv {} };//end struct reference_diff::priv +/// The private data of the @ref ptr_to_mbr_diff type. +struct ptr_to_mbr_diff::priv +{ + diff_sptr member_type_diff_; + diff_sptr containing_type_diff_; + + priv(const diff_sptr& member_type_diff, + const diff_sptr& containing_type_diff) + : member_type_diff_(member_type_diff), + containing_type_diff_(containing_type_diff) + {} +};//end ptr_to_mbr_diff::priv + struct qualified_type_diff::priv { diff_sptr underlying_type_diff; diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 8a705c54..fdd2a688 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -3041,6 +3041,7 @@ compute_diff_for_types(const type_or_decl_base_sptr& first, ||(d = try_to_diff(f, s,ctxt)) ||(d = try_to_diff(f, s, ctxt)) ||(d = try_to_diff(f, s, ctxt)) + ||(d = try_to_diff(f, s, ctxt)) ||(d = try_to_diff(f, s, ctxt)) ||(d = try_to_diff(f, s, ctxt)) ||(d = try_to_diff(f, s, ctxt)) @@ -4143,6 +4144,166 @@ compute_diff(reference_type_def_sptr first, } // +// + + +/// Constructor of @ref ptr_to_mbr_diff. +/// +/// @param first the first pointer-to-member subject of the diff. +/// +/// @param second the second pointer-to-member subject of the diff. +/// +/// @param member_type_diff the diff node carrying changes to the +/// member type of the pointer-to-member we are considering. +/// +/// @param containing_type_diff the diff node carrying changes to the +/// containing type of the pointer-to-member we are considering. +/// +/// @param ctxt the context of the diff we are considering. +ptr_to_mbr_diff::ptr_to_mbr_diff(const ptr_to_mbr_type_sptr& first, + const ptr_to_mbr_type_sptr& second, + const diff_sptr& member_type_diff, + const diff_sptr& containing_type_diff, + diff_context_sptr ctxt) + : type_diff_base(first, second, ctxt), + priv_(new priv(member_type_diff, containing_type_diff)) +{} + +/// Getter of the first pointer-to-member subject of the current diff +/// node. +/// +/// @return the first pointer-to-member subject of the current diff +/// node. +ptr_to_mbr_type_sptr +ptr_to_mbr_diff::first_ptr_to_mbr_type() const +{return dynamic_pointer_cast(first_subject());} + +/// Getter of the second pointer-to-member subject of the current diff +/// node. +/// +/// @return the second pointer-to-member subject of the current diff +/// node. +ptr_to_mbr_type_sptr +ptr_to_mbr_diff::second_ptr_to_mbr_type() const +{return dynamic_pointer_cast(second_subject());} + +/// Getter of the diff node carrying changes to the member type of +/// first subject of the current diff node. +/// +/// @return The diff node carrying changes to the member type of first +/// subject of the current diff node. +const diff_sptr +ptr_to_mbr_diff::member_type_diff() const +{return priv_->member_type_diff_;} + +/// Getter of the diff node carrying changes to the containing type of +/// first subject of the current diff node. +/// +/// @return The diff node carrying changes to the containing type of +/// first subject of the current diff node. +const diff_sptr +ptr_to_mbr_diff::containing_type_diff() const +{return priv_->containing_type_diff_;} + +/// Test whether the current diff node carries any change. +/// +/// @return true iff the current diff node carries any change. +bool +ptr_to_mbr_diff::has_changes() const +{ + return first_ptr_to_mbr_type() != second_ptr_to_mbr_type(); +} + +/// Test whether the current diff node carries any local change. +/// +/// @return true iff the current diff node carries any local change. +enum change_kind +ptr_to_mbr_diff::has_local_changes() const +{ + ir::change_kind k = ir::NO_CHANGE_KIND; + if (!equals(*first_ptr_to_mbr_type(), *second_ptr_to_mbr_type(), &k)) + return k & ir::ALL_LOCAL_CHANGES_MASK; + return ir::NO_CHANGE_KIND; +} + +/// Get the pretty representation of the current @ref ptr_to_mbr_diff +/// node. +/// +/// @return the pretty representation of the current diff node. +const string& +ptr_to_mbr_diff::get_pretty_representation() const +{ + if (diff::priv_->pretty_representation_.empty()) + { + std::ostringstream o; + o << "ptr_to_mbr_diff[" + << first_subject()->get_pretty_representation() + << ", " + << second_subject()->get_pretty_representation() + << "]"; + diff::priv_->pretty_representation_ = o.str(); + } + return diff::priv_->pretty_representation_; +} + +void +ptr_to_mbr_diff::report(ostream& out, const string& indent) const +{ + context()->get_reporter()->report(*this, out, indent); +} + +/// Populate the vector of children node of the @ref diff base type +/// sub-object of this instance of @ref ptr_to_mbr_diff. +/// +/// The children node can then later be retrieved using +/// diff::children_node(). +void +ptr_to_mbr_diff::chain_into_hierarchy() +{ + append_child_node(member_type_diff()); + append_child_node(containing_type_diff()); +} + +/// Destructor of @ref ptr_to_mbr_diff. +ptr_to_mbr_diff::~ptr_to_mbr_diff() +{ +} + +/// Compute the diff between two @ref ptr_to_mbr_type types. +/// +/// Note that the two types must have been created in the same @ref +/// environment, otherwise, this function aborts. +/// +/// @param first the first pointer-to-member type to consider for the diff. +/// +/// @param second the second pointer-to-member type to consider for the diff. +/// +/// @param ctxt the diff context to use. +ptr_to_mbr_diff_sptr +compute_diff(const ptr_to_mbr_type_sptr& first, + const ptr_to_mbr_type_sptr& second, + diff_context_sptr& ctxt) +{ + diff_sptr member_type_diff = + compute_diff(is_type(first->get_member_type()), + is_type(second->get_member_type()), + ctxt); + + diff_sptr containing_type_diff = + compute_diff(is_type(first->get_containing_type()), + is_type(second->get_containing_type()), + ctxt); + + ptr_to_mbr_diff_sptr result(new ptr_to_mbr_diff(first, second, + member_type_diff, + containing_type_diff, + ctxt)); + ctxt->initialize_canonical_diff(result); + return result; +} + +// + // /// Populate the vector of children node of the @ref diff base type diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index c71f8d56..0b317fac 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -522,6 +522,100 @@ default_reporter::report(const reference_diff& d, ostream& out, } } +/// Report the local changes carried by a @ref ptr_to_mbr_diff diff +/// node. +/// +/// This is a subroutine of the method default_reporter::report() that +/// emits change report for @ref ptr_to_mbr_diff node. +/// +/// @param d the diff node to consider +/// +/// @param out the output stream to emit the report to. +/// +/// @param indent the indentation string (spaces) to use in the +/// report. +/// +/// @return truf iff a report was emitted to the output stream. +bool +default_reporter::report_local_ptr_to_mbr_type_changes(const ptr_to_mbr_diff& d, + std::ostream& out, + const std::string& indent) const +{ + if (!d.to_be_reported()) + return false; + + ptr_to_mbr_type_sptr f = d.first_ptr_to_mbr_type(), + s = d.second_ptr_to_mbr_type(); + + enum change_kind k = ir::NO_CHANGE_KIND; + equals(*d.first_ptr_to_mbr_type(), *d.second_ptr_to_mbr_type(), &k); + + if (k & ALL_LOCAL_CHANGES_MASK) + { + string f_repr = f->get_pretty_representation(), + s_repr = s->get_pretty_representation(); + + out << indent; + out << "pointer-to-member type changed from: '" + << f_repr << " to: '"<< s_repr << "'\n"; + return true; + } + return false; +} + + +/// Emit a textual report about the changes carried by a @ref +/// ptr_to_mbr_diff diff node. +/// +/// @param out the output stream to emit the report to. +/// +/// @param indent the indentation string to use for the report. +void +default_reporter::report(const ptr_to_mbr_diff& d, + std::ostream& out, + const std::string& indent) const +{ + if (!d.to_be_reported()) + return; + + report_local_ptr_to_mbr_type_changes(d, out, indent); + + if (diff_sptr dif = d.member_type_diff()) + { + RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2 + (dif,"data member type of pointer-to-member"); + if (dif->to_be_reported()) + { + out << indent + << "in data member type '" + << dif->first_subject()->get_pretty_representation() + << "' of pointed-to-member type '" + << d.first_ptr_to_mbr_type()->get_pretty_representation() + << "'"; + report_loc_info(dif->second_subject(), *d.context(), out); + out << ":\n"; + dif->report(out, indent + " "); + } + } + if (diff_sptr dif = d.containing_type_diff()) + { + RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2 + (dif,"containing type of pointer-to-member"); + if (dif->to_be_reported()) + { + out << indent + << "in containing type '" + << dif->first_subject()->get_pretty_representation() + << "' of pointed-to-member type '" + << d.first_ptr_to_mbr_type()->get_pretty_representation() + << "'"; + report_loc_info(dif->second_subject(), *d.context(), out); + out << ":\n"; + dif->report(out, indent + " "); + } + } +} + /// Emit a textual report about the a @ref fn_parm_diff instance. /// /// @param d the @ref fn_parm_diff to consider. diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 0cf1ce14..15a35edf 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -13994,6 +13994,81 @@ build_reference_type(reader& rdr, return result; } +/// Build an instance of @ref ptr_to_mbr_type from a DIE of tag +/// DW_TAG_ptr_to_member_type. +/// +/// @param the DWARF reader touse. +/// +/// @param the DIE to consider. It must carry the tag +/// DW_TAG_ptr_to_member_type. +/// +/// @param called_from_public_decl true if this function was called +/// from a context where either a public function or a public variable +/// is being built. +/// +/// @param where_offset the offset of the DIE where we are "logically" +/// positionned at, in the DIE tree. This is useful when @p die is +/// e.g, DW_TAG_partial_unit that can be included in several places in +/// the DIE tree. +/// +/// @return a pointer to the resulting @ref ptr_to_mbr_type. +static ptr_to_mbr_type_sptr +build_ptr_to_mbr_type(reader& rdr, + Dwarf_Die* die, + bool called_from_public_decl, + size_t where_offset) +{ + ptr_to_mbr_type_sptr result; + + if (!die) + return result; + + unsigned tag = dwarf_tag(die); + if (tag != DW_TAG_ptr_to_member_type) + return result; + + Dwarf_Die data_member_type_die, containing_type_die; + + if (!die_die_attribute(die, DW_AT_type, data_member_type_die) + || !die_die_attribute(die, DW_AT_containing_type, containing_type_die)) + return result; + + type_or_decl_base_sptr data_member_type = + build_ir_node_from_die(rdr, &data_member_type_die, + called_from_public_decl, where_offset); + if (!data_member_type) + return result; + + type_or_decl_base_sptr containing_type = + build_ir_node_from_die(rdr, &containing_type_die, + called_from_public_decl, where_offset); + if (!containing_type) + return result; + + if (!is_typedef_of_maybe_qualified_class_or_union_type + (is_type(containing_type))) + return result; + + if (type_base_sptr t = rdr.lookup_type_from_die(die)) + { + result = is_ptr_to_mbr_type(t); + ABG_ASSERT(result); + return result; + } + + uint64_t size_in_bits = rdr.cur_transl_unit()->get_address_size(); + + result.reset(new ptr_to_mbr_type(data_member_type->get_environment(), + is_type(data_member_type), + is_type(containing_type), + size_in_bits, + /*alignment=*/0, + location())); + + rdr.associate_die_to_type(die, result, where_offset); + return result; +} + /// Build a subroutine type from a DW_TAG_subroutine_type DIE. /// /// @param rdr the DWARF reader to consider. @@ -15511,6 +15586,20 @@ build_ir_node_from_die(reader& rdr, } break; + case DW_TAG_ptr_to_member_type: + { + ptr_to_mbr_type_sptr p = + build_ptr_to_mbr_type(rdr, die, called_from_public_decl, + where_offset); + if (p) + { + result = + add_decl_to_scope(p, rdr.cur_transl_unit()->get_global_scope()); + maybe_canonicalize_type(p, rdr); + } + } + break; + case DW_TAG_const_type: case DW_TAG_volatile_type: case DW_TAG_restrict_type: @@ -15707,8 +15796,6 @@ build_ir_node_from_die(reader& rdr, break; case DW_TAG_file_type: break; - case DW_TAG_ptr_to_member_type: - break; case DW_TAG_thrown_type: break; case DW_TAG_interface_type: diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 06cfe558..56d71465 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -231,6 +231,16 @@ pointer_declaration_name(const type_base_sptr& ptr, const string& variable_name, bool qualified, bool internal); +static interned_string +ptr_to_mbr_declaration_name(const ptr_to_mbr_type* ptr, + const string& variable_name, + bool qualified, bool internal); + +static interned_string +ptr_to_mbr_declaration_name(const ptr_to_mbr_type_sptr& ptr, + const string& variable_name, + bool qualified, bool internal); + static interned_string array_declaration_name(const array_type_def* array, const string& variable_name, @@ -264,6 +274,22 @@ static string add_outer_pointer_to_array_type_expr(const type_base_sptr& pointer_to_ar, const string& input, bool qualified, bool internal); + +static string +add_outer_ptr_to_mbr_type_expr(const ptr_to_mbr_type* p, + const string& input, bool qualified, + bool internal); + +static string +add_outer_ptr_to_mbr_type_expr(const ptr_to_mbr_type_sptr& p, + const string& input, bool qualified, + bool internal); + +static string +add_outer_pointer_to_ptr_to_mbr_type_expr(const type_base* p, + const string& input, + bool qualified, bool internal); + void push_composite_type_comparison_operands(const type_base& left, const type_base& right); @@ -540,6 +566,7 @@ struct type_maps::priv mutable istring_type_base_wptrs_map_type typedef_types_; mutable istring_type_base_wptrs_map_type qualified_types_; mutable istring_type_base_wptrs_map_type pointer_types_; + mutable istring_type_base_wptrs_map_type ptr_to_mbr_types_; mutable istring_type_base_wptrs_map_type reference_types_; mutable istring_type_base_wptrs_map_type array_types_; mutable istring_type_base_wptrs_map_type subrange_types_; @@ -660,6 +687,20 @@ istring_type_base_wptrs_map_type& type_maps::pointer_types() {return priv_->pointer_types_;} +/// Getter for the map that associates the name of a pointer-to-member +/// type to the vector of instances of @ref ptr_to_mbr_type_sptr that +/// represents that type. +istring_type_base_wptrs_map_type& +type_maps::ptr_to_mbr_types() +{return priv_->ptr_to_mbr_types_;} + +/// Getter for the map that associates the name of a pointer-to-member +/// type to the vector of instances of @ref ptr_to_mbr_type_sptr that +/// represents that type. +const istring_type_base_wptrs_map_type& +type_maps::ptr_to_mbr_types() const +{return priv_->ptr_to_mbr_types_;} + /// Getter for the map that associates the name of a pointer type to /// the vector of instances of @ref pointer_type_def_sptr that /// represents that type. @@ -10584,7 +10625,10 @@ is_anonymous_type(const type_base_sptr& t) bool is_npaf_type(const type_base_sptr& t) { - if (!(is_pointer_type(t) || is_array_type(t) || is_function_type(t))) + if (!(is_pointer_type(t) + || is_array_type(t) + || is_function_type(t) + || is_ptr_to_mbr_type(t))) return true; return false; } @@ -11173,6 +11217,23 @@ is_pointer_to_npaf_type(const type_base_sptr& t) return pointer_type_def_sptr(); } +/// Test if we are looking at a pointer to pointer to member type. +/// +/// @param t the type to consider. +/// +/// @return the @ref pointer_type_def_sptr type iff @p t is a pointer +/// to pointer to member type. +pointer_type_def_sptr +is_pointer_to_ptr_to_mbr_type(const type_base_sptr& t) +{ + if (pointer_type_def_sptr p = is_pointer_type(t)) + { + if (is_ptr_to_mbr_type(p->get_pointed_to_type())) + return p; + } + return pointer_type_def_sptr(); +} + /// Test if a type is a typedef, pointer or reference to a decl-only /// class/union. /// @@ -11195,6 +11256,43 @@ is_typedef_ptr_or_ref_to_decl_only_class_or_union_type(const type_base* t) return false; } +/// Test if a type is a typedef of a class or union type, or a typedef +/// of a qualified class or union type. +/// +/// Note that if the type is directly a class or union type, the +/// function returns true as well. +/// +/// @param t the type to consider. +/// +/// @return true iff @p t is a typedef of a class or union type, or a +/// typedef of a qualified class or union type. +bool +is_typedef_of_maybe_qualified_class_or_union_type(const type_base* t) +{ + if (!t) + return false; + + t = peel_qualified_or_typedef_type(t); + if (is_class_or_union_type(t)) + return true; + +return false; +} + +/// Test if a type is a typedef of a class or union type, or a typedef +/// of a qualified class or union type. +/// +/// Note that if the type is directly a class or union type, the +/// function returns true as well. +/// +/// @param t the type to consider. +/// +/// @return true iff @p t is a typedef of a class or union type, or a +/// typedef of a qualified class or union type. +bool +is_typedef_of_maybe_qualified_class_or_union_type(const type_base_sptr& t) +{return is_typedef_of_maybe_qualified_class_or_union_type(t.get());} + /// Test whether a type is a reference_type_def. /// /// @param t the type to test. @@ -11259,6 +11357,42 @@ is_reference_type(const type_or_decl_base_sptr& t, return dynamic_pointer_cast(type); } +/// Test whether a type is a @ref ptr_to_mbr_type. +/// +/// @param t the type to test. +/// +/// @return the @ref ptr_to_mbr_type* if @p t is a @ref +/// ptr_to_mbr_type type, null otherwise. +const ptr_to_mbr_type* +is_ptr_to_mbr_type(const type_or_decl_base* t, + bool look_through_qualifiers) +{ + const type_base* type = is_type(t); + if (look_through_qualifiers) + type = peel_qualified_type(type); + return dynamic_cast(type); +} + +/// Test whether a type is a @ref ptr_to_mbr_type_sptr. +/// +/// @param t the type to test. +/// +/// @param look_through_decl_only if this is true, then look through +/// qualified types to see if the underlying type is a +/// ptr_to_mbr_type.. +/// +/// @return the @ref ptr_to_mbr_type_sptr if @p t is a @ref +/// ptr_to_mbr_type type, null otherwise. +ptr_to_mbr_type_sptr +is_ptr_to_mbr_type(const type_or_decl_base_sptr& t, + bool look_through_qualifiers) +{ + type_base_sptr type = is_type(t); + if (look_through_qualifiers) + type = peel_qualified_type(type); + return dynamic_pointer_cast(type); +} + /// Test if a type is equivalent to a pointer to void type. /// /// Note that this looks trough typedefs or CV qualifiers to look for @@ -14518,6 +14652,39 @@ maybe_update_types_lookup_map(const pointer_type_def_sptr& pointer_type) } } +/// Update the map that associates the fully qualified name of a +/// pointer-to-member type with the type itself. +/// +/// The per-translation unit type map is updated if no type with this +/// name was already existing in that map. +/// +/// If no type with this name did already exist in the per-corpus type +/// map, then that per-corpus type map is updated. Otherwise, that +/// type is erased from that per-corpus map. +/// +/// @param ptr_to_mbr_type the type to consider. +void +maybe_update_types_lookup_map(const ptr_to_mbr_type_sptr& ptr_to_member) +{ + if (translation_unit *tu = ptr_to_member->get_translation_unit()) + maybe_update_types_lookup_map + (ptr_to_member, tu->get_types().ptr_to_mbr_types()); + + if (corpus *type_corpus = ptr_to_member->get_corpus()) + { + maybe_update_types_lookup_map + (ptr_to_member, + type_corpus->priv_->get_types().ptr_to_mbr_types()); + + if (corpus *group = type_corpus->get_group()) + { + maybe_update_types_lookup_map + (ptr_to_member, + group->priv_->get_types().ptr_to_mbr_types()); + } + } +} + /// Update the map that associates the fully qualified name of a /// reference type with the type itself. /// @@ -14703,6 +14870,8 @@ maybe_update_types_lookup_map(const decl_base_sptr& decl) maybe_update_types_lookup_map(qualified_type); else if (pointer_type_def_sptr pointer_type = is_pointer_type(decl)) maybe_update_types_lookup_map(pointer_type); + else if (ptr_to_mbr_type_sptr ptr_to_member = is_ptr_to_mbr_type(decl)) + maybe_update_types_lookup_map(ptr_to_member); else if (reference_type_def_sptr reference_type = is_reference_type(decl)) maybe_update_types_lookup_map(reference_type); else if (array_type_def_sptr array_type = is_array_type(decl)) @@ -18111,6 +18280,280 @@ operator!=(const reference_type_def_sptr& l, const reference_type_def_sptr& r) // +// + +/// The private data type of @ref ptr_to_mbr_type. +struct ptr_to_mbr_type::priv +{ + // The type of the data member this pointer-to-member-type + // designates. + type_base_sptr dm_type_; + // The class (or typedef to potentially qualified class) containing + // the data member this pointer-to-member-type designates. + type_base_sptr containing_type_; + interned_string internal_qualified_name_; + interned_string temp_internal_qualified_name_; + + priv() + {} + + priv(const type_base_sptr& dm_type, const type_base_sptr& containing_type) + : dm_type_(dm_type), + containing_type_(containing_type) + {} +};// end struct ptr_to_mbr_type::priv + +/// A constructor for a @ref ptr_to_mbr_type type. +/// +/// @param env the environment to construct the @ref ptr_to_mbr_type in. +/// +/// @param member_type the member type of the of the @ref +/// ptr_to_mbr_type to construct. +/// +/// @param containing_type the containing type of the @ref +/// ptr_to_mbr_type to construct. +/// +/// @param size_in_bits the size (in bits) of the resulting type. +/// +/// @param alignment_in_bits the alignment (in bits) of the resulting +/// type. +/// +/// @param locus the source location of the definition of the +/// resulting type. +ptr_to_mbr_type::ptr_to_mbr_type(const environment& env, + const type_base_sptr& member_type, + const type_base_sptr& containing_type, + size_t size_in_bits, + size_t alignment_in_bits, + const location& locus) + : type_or_decl_base(env, + POINTER_TO_MEMBER_TYPE + | ABSTRACT_TYPE_BASE + | ABSTRACT_DECL_BASE), + type_base(env, size_in_bits, alignment_in_bits), + decl_base(env, "", locus, ""), + priv_(new priv(member_type, containing_type)) +{ + runtime_type_instance(this); + ABG_ASSERT(member_type); + ABG_ASSERT(containing_type); + interned_string name = ptr_to_mbr_declaration_name(this, "", + /*qualified=*/true, + /*internal=*/false); + set_name(name); +} + +/// Getter of the member type of the current @ref ptr_to_mbr_type. +/// +/// @return the type of the member referred to by the current +/// @ptr_to_mbr_type. +const type_base_sptr& +ptr_to_mbr_type::get_member_type() const +{return priv_->dm_type_;} + +/// Getter of the type containing the member pointed-to by the current +/// @ref ptr_to_mbr_type. +/// +/// @return the type containing the member pointed-to by the current +/// @ref ptr_to_mbr_type. +const type_base_sptr& +ptr_to_mbr_type::get_containing_type() const +{return priv_->containing_type_;} + +/// Equality operator for the current @ref ptr_to_mbr_type. +/// +///@param o the other instance of @ref ptr_to_mbr_type to compare the +///current instance to. +/// +/// @return true iff the current @ref ptr_to_mbr_type equals @p o. +bool +ptr_to_mbr_type::operator==(const decl_base& o) const +{ + const ptr_to_mbr_type* other = + dynamic_cast(&o); + if (!other) + return false; + return try_canonical_compare(this, other); +} + +/// Equality operator for the current @ref ptr_to_mbr_type. +/// +///@param o the other instance of @ref ptr_to_mbr_type to compare the +///current instance to. +/// +/// @return true iff the current @ref ptr_to_mbr_type equals @p o. +bool +ptr_to_mbr_type::operator==(const type_base& o) const +{ + const decl_base* other = dynamic_cast(&o); + if (!other) + return false; + return *this == *other; +} + +/// Equality operator for the current @ref ptr_to_mbr_type. +/// +///@param o the other instance of @ref ptr_to_mbr_type to compare the +///current instance to. +/// +/// @return true iff the current @ref ptr_to_mbr_type equals @p o. +bool +ptr_to_mbr_type::operator==(const ptr_to_mbr_type& o) const +{ + const decl_base* other = dynamic_cast(&o); + if (!other) + return false; + return *this == *other; +} + +/// Get the qualified name for the current @ref ptr_to_mbr_type. +/// +/// @param qualified_name out parameter. This is set to the name of +/// the current @ref ptr_to_mbr_type. +/// +/// @param internal if this is true, then the qualified name is for +/// the purpose of type canoicalization. +void +ptr_to_mbr_type::get_qualified_name(interned_string& qualified_name, + bool internal) const +{qualified_name = get_qualified_name(internal);} + +/// Get the qualified name for the current @ref ptr_to_mbr_type. +/// +/// @param internal if this is true, then the qualified name is for +/// the purpose of type canoicalization. +/// +/// @return the qualified name for the current @ref ptr_to_mbr_type. +const interned_string& +ptr_to_mbr_type::get_qualified_name(bool internal) const +{ + type_base_sptr member_type = get_member_type(); + type_base_sptr containing_type = get_containing_type(); + + if (internal) + { + if (get_canonical_type()) + { + if (priv_->internal_qualified_name_.empty()) + priv_->internal_qualified_name_ = + ptr_to_mbr_declaration_name(this, "", + /*qualified=*/true, + internal); + return priv_->internal_qualified_name_; + } + else + { + priv_->temp_internal_qualified_name_ = + ptr_to_mbr_declaration_name(this, "", /*qualified=*/true, internal); + return priv_->temp_internal_qualified_name_; + } + } + else + { + set_qualified_name + (ptr_to_mbr_declaration_name(this, "", /*qualified=*/true, + /*internal=*/false)); + return decl_base::peek_qualified_name(); + } +} + +/// This implements the ir_traversable_base::traverse pure virtual +/// function for @ref ptr_to_mbr_type. +/// +/// @param v the visitor used on the current instance. +/// +/// @return true if the entire IR node tree got traversed, false +/// otherwise. +bool +ptr_to_mbr_type::traverse(ir_node_visitor& v) +{ + if (v.type_node_has_been_visited(this)) + return true; + + if (visiting()) + return true; + + if (v.visit_begin(this)) + { + visiting(true); + if (type_base_sptr t = get_member_type()) + t->traverse(v); + + if (type_base_sptr t = get_containing_type()) + t->traverse(v); + visiting(false); + } + + bool result = v.visit_end(this); + v.mark_type_node_as_visited(this); + return result; +} + +/// Desctructor for @ref ptr_to_mbr_type. +ptr_to_mbr_type::~ptr_to_mbr_type() +{} + + +/// Compares two instances of @ref ptr_to_mbr_type. +/// +/// If the two intances are different, set a bitfield to give some +/// insight about the kind of differences there are. +/// +/// @param l the first artifact of the comparison. +/// +/// @param r the second artifact of the comparison. +/// +/// @param k a pointer to a bitfield that gives information about the +/// kind of changes there are between @p l and @p r. This one is set +/// iff @p k is non-null and the function returns false. +/// +/// Please note that setting k to a non-null value does have a +/// negative performance impact because even if @p l and @p r are not +/// equal, the function keeps up the comparison in order to determine +/// the different kinds of ways in which they are different. +/// +/// @return true if @p l equals @p r, false otherwise. +bool +equals(const ptr_to_mbr_type& l, const ptr_to_mbr_type& r, change_kind* k) +{ + bool result = true; + + if (!(l.decl_base::operator==(r))) + { + result = false; + if (k) + *k |= LOCAL_TYPE_CHANGE_KIND; + else + result = false; + } + + if (l.get_member_type() != r.get_member_type()) + { + if (k) + { + if (!types_have_similar_structure(&l, &r)) + *k |= LOCAL_TYPE_CHANGE_KIND; + *k |= SUBTYPE_CHANGE_KIND; + } + result = false; + } + + if (l.get_containing_type() != r.get_containing_type()) + { + if (k) + { + if (!types_have_similar_structure(&l, &r)) + *k |= LOCAL_TYPE_CHANGE_KIND; + *k |= SUBTYPE_CHANGE_KIND; + } + result = false; + } + + ABG_RETURN(result); +} + +// + // // @@ -20532,7 +20975,8 @@ var_decl::get_pretty_representation(bool internal, bool qualified_name) const type_base_sptr type = get_type(); if (is_array_type(type, /*look_through_qualifiers=*/true) || is_pointer_type(type, /*look_through_qualifiers=*/true) - || is_reference_type(type, /*look_through_qualifiers=*/true)) + || is_reference_type(type, /*look_through_qualifiers=*/true) + || is_ptr_to_mbr_type(type, /*look_through_qualifiers=*/true)) { string name; if (member_of_anonymous_class || !qualified_name) @@ -20556,6 +21000,10 @@ var_decl::get_pretty_representation(bool internal, bool qualified_name) const result += pointer_declaration_name(t, name, qualified_name, internal); else if (reference_type_def_sptr t = is_reference_type(type)) result += pointer_declaration_name(t, name, qualified_name, internal); + else if (ptr_to_mbr_type_sptr t = is_ptr_to_mbr_type(type)) + result += ptr_to_mbr_declaration_name(t, name, + qualified_name, + internal); } else { @@ -27609,6 +28057,18 @@ types_have_similar_structure(const type_base* first, /*indirect_type=*/true); } + // Peel off matching pointer-to-member types. + if (const ptr_to_mbr_type* ty1 = is_ptr_to_mbr_type(first)) + { + const ptr_to_mbr_type* ty2 = is_ptr_to_mbr_type(second); + return (types_have_similar_structure(ty1->get_member_type(), + ty2->get_member_type(), + /*indirect_type=*/true) + && types_have_similar_structure(ty1->get_containing_type(), + ty2->get_containing_type(), + /*indirect_type=*/true)); + } + if (const type_decl* ty1 = is_type_decl(first)) { const type_decl* ty2 = is_type_decl(second); @@ -28251,6 +28711,218 @@ add_outer_pointer_to_array_type_expr(const type_base_sptr& pointer_to_ar, {return add_outer_pointer_to_array_type_expr(pointer_to_ar.get(), input, qualified, internal);} +/// When constructing the name of a pointer to mebmer type, add the +/// return type to the left of the existing type identifier, and the +/// parameters declarator to the right. +/// +/// This function considers the name of the type as an expression. +/// +/// The resulting type expr is going to be made of three parts: +/// left_expr inner_expr right_expr. +/// +/// Suppose we want to build the type expression representing: +/// +/// "an array of pointer to member function (of a containing struct +/// X) taking a char parameter and returning an int". +/// +/// It's going to look like: +/// +/// int (X::* a[])(char); +/// +/// Suppose the caller of this function started to emit the inner +/// "a[]" part of the expression already. It thus calls this +/// function with that input "a[]" part. We consider that "a[]" as +/// the "type identifier". +/// +/// So the inner_expr is going to be "(X::* a[])". +/// +/// The left_expr part is "int". The right_expr part is "(char)". +/// +/// In other words, this function adds the left_expr and right_expr to +/// the inner_expr. left_expr and right_expr are called "outer +/// pointer to member type expression". +/// +/// This is a sub-routine of @ref ptr_to_mbr_declaration_name(). +/// +/// @param p the pointer to member type to consider. +/// +/// @param input the type-id to use as the inner expression of the +/// overall pointer-to-member type expression +/// +/// @param qualified if true then use qualified names in the resulting +/// type name. +/// +/// @param internal if true then the resulting type name is going to +/// be used for type canonicalization purposes. +/// +/// @return the name of the pointer to member type. +static string +add_outer_ptr_to_mbr_type_expr(const ptr_to_mbr_type* p, + const string& input, bool qualified, + bool internal) +{ + if (!p) + return ""; + + std::ostringstream left, right, inner; + string containing_type_name = get_type_name(p->get_containing_type(), + qualified, internal); + type_base_sptr mbr_type = p->get_member_type(); + string result; + if (function_type_sptr fn_type = is_function_type(mbr_type)) + { + inner << "(" << containing_type_name << "::*" << input << ")"; + stream_pretty_representation_of_fn_parms(*fn_type, right, + qualified, internal); + type_base_sptr return_type = fn_type->get_return_type(); + if (is_npaf_type(return_type) + || !(is_pointer_to_function_type(return_type) + || is_pointer_to_array_type(return_type) + || is_pointer_to_ptr_to_mbr_type(return_type) + || is_ptr_to_mbr_type(return_type))) + { + left << get_type_name(return_type, qualified, internal) << " ";; + result = left.str() + inner.str() + right.str(); + } + else if (pointer_type_def_sptr p = is_pointer_type(return_type)) + { + string inner_str = inner.str() + right.str(); + result = pointer_declaration_name(p, inner_str, qualified, internal); + } + else if (ptr_to_mbr_type_sptr p = is_ptr_to_mbr_type(return_type)) + { + string inner_str = inner.str() + right.str(); + result = add_outer_ptr_to_mbr_type_expr(p, inner_str, + qualified, internal); + } + else + ABG_ASSERT_NOT_REACHED; + } + else if (ptr_to_mbr_type_sptr ptr_mbr_type = is_ptr_to_mbr_type(mbr_type)) + { + inner << "(" << containing_type_name << "::*" << input << ")"; + stream_pretty_representation_of_fn_parms(*fn_type, right, + qualified, internal); + string inner_str = inner.str() + right.str(); + result = add_outer_ptr_to_mbr_type_expr(ptr_mbr_type, inner_str, + qualified, internal); + } + else + { + left << get_type_name(p->get_member_type(), qualified, internal) << " "; + inner << containing_type_name << "::*" << input; + result = left.str()+ inner.str(); + } + + return result; +} + +/// When constructing the name of a pointer to mebmer type, add the +/// return type to the left of the existing type identifier, and the +/// parameters declarator to the right. +/// +/// This function considers the name of the type as an expression. +/// +/// The resulting type expr is going to be made of three parts: +/// left_expr inner_expr right_expr. +/// +/// Suppose we want to build the type expression representing: +/// +/// "an array of pointer to member function (of a containing struct +/// X) taking a char parameter and returning an int". +/// +/// It's going to look like: +/// +/// int (X::* a[])(char); +/// +/// Suppose the caller of this function started to emit the inner +/// "a[]" part of the expression already. It thus calls this +/// function with that input "a[]" part. We consider that "a[]" as +/// the "type identifier". +/// +/// So the inner_expr is going to be "(X::* a[])". +/// +/// The left_expr part is "int". The right_expr part is "(char)". +/// +/// In other words, this function adds the left_expr and right_expr to +/// the inner_expr. left_expr and right_expr are called "outer +/// pointer to member type expression". +/// +/// This is a sub-routine of @ref ptr_to_mbr_declaration_name(). +/// +/// @param p the pointer to member type to consider. +/// +/// @param input the type-id to use as the inner expression of the +/// overall pointer-to-member type expression +/// +/// @param qualified if true then use qualified names in the resulting +/// type name. +/// +/// @param internal if true then the resulting type name is going to +/// be used for type canonicalization purposes. +/// +/// @return the name of the pointer to member type. +static string +add_outer_ptr_to_mbr_type_expr(const ptr_to_mbr_type_sptr& p, + const string& input, bool qualified, + bool internal) +{return add_outer_ptr_to_mbr_type_expr(p.get(), input, qualified, internal);} + +/// This adds the outer parts of a pointer to a pointer-to-member +/// expression. +/// +/// Please read the comments of @ref add_outer_ptr_to_mbr_type_expr to +/// learn more about this function, which is similar. +/// +/// This is a sub-routine of @ref pointer_declaration_name(). +/// +/// @param a pointer (or reference) to a pointer-to-member type. +/// +/// @param input the inner type-id to add the outer parts to. +/// +/// @param qualified if true then use qualified names in the resulting +/// type name. +/// +/// @param internal if true then the resulting type name is going to +/// be used for type canonicalization purposes. +static string +add_outer_pointer_to_ptr_to_mbr_type_expr(const type_base* p, + const string& input, bool qualified, + bool internal) +{ + if (!p) + return ""; + + string star_or_ref; + type_base_sptr pointed_to_type; + + if (const pointer_type_def* ptr = is_pointer_type(p)) + { + pointed_to_type = ptr->get_pointed_to_type(); + star_or_ref = "*"; + } + else if (const reference_type_def* ref = is_reference_type(p)) + { + pointed_to_type= ref->get_pointed_to_type(); + star_or_ref = "&"; + } + + if (!pointed_to_type) + return ""; + + ptr_to_mbr_type_sptr pointed_to_ptr_to_mbr = + is_ptr_to_mbr_type(pointed_to_type); + if (!pointed_to_ptr_to_mbr) + return ""; + + std::ostringstream inner; + inner << star_or_ref << input; + string result = add_outer_ptr_to_mbr_type_expr(pointed_to_ptr_to_mbr, + inner.str(), + qualified, internal); + return result; +} + /// Emit the name of a pointer declaration. /// /// @param the pointer to consider. @@ -28291,7 +28963,8 @@ pointer_declaration_name(const type_base* ptr, string result; if (is_npaf_type(pointed_to_type) || !(is_function_type(pointed_to_type) - || is_array_type(pointed_to_type))) + || is_array_type(pointed_to_type) + || is_ptr_to_mbr_type(pointed_to_type))) { result = get_type_name(pointed_to_type, qualified, @@ -28310,6 +28983,9 @@ pointer_declaration_name(const type_base* ptr, else if (is_array_type(pointed_to_type)) result = add_outer_pointer_to_array_type_expr(ptr, idname, qualified, internal); + else if (is_ptr_to_mbr_type(pointed_to_type)) + result = add_outer_pointer_to_ptr_to_mbr_type_expr(ptr, idname, + qualified, internal); else ABG_ASSERT_NOT_REACHED; } @@ -28379,7 +29055,9 @@ array_declaration_name(const array_type_def* array, { if (is_npaf_type(e_type) || !(is_pointer_to_function_type(e_type) - || is_pointer_to_array_type(e_type))) + || is_pointer_to_array_type(e_type) + || is_pointer_to_ptr_to_mbr_type(e_type) + || is_ptr_to_mbr_type(e_type))) { result = e_type_repr; if (!variable_name.empty()) @@ -28391,6 +29069,11 @@ array_declaration_name(const array_type_def* array, string s = variable_name + array->get_subrange_representation(); result = pointer_declaration_name(p, s, qualified, internal); } + else if (ptr_to_mbr_type_sptr p = is_ptr_to_mbr_type(e_type)) + { + string s = variable_name + array->get_subrange_representation(); + result = ptr_to_mbr_declaration_name(p, s, qualified, internal); + } else ABG_ASSERT_NOT_REACHED; } @@ -28416,6 +29099,56 @@ array_declaration_name(const array_type_def_sptr& array, bool qualified, bool internal) {return array_declaration_name(array.get(), variable_name, qualified, internal);} + +/// Emit the name of a pointer-to-member declaration. +/// +/// @param ptr the pointer-to-member to consider. +/// +/// @param variable_name the name of the variable that has @p as a +/// type. If it's empty then the resulting name is going to be the +/// abstract name of the type. +/// +/// @param qualified if true then the type name is going to be +/// fully qualified. +/// +/// @param internal if true then the type name is going to be used for +/// type canonicalization purposes. +static interned_string +ptr_to_mbr_declaration_name(const ptr_to_mbr_type* ptr, + const string& variable_name, + bool qualified, bool internal) +{ + if (!ptr) + return interned_string(); + + string input = variable_name; + string result = add_outer_ptr_to_mbr_type_expr(ptr, input, + qualified, internal); + return ptr->get_environment().intern(result); +} + +/// Emit the name of a pointer-to-member declaration. +/// +/// @param ptr the pointer-to-member to consider. +/// +/// @param variable_name the name of the variable that has @p as a +/// type. If it's empty then the resulting name is going to be the +/// abstract name of the type. +/// +/// @param qualified if true then the type name is going to be +/// fully qualified. +/// +/// @param internal if true then the type name is going to be used for +/// type canonicalization purposes. +static interned_string +ptr_to_mbr_declaration_name(const ptr_to_mbr_type_sptr& ptr, + const string& variable_name, + bool qualified, bool internal) +{ + return ptr_to_mbr_declaration_name(ptr.get(), variable_name, + qualified, internal); +} + bool ir_traversable_base::traverse(ir_node_visitor&) {return true;} @@ -28590,6 +29323,14 @@ bool ir_node_visitor::visit_end(reference_type_def* t) {return visit_end(static_cast(t));} +bool +ir_node_visitor::visit_begin(ptr_to_mbr_type* t) +{return visit_begin(static_cast(t));} + +bool +ir_node_visitor::visit_end(ptr_to_mbr_type* t) +{return visit_end(static_cast(t));} + bool ir_node_visitor::visit_begin(array_type_def* t) {return visit_begin(static_cast(t));} diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc index 10d65054..7b7111db 100644 --- a/src/abg-leaf-reporter.cc +++ b/src/abg-leaf-reporter.cc @@ -256,6 +256,21 @@ leaf_reporter::report(const reference_diff& d, report_local_reference_type_changes(d, out, indent); } +/// Report the changes carried by a @ref ptr_to_mbr_diff node. +/// +/// @param out the output stream to report to. +/// +/// @param indent the white space string to use for indentation. +void +leaf_reporter::report(const ptr_to_mbr_diff& d, std::ostream& out, + const std::string& indent) const +{ + if (!diff_to_be_reported(&d)) + return; + + report_local_ptr_to_mbr_type_changes(d, out, indent); +} + /// Report the changes carried by a @ref fn_parm_diff node. /// /// @param out the output stream to report to. diff --git a/src/abg-reader.cc b/src/abg-reader.cc index e71337f7..c6e0fa32 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -1429,6 +1429,9 @@ build_pointer_type_def(reader&, const xmlNodePtr, bool); static shared_ptr build_reference_type_def(reader&, const xmlNodePtr, bool); +static ptr_to_mbr_type_sptr +build_ptr_to_mbr_type(reader&, const xmlNodePtr, bool); + static shared_ptr build_function_type(reader&, const xmlNodePtr, bool); @@ -4184,6 +4187,87 @@ build_reference_type_def(reader& rdr, return t; } +/// Build a @ref ptr_to_mbr_type from a pointer to +/// 'pointer-to-member-type' xml node. +/// +/// @param rdr the reader used for parsing. +/// +/// @param node the xml node to build the reference_type_def from. +/// +/// @param add_to_current_scope if set to yes, the resulting of +/// this function is added to its current scope. +/// +/// @return a pointer to a newly built @ref ptr_to_mbr_type upon +/// successful completio, a null pointer otherwise. +static ptr_to_mbr_type_sptr +build_ptr_to_mbr_type(reader& rdr, + const xmlNodePtr node, + bool add_to_current_scope) +{ + ptr_to_mbr_type_sptr result, nil; + + if (!xmlStrEqual(node->name, BAD_CAST("pointer-to-member-type"))) + return nil; + + if (decl_base_sptr d = rdr.get_decl_for_xml_node(node)) + { + result = is_ptr_to_mbr_type(d); + ABG_ASSERT(result); + return result; + } + + string id; + if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "id")) + id = CHAR_STR(s); + + if (id.empty()) + return nil; + + if (type_base_sptr d = rdr.get_type_decl(id)) + { + result = is_ptr_to_mbr_type(d); + ABG_ASSERT(result); + return result; + } + + size_t size_in_bits = rdr.get_translation_unit()->get_address_size(); + size_t alignment_in_bits = 0; + read_size_and_alignment(node, size_in_bits, alignment_in_bits); + + location loc; + read_location(rdr, node, loc); + + string member_type_id; + if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "member-type-id")) + member_type_id = CHAR_STR(s); + if (member_type_id.empty()) + return nil; + type_base_sptr member_type = + is_type(rdr.build_or_get_type_decl(member_type_id, true)); + if (!member_type) + return nil; + + string containing_type_id; + if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "containing-type-id")) + containing_type_id = CHAR_STR(s); + if (containing_type_id.empty()) + return nil; + type_base_sptr containing_type = + rdr.build_or_get_type_decl(containing_type_id, true); + if (!is_typedef_of_maybe_qualified_class_or_union_type(containing_type)) + return nil; + + result.reset(new ptr_to_mbr_type(rdr.get_environment(), + member_type, containing_type, + size_in_bits, alignment_in_bits, + loc)); + + if (rdr.push_and_key_type_decl(result, node, add_to_current_scope)) + rdr.map_xml_node_to_decl(node, result); + + return result; +} + /// Build a function_type from a pointer to 'function-type' /// xml node. /// @@ -6001,6 +6085,7 @@ build_type(reader& rdr, || (t = build_qualified_type_decl(rdr, node, add_to_current_scope)) || (t = build_pointer_type_def(rdr, node, add_to_current_scope)) || (t = build_reference_type_def(rdr, node , add_to_current_scope)) + || (t = build_ptr_to_mbr_type(rdr, node , add_to_current_scope)) || (t = build_function_type(rdr, node, add_to_current_scope)) || (t = build_array_type_def(rdr, node, add_to_current_scope)) || (t = build_subrange_type(rdr, node, add_to_current_scope)) diff --git a/src/abg-writer.cc b/src/abg-writer.cc index 850c8759..0f2d2bdf 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -919,6 +919,8 @@ static bool write_pointer_type_def(const pointer_type_def_sptr&, write_context&, unsigned); static bool write_reference_type_def(const reference_type_def_sptr&, write_context&, unsigned); +static bool write_ptr_to_mbr_type(const ptr_to_mbr_type_sptr&, + write_context&, unsigned); static bool write_array_type_def(const array_type_def_sptr&, write_context&, unsigned); static bool write_array_subrange_type(const array_type_def::subrange_sptr&, @@ -1928,6 +1930,9 @@ write_type(const type_base_sptr& type, write_context& ctxt, unsigned indent) ctxt, indent) || write_reference_type_def(dynamic_pointer_cast (type), ctxt, indent) + || write_ptr_to_mbr_type(dynamic_pointer_cast + (type), + ctxt, indent) || write_array_type_def(dynamic_pointer_cast (type), ctxt, indent) || write_enum_type_decl(dynamic_pointer_cast(type), @@ -1970,6 +1975,9 @@ write_decl(const decl_base_sptr& decl, write_context& ctxt, unsigned indent) ctxt, indent) || write_reference_type_def(dynamic_pointer_cast (decl), ctxt, indent) + || write_ptr_to_mbr_type(dynamic_pointer_cast + (decl), + ctxt, indent) || write_array_type_def(dynamic_pointer_cast (decl), ctxt, indent) || write_array_subrange_type(dynamic_pointer_cast @@ -2874,6 +2882,78 @@ write_reference_type_def(const reference_type_def_sptr& decl, unsigned indent) {return write_reference_type_def(decl, "", ctxt, indent);} +/// Serialize a pointer to an instance of @ref ptr_to_mbr_type. +/// +/// @param decl a pointer to the @ref ptr_to_mbr_type to serialize. +/// +/// @param id the ID of the type. If it's an empty string then a new +/// ID is generated. +/// +/// @param ctxt the context of the serialization. +/// +/// @param indent the number of indentation white spaces to use. +/// +/// @return true upon succesful completion, false otherwise. +static bool +write_ptr_to_mbr_type(const ptr_to_mbr_type_sptr& decl, + const string& id, write_context& ctxt, + unsigned indent) +{ + if (!decl) + return false; + + annotate(decl->get_canonical_type(), ctxt, indent); + + ostream& o = ctxt.get_ostream(); + + do_indent(o, indent); + + o << "get_translation_unit()->get_address_size()), + 0); + + write_location(static_pointer_cast(decl), ctxt); + + type_base_sptr member_type = decl->get_member_type(); + string i = ctxt.get_id_for_type(member_type); + o << " member-type-id='" << i << "'"; + ctxt.record_type_as_referenced(member_type); + + type_base_sptr containing_type = decl->get_containing_type(); + i = ctxt.get_id_for_type(containing_type); + o << " containing-type-id='" << i << "'"; + ctxt.record_type_as_referenced(containing_type); + + i = id; + if (i.empty()) + i = ctxt.get_id_for_type(decl); + o << " id ='" << i << "'"; + + o << "/>\n"; + + ctxt.record_type_as_emitted(decl); + + return true; +} + +/// Serialize a pointer to an instance of @ref ptr_to_mbr_type. +/// +/// @param decl a pointer to the @ref ptr_to_mbr_type to serialize. +/// +/// @param ctxt the context of the serialization. +/// +/// @param indent the number of indentation white spaces to use. +/// +/// @return true upon succesful completion, false otherwise. +static bool +write_ptr_to_mbr_type(const ptr_to_mbr_type_sptr& decl, + write_context& ctxt, unsigned indent) +{return write_ptr_to_mbr_type(decl, "", ctxt, indent);} + /// Serialize an instance of @ref array_type_def::subrange_type. /// /// @param decl the array_type_def::subrange_type to serialize. @@ -4179,21 +4259,23 @@ write_member_type(const type_base_sptr& t, write_context& ctxt, unsigned indent) unsigned nb_ws = get_indent_to_level(ctxt, indent, 1); ABG_ASSERT(write_qualified_type_def(dynamic_pointer_cast(t), - id, ctxt, nb_ws) - || write_pointer_type_def(dynamic_pointer_cast(t), + id, ctxt, nb_ws) + || write_pointer_type_def(dynamic_pointer_cast(t), id, ctxt, nb_ws) - || write_reference_type_def(dynamic_pointer_cast(t), + || write_reference_type_def(dynamic_pointer_cast(t), + id, ctxt, nb_ws) + || write_ptr_to_mbr_type(dynamic_pointer_cast(t), + id, ctxt, nb_ws) + || write_array_type_def(dynamic_pointer_cast(t), + id, ctxt, nb_ws) + || write_enum_type_decl(dynamic_pointer_cast(t), id, ctxt, nb_ws) - || write_array_type_def(dynamic_pointer_cast(t), - id, ctxt, nb_ws) - || write_enum_type_decl(dynamic_pointer_cast(t), + || write_typedef_decl(dynamic_pointer_cast(t), + id, ctxt, nb_ws) + || write_union_decl(dynamic_pointer_cast(t), id, ctxt, nb_ws) - || write_typedef_decl(dynamic_pointer_cast(t), - id, ctxt, nb_ws) - || write_union_decl(dynamic_pointer_cast(t), - id, ctxt, nb_ws) - || write_class_decl(dynamic_pointer_cast(t), - id, ctxt, nb_ws)); + || write_class_decl(dynamic_pointer_cast(t), + id, ctxt, nb_ws)); do_indent_to_level(ctxt, indent, 0); o << "\n"; diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 8af6a2c4..231aaa6b 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -389,6 +389,31 @@ test-abidiff-exit/PR31045/zfs-abigail-2.4/libnvpair.abi \ test-abidiff-exit/PR31045/zfs-abigail-2.4/libnvpair.so \ test-abidiff-exit/PR31045/zfs-abigail-2.4/libnvpair.suppr \ test-abidiff-exit/PR31045/zfs-abigail-2.4/test-PR31045-report-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-output-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.cc \ +test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.o \ \ test-diff-dwarf/test0-v0.cc \ test-diff-dwarf/test0-v0.o \ @@ -759,6 +784,9 @@ test-read-dwarf/test-fallback.c \ test-read-dwarf/test-fallback.o \ test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0 \ test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi \ +test-read-dwarf/test-pointer-to-member-1.cc \ +test-read-dwarf/test-pointer-to-member-1.o \ +test-read-dwarf/test-pointer-to-member-1.o.abi \ \ test-read-ctf/test0 \ test-read-ctf/test0.abi \ @@ -901,6 +929,7 @@ test-annotate/test-anonymous-members-0.cc \ test-annotate/test-anonymous-members-0.o \ test-annotate/test-anonymous-members-0.o.abi \ test-annotate/PR29443-missing-xx.o.annotated.abi \ +test-annotate/test-pointer-to-member-1.o.annotated.abi \ \ test-types-stability/pr19434-elf0 \ test-types-stability/pr19139-DomainNeighborMapInst.o \ diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt new file mode 100644 index 00000000..a88d96fb --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt @@ -0,0 +1,18 @@ +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 1 Changed, 0 Added variable + +1 Changed variable: + + [C] 'int S::* pm' was changed to 'char S::* pm' at test-ptr-to-mbr1-v1.cc:6:1: + type of variable changed: + pointer-to-member type changed from: 'int S::* to: 'char S::*' + in data member type 'int' of pointed-to-member type 'int S::*': + type name changed from 'int' to 'char' + type size changed from 32 to 8 (in bits) + in containing type 'struct S' of pointed-to-member type 'int S::*' at test-ptr-to-mbr1-v1.cc:1:1: + type size changed from 32 to 8 (in bits) + 1 data member change: + type of 'int m' changed: + type name changed from 'int' to 'char' + type size changed from 32 to 8 (in bits) + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc new file mode 100644 index 00000000..47ed40a1 --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.cc @@ -0,0 +1,7 @@ +struct S +{ + int m; +}; + +int S::* pm = &S::m; + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..4f05d85961f6dcb600ce77e4268c60d9f74b1b21 GIT binary patch literal 2624 zcmcgtOHUL*5U$zTg@uvlCW@l&Ks16lvkzcJ6x@U;poS3CgE5B8>^95jKFI7qFdjU5 z@Z!O%p8O4l#EU<{_%A$qGx4BRGu_a%vx$j`m2_9tSI_C!yu5Yqc0$uYkOqrzqzM$@ zbLvPghhiCqVF(_foB}OPP#8BB8u^sC4@pf+&!Va~K-0TP0!SuPUNeByd6Ws!#=CaV z+|_#nl^z|Zh_oT?Vt>Zav!mI;QvivKrl$>K-nedDGqeom>;pX=sjHbe0~22W!&o$Q zY$uh4bD7o5oe_Yp8OiPD=>$S>7Dpni61E=Iljb7IDM-U*S?1EX$7pL>3{H!^#!K&tp6L5o7oHVUQu-jw{HP&Rl zS3%YBE87eEb0w=ZW9=19s|LC4R)giLt?E-RSM!2g-E$q+t2tghx4to*FP8GTfVG2m zuIdC%C|YQ*dRto-+eiPM7Ope%t)OK!Si@yLkh`@LM3Czjti8Nlsr!bj87#rMm;((*eh$978&s zh(W3U{tkHGA2^-;A?dpgPk)Dv!Fw5!@asiQ{z_4SaQSP7qc9+x#s=3Gtuck@llMXwH50rl9h#^@bKA_urZVgQ*TOH@{vU~{t_B#zdOat zXMyslI_;mDll;mwAw7xM;jH@7xuDxzKJ%ZcE^&B}% zB;o{ri#8!kZt#)E%NWV3FX?fv2OM1I0fXpA@1MGUw5ICaK?u@({po(oq}CroV_f_Q Ne^fun!6>WozX7|i+-?8> literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.cc @@ -0,0 +1,6 @@ +struct S +{ + char m; +}; + +char S::* pm = &S::m; diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o new file mode 100644 index 0000000000000000000000000000000000000000..253a9a353be4d769402911fabb1d7d579364a69c GIT binary patch literal 2656 zcmcIl%}>-o6o1{q3RXUrO%z4lLNtQd?gy|U3T{FaP(ujH!5Bl@-C?)N?vidH7!Upd zdi3f^5B?8a{2M%Z^y*D-CLZ*?b_Rx_8%&HZ>Ad%T?{lW}+E;fT+)Zd22-08<4m5!R zeC<4tOQBeT0Z74PlsiG|A}EX-4vl!9hO1kj-+$)WQiE@ab2l3Qp_ z8n;mC)^UkQOKF#T(}tcI%JiQBNTe}?VaymejT?rR#+*H%cSY(_dfLFmm%uRQ480eV zXW&A5DSdAcAUP?y-9DQ@2+re^2&;sxNA;w&fO02v!BynAgx?yRf`w&X14hubcV2J!$97Las28E9R!m(N$J47oC6`tiqUS)r0K@o2{}2^Sv^v zj$f|L?oJo2;-s}xFs&+-YmN^AYX#O;;9Eh{s=I#P+R5AHGGuGbI?Gm?m1kbI>IKUf*kmDPz{p_t23WGh>70w)wLv{$^14U6rf|5np$1T4zR>MryDL&i3(w}D|{ zetyOr#X}tXi}MQ)yzN4-rvrZcj&smsZ#Z5jek0Tv9W8OBV}&@{wuc!zXO!bL5DrX`&6uWBjq8h-_ibPw9a%XftGs5-qrH7EI%XhC`!vHex`rF%hBUfTDFgd89Jj~wqq zPLQZi^F=g^kD8P4ceEfqiP-+C`qDjDF>?ONBTUW(Q+@BFA+G-~ynoRr^-o_Xwf_oY zYEFb;kb^~1BvO6X(H2+#JFmaUW2rvPwOW4*G0K_4N2X<7XiWxD7WD;x$uTwlJ$Lwa zO#JIM@o)HFKYL94TOO~t!5)uSanZNHNsn{=#K9FF(2suf{Zr46&QzTpgrJ|FKh3vH UYW)-%;M1& literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt @@ -0,0 +1,13 @@ +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 1 Changed, 0 Added variable + +1 Changed variable: + + [C] 'int S::* pm' was changed to 'int T::* pm' at test-ptr-to-mbr2-v1.cc:6:1: + type of variable changed: + pointer-to-member type changed from: 'int S::* to: 'int T::*' + in containing type 'struct S' of pointed-to-member type 'int S::*' at test-ptr-to-mbr2-v1.cc:1:1: + type name changed from 'S' to 'T' + type size hasn't changed + no data member change (1 filtered); + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc new file mode 100644 index 00000000..47ed40a1 --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.cc @@ -0,0 +1,7 @@ +struct S +{ + int m; +}; + +int S::* pm = &S::m; + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..707440f9d2b03d60b324734e39c33563dd9da5ab GIT binary patch literal 2624 zcmcIlOHUL*5U$zTg@uvlCW@l&Ks16lvkzcJ6x@U;poS3CgE5B8>^95jKFI7qFdjU5 z@Z!O%p8O4l#EU<{_%A$qGx4BRGu_a%vx$kZlJ2Vd>N)+Im$&ZSPG}kk(qIveG=Tzq zP94eRP%OhR48bFmQ=p{@3ggB?BcBrYA*pHUSyc4~XnHqE0Lf&^YX*=yk1`?Jc-Ib^ zyLxY+(xc-Pkv61V?9Ui_b~HP93Lufu^t55j8`q6%hL*vceW0f!bu}|*VB!m47>kCE z?WD4BF0-1sGXl^xBe~r?oj?fA;z)#5!q%gD(p*G21!=g9T+_6l{e8sf3vr;34L>%a zWfKEYnlN^G?V-6eHC4E377F%^T`-IJ;&i^0pEV~oSk+u{0&cL1lcv=OcAIRW#+uCc zDyTYsWqVt@4w=#dhE%@W5iE_8l$5nj&!ULM>=%H!I-7H1K!gC$DssH{Cc;6p5o&6!{yADr(hmFB|8IthpMNR%nQGsyzYlfpRAe@GvlUxuuUh9y~ zNVup)&;yRszKU7|i5@7A^fbXZ8IeSOFH+$O=K}x4^@4(b1Q51%~=8$+2e^`?|1A6Zo6FQJk4 zyHmV;7ATLZ)BdSB$*)Wk(vyfC&Z;k+3%bqaLyt(9;8*+&#|MxTBu6Cia{j?1OwI*Ueea?nuKxqxzvz?tr&mbrzlxZe6CoJkV2KooRNqas z#nu19>#y)ws!#8OT7L&I%9+O@(;6>C>m!q>FZc^I#>Kzq4&UTp?n{t}f6ZmJ{ww}h z&yll4B2MtPXcMyJ1|NC6jFGJRk{;)Jz`=DMFo=Hi{;BInYpUKIgdok=pYFFzYW*QJ Q#>J2DNA-gojItX48&!4OHvj+t literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.cc @@ -0,0 +1,6 @@ +struct T +{ + int m; +}; + +int T::* pm = &T::m; diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o new file mode 100644 index 0000000000000000000000000000000000000000..5cec3e47ca82475c1a802563c054f86b44a58311 GIT binary patch literal 2624 zcmcgtOHUL*5U$x_VPWLCiK3`G5RD+t>;qU41veoIs3C;l!5BkkcAI5%Uzr^U#)C%> zUOaf!lfS``c=0C~|Aj|yCLXkErW=}eHZd`=lJ2Vd>N)+Imv4uMt4RNijv#xu$792l|Q87vex66Mk$$ z%OnP)G-2$@`a^ShdOCmI%;)V{J8u?pg_&G2H)l?6vWmIt1l(X1rcA3I>^0b8l{J{} zl~Hy4^6uine95;^mM>`JK%VfV@QWn zF(~yv&;jrN1E;e;EPdC}>F=;HcrQZ|etoFPUnwdOE`QBP6b6LT*yQ?Y1?MW9lWHmzKU7|i5@7o^fbW)8IeR?FH+$e=K}x4^}K?AsGkq3UncZC$Ng8*#0 za$vjdHrPI^Id+A)d(~~PvC~9bC_Ap}v;7lh$9Ec4b~2>qHJAv&5<(<+JJid~dY$2W zX*Zeyv+<5t?Z7EN6P^AOAH!%`Td|%ZSxE>A51%~=8%LQi^`?|0A6Zo6ub`3kyHmV; z7ATLZ)BdSB$*)8c(vyfC&8jb*3%bpvBacX!czvz?tr&mbrzk-;W6CoJoV38DwRNrm1#nu19 z>#y=ys!#8OTEB%D<;>xbX`L6M^^r-`7yJbpqgO5C3#z^95jzA`%yj0cY% zym;`cCx3$>@#0S~{tJ)ZOgw1SOgA*`Y+_=pq`RuVdQQLQ<*j?S6PgBsG+2Z~O`rgu zlZSFS6w5FSL+}XYBxq@Z!nm=}$fv}8=+U(FEUJ0~H2oM!06jfPuNgq{Jj#S<h!M^y)Z8qz!2o`!j}~9nB7&0!U;uJ#85C#&zSGp=B^*m_h?nu{nWAq|(2Ynt}6zmFJwAr2I>;m0Pl zY+@iv6UHvDJv5i5rV3ZhLcyM~3uZB2oX(f>v*yGGtC}lLzztS$(zF`EPLnOvSd;l) z1y#qdY%lE1m8{Z?wOcf;8U(BpSna^Kf|k{A{b_4AZ&xai+io>juG*?T^>Q^Y$kjd9 zalM-3)pP3`)A?d4pQFf5uIdC%C|YQ*dRto-+e80$3zwfoSy{tn{(s2WrS&c_EH5q1 zn-jQxlYg;v;abN}v@JdG{a2h-k3HFVjQB}VV|28{k&YGONQYD$j9HF#!F#*lc$8yE zhZ8X<_21tG@B0I%vp*z#*TL!UvN3osLlS<+QIo$?R3Kdbn&Bu62&Wjv+7Idf^Kv9z#|eS_!WP{@d4xniTZSph!$|DISGG9 z6Vl^|9n7llI$BhWoPY2LlXJmT-@9mt>wlm3FZ!hZ=@nA@uOg=ALeKt6)^8(5IrBJVTH}RiePj~#1%H9YxcK+n;hP-HeF+lrueq$&f5rdm zIdYar#0mZuZ9+0*-LxhQtA8?A>(PIw}%kB=5|8^SkRE`^B}}*HfAXf;6}STbe)t zzNWY2S|rwB0>aB&%YQ?I|SsP{3YC_2Rq16imE9_bwH<-0HN_M>tg;ux23XN{# zu~%q%VWI80j_WlYuU%MKoh_Ct#R5h43k@f9BGE#7!&_gs*e3e-x}G1hI4kS8Ecg!@ zhqOKfh8v5E^X4?3-3xeH2ok+fe(4hiC&-8->UyyX=QtPm z2d|V?mz2~RRe*-Z!CqgjE!3rr7slIDyORE2a*I(kXRG;Qrt=~h8au)HC=?*XSPzF&J^#y;< zF*W`@clfqL{L3NnulV1;utWT79Kl;)4Pdz_6Q+0L_ bf=PbX)wgmm%4+;?2kqdP literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt @@ -0,0 +1,12 @@ +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 1 Changed, 0 Added variable + +1 Changed variable: + + [C] 'int S::* pm' was changed to 'double S::* pm' at test-ptr-to-mbr4-v1.cc:7:1: + type of variable changed: + pointer-to-member type changed from: 'int S::* to: 'double S::*' + in data member type 'int' of pointed-to-member type 'int S::*': + type name changed from 'int' to 'double' + type size changed from 32 to 64 (in bits) + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc new file mode 100644 index 00000000..9161dfc0 --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.cc @@ -0,0 +1,8 @@ +struct S +{ + int m0; + double m1; +}; + +auto pm = &S::m0; + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..36f028461af4c24312b17bbe9f0768123337fcb3 GIT binary patch literal 2688 zcmcgt&2AG(5UzIHv0+F^u*5&>2?FsuB-_1Dwg)$`)^{XYtffg%RC zU{6yh@~J(!or!HY0(0;Tr+{D=1ZJ1Bv&av||Rg2e7)n<&s==A+YW41Mfbs&R%=}lYzn>@|1gCLiUxO>m zqb7nSv|UEd82dakO^o&p2MV=p3k$4PI6O*|C0Tj!$X>p3rSYrXXt)b*!)|)bYhKH{ zZeLs%UHguoN`uq9WIIv1GZ0HXF%U`ELDf$>TT8n)T25=hdET_09(3cKpf8}l6-T1p zjk{07dM`}t{V?!@u;+*U`r7(6ui5hIsTiiide=|=OmxuR4L3I(v5WrOF`j@(oHTYK z5d|Uva(A}V5fmg?&vQGS|F6)5`mnORyl7v`r050!@ z8N<<%M;t5U5!ahZbKp?cv^|l-fjvc&IN<%yAr6OfQ0xuBo1a4*roTa{3+A-%8u!73 zv%zl7NckN^O?xuN6$sbA=Ex`v2&b_w^`izZRXC~Psun?aHJtLVNqtjtI&b|e)!L|L zN%{~wD`mBwQ0i9={EgHb2L4X!;12(cQa?bRCL_M3q*Uyt;8Hh&8w`iwCZg}VT@mc` zHp0PXjJ8bngCG&l_nG~~AN0ijkbXE2Dg;X?k>HI?@5E6g@R4-~aVlJFA7_~Q9eTNc zo=#y3+FP}sDq~v-2G1Tw4Vy=qFtdZ&nvX7;@fXlY_h3@Ien%*esnhwHImxe06H+{4 zeF#FQO$JW=_Ii(}dI;vGHvB(mgjZay}|Sn-q;q z-+O4wTmL7yezi_oKfO-o`n!mkIT3=E1Y4wNWcqHPEwBEpY|1+_mg-YqoAtL5qnsWN zo%*uSV;w|U)mQv4iJ9?lrNe*UiGMjE{+0ai*S{10w~RO3;Ju7DakXxRlb+}LL4s>C oU>5!8{WJHE_SEbhgus*MPyMZvS$__VdGSx=`Te5@qin{11-gdeg#Z8m literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.cc @@ -0,0 +1,7 @@ +struct S +{ + int m0; + double m1; +}; + +auto pm = &S::m1; diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o new file mode 100644 index 0000000000000000000000000000000000000000..4dbd70288431b6cfc03bcf2b3ca8cb31c00e59eb GIT binary patch literal 2696 zcmcIm&2G~`5T4B@O~ACYMB*RfA`riJekh?7wM43*6cDOF2yVqrwy7bGE5}7e9C!e( zJOT$E0Eq*Sz>Qbn0!PjqV8+>{+r<$`h>`4>`R3QVJDa?`e&{6DNy1N&7l5T|j<9KINEyEmlZ=&GsIagGyhsv?b;$2tLa7A#d?Dy3P$=ce zGIktaWMC(X8zHdb*j-e1aeNJljRP;uO|z@k6>GUXYXRh@*r|!K#VbcDlLr8Jnemck z%~|BZ$^iM3U|9*x|BIq$?YAcN#mC8KClvea=t=o-S<6^B@yJVla zCpz{`FOdePan^RiWV0{kyP_}RppB{*x7X*lW}8lP#(CDToi22uO}{4~5rf3pNMa|6 zoY0TaT6f!RsIEt$sCJ^xlc3rSl4>vTJwNDrL9e=U?_#adtW_y;Q0;h$mx>PBJHgtT zBeu|gBf^al!>l6oMf@K!j%a-Z3`>iPbM_fr#qsA=0Ghh5u>CUL;?pFte+ zD1U(fNhc&%bpxqiFz^pjuN(L$se?Os9wwfTJc);VT}g@9O2DPD1J@r6z>P)Eb34M{ z?5+m=wFqsg?D>8yp6xJuvDfd4oguxTFH{JYP$I#rsosvlP~au&_M=3&I6lrG@!E8A z|2rMQ6tuQ#Jyph*5)7VRj2bqLGGXQfwWN=}#{`-BX^ENfH)XuZ%=)x{CPpzTJ~9%R zzH}~V%3FrtBRTqSCB7FqL8^b6FQR#T%$$V3rx#Lp$bP*|UpnU|M$X42Xp^Fm>3bV( zS^cY_P<>MWbUT^-cMvmkA_NN(Y?7jp>AQ-ytojG#P^x{P`ZU*O{SCw@XAK{n5?Sb> z4x+5;EB-=aX8cF#@bwSzuSUeblfV1bKg7S5@rE0G*8Vr>Hr2PnNY8TpBEc0IFo}M2 l|C#GYYiiC8LNH64f<*JJlUaWXjal)J<^H|VgHbl)e*(#9;N1WK literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc new file mode 100644 index 00000000..e8c26c23 --- /dev/null +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.cc @@ -0,0 +1,8 @@ +struct S +{ + int m0; + int m1; +}; + +auto pm = &S::m0; + diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..e07652ea76e548177ecec710c45fd38850f3675d GIT binary patch literal 2640 zcmcIlPfrs;6o1ogp}K-V6aS%hL5(2p_K#2z12!Rus4)cN!Gj^Y?NCU``ej$(-%v3Z)O++NemWXUy~@n z=iI(rkHtESz%Y0y=YZu2%Fr@KizMSdD|^V(SdN@3Q-V#DmhV8Jwsqs5`)07iisdDEOT(Zys1 zOnx3rbHOyQvs@9*6jlniPXP2yQ=-^urEue91|c|&U)(yxze1GUXH^t)XuE`*G4^9{ zfEaBOekc^<{mQUn=4g^84qd+Yz*?M|s$8`y6=&M1Sk-d%O1V~^u_o4d)4JtG!eCb? zEjx&ww)uREw|VF{P<6w`=KSt#&8|(`J5|eWLBzX}y&Z*i)Ug9EoUwPxPNM;(%}&5e z%}(>NUuyYLY0LLq&u_W@R%vzZO1WAqmngDZYPyjdi#FPu{>FyQchP^lg9pHqtUT~| z_#ZO%XuSsv%ZrP1)&%a~!Eyw`tN=xnm^{b!nsk$ThdE{W@)#~5fyBLgd>kpX>a zFlOoRfgkFD<9$yd1CFGi)c;@)eBc0112C-ouDucHaXL7jF-gC}sHwkFRv=vcH6uwF z5Kf<@V?vNPj&e+=6kOIK=#jwbTxBhSWDk@_d8%NXj7T!SpQvzIaEX5qdPT#(2pyd6 zvmkOk>f91t;WNuG8e+)7HA*-sqq$mR-*a`Oa@9ji$cW_YbZsaze$WH%>k76|Kt=vzUtS$wO$8Vp4jiF4K zJ}Gs@M-}z>i)f_t?iH`z17PQu^Of+X*6q8;>IMMGM=AwWw83aC-qOSklue2F+C?j za87_VQWVmC*U^?%|Es8fOTn^ ze90Wi)mW^;2n<77z#j4puq>%5n#O37WITc_W7$R2Sx^Ln1e8jUCMgZ+bjEK+khzRn z>@?o98vyI=Sw^7Gz^Oy5AB^n$7`tuW8tYxl&6${Nm|Y#nnMQszKXewr$T1^pn)4>Q zm@J2jUjfrxG!3jQlZQ*WwcNdP06jCbQ0%mpyK_E;5M0C&mk#k)h?GaHjA90D*O4>E zehl;zqh{eiAs_cG#qz1a&N6Z6%EQOj($rMxrd29AGfv4W7t7PdN^#bj*x+?*)s2L~ zE>Bu^5bZVjLW4JX=+{tn!`k-3!Cb|z%-H*7%WgnnyA|+4y;Xne7aD$4*zrBr^Bb7k#_!v3+-gA2 zaX@GW^mf7fy5M-;6Uczm2`JS+&;{>5fzt&TR=)T573i`%cs*m1ey31Vzfxu(T>YAn zP8bkQV?*d?G+d}~LBVA%f}RMR_EqL0NY+4WD^C`TlMzYg^*buu5M1IPgM z{XB?V4|x=J__mZHeh`5}_YNGd-3BM*JFZjb-dZg?#^**$v%hgC7ss z@ta(RU$0>;&rCyr~T70ijnbK+5);SoeTPHt7?8#@q_nT;Dg8slJ(O) zB3i(quSxiOnvmrA?Pw=`*U^v^Zwk!kYW71HakBc`v35KIZM zLW)AV?!BsMe(S` literal 0 HcmV?d00001 diff --git a/tests/data/test-annotate/test-pointer-to-member-1.o.annotated.abi b/tests/data/test-annotate/test-pointer-to-member-1.o.annotated.abi --- /dev/null +++ b/tests/data/test-annotate/test-pointer-to-member-1.o.annotated.abi @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi index a9115aa8..c90a38fd 100644 --- a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi +++ b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi @@ -144,17 +144,18 @@ - - - + + + + - - - + + + - + - + @@ -165,42 +166,42 @@ - + - + - + - + - + - + - - - + + + - + - + - + - + - + - + @@ -229,235 +230,235 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + + + - + - + - + - - + + - - - + + + - + - + - + - + - - - + + + @@ -468,82 +469,82 @@ - - + + - - + + - + - + - - + + - + - - + + - - - + + + - + - + - - + + - + - - + + - - - - - - + + + + + + - + - - - - + + + + @@ -604,147 +605,147 @@ - - + + - + - + - - + + - + - - + + - + - + - - - + + + - - - - + + + + - - - + + + - - + + - + - - + + - + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - - + + + + - - + + - + - - + + - - - + + + - - + + - - - + + + - + - + @@ -752,12 +753,12 @@ - + - + @@ -765,810 +766,810 @@ - + - - + + - - + + - + - + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - - + + - - - + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - + + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - - + + - + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - - + + - - - + + + - + - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - - + + + - - + + - + - - + + - + - - + + - + - - + + - + - + - - + + - + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - + - - - + + + - - - + + + - - + + - + - - + + - - + + - - - + + + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - - + + + @@ -1620,8 +1621,8 @@ - - + + @@ -1632,8 +1633,8 @@ - - + + @@ -1644,8 +1645,8 @@ - - + + @@ -1653,7 +1654,7 @@ - + @@ -1671,7 +1672,7 @@ - + @@ -1683,8 +1684,8 @@ - - + + @@ -1695,8 +1696,8 @@ - - + + @@ -1707,8 +1708,8 @@ - - + + @@ -1719,8 +1720,8 @@ - - + + @@ -1731,8 +1732,8 @@ - - + + @@ -1754,9 +1755,9 @@ - - - + + + @@ -1767,8 +1768,8 @@ - - + + @@ -1798,21 +1799,21 @@ - - - + + + - + - + - - + + @@ -1823,8 +1824,8 @@ - - + + @@ -1835,8 +1836,8 @@ - - + + @@ -1847,8 +1848,8 @@ - - + + @@ -1859,8 +1860,8 @@ - - + + @@ -1871,8 +1872,8 @@ - - + + @@ -1885,24 +1886,24 @@ - - - + + + - + - + - - - + + + @@ -1915,9 +1916,9 @@ - - - + + + @@ -1930,9 +1931,9 @@ - + - + @@ -1943,23 +1944,23 @@ - + - + - + - - - + + + @@ -1970,8 +1971,8 @@ - - + + @@ -1982,8 +1983,8 @@ - - + + @@ -1994,74 +1995,74 @@ - - + + - + - + - - - - + + + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + @@ -2074,9 +2075,9 @@ - - - + + + @@ -2089,9 +2090,9 @@ - - - + + + @@ -2104,9 +2105,9 @@ - - - + + + @@ -2121,661 +2122,661 @@ - - - - + + + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - + + - + - - - + + + - - - + + + - - + + - - - + + + - - + + - + - + - + - + - + - + - + - + - - - - + + + + - + - - + + - - + + - - + + - - - + + + - + - - - - + + + + - - - + + + - - + + - - + + - - + + - + - + - - + + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - + + - + - + - + - + - - + + - - + - + + - - - - + + + + - - - - + + + + - - - + + + - - + - + + - - - - - + + + + + - - - - + + + + - - - - + + + + - + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - + + - + + - - + - - - - + + + + - - - - + + + + - - - + + + - + + - - + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - - + + - + + - - + - - - - + + + + - - - - + + + + - - - + + + - + + - - + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - + - - + + @@ -2783,568 +2784,574 @@ - + - - + + - - + + - + - + - + - - + + - - - - + + + + - - - - + + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - + - - + + - - + + - + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - + - + - + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - + - - - + + + - - - + + + - - + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - + - + - - - + + + - - - - + + + + - - + + + + + - + - + - + - + - + - - + + - - - + + + - - - + + + - + - - + + - - + + - - + + - - - + + + - - + + - + - + + + + - + - + - + - + - - + + - - - + + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + @@ -3354,156 +3361,156 @@ - - + + - - - + + + - - + + - + - - + + - - - + + + - - - + + + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - - + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + @@ -3513,82 +3520,82 @@ - + - - + + - - + + - + - + - + - + - + - + - + - - + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/tests/data/test-read-dwarf/test-pointer-to-member-1.cc b/tests/data/test-read-dwarf/test-pointer-to-member-1.cc new file mode 100644 index 00000000..c034e76c --- /dev/null +++ b/tests/data/test-read-dwarf/test-pointer-to-member-1.cc @@ -0,0 +1,30 @@ +struct X { + void f(int); + int a; +}; +struct Y; + +int X::* pmi = &X::a; +void (X::* pmf)(int) = &X::f; +double X::* pmd; +char Y::* pmc; + +typedef struct { int t; } T; +auto pmy = &T::t; + +namespace { +struct Z { int z; }; +} +int Z::* pmz = &Z::z; + +union U { int u; }; +auto pmu = &U::u; + +typedef const U CU; +auto pmcu = &CU::u; + +int +main() +{ + return 0; +} diff --git a/tests/data/test-read-dwarf/test-pointer-to-member-1.o b/tests/data/test-read-dwarf/test-pointer-to-member-1.o new file mode 100644 index 0000000000000000000000000000000000000000..04c1b0458772f76c95a1cf226930efa31a806ed9 GIT binary patch literal 4360 zcmbtXO>7%g5T56?osHLaoH$7vLKUZ?RZ8(+8q)tZ5VcJyRHbTATY=KGy><-okDPUB zbD0>UJ_0cxhH z2~r>tnCBrZgn0?|gH;eA>2?aGm+%V{9I0Xhh7HDmy4~0SF%l!gp5N#)x{MCIkKkAr#ORRp6W4t=thNhdQ8MUx zjng>9Rt?=E(MjQ@CIMH#>p;8*VhXmUPo|&Sic>HLhIwFG9JKaZC(}nKLWmiOAhvHB z9m5egnVy@#)g=ZX`UF_k5z9#8o*5Q9l4;ABnw%OIBLgYSZKj1`TGj!Jq6#!0%!#8D zm`4K5O`hWCpb zVuBPS!2$r%a*)c7MmV}fD{xE>*^e}i4oME|P0E%W;1GO}hPtqI1FM3k@C(Vwm4`uc z)bND+fMQ<2J_05@iM{LWt2!+t2 zylQu#((0Dh95``$IkUKXcX4l~Sj^4kikaEM?4H7W;pxoGS*Ma&vR$Rf&hE-&8*aDh z9IiP{r&BMZXm`r1hp+6L&(6qoJI+`Vy;|<{A#P=Kxv%Fdwrfi^ z+i~nlw(`2&ss2yzN7eNx9h_KPJdl~esoV80W=*aJHlvCW8)rdWNr}n$fO!*_?s3HF zBa&O-nPlp%&|)Hb91T3UZ%eBlhF>1^QyP6=06eK`4^gD;q>v!jwn50eyzyM7YcjE`D{F<>?v<= zH9%gAq$2x4VieK*5fM%wzin?4h(vLMyXG^AdN|KHL0>DJRZkJWo3UqU>}_4 zsM1q><_Y4tBDbLZc2XjdJ+1FW5|HTmBVzoPCqhy6jDMnJIv+%O{ES4soWZ=1Tff?H z?GpBG$Lm*_bDb+LP?4TFb}f?uSmJvYBU`DEt_k$TqlRGMt0q`%de@x&gx3FV>cW%n*ZKSqASf&aBV2s z0yRj%Ge)vnW@07n#FjAsx3veu8P#W0&mFHj%hSlvK3!ly^=)-A@O?#Rh1QGj3&v?* z5T@sEBStjib$-kK49p{=kBM~b|Es3dM7jU^)qhcd)b#Veqx`?|Jw1l~xWBoHe@9*T z`G4?#SNUsZaGM_tO~H8?{z&<&?ZPm8p#1mwh{y2!G5jGi{pSA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/test-read-dwarf/test12-pr18844.so.abi b/tests/data/test-read-dwarf/test12-pr18844.so.abi index fb1f31e1..90914ded 100644 --- a/tests/data/test-read-dwarf/test12-pr18844.so.abi +++ b/tests/data/test-read-dwarf/test12-pr18844.so.abi @@ -1785,16 +1785,18 @@ - - - - + + + + + + - + - + - + @@ -1805,48 +1807,48 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1875,422 +1877,417 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2306,18 +2303,18 @@ - + - - - - - - - - - + + + + + + + + + @@ -2385,70 +2382,70 @@ - + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -2596,73 +2593,72 @@ - + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -2677,19 +2673,20 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -2698,37 +2695,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2757,59 +2753,60 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + @@ -2840,61 +2837,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - + + - - - - - - + + + + + + + + + + @@ -2920,989 +2917,989 @@ - + - + - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3916,9 +3913,8 @@ - - - + + @@ -3931,1167 +3927,1184 @@ - - - - + + + + + + - - - - - - + + + + + - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + + - - + - - - - - + + + + + + + + + + + + + + + + + - + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - + + + - - - - - + + + + + - + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - + - + - + - + - + - - + + - - - + + + - - + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - - + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - + + + - - - - + + + + - - + + - + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - - + + - + - + - - - + + + - - - + + + - - - - - + + + + + - - + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - + + + + + - - + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - - - - + + + + + + + + + - - - + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - - + + + + + + + - - - + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - + - + - + @@ -5100,52 +5113,52 @@ - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - + - + @@ -5154,5333 +5167,5354 @@ - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - - - - - + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - + + + + + + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + - + - - + + - + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - + - - + + - + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + + + + + + + - - + + + - - - + + + - - + + + + + + + + - - + + + - - - - - - - - + + + + + + + + - - + + + + + + + + - - + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - + + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - + - - - - + + + + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - + + + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - + - - - + + + - - + + - + - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - + - - - + + + - - + + - + - - - - + + + + - - + + - - + + - - + + - - + + - - - + + + - + - + - + - + - + - + - + - - + + - - - + + + - + - + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - - - - + + + + + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - - - + + + + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - + - - + + - - - + + + - - + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - + - - + + - - - + + + - - + + - - - + + + - - + + - + - - + + - - - + + + - - + + - - - + + + - - + + - + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - + + - + - - + + - - - + + + - - + + - + - + - + - + - - + + - - + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - - - + + + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - + + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - + + - - + + - + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - + - + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - - + + + + + - - + + - - + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - + - + - + - - + + - - - + + + - - + + - + - - - + + + - - + + - + - + - - + + - - + + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - + - - + + - - + + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - + + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -10489,15 +10523,15 @@ - - + + - - + + @@ -10505,8268 +10539,8294 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - - - - - - + + + + + + + - + - + - + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - + - + - + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - - - + + + - - - - - - - - + + + + + + + + - - - + + + - - + + - - + + - - + + - - - - + + + + - + - + - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + + - + - + + - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - - + + + + - + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - + + - - + + - + - - + + - - + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - + - - + + - - + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - - + + - + - - + + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - + + + - - - + + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - + - + - + - + - + - + - + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - + + + - + - + - + - + - + - + - + - - - + + + - - - - - + + + + + - + + - - + - - - - - + + + + + - - - + + + - - - + + + - + - + - + - + - + - + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - - + + - - + + - - - + + + - - - + + + - - + + - - - + + + - + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - + - - + + - - - + + + - - + + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - + - - + + - - - - + + + + - - - + + + - - - + + + - + - + - + - - + + - - - - + + + + - - - + + + - - - + + + - + - + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + - + - + - + + + - + - + - + - + - + - + - + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + - + - - - - - - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + - + - + - + - - - - - - + + + + + + - - + + - + - + - + - - + + - - - + + + - - + + - + - - + + - + - + - - - + + + - - - + + + - - - + + + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - + - + - - + + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - + - + - + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - + - + - + - - - - + + + + - - - - + + + + - - - + + + - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + + - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - - + + + @@ -18827,149 +18887,149 @@ - - + + - + - - + + - + - - + + - + - - + + - + - + - - - + + + - - - - + + + + - - - + + + - - + + - + - - + + - + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - - + + + + - - + + - + - - + + - - - + + + - - + + - - - + + + - + - + @@ -18977,12 +19037,12 @@ - + - + @@ -18990,814 +19050,814 @@ - + - - + + - - + + - - + + - + - + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - - + + - - - + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - + + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - - + + - + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - - + + - - - + + + - + - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - + - + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - - + + + - - + + - + - - + + - + - - + + - + - - + + - + - + - - + + - + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - + - - - + + + - - - + + + - - + + - + - - + + - - + + - - - + + + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - - + + + @@ -19849,8 +19909,8 @@ - - + + @@ -19861,8 +19921,8 @@ - - + + @@ -19873,8 +19933,8 @@ - - + + @@ -19882,7 +19942,7 @@ - + @@ -19900,7 +19960,7 @@ - + @@ -19912,8 +19972,8 @@ - - + + @@ -19924,8 +19984,8 @@ - - + + @@ -19936,8 +19996,8 @@ - - + + @@ -19948,8 +20008,8 @@ - - + + @@ -19960,8 +20020,8 @@ - - + + @@ -19983,9 +20043,9 @@ - - - + + + @@ -19996,8 +20056,8 @@ - - + + @@ -20027,21 +20087,21 @@ - - - + + + - + - + - - + + @@ -20052,8 +20112,8 @@ - - + + @@ -20064,8 +20124,8 @@ - - + + @@ -20076,8 +20136,8 @@ - - + + @@ -20088,8 +20148,8 @@ - - + + @@ -20100,8 +20160,8 @@ - - + + @@ -20114,24 +20174,24 @@ - - - + + + - + - + - - - + + + @@ -20144,9 +20204,9 @@ - - - + + + @@ -20159,9 +20219,9 @@ - + - + @@ -20172,23 +20232,23 @@ - + - + - + - - - + + + @@ -20199,8 +20259,8 @@ - - + + @@ -20211,8 +20271,8 @@ - - + + @@ -20223,74 +20283,74 @@ - - + + - + - + - - - - + + + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + @@ -20303,9 +20363,9 @@ - - - + + + @@ -20318,9 +20378,9 @@ - - - + + + @@ -20333,9 +20393,9 @@ - - - + + + @@ -20350,68 +20410,68 @@ - - - - + + + + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + @@ -20421,504 +20481,504 @@ - - + + - - + + - + - - - + + + - - + + - - + + - - + + - - + + - + - - - + + + - - + + - - + + - - + + - - + + - + - - - + + + - - + + - - + + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - + - + - + - - - + + + - - - + + + - - - + + + - - + + - + - - - + + + - - - + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - + - - + + @@ -20927,8 +20987,8 @@ - - + + @@ -20938,182 +20998,182 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - + - - + + - - - - + + + + - + - - + + @@ -21276,1249 +21336,1249 @@ - + - + - + - - + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - + - - - + + + - + - - + + - - + + - - + + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - + - + - + - - - + + + - - + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - + - + - + - + - + - + - - - + + + - + - - - + + + - + - + - - - + + + - + - - - + + + - - - + + + - - + + - - + + - + - + - - + + - - + + - - + + - - - + + + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - + - + - - - + + + - + - - - + + + - - - + + + - + - - + + - - + + - - - + + + - + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - + - + - - - + + + - + - - - + + + - - - + + + - + - - + + - - - + + + - + - - - + + + - - - + + + - - + + - - + + - + - + - + - - - + + + - + - - - + + + - - - + + + - + - - + + - - + + - - - + + + - + - - - + + + - - - + + + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - + + + - - + + - + - - + + - - + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - - - + + + + - - - + + + - + - + - + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - + - - - - + + + + - - - + + + - - - + + + - + - + - + @@ -22531,87 +22591,87 @@ - - - + + + - + - + - - + + - + - + - + - + - - + + - - - + + + - + - + - - + + - - - + + + - + - + - - + + - - + + @@ -22636,8 +22696,8 @@ - - + + @@ -22646,8 +22706,8 @@ - - + + @@ -22667,14 +22727,14 @@ - - + + - - + + @@ -22682,534 +22742,534 @@ - + - + - - + + - - - + + + - - + + - + - - + + - - - + + + - - + + - + - - + + - - - + + + - - + + - + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - + - + - + - + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - + - + - + - + - - - - + + + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + @@ -23219,396 +23279,396 @@ - + - + - + - + - + - + - + - + - + - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + - + - + - + - + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - + + - + - + - - + + - - - + + + - + - - + + - - - + + + - + - + - - + + - - - + + + - - + + - - - + + + - + - + - + - + - + - + - - - - - - + + + + + + - - - - - - + + + + + + - + - + - + - + - + - - - - - - + + + + + + - - - - - - + + + + + + - + - + - + - + - - + + - + - - - + + + - - + + - - + + - + - + - + - + - - + + - + - - + + - + - + - - + + @@ -23627,17 +23687,17 @@ - + - - - + + + - + @@ -23646,1991 +23706,2011 @@ - - - + + + - - + + - - + + - + - + - + - + - + - + - - - + + + - - + + - - + + - + - + - + - + - - - + + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - + + + - - + + - + - - - + + + - - - + + + - - + + - - - - + + + + - + - - + + - - + + - - + + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - + - - + + - - + + - + - - - + + + - - + + - - - + + + - + - - + + - - - + + + - - + + - - + + - + - - - + + + - - + + - - - + + + - - + + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - - + + + - + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - - + + + + - + - - - + + + - - + + - - - - + + + + - - - + + + - - + + - - - - + + + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - + - - + + - - - - + + + + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - - + + + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - + + - + - - + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - + + - - + + + - - - + + + - - - + + + - + - - + + - - - + + + - - - + + + - - + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + - - - - - - + + + + + + + + + + + + + + + + - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + + + + + + + + + - - - + + + + + + + + - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - + + + - + - - + + - - + + - - - - + + + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -25640,2984 +25720,3039 @@ - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - + - - - - - + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - + + - - - + + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - - - + + + + - + - + - + - - + + - - - + + + - - + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - - - + + + + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - + - + - - - + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + - - + + + + + + + + - - + + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - - + + + + - - + + - + - + - + - - + + - - - + + + - - + + - - + + - + - + - - + + - - - + + + - - + + - + - + - + - + - + - - - - + + + + - - + + - + - + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - + - + - + - + - + - + - + - - - + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - + - - + + - + - - + + - + - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - - + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - - + + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - + + + + - + - - + + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - + - - + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - + - + - + - + - + - + - - - - + + + + - + - + - + - + - + - + - + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - + - + - - - - + + + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - + - - - - - + + + + + - - - - + + + + - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + + + + - + - - + + - - - - + + + + + - - + + - - - + + + + - + - - + + - - - + + + - - + + - - + + - - + + - - - - + + + + - + - + - + - + - + - + - - - + + + - - - + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - + - + - + - - + + - - - + + + + - + - + + + + - - + + - - - - - + + + + + + + + + + + + + + + - - - - + + + + diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc index ff5d39d0..47807847 100644 --- a/tests/test-abidiff-exit.cc +++ b/tests/test-abidiff-exit.cc @@ -1200,6 +1200,81 @@ InOutSpec in_out_specs[] = "data/test-abidiff-exit/PR31045/zfs-abigail-2.4/test-PR31045-report-1.txt", "output/test-abidiff-exit/PR31045/zfs-abigail-2.4/test-PR31045-report-1.txt" }, + { + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v0.o", + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-v1.o", + "", + "", + "", + "", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt", + "output/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr1-output-1.txt" + }, + { + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v0.o", + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-v1.o", + "", + "", + "", + "", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt", + "output/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt" + }, + { + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v0.o", + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-v1.o", + "", + "", + "", + "", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-output-1.txt", + "output/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr3-output-1.txt" + }, + { + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v0.o", + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-v1.o", + "", + "", + "", + "", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt", + "output/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr4-output-1.txt" + }, + { + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v0.o", + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-v1.o", + "", + "", + "", + "", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_OK, + "data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt", + "output/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr5-output-1.txt" + }, #ifdef WITH_BTF { "data/test-abidiff-exit/btf/test0-v0.o", diff --git a/tests/test-annotate.cc b/tests/test-annotate.cc index f01fe6db..cb9c8af6 100644 --- a/tests/test-annotate.cc +++ b/tests/test-annotate.cc @@ -136,6 +136,11 @@ InOutSpec in_out_specs[] = "data/test-annotate/PR29443-missing-xx.o.annotated.abi", "output/test-annotate/PR29443-missing-xx.o.annotated.abi", }, + { + "data/test-read-dwarf/test-pointer-to-member-1.o", + "data/test-annotate/test-pointer-to-member-1.o.annotated.abi", + "output/test-annotate/test-pointer-to-member-1.o.annotated.abi", + }, // This should be the last entry. {NULL, NULL, NULL} }; diff --git a/tests/test-read-dwarf.cc b/tests/test-read-dwarf.cc index d2d2ec6d..8570d774 100644 --- a/tests/test-read-dwarf.cc +++ b/tests/test-read-dwarf.cc @@ -559,6 +559,15 @@ static InOutSpec in_out_specs[] = "output/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi", NULL, }, + { + "data/test-read-dwarf/test-pointer-to-member-1.o", + "", + "", + SEQUENCE_TYPE_ID_STYLE, + "data/test-read-dwarf/test-pointer-to-member-1.o.abi", + "output/test-read-dwarf/test-pointer-to-member-1.o.abi", + NULL, + }, // DWARF fallback feature. { "data/test-read-dwarf/test-fallback.o",