From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 684CC385800A for ; Wed, 7 Feb 2024 19:28:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 684CC385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 684CC385800A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707334092; cv=none; b=HZ3hNK8HhOgEoPjopNd8vabGJhjxEu77pgSlxn0riPziNaA3L7KDVtvG2gG9GC1zXIbu8KjvETQp0kD9iLQblrc+zo29q/pRA21wp7JVZa4YTCCjX67vaGpjK2fHiE7bHRJfzO/r7J+ObNW9iLNEFgONLq5qOduq5s4hpIjqQ4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707334092; c=relaxed/simple; bh=4NCHkLwkCg9nX/ySPoLryD3MvAMAeUk5zID0h7rNdxY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Xyk9u0Fo3BYznLLoE+OI3OiiEse/dtXx7T2vf7+qJEE11RbkAnbxpqbxsaRisymULCHU9Zgn3/A+Ot7SUtpR1UdSir4HD2ja2GcxM8SUB9oTLLB4RRIqPjcPyPJROUJ9nEprpz5YhplW9zfLUY2KpTE+rnWtuzuDoSZODbLBA0E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5007a.ext.cloudfilter.net ([10.0.29.141]) by cmsmtp with ESMTPS id XjdkrTp3yrh9zXnabrkAQI; Wed, 07 Feb 2024 19:28:09 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Xnaarf5IG511XXnaarHoQw; Wed, 07 Feb 2024 19:28:08 +0000 X-Authority-Analysis: v=2.4 cv=X7/xK3Te c=1 sm=1 tr=0 ts=65c3d9c8 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=k7vzHIieQBIA:10 a=Qbun_eYptAEA:10 a=pGLkceISAAAA:8 a=NgR71kTumKLBlk8ZrgsA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=W9YiuDm3R2GcgoluZ3yScrU8bkIxeYjODqnD5KEG3xc=; b=btOw5xFm6j6c1IJkYzX930CIQ9 s/1/mdGzmtf4yu+qnDgcexQK7MoExQ013DXaV1TaAtkJsIuWDMJJD5+VjztQbYZUpkzZnJrwUc4zI bvsL87YicN4q+D/JRwbJ+YLqe; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:37896 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rXnaZ-000hmf-2r; Wed, 07 Feb 2024 12:28:07 -0700 From: Tom Tromey To: Simon Farre Cc: gdb-patches@sourceware.org, tom@tromey.org Subject: Re: [PATCH v3 1/5] [dap & linetable]: Add column to linetable entry References: <20240122133115.201205-1-simon.farre.cx@gmail.com> X-Attribution: Tom Date: Wed, 07 Feb 2024 12:28:06 -0700 In-Reply-To: <20240122133115.201205-1-simon.farre.cx@gmail.com> (Simon Farre's message of "Mon, 22 Jan 2024 14:31:11 +0100") Message-ID: <87fry4axbt.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rXnaZ-000hmf-2r X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net (murgatroyd) [97.122.68.157]:37896 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfBaUeXSrqoxuLu7/AVnC78Ve/KbObI7re0yLwoeCYXkLhdY88DbQ1oV82P3NwhqyTm1nVkfahlzx0m8WwEPsc2nANs77N01sxmJaWP+QTNPTjkpMi0Ek 8T02UVlXt907x31LsNY1KSsZIJzT9ppDZsdXrG6Gy0c9E0L86RdeZ3aPzu74aYXfyvZZxxxgerWikd2Iww4VY0rsjIqb4pFLwb4= X-Spam-Status: No, score=-3022.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 List-Id: >>>>> "Simon" == Simon Farre writes: Thanks for the patch. Simon> void Simon> -record_line (struct subfile *subfile, int line, unrelocated_addr pc) Simon> +record_line (struct subfile *subfile, int line, uint col, unrelocated_addr pc) "uint" isn't really a type used in gdb. I think "unsigned" would be fine. Simon> + void set_column (unsigned int column) noexcept { Simon> + m_col = column; Simon> + } gdb style puts the opening brace on the next line. Simon> + else if(line == last_line && col != last_col) Simon> + return 1; Space before paren. Simon> diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c Simon> index 73df0ed8165..b5cbe4548a7 100644 Simon> --- a/gdb/mdebugread.c Simon> +++ b/gdb/mdebugread.c Simon> @@ -4008,7 +4008,7 @@ mdebug_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) Simon> { Simon> /* Handle encoded stab line number. */ Simon> record_line Simon> - (get_current_subfile (), sh.index, Simon> + (get_current_subfile (), sh.index, 0, Unfortunately there's also mdebugread.c:add_line. I suspect this code is already a bit wrong because new_linetable doesn't zero out the memory. I think there are other such spots needing an update as well, for instance jit.c. Simon> - /* Two entries are equal if they have the same line and PC. The Simon> + /* Two entries are equal if they have the same line, PC and col. The Simon> other members are ignored. */ Simon> bool operator== (const linetable_entry &other) const Simon> - { return line == other.line && m_pc == other.m_pc; } Simon> + { return line == other.line && m_pc == other.m_pc && col == other.col; } Does operator< also need a change? Tom