From patchwork Thu Apr 12 19:21:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 26703 Received: (qmail 8987 invoked by alias); 12 Apr 2018 19:21:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 8974 invoked by uid 89); 12 Apr 2018 19:21:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, SPF_PASS autolearn=ham version=3.3.2 spammy=oct, Oct, adjusted, jun X-HELO: sessmg23.ericsson.net Received: from sessmg23.ericsson.net (HELO sessmg23.ericsson.net) (193.180.251.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Apr 2018 19:21:49 +0000 Received: from ESESSHC011.ericsson.se (Unknown_Domain [153.88.183.51]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id 77.B4.29657.AC1BFCA5; Thu, 12 Apr 2018 21:21:46 +0200 (CEST) Received: from ESESBMR502.ericsson.se (153.88.183.134) by ESESSHC011.ericsson.se (153.88.183.51) with Microsoft SMTP Server (TLS) id 14.3.382.0; Thu, 12 Apr 2018 21:21:45 +0200 Received: from ESESSMB505.ericsson.se (153.88.183.166) by ESESBMR502.ericsson.se (153.88.183.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Thu, 12 Apr 2018 21:21:45 +0200 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB505.ericsson.se (153.88.183.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26 via Frontend Transport; Thu, 12 Apr 2018 21:21:45 +0200 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [142.133.61.245] (192.75.88.130) by DM5PR1501MB2008.namprd15.prod.outlook.com (2603:10b6:4:a1::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Thu, 12 Apr 2018 19:21:42 +0000 Subject: Re: [patch+8.1] Fix -D_GLIBCXX_DEBUG gdb-add-index regression To: Jan Kratochvil , CC: Sergio Durigan Junior References: <20180204193754.GA29011@host1.jankratochvil.net> From: Simon Marchi Message-ID: Date: Thu, 12 Apr 2018 15:21:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180204193754.GA29011@host1.jankratochvil.net> X-ClientProxiedBy: BN3PR03CA0081.namprd03.prod.outlook.com (2a01:111:e400:7a4d::41) To DM5PR1501MB2008.namprd15.prod.outlook.com (2603:10b6:4:a1::38) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM5PR1501MB2008; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2008; 3:u9k3sLKAUXAEoZbFl59bgnS2W7mAFAr4Hgi6GOrQiVbNjNU7Bq9Juhtrb0dfLVLSIP8nXIHHEvXXASWb3VgQh/uXTsBONWuV4ctP+6t/0VdJaIjlQPnwNt3tUN5u4Rcfi/YBIrGTfm9mItwWrtF9eKPWhsj3q80K1IXfhvVTUWJTvezIAvco59LrCkua3oK+OqUA0WtKGO5I7YJseLHV7Q+bISViwSCuOA/+6VrB89IUIc3N61Utd6DgOdQwt90G; 25:2eO3YvimY0DxMhfiHTxjL0KWbCu/KllmNabAMgEAZfazA2GCnirbTUCh5HBQhzNUWmpMJgBKYPoSJMz63l5GgDpmVYKW5T+vu3NDtlM2Lev3tpz+zT/Oa6iUCtCwtnD0dFN009HLPikFjcjQC3qxv0d5XLZkgCkrfxAt2FfUJqpuhOfqRIv1MzBUVWNCO5Mkd8lnAxSVFAZHrVXOamMwIIT2V0Tt3u1NDnpXfdsQXjl8w20np7RaAvUo2uPs2a1lcICKFuIgIUR+HqnCtLfPji2j8iVbQcS7gnd+HaWN1XTB2HpHIRMiwazDTvloYL/3mcw8NGWEgWYGew03Z4P3nA==; 31:JtLXBU+ZPpiisI/KgXlk/l3THHlT+T6hDoyqOmH03KH3BKmhyNN6GC2vRgjwOi0yosq9rqCn6vzAFFRZUMwHXJ0AWxe9GB+TMi5LgaUCTzCYOF+1GS5FDWxoNdFH0StzbpjFCeDjoSAd6Q5LpWVX9qmQA3nyK51o1f0SRjF2V2/U70fYPomdgOOmLDsBXc5xiaL/tKuuqTgxrV8Y7pPBS41/6XWSQg7lBRDlsIE1wqQ= X-MS-TrafficTypeDiagnostic: DM5PR1501MB2008: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2008; 20:zITbpacxToZFXycFBe9+poFXHu4z/f8bN5dbQGoJg7koJdLrYoXbkG1k+5OEb5iiEdlAU0DNYy7RgViJymb43rJMKWF0Qslk8L5T8HCPyRjy81Ks4KXmG94OIm7FuhlWPRY6obrevp/sSwqvLyW58GkuMj4Uk9CTunRJtkp4tajTC5y/AineGuLkqD0rhyB0ySzoE/iDE889N4fXBmetJHJkOTQymtmd84eaZ7c/Sw4CUvhFHO62MGMEIf2NFD+E1nfwS/fcrhEr4ItDo46dz5166cuCiL/uTz17+eZ9SZIB5ACeB9SabO347weoMMrnqZ0GY4S64XYf0TqzZ0UV5/SrZge23IrojBVDjrccDgk6zPQgfIWywr2f5V4j/kF1c0s5kOGazkKzSqVe8IPkjWiDsNzPjgVOllQf6PN8G2VHtNxofQyjjOBnR8DcwYiI4zCJWBFddy0Sim1Qtjkmhno1DxzU4No6fHJDaMgB2mbFIoRaGAL7tP23L0Sojyyd; 4:CzugnJ9up+s+Ta6NshpqVIf72eZXH9aB3MC8ORn7uB+BXQg06FXuaKEWwuBoBUvDnbvx9I81/l4510xLShQIep5hWI+fXvnZcMK7n5DZfzokqucNTZBFidFEL4aUX4yUW/oOg1+RtLSR+ubGhJyt5HLWmmAYRfuoAUPf3rhsAaXadcrNqFbuyacJbIaoVUceDEaP4JqSjrTESmmiECbKqcdCJGVtWqJmDfHfR1zq80vxoSlOgz6W0p2W506U1rh8GEn8S9r2q3nCuYuKgLLKpeCwqRiwEaKwnM3OYDnJ/gXvektIGilCAqtly29u4vm6JhMbSgmSvsSltm2D8QCF5qo49/vzbOBSS1jexFK+YnE86aQ6+zfOKnha/oIa7f009Tj3+xkkVzPTqAQLU5hrjZDJGELSnHNVVrDcOJefK+g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(37575265505322)(15185016700835)(788757137089)(83566789882024); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR1501MB2008; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1501MB2008; X-Forefront-PRVS: 06400060E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(366004)(39380400002)(39860400002)(396003)(376002)(377424004)(199004)(54534003)(189003)(65806001)(575784001)(81156014)(6306002)(5660300001)(50466002)(2616005)(86362001)(106356001)(6246003)(81166006)(3846002)(956004)(58126008)(6116002)(23746002)(65826007)(64126003)(16526019)(966005)(16576012)(49976009)(186003)(31696002)(230700001)(36756003)(8676002)(386003)(31686004)(446003)(4326008)(2906002)(11346002)(59450400001)(26005)(53936002)(478600001)(486006)(6666003)(97736004)(476003)(6486002)(65956001)(52116002)(316002)(8936002)(76176011)(68736007)(53546011)(105586002)(66066001)(47776003)(305945005)(25786009)(44832011)(7736002)(229853002)(78286006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1501MB2008; H:[142.133.61.245]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM5PR1501MB2008; 23:2M3O1iEf10z9EUo7ejnUTWpa3W5JPw72+ir?= =?Windows-1252?Q?RL9KBLITup8fuSHTca0eC5QMMZJ9hvE1iceyiaHWeLcEi5uAP2o+Ujgt?= =?Windows-1252?Q?DWWtD7W2lxnEktb2QAeRW8TNJxJM8nWVsBNuiHIXyVHWsm0IIfWlP3UH?= =?Windows-1252?Q?VA0HfFG1iy/nhD46CxzhFILYBkSqV/oD+imUixC3+FhHeQBsr3LV8bvp?= =?Windows-1252?Q?+SoiC6tfA+vRsOWPPn124b3X04aL228X57XCetOtAC/MU+wBIDj4+0wd?= =?Windows-1252?Q?izSowjKhCmEeodb+xgUF5UquRihfBKYTToe0ihdkn/qE1TyTdVVokuHF?= =?Windows-1252?Q?0o/5POzWDrW4azuavuNrekPk4NoCDoVpEqfvhoBeaSLAHymQUUYN+bN2?= =?Windows-1252?Q?komUVjIgeV1Ti6UujkaEidBEpCnMRm5U1qPc2b5Ec9gwvMP/u0/nlOuQ?= =?Windows-1252?Q?Uo2oui8ZYlmqdpr74j//yturAmrwMPKTLlGviOvPm5jtyhelIgeudvw1?= =?Windows-1252?Q?i/m6cpXjyd6b03JkBKfwh3BQsEGQcEu4SPThh9Q0R1e/QAeYj3Ago/8e?= =?Windows-1252?Q?WR8ADAQO1Q6MxItoQWphvyzHd3e1DqLWiSUAzDiukMXsoCpPslrokLIC?= =?Windows-1252?Q?CnP1k3zVRxPNM+5u2Y/oJnQRDAoLoNGYdQa8txV/5A0I157xOzZ23wlr?= =?Windows-1252?Q?nbNDI6DrN7xj3QZbVheWBen4nS7Obx87gaL2KtIojv9zz4WgxKaBBgZY?= =?Windows-1252?Q?Ur5xuWHPsyu3uh0rpiiuvid7Jdp0CSsXLEFW320aprWgfuGo1GOxBtya?= =?Windows-1252?Q?flsfe4Gtr5l7rR08n5ROaO6NgSkq9smm+jdfw692Jr78SUVqbZsOqh1d?= =?Windows-1252?Q?MIqTEkVj7eTSodo0NwUca2w+EvXuBwMkKE5af3qFh31wc/f17eJA+c9a?= =?Windows-1252?Q?3mBNRK0VLr+ylv8CvyG6hVyDxA4uKpHUS/L0O+oEGwdRolhcFmwntYhp?= =?Windows-1252?Q?a/DxFGTbGdIfQLXhoFOfzRP+p6RQ51Q/mjitdpwd+ZARcTlAroNLefUW?= =?Windows-1252?Q?sEUnftzpbiigdXiUcaOPYooaKS6YcIGyi5wWwBnzivvEQ8BYRM51avx1?= =?Windows-1252?Q?hDNaPc8451ucFp8V/IGmLWj3/8umV69B+lh0gZL3Gb4q6/NCDDvnWAzL?= =?Windows-1252?Q?ycdB4EEa5/o/QnxIiWODAqAU8mPSn5ukFG8YEpCkXI4xlXX88farzgyV?= =?Windows-1252?Q?avdkvsLhIsn3lEdojWGQkGEVGR0wlQbV8JionRexB98pUWvBzdgpw46Y?= =?Windows-1252?Q?SnkSJx6y/k8Lu46fkOM/iNtsEbPkvTIwr+Hdb4gIuWWSVes+ztqLS2m0?= =?Windows-1252?Q?+4338DtvcNTL6+TQGTK3Kv5bhGAHejW3M6ki4z6vuIk0wk3+k7D6C+Yr?= =?Windows-1252?Q?iH4I6H2AOFec86p+MQWjqJH/NrWiynlELZTMA0wTViVtdt6NhOo94gf9?= =?Windows-1252?Q?tb9nwxq+kGF1wavYniZrRczbW37bdni43b+SGM+9kj2S8d6Y+XYncShU?= =?Windows-1252?Q?AJ4jSum87suaUzgM/H7Ve/b39PRDKNkK3UO0KSNaik2AM1z4BEH3ovJW?= =?Windows-1252?Q?0txeEwv3sDXSGyfEo97d9eICL+BzX4rt3++KOrfasYE4M?= X-Microsoft-Antispam-Message-Info: UdY5F1ukD6H806vMSyygh4PHRFY7Ql7M33qL4i6sL1sTl5dddRq9M5Un7R4lxN4aoT1uEEPShn/FYm9O04uNhWisuhFTWpzsfBd23uF8HjRqua1xin0Fk9rl7fnigqmcL47o1XPU8PjQVaef5pKgf1aXCtwdIZvxMRIzcvBI9ozgSs+/0yPUJWcc5aXdqnOG X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2008; 6:K8+YrE4c76kaM5iRRDN5l1RCwYlZd0qzOE3IhCTPGwq9yn1NVfCySNTrXOf//1ZTj4aA+dHiT+YCKXeVWMVHDwFQYIAN2woI6pEB2Qfk9E3x4rXFdB01wVPLIehcqeMIBXos52P6cv03oTnWv3H63Z61fC1MGzbP/2zgDLCocDTUFj2YnL04qErI1r3HtVHIy9mhB8M2vYvPpOhI1n1aQV5b0Q+uJjRILrdtQJDJGcGHlHgW4Cak3170glwiBSDe1kwVSZ/N327QDhnV1jeGHu4rtZVuYxkYs3I2A0ODep6u0tBUGUmwBvcMXi9YTN+1Q1bubeJFGHJH0uTS1s3/6ePw1DomaNKoRMWtysucFxkYQszahyAm4d1MbVsoLROpbqjzON/YRG6GY8K7Dt6KxAf9+D3k65lKPoF5/YWWJv/NV/gsS9fLGI387Wba6iVwNm0uXmtk14GskJRStg/Elg==; 5:OU6us+a5aN7sG7CVssf2PjkrwWPkn42GSIvpj4gbqnn7pGTdG7RZTQUqF6NrCTJn/bVfh8aPf173Dxnt/bX+wCtKhuV7EaXeT0qif7+Pfyg2Zg3OYWLTcCIBS6ra246wng13OMlZnEn3QHkZ7WO2isoepMWgvpM7N6cSFg6u3e8=; 24:uz0v1CWyyAHjQaUmoVwL0k8t5iIeMhY4hGuQrbyypegHnunRqUDRdrJgrBxUxjal5Ml9oHV7nGKGdcKR6PDxaX+fYKlhHaxXCG/dI3YqXBM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1501MB2008; 7:AKZw2PhuIKsM1LjLj0pWQ3bAHlCpO+tD4I3B+qo0dx8zIqTamdWwJL0YY5F51TnbGZEgggVtEZIvDM6LcJe5JO/35BVn34rJuzWb3SAgFXoODuRZzYDIr2NRSZRI7ecP7nvic8H2oXdClXodvO6sFkyJ0dhmutMzk4jhJA1glm/7JWag42v6XX/JV4ILyUKQ42eNZVYrAPCp/pAWhKnesRnMfSuIlkOjK//ST4U3wRTbfkOx1TEdPXEEJABaDsc9 X-MS-Office365-Filtering-Correlation-Id: 4a9b5c98-3a6c-47f8-109b-08d5a0aa9fd8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2018 19:21:42.6133 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a9b5c98-3a6c-47f8-109b-08d5a0aa9fd8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1501MB2008 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes Hi Jan, Sorry I missed this patch, but found out about it from your bug report. On 2018-02-04 02:37 PM, Jan Kratochvil wrote: > Hi, > > gdb: Out-of-bounds vector access while running gdb-add-index > https://bugzilla.redhat.com/show_bug.cgi?id=1540559 > > Fedora Rawhide started to use -D_GLIBCXX_DEBUG which made gdb-add-index > failing. > > /usr/include/c++/7/debug/safe_iterator.h:270: > Error: attempt to dereference a past-the-end iterator. > Objects involved in the operation: > iterator "this" @ 0x0x7fffffffcb90 { > type = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > > >, std::__debug::vector > > > (mutable iterator); > state = past-the-end; > references sequence with type 'std::__debug::vector > >' @ 0x0x7fffffffcc50 > } > > /usr/include/c++/7/debug/vector:417: > Error: attempt to subscript container with out-of-bounds index 556, but > container only holds 556 elements. > Objects involved in the operation: > sequence "this" @ 0x0x2e87af8 { > type = std::__debug::vector >; > } > > I do not know if anyone regression-tests GDB with -D_GLIBCXX_DEBUG, > I have just checked -D_GLIBCXX_DEBUG run against gdb-add-index. I didn't know about this before you reported those bugs. I've added it to my build, and suggested to Sergio that we add it to the buildbot. > The two -D_GLIBCXX_DEBUG regressions were made by: > > commit bc8f2430e08cc2a520db49a42686e0529be4a3bc > Author: Jan Kratochvil > Date: Mon Jun 12 16:29:53 2017 +0100 > Code cleanup: C++ify .gdb_index producer > > commit af5bf4ada48ff65b6658be1fab8f9c8f8ab5f319 > Author: Simon Marchi > Date: Sat Oct 14 08:06:29 2017 -0400 > Replace psymbol_allocation_list with std::vector > > No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu. > > OK for check-in? LGTM. But that code has moved to dwarf-index-write.c, and I feel bad because your patch was posted way before the move. So I adjusted it to save you a bit of time (please make sure I didn't mess up anything). From 0f437317476d4eacf220c03f58baaf595a5c0cee Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 4 Feb 2018 20:37:54 +0100 Subject: [PATCH] Fix -D_GLIBCXX_DEBUG gdb-add-index regression Hi, gdb: Out-of-bounds vector access while running gdb-add-index https://bugzilla.redhat.com/show_bug.cgi?id=1540559 Fedora Rawhide started to use -D_GLIBCXX_DEBUG which made gdb-add-index failing. /usr/include/c++/7/debug/safe_iterator.h:270: Error: attempt to dereference a past-the-end iterator. Objects involved in the operation: iterator "this" @ 0x0x7fffffffcb90 { type = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > > >, std::__debug::vector > > > (mutable iterator); state = past-the-end; references sequence with type 'std::__debug::vector > >' @ 0x0x7fffffffcc50 } /usr/include/c++/7/debug/vector:417: Error: attempt to subscript container with out-of-bounds index 556, but container only holds 556 elements. Objects involved in the operation: sequence "this" @ 0x0x2e87af8 { type = std::__debug::vector >; } I do not know if anyone regression-tests GDB with -D_GLIBCXX_DEBUG, I have just checked -D_GLIBCXX_DEBUG run against gdb-add-index. The two -D_GLIBCXX_DEBUG regressions were made by: commit bc8f2430e08cc2a520db49a42686e0529be4a3bc Author: Jan Kratochvil Date: Mon Jun 12 16:29:53 2017 +0100 Code cleanup: C++ify .gdb_index producer commit af5bf4ada48ff65b6658be1fab8f9c8f8ab5f319 Author: Simon Marchi Date: Sat Oct 14 08:06:29 2017 -0400 Replace psymbol_allocation_list with std::vector No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu. OK for check-in? Jan gdb/ChangeLog 2018-02-04 Jan Kratochvil * dwarf2read.c (data_buf::grow) (write_one_signatured_type) (recursively_write_psymbols) (debug_names::recursively_write_psymbols) (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG regression. --- gdb/dwarf-index-write.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf-index-write.c index 4c596c2..a5e196d 100644 --- a/gdb/dwarf-index-write.c +++ b/gdb/dwarf-index-write.c @@ -154,7 +154,7 @@ private: gdb_byte *grow (size_t size) { m_vec.resize (m_vec.size () + size); - return &*m_vec.end () - size; + return &*(m_vec.end () - size); } gdb::byte_vector m_vec; @@ -588,12 +588,14 @@ write_one_signatured_type (void **slot, void *d) write_psymbols (info->symtab, info->psyms_seen, - &info->objfile->global_psymbols[psymtab->globals_offset], + (info->objfile->global_psymbols.data () + + psymtab->globals_offset), psymtab->n_global_syms, info->cu_index, 0); write_psymbols (info->symtab, info->psyms_seen, - &info->objfile->static_psymbols[psymtab->statics_offset], + (info->objfile->static_psymbols.data () + + psymtab->statics_offset), psymtab->n_static_syms, info->cu_index, 1); @@ -643,12 +645,12 @@ recursively_write_psymbols (struct objfile *objfile, write_psymbols (symtab, psyms_seen, - &objfile->global_psymbols[psymtab->globals_offset], + objfile->global_psymbols.data () + psymtab->globals_offset, psymtab->n_global_syms, cu_index, 0); write_psymbols (symtab, psyms_seen, - &objfile->static_psymbols[psymtab->statics_offset], + objfile->static_psymbols.data () + psymtab->statics_offset, psymtab->n_static_syms, cu_index, 1); } @@ -839,10 +841,10 @@ public: psyms_seen, cu_index); write_psymbols (psyms_seen, - &objfile->global_psymbols[psymtab->globals_offset], + objfile->global_psymbols.data () + psymtab->globals_offset, psymtab->n_global_syms, cu_index, false, unit_kind::cu); write_psymbols (psyms_seen, - &objfile->static_psymbols[psymtab->statics_offset], + objfile->static_psymbols.data () + psymtab->statics_offset, psymtab->n_static_syms, cu_index, true, unit_kind::cu); } @@ -1200,11 +1202,13 @@ private: struct partial_symtab *psymtab = entry->per_cu.v.psymtab; write_psymbols (info->psyms_seen, - &info->objfile->global_psymbols[psymtab->globals_offset], + (info->objfile->global_psymbols.data () + + psymtab->globals_offset), psymtab->n_global_syms, info->cu_index, false, unit_kind::tu); write_psymbols (info->psyms_seen, - &info->objfile->static_psymbols[psymtab->statics_offset], + (info->objfile->static_psymbols.data () + + psymtab->statics_offset), psymtab->n_static_syms, info->cu_index, true, unit_kind::tu);