From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2fMMHfP+vmjkaDkAWB0awg (envelope-from ) for ; Mon, 08 Sep 2025 12:06:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1757347570; bh=K4Iq0GVqXArTCqhf5Wgt9boIcgP54Koki1ZvubGchJU=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HI+mO0TRFaFFw7XhhSeVZf2epIhjpHizZ/prID583Qa/+QT7pS6daix5XA9YMGGAP 5wUXN9SD/SaFQiHC2YjHj41/jyEu3ivheoKIngXnp/jKa4Qkm1kOqL88k6j4LJnz1P Z+V4WLEbc2c8+wxo6oD9dfqFI/c9SDKoMsGycuKs= Received: by simark.ca (Postfix, from userid 112) id CAE651E0BA; Mon, 08 Sep 2025 12:06:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=qkW9PklJ; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 8C50D1E04C for ; Mon, 08 Sep 2025 12:06:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28168385842B for ; Mon, 8 Sep 2025 16:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28168385842B Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=qkW9PklJ Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 8161D3858C53 for ; Mon, 8 Sep 2025 16:04:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8161D3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8161D3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757347459; cv=none; b=P1BRzJPeJmqiBRsPHP/9dQzqjIkjpoLfpwENE96qk7LvjZ8s0gAFauAm/ZIbxVfpU0paWdCygXGh7a0W8xEVzJukvoLyJ2zsV3NnfGo1/cdaXnUT898xmuVqKMO8zIOSyy+R8rDngd5j8yiNVIBfLAEHQWyC4K+11IOFLL2fdbA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757347459; c=relaxed/simple; bh=K4Iq0GVqXArTCqhf5Wgt9boIcgP54Koki1ZvubGchJU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=EgqnY/db3EDn4OxbGkGyBfZ+PN75qRTO40VFmu7ASQT7VC2MG583uzAZuyBqxdSXEiJWp1DLXBG1tx8XkXUYcsAwBxDrdWwMYIjwI9xSQSl659lxTKxC1FL+qGutgMnWfH/iA5yomBFuR61PVT3AQWVxeHiKYzARcihaGAHKTk8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8161D3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1757347458; bh=K4Iq0GVqXArTCqhf5Wgt9boIcgP54Koki1ZvubGchJU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=qkW9PklJWymsI7eBQ8Naqrb+0NUSC1dY02Uqu6Xe66eEN0okptqcBVKzBcySx4lcn N2o2HEH21qIGtWIUbegn9/OQv8NnGXtOUz/KM1XLrSr8/YiL3ghjCleDDEQM6lj5G/ +DkF2ULJm8q4yf+DTgmd8lHkODb9uKZZcUKgeKyg= Received: by simark.ca (Postfix) id D56991E04C; Mon, 08 Sep 2025 12:04:18 -0400 (EDT) Message-ID: <3fccac07-1e35-48be-a028-94140c019abb@simark.ca> Date: Mon, 8 Sep 2025 12:04:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/7] Move lnp_state_machine to new file To: Tom Tromey , gdb-patches@sourceware.org References: <20250907-breakpoint-cu-expand-v1-0-dd2beef9d475@tromey.com> <20250907-breakpoint-cu-expand-v1-1-dd2beef9d475@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20250907-breakpoint-cu-expand-v1-1-dd2beef9d475@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/7/25 3:29 PM, Tom Tromey wrote: > This patch moves lnp_state_machine and some supporting code to a new > file, dwarf2/line-program.c. The main benefit of this is shrinking > dwarf2/read.c a bit. > --- > gdb/Makefile.in | 1 + > gdb/dwarf2/line-program.c | 731 ++++++++++++++++++++++++++++++++++++++++++++ > gdb/dwarf2/line-program.h | 47 +++ > gdb/dwarf2/read.c | 757 +--------------------------------------------- > gdb/dwarf2/read.h | 31 ++ > 5 files changed, 814 insertions(+), 753 deletions(-) > > diff --git a/gdb/Makefile.in b/gdb/Makefile.in > index 7654fb1aa04465e570b2e06f9a223b95448b0ca2..d7f8b95cae736255d4d26bc6c85cb8e22675c9f1 100644 > --- a/gdb/Makefile.in > +++ b/gdb/Makefile.in > @@ -1910,6 +1910,7 @@ DWARF2_SRCS = \ > dwarf2/index-write.c \ > dwarf2/leb.c \ > dwarf2/line-header.c \ > + dwarf2/line-program.c \ > dwarf2/loc.c \ > dwarf2/macro.c \ > dwarf2/parent-map.c \ I think we're supposed to add header files to the HFILES_NO_SRCDIR variable (although I'm sure it's missing some). > diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h > index 74ec4204cadbc38d9d66f8a6a5cac432297a88ff..12c8666a7350246c71d1bbf97119ce6fa1d25a50 100644 > --- a/gdb/dwarf2/read.h > +++ b/gdb/dwarf2/read.h > @@ -1351,4 +1351,35 @@ extern file_and_directory &find_file_and_directory (die_info *die, > extern const dwarf2_section_info &get_section_for_ref > (const attribute &attr, dwarf2_cu *cu); > > +/* A convenience function to find the proper .debug_line section for a CU. */ > + > +extern struct dwarf2_section_info *get_debug_line_section > + (struct dwarf2_cu *cu); > + > +struct file_entry; I would put this at the top with the other forward decls. Otherwise, looks very nice. That's a good chunk of code out of read.c. Approved-By: Simon Marchi Simon