From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix M-x gdb when debugging over Tramp Date: Wed, 14 Apr 2021 22:02:07 -0700 Message-ID: References: <87y2dtaq6q.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2843"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 15 07:02:52 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWu9U-0000g9-TT for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Apr 2021 07:02:52 +0200 Original-Received: from localhost ([::1]:39192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWu9T-0000mu-VU for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Apr 2021 01:02:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWu8y-0000MS-TP for emacs-devel@gnu.org; Thu, 15 Apr 2021 01:02:20 -0400 Original-Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:41842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWu8x-0006pI-C1 for emacs-devel@gnu.org; Thu, 15 Apr 2021 01:02:20 -0400 Original-Received: by mail-pf1-x434.google.com with SMTP id w6so729384pfc.8 for ; Wed, 14 Apr 2021 22:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wezb4soYI4tzuFFOoj+R2JmOsDA3q9egFvijEVTtn8M=; b=DChT6rybbrl5MP6K13S2G36hTIKTwGQyXp/VeXBIX0yrDPB1JWvVixXPzdU1/89td+ YK3gkJD4tR9lTST/SraTEslknXARUcGm8a/YMuKTqOmtzKI4nzyaBUvmDw2y2Khv5Sq+ VKTqVXD+MK+XKDvcj1dyRZrrAEBYos21YDSEV5zfRmElVG8Q75Li3y1O7l6YH85GPaci +l0nPLpFgn2/0vYBDkd3KXubg0REehxyZgChn8QeQLAEVsQB57OsSSwiqkYXOUqYv/y6 fNVly36hE3xdh+tB86kzl7LBtiOsw2qJYkUUPkdhhPPO8dn5I7uifJY+wxnTTL2ajPDg 5Oyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wezb4soYI4tzuFFOoj+R2JmOsDA3q9egFvijEVTtn8M=; b=XRa76TK8+2ZffQNpeQ8k6RhnckvZlVZhOGMzwYa/GZJSS740dFLeMr2pnpD0T0+y6X HGnk9rud+bKKJJ4oZQcehqr0oY3TqR9AIECxwvoqjOz/NCjqeMWvZQvvVF8PvcRGhETn qotrPwVi4YtbNu1D+JqGhwKgxE9J54P64yPYDpa1JNXNLGsBQPyMgZX5b8WKAWzA0UCD TC7O04AAD1/TxUd1O92bMtkZrvHiijXTaoVPsge8RWW3QonFiKPE3SaICUmcMAWuTVAg TB99JNgzpckor4hzlt4ALSUIInmrIHXXnGncI2wTP23eFt212GyFXF6f3L2HKs4SOfug klrw== X-Gm-Message-State: AOAM5315ywbD4290zdgUqIT4VnMMigO7kXmodhMYpxBcgw4jYXJ4ytZD DtuPHeJh8R8sE0mPCB1hytv0cuYQ1Mk+b86SqrU= X-Google-Smtp-Source: ABdhPJxyWMqhEJif70C1HCVPsVZT0VAVcpd7i8WmFrEaqRXl4IW0IKUAr6xaqg2op7ie1nrPMFpW4Rfc6LHXomJaNAs= X-Received: by 2002:a62:1b4d:0:b029:253:ccef:409d with SMTP id b74-20020a621b4d0000b0290253ccef409dmr1534466pfb.4.1618462937357; Wed, 14 Apr 2021 22:02:17 -0700 (PDT) In-Reply-To: <87y2dtaq6q.fsf@gmx.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268073 Archived-At: On Thu, Apr 8, 2021 at 5:58 AM Michael Albinus wrote: > > Jim Porter writes: > > Hi Jim, > > > Here's a pair of patches (one against the latest git revision, and one > > against the emacs-27 branch) to fix debugging via M-x gdb over Tramp. > > There were two problems: > > > > 1) In `gdb-jsonify-buffer', when replacing the "fullname" with a Tramp > > path, the wildcard was greedy, resulting in only one "fullname" being > > replaced. This had the effect of rendering it impossible to have more > > than one breakpoint, as all but the first breakpoint would have > > unmodified "fullname"s. This fix isn't needed for Emacs 28, since > > `gdb-jsonify-buffer' was replaced with a more-accurate parser for > > GDB/MI. > > > > 2) In `gdb-frame-handler', `gdb-selected-file' needs to be the *local* > > file path, since that's what `gud-last-frame' expects. Without this, > > the overlay arrow for the current line in the source buffer won't > > show. > > From my POV these patches look OK, but I'm a very occasional gdb > user. It would be great if somebody else could verify. Thanks for taking a look. Of course, if anyone with more experience using M-x gdb could take a look, that would be helpful too. > I have also the impression that this is related to bug#39408, bug#28392 > and bug#44151. Perhaps this could be checked, and in case of yes, I > would much appreciate if we could solve all of these bugs. Indeed, it looks like bug#39408 is my issue (1) above, and bug#28392 is my issue (2). bug#44151 looks like it's done(ish): the first part is something you've already fixed in Tramp, and the second part (mentioned in comment 11) is a duplicate of bug#28392. Given that these are already tracked as bugs, should I just submit patches to both bug#39408 and bug#28392? I'd have to rearrange my existing patches slightly, but that's easy. - Jim