From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Lv5pJfehsWrC2i4AWB0awg (envelope-from ) for ; Mon, 21 Sep 2026 17:30:31 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MMc7xwHv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=b2V3mKV/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Vzp6z/2N; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WoPU+LK7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7E10F1E01F; Mon, 21 Sep 2026 17:30:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D750C1E01F for ; Mon, 21 Sep 2026 17:30:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 26EDE4BA9035 for ; Mon, 21 Sep 2026 21:30:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26EDE4BA9035 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MMc7xwHv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=b2V3mKV/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Vzp6z/2N; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WoPU+LK7 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 673134BA79A0 for ; Mon, 21 Sep 2026 21:30:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 673134BA79A0 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 673134BA79A0 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790026203; cv=none; b=eMzYm3obj158CjbYbCpUjS4miYdY2imMNQJ5gdye6T+pwz2S9TltENy//s46ri2lS04TO3Im6F2pi3r1JaeydAh8nInSi6DHbhWzjdWCwV/wKOmeE1QczVbKsSXfRQBUKl0PAluk4UcTaNxhsNv8vOxqtiI4saDacoJPlZaHm2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790026203; c=relaxed/simple; bh=Ky/BcYKIM24nTotroAsZc38iOoptI+/z6EvQU8Bs0GE=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=uYOfqBz9bNp2eGyAhimeLai04ZTtdd3dJ3vL5xCOgl93GK+Q+/2jeXRAlFW3XdgBYqCRywTifMw3q7w3S/vDAH24ol02xdQXwrOZEqcuSEB6YJG+G9k25Wpvsp94UJvzw1/8iIoHJ9M050ekGcRinxBYxf9l1ONyhYEFSRevqjM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MMc7xwHv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=b2V3mKV/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Vzp6z/2N; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WoPU+LK7 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 673134BA79A0 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 17D7A21D4C; Mon, 21 Sep 2026 21:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1790026198; h=from:from:reply-to: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=rEOLuyOJbTdo9SpG5SiJToNCLkyH4W9dnXyy0tq+1nY=; b=MMc7xwHvsADorpDqzAXJQGAtud/Vex3uFLsrXNH8Y8lewwr3MTURH+W1VLUaHucaW7BLlo SGvj9dOwjIYoozr/s3teBpODVEwLYzs/tHpLPwf9w+gze+h5opTyPVQ4PoC273L9L4tO6T 0kT1aKh7VP0/MlUXyMzrtIWluRISm18= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1790026198; h=from:from:reply-to: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=rEOLuyOJbTdo9SpG5SiJToNCLkyH4W9dnXyy0tq+1nY=; b=b2V3mKV/bApUYX/0rhQcKYpVdXd9HhcZrpaRQcVxkOzZGfdXBij1d02WI5brIofdksYZrH pSJ4BH2AitOt87BQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="Vzp6z/2N"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=WoPU+LK7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1790026194; h=from:from:reply-to: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=rEOLuyOJbTdo9SpG5SiJToNCLkyH4W9dnXyy0tq+1nY=; b=Vzp6z/2NF5RZWcGUl2XZlKuR5I3F0QD5u6nH8L29+3whb1x41NsGFqxoJXzTkXplYcjOYV fkNb+XY36nNQGAjmAFglRpBQliIiLpBW+wO+HdLnoL3458gKgrmGpFmYjUGRE54Q9egzVA g8UuYvqqL8hTcA0GZXpR3ao9yMiYeOU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1790026194; h=from:from:reply-to: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=rEOLuyOJbTdo9SpG5SiJToNCLkyH4W9dnXyy0tq+1nY=; b=WoPU+LK7amXSxTqg6JleJ56vmclvRN4YRwepclxagcvITDphWYMBAs+OwQ1Vutu3VzwmPf PpZT1oi6jEhtENCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B10F913793; Mon, 21 Sep 2026 21:29:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wYdJH9GhsWpecwAAD6G6ig (envelope-from ); Mon, 21 Sep 2026 21:29:53 +0000 Message-ID: <255d0dd3-6b7e-4bfc-800a-2aedfecbdcab@suse.de> Date: Mon, 21 Sep 2026 23:29:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 6/7] [gdb/tui] Handle section holes when forward disassembling To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260909094849.2745086-1-tdevries@suse.de> <20260909094849.2745086-7-tdevries@suse.de> <87ld97y6na.fsf@tromey.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87ld97y6na.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Queue-Id: 17D7A21D4C X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:email,suse.de:mid,sourceware.org:url]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_TRACE(0.00)[suse.de:+] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 9/11/26 8:39 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> + struct obj_section *next; > Tom> + struct obj_section *section > Tom> + = find_pc_section (pc, nullptr, &next); > Tom> + if (section == nullptr > Tom> + && next != nullptr > Tom> + && ((bfd_section_flags (next->the_bfd_section) & SEC_ALLOC) > > I'm not sure this is the best test. SEC_ALLOC can be set for data > sections as well; e.g. from 'objdump -h' on gdb: > > 13 .rodata 00dc0acc 0000000001064d80 0000000001064d80 00c64d80 2**7 > CONTENTS, ALLOC, LOAD, READONLY, DATA > > Probably you want SEC_CODE or maybe SEC_ALLOC|SEC_CODE, though I don't > know if you can ever have code that isn't also 'alloc' (like, what would > be the point). > That was my approach in v1, but it got comments [1], so I'm leaving that for now. > Then there's the issue that presumably you want to find the next code > section -- but if code and data are interleaved, find_pc_section won't > necessarily return this. I've come up with a new approach ( v3: https://sourceware.org/pipermail/gdb-patches/2026-September/230515.html ): build an addrmap mirroring what find_pc_section does. The v3 introduces a function disassemble_skip_sections. If we indeed decide that we don't want to disassemble data sections, then it should be easy to address that in there, having effect for all disassembling (CLI forward, TUI forward/backward). Thanks, - Tom [1] https://sourceware.org/pipermail/gdb-patches/2026-September/230069.html