From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 02DF8385842B for ; Sun, 7 Aug 2022 06:35:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 02DF8385842B Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 12D6B1FD5E; Sun, 7 Aug 2022 06:35:41 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F09511333E; Sun, 7 Aug 2022 06:35:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LM1sOTxd72IBMwAAMHmgww (envelope-from ); Sun, 07 Aug 2022 06:35:40 +0000 Message-ID: <08abf536-a2df-95c8-6b4f-cf3aef39a582@suse.de> Date: Sun, 7 Aug 2022 08:35:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 2/2] [gdb/symtab] Fix assert in read_addrmap_from_aranges Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20220805114116.8338-1-tdevries@suse.de> <20220805114116.8338-2-tdevries@suse.de> <0aff8f76-bfe0-a62e-421b-921aa6d7946e@simark.ca> From: Tom de Vries In-Reply-To: <0aff8f76-bfe0-a62e-421b-921aa6d7946e@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2022 06:35:43 -0000 On 8/5/22 22:03, Simon Marchi wrote: > > >> +save_vars { Dwarf::_add_dummy_cus } { >> + >> + set Dwarf::_add_dummy_cus 0 > > Could we make that an option to Dwarf::assemble? Just an idea, turn: > > proc assemble {filename body} > > into > > proc assemble {options body} > > ... where options could be: > > Dwarf::assemble { > filename $asm_file > add_dummy_cus 0 > } { > ... body ... > } > > And if $options is of length one, you transform it into > > {filename $options} > > such that existing test cases don't have to be changed. > Done, and committed. [ FWIW, I noticed that this works when there are no spaces in filenames, otherwise llength > 1. ] Also added an extra test-case for the non-ascending warning. And I've added checking for the specific warning in the test-cases. Thanks, - Tom