From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 11 06:54:36 2013 Received: (at submit) by debbugs.gnu.org; 11 Apr 2013 10:54:36 +0000 Received: from localhost ([127.0.0.1]:45016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQF9H-00038H-6m for submit@debbugs.gnu.org; Thu, 11 Apr 2013 06:54:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39110) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQF9D-00037d-3Z for submit@debbugs.gnu.org; Thu, 11 Apr 2013 06:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQF5S-0001GF-Qy for submit@debbugs.gnu.org; Thu, 11 Apr 2013 06:50:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:57259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQF5S-0001GB-OQ for submit@debbugs.gnu.org; Thu, 11 Apr 2013 06:50:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQF5P-0003Sp-VU for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 06:50:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQF5N-0001F3-4L for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 06:50:35 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQF5N-0001Ez-1f for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 06:50:33 -0400 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id A5B1C20E28 for ; Thu, 11 Apr 2013 06:50:32 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 11 Apr 2013 06:50:32 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=3jU10rxcU5c1Sh8C4sQOPw5VabM=; b=gKEslrOuUu/DVIlRcip9f j8ROmv0DAZN1hWBqh79LZ0BPMQv/cMdbUbDiS5rhc3/MdJ8GiF39S2Eyw6vyewVV WiyPjJYn4OYmz2uUdarOReKEzksz3j8EsKoKh4iyhIIGwVx5geNUPswmni+GPpq/ FbXQcz8vGimuHgUXjrr0Bo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=3jU10rxcU5c1Sh8C4sQOPw 5VabM=; b=iFnUr6xYgtvCT83HXSMeW8Y8rhdG8Ecr6NyAi6KG9ydEzAELfIZIjU Vj+BjujWK17wWrXCeVcAd0nSJf7+WNWtUGRzb1OwncC2Oz/+RNsrzBn/8CaMf0ap 72abK6+T0FOMhGhl3g6rwW5jwvFwZTRig6lhtGUFHTP0j2MFduvBc= X-Sasl-enc: HtvgoTzGJ8t8DnB9dovMC+uomVAYVBAK33p2KYRB88rb 1365677432 Received: from shorty.local (unknown [76.169.247.77]) by mail.messagingengine.com (Postfix) with ESMTPA id 63616C8000C for ; Thu, 11 Apr 2013 06:50:32 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.80) (envelope-from ) id 1UQF5K-0006fI-KW for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2013 03:50:30 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 24.2; [PATCH] gud: perldb works with eval-ed subs Date: Thu, 11 Apr 2013 03:50:30 -0700 Message-ID: <878v4p9w95.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain Hi. This is a patch to fix a specific case that makes 'M-x perldb' unable to step through some code. When debugging through a subroutine defined in an eval, perldb uses a slightly different string to communicate the debugger position. This patch updates the regex in gud-perldb-marker-filter to be able to parse this string. An example of a "normal" string: ^Z^Z/tmp/tst.pl:6:0 An example of a sub-in-eval string that can now be parsed: ^Z^Z(eval 5)[/tmp/tst.pl:6]:3:0 Sample perl source that couldn't be stepped through before, and now can be: eval 'sub f { print 34; } '; f(); --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gud-perldb-works-with-eval-ed-subs.patch Content-Description: patch >From 4d95d04798ef4055758c7538275086d77cf10474 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 11 Apr 2013 03:39:41 -0700 Subject: [PATCH] gud: perldb works with eval-ed subs When debugging through a subroutine defined in an eval, perldb uses a slightly different string to communicate the debugger position. This patch updates the regex in gud-perldb-marker-filter to be able to parse this string. The "normal" string: ^Z^Z/tmp/tst.pl:6:0 The sub-in-eval string that can now be parsed: ^Z^Z(eval 5)[/tmp/tst.pl:6]:3:0 Sample perl source that couldn't be stepped through before, and now can be: eval 'sub f { print 34; } '; f(); --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d339495..83b5fb6 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1487,7 +1487,7 @@ into one that invokes an Emacs-enabled debugging session. (let ((output "")) ;; Process all the complete markers in this chunk. - (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n" + (while (string-match "\032\032\\(?:(eval [0-9]+)\\[\\)?\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)\\]?:.*\n" gud-marker-acc) (setq -- 1.7.10.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 03:52:38 2013 Received: (at 14182) by debbugs.gnu.org; 18 Apr 2013 07:52:38 +0000 Received: from localhost ([127.0.0.1]:57968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USje1-00081w-V9 for submit@debbugs.gnu.org; Thu, 18 Apr 2013 03:52:38 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49299) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1USjdx-00081Z-OU for 14182@debbugs.gnu.org; Thu, 18 Apr 2013 03:52:35 -0400 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id D801420B10 for <14182@debbugs.gnu.org>; Thu, 18 Apr 2013 03:48:05 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 18 Apr 2013 03:48:05 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=X2D24n7qCY6aMyH95bKSIGN/dCw=; b=k6mo/1980aiU21hHHoWPf fSvTWb2bl+U7tzGXtGMfH/zMRM/ShL1Ie1T4Jw6pKqwhO1vIJ9sJ8sZSkBwsfbCQ FXUm4js5DBgOsFG0RX1RPDVpJAoMWTDfV7IbI76pk6MVD72X60iYKLLl1+ZgKMGl D3HHzTTh3RsA82fOmJfBF8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=X2D24n7qCY6aMyH95bKSIG N/dCw=; b=jPyjMNsSLff9LOs7+PxJ3LhGZ8lWHGugjYL8FYOCe+DglVGUjTCgHu 7wMsmO6Xj2Qmeb7x13eONq51m95XBJ44i23RrpAKq/P7pOqJjW5QTY/W+j/vlWZx 492LPO9/vlHX/9u03Jktcm9PdHxYUGPCGHzgvE6fsAC5GbLcf/lMU= X-Sasl-enc: jGIM0t99sjJY/4ZcaoX5Q53g1PMmXfXRYUoLYKPHFq+A 1366271285 Received: from shorty.local (unknown [76.169.247.77]) by mail.messagingengine.com (Postfix) with ESMTPA id 95A6D2000C7 for <14182@debbugs.gnu.org>; Thu, 18 Apr 2013 03:48:05 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.80) (envelope-from ) id 1USjZc-00088X-6c for 14182@debbugs.gnu.org; Thu, 18 Apr 2013 00:48:04 -0700 From: Dima Kogan To: 14182@debbugs.gnu.org Subject: updated patch User-agent: mu4e 0.9.9.5-dev6; emacs 24.3.50.1 Date: Thu, 18 Apr 2013 00:48:03 -0700 Message-ID: <87ppxs9t58.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 14182 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain I used the patch in the original report for a while, and stumbled on another, related case that emacs doesn't handle. I'm attaching an updated patch that handles both cases (described in the patch). I've also broken up the regex for improved readability. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gud-perldb-works-with-eval-ed-subs.patch Content-Description: patch >From 7ead460b535a84692057ddb8d36cec2203d5c3b4 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 11 Apr 2013 03:39:41 -0700 Subject: [PATCH] gud: perldb works with eval-ed subs When debugging through a subroutine defined in an eval, perldb uses a slightly different string to communicate the debugger position. This patch updates the regex matching in gud-perldb-marker-filter to be able to parse this string. The "normal" string: ^Z^Z/tmp/tst.pl:6:0 The sub-in-eval string that can now be parsed can look like either of ^Z^Z(eval 5)[/tmp/tst.pl:6]:3:0 ^Z^Z(eval 17)[Basic/Core/Core.pm.PL (i.e. PDL::Core.pm):2931]:1:0 Sample perl source that couldn't be stepped through before, and now can be: eval 'sub f { print 34; } '; f(); --- lisp/progmodes/gud.el | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d339495..15e6d07 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1487,14 +1487,40 @@ into one that invokes an Emacs-enabled debugging session. (let ((output "")) ;; Process all the complete markers in this chunk. - (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n" - gud-marker-acc) + ;; + ;; Here I match the string coming out of perldb. + ;; The strings can look like any of + ;; + ;; "\032\032/tmp/tst.pl:6:0\n" + ;; "\032\032(eval 5)[/tmp/tst.pl:6]:3:0\n" + ;; "\032\032(eval 17)[Basic/Core/Core.pm.PL (i.e. PDL::Core.pm):2931]:1:0\n" + ;; + ;; From those I want the filename and the line number. I use two + ;; regexes. First I look for the eval case. If that doesn't match, + ;; I look for the "normal" case + (while + (or (string-match (concat "\032\032" + "(eval [0-9]+)" + "\\[" + "\\(\\(?:[a-zA-Z]:\\)?[^:\n]*\\)" ; path + "\\(?: (i\.e\. [^)]*)\\)?" ; optional "(i.e. ...)" line + ":" + "\\([0-9]*\\)" ; line number + "\\]" + ":.*\n") + gud-marker-acc) + (string-match (concat "\032\032" + "\\(\\(?:[a-zA-Z]:\\)?[^:\n]*\\)" ; path + ":" + "\\([0-9]*\\)" ; line number + ":.*\n") + gud-marker-acc)) (setq ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 1 gud-marker-acc) - (string-to-number (match-string 3 gud-marker-acc))) + (string-to-number (match-string 2 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. -- 1.7.10.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 12:04:01 2013 Received: (at 14182-done) by debbugs.gnu.org; 19 Apr 2013 16:04:02 +0000 Received: from localhost ([127.0.0.1]:60338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTDn7-0004YH-8J for submit@debbugs.gnu.org; Fri, 19 Apr 2013 12:04:01 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40358) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTDn3-0004Xy-K3 for 14182-done@debbugs.gnu.org; Fri, 19 Apr 2013 12:03:59 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r3JFxKtS010372; Fri, 19 Apr 2013 11:59:20 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 556EBB4178; Fri, 19 Apr 2013 11:59:20 -0400 (EDT) From: Stefan Monnier To: Dima Kogan Subject: Re: bug#14182: updated patch Message-ID: References: <878v4p9w95.fsf@secretsauce.net> <87ppxs9t58.fsf@secretsauce.net> Date: Fri, 19 Apr 2013 11:59:20 -0400 In-Reply-To: <87ppxs9t58.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 18 Apr 2013 00:48:03 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4554=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4554> : streams <944047> : uri <1398582> X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 14182-done Cc: 14182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > I used the patch in the original report for a while, and stumbled on > another, related case that emacs doesn't handle. I'm attaching an > updated patch that handles both cases (described in the patch). I've > also broken up the regex for improved readability. Thanks. Installed with a minor change (I merged the two searches into a single one, using the \(?N:...\) form). Stefan From unknown Mon Aug 18 14:23:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 May 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator