From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robin Allen Newsgroups: gmane.emacs.bugs Subject: bug#30208: M-x pdb breaks if certain characters are in the file's path Date: Mon, 22 Jan 2018 11:35:09 +0000 Message-ID: <49E150E265ED694F872EDD5DA5137F90E3938A@ex-04.aam.local> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_49E150E265ED694F872EDD5DA5137F90E3938Aex04aamlocal_" X-Trace: blaine.gmane.org 1516637467 21213 195.159.176.226 (22 Jan 2018 16:11:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2018 16:11:07 +0000 (UTC) To: 30208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 22 17:11:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edeg7-0003gz-IR for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 17:10:35 +0100 Original-Received: from localhost ([::1]:50495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edei7-0006wH-Ts for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 11:12:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edehb-0006bO-Ka for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 11:12:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edehW-0001ts-Gy for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 11:12:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edehW-0001tL-Cu for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 11:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1edehW-0000ID-2O for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 11:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robin Allen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jan 2018 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30208 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.15166375071101 (code B ref -1); Mon, 22 Jan 2018 16:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jan 2018 16:11:47 +0000 Original-Received: from localhost ([127.0.0.1]:38331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edehH-0000Hh-2U for submit@debbugs.gnu.org; Mon, 22 Jan 2018 11:11:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edaPB-0000DS-Rl for submit@debbugs.gnu.org; Mon, 22 Jan 2018 06:36:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edaP2-00082h-EK for submit@debbugs.gnu.org; Mon, 22 Jan 2018 06:36:44 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edaP2-00082K-BC for submit@debbugs.gnu.org; Mon, 22 Jan 2018 06:36:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edaOo-0001HO-Vd for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 06:36:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edaOl-0007j1-15 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 06:36:26 -0500 Original-Received: from eu-smtp-delivery-101.mimecast.com ([146.101.78.101]:53995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edaOk-0007h3-Dq for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 06:36:22 -0500 Original-Received: from EX-03.aam.local (213-161-94-150.available.lhr.above.net [213.161.94.150]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-109--ZMdMdQvPqS3H5YgpG317g-1; Mon, 22 Jan 2018 11:35:09 +0000 Original-Received: from EX-04.aam.local ([::1]) by EX-03.aam.local ([::1]) with mapi id 14.03.0181.006; Mon, 22 Jan 2018 11:35:08 +0000 Thread-Topic: M-x pdb breaks if certain characters are in the file's path Thread-Index: AQHTk3UOqdgqAxqZDUCTT8VrJ1t/bA== Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [80.229.188.87] X-MC-Unique: -ZMdMdQvPqS3H5YgpG317g-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 22 Jan 2018 11:11:45 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142380 Archived-At: --_000_49E150E265ED694F872EDD5DA5137F90E3938Aex04aamlocal_ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable "M-x pdb" breaks if the path to the file being debugged includes certain ch= aracters. CONFIGURATION GNU Emacs 25.3.1 Happens with default settings (no init file) STEPS TO REPRODUCE M-x pdb Run pdb (like this): python3 -m pdb test.py WHAT SHOULD HAPPEN A *gud-pdb* buffer should open, display the PDB prompt, and accept debugger= commands. WHAT ACTUALLY HAPPENS A *gud-pdb* buffer opens, with output: "Current directory is /home/me@mycom= pany.local/" and nothing else. Commands sent to the debugger do seem to wor= k, but the prompt and debugger output is not displayed. After sending many = commands, all the previous prompts and outputs may appear in one big lump, = as if this were a buffering issue (though I don't think it is). WORKAROUND This is caused by GUD choking on the @ character in the file path. I worked= around it by putting this in .emacs: (setq gud-pdb-marker-regexp "^> \\([-a-zA-Z0-9_/.:\\@ ]*\\|\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\= \|\\?\\|\\)()\\(->[^\n\r]*\\)?[\n\r]") This is the default value, with @ (and space, for good measure) inserted in= the first group. SUGGESTED FIX Update the default value of gud-gdb-marker-regexp I hope this is useful Robin --_000_49E150E265ED694F872EDD5DA5137F90E3938Aex04aamlocal_ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =0A =20=0A =20
"M-x pdb" breaks if the path to the file being debugged in= cludes certain characters.

CONFIGURATION
GNU Emacs 25.3.1
Happens with default settings (no init file)

STEPS TO REPRODUCE
M-x pdb
Run pdb (like this): python3 -m pdb test.py

WHAT SHOULD HAPPEN
A *gud-pdb* buffer should open, display the PDB prompt, and accept debugger= commands.

WHAT ACTUALLY HAPPENS
A *gud-pdb* buffer opens, with output: "Current directory is /home/me@= mycompany.local/" and nothing else. Commands sent to the debugger do s= eem to work, but the prompt and debugger output is not displayed. After sen= ding many commands, all the previous prompts and outputs may appear in one big lump, as if this were a buffering issue = (though I don't think it is).

WORKAROUND
This is caused by GUD choking on the @ character in the file path. I worked= around it by putting this in .emacs:
(setq gud-pdb-marker-regexp
  "^> \\([-a-zA-Z0-9_/.:\\@ ]*\\|<string>\\)(\\([0-9]= 3;\\))\\([a-zA-Z0-9_]*\\|\\?\\|<module>\\)()\\(->[^\n\r]*\\)?[\n\r= ]")

This is the default value, with @ (and space, for good measure) inserted in= the first group.

SUGGESTED FIX
Update the default value of gud-gdb-marker-regexp

I hope this is useful

Robin


=0A=20=0A --_000_49E150E265ED694F872EDD5DA5137F90E3938Aex04aamlocal_--