From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7643385C426; Fri, 17 Apr 2020 06:50:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7643385C426 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug ada/25837] [cc-with-debug-names] gdb.ada/big_packed_array segv Date: Fri, 17 Apr 2020 06:50:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: ada X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 06:50:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25837 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca, | |tromey at sourceware dot o= rg --- Comment #1 from Tom de Vries --- Bisects to: ... commit e0802d59969339502203ad8e0d161b5f93beca73 Author: Tom Tromey Date: Wed Apr 1 07:47:13 2020 -0600 Avoid copying in lookup_name_info lookup_name_info always copies the name that is passed in. However, normally a copy is not needed. This patch changes this class to avoid copying. This required changing the "name" method to return something else; I chose a gdb::string_view, to avoid excessive calls to strlen in the code using the lookup_name_info. However, as this class does not allow an arbitrary string_view, I've also added a c_str method that guarantees a \0-terminated result -- a pedantic difference but one that respects the string_view contract, IMO. gdb/ChangeLog 2020-04-01 Tom Tromey * symtab.h (class lookup_name_info) : Change "name" parameter to rvalue reference. Initialize m_name_holder. : New overloads. : Return gdb::string_view. : New method. : Update. : Update. : Return const char *. : Change type. * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info) (demangle_for_lookup_info::demangle_for_lookup_info): Update. (lookup_name_info::match_any): Update. * psymtab.c (match_partial_symbol, lookup_partial_symbol): Update. * minsyms.c (linkage_name_str): Update. * language.c (default_symbol_name_matcher): Update. * dwarf2/read.c (mapped_index_base::find_name_components_bounds= ): Update. * ada-lang.c (ada_fold_name): Change parameter to string_view. (ada_lookup_name_info::ada_lookup_name_info): Update. (literal_symbol_name_matcher): Update. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=