Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'

From: Stefan Kangas <[email-masked]>
Date: Sun, 30 Jun 2019 18:13:19 +0200

[email-masked] (a.soroa) writes:

> 'pdb' command does not work if the directory where the python script is
> contains the characters '++'. Here is a receipt
>
> $ mkdir /tmp/foo++
> $ cd /tmp/foo++
> $ echo "print(10)" > pp.py
> $ emacs -Q
> M-x pdb
> Run pdb (like this): python3 -m pdb pp.py

I am able to reproduce this on current master.

The expected behaviour is to see TWO buffers in separate windows,
first "*gud-pp.py" with the following content:

    Current directory is /tmp/foo++/
    > /tmp/foo++/pp.py(1)<module>()
    -> print(10)
    (Pdb)

And the second a buffer visiting "pp.py".

The symptom is that you only see ONE buffer "*gud-pp.py*" with the
following content:

    Current directory is /tmp/foo++/

The bug (half) goes away as soon as I try to debug `gud-common-init'
using M-x edebug-defun, but only when stepping through manually using
"n" (and not when hitting "c").  Without this instrumentation, I get
the bug as above.  With it, I see the expected output in the
"*gud-pp.py*" buffer (but *not* the expected "pp.py" buffer).

I tried adding strategic calls to sit-for in gud-common-init and could
get the same result as with M-x edebug-defun.

Does anyone have any ideas what could cause this?

Thanks,
Stefan Kangas