all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: David Abrahams <dave@boostpro.com>
Cc: 6097@debbugs.gnu.org
Subject: bug#6097: 23.1; PDB should pop "up" the stack on return
Date: Fri, 13 Sep 2019 13:38:26 +0200	[thread overview]
Message-ID: <CADwFkmmMm6852CuMbyD1P1uSaOsSUkx_zK4z9hrvJ25SO4tTMQ@mail.gmail.com> (raw)
In-Reply-To: <m2iq73ralk.wl%dave@boostpro.com>

David Abrahams <dave@boostpro.com> writes:

> 1) Debug a python program using PDB, say
>
>     def g():
>         pass
>
>     def h():
>         pass
>
>     def f():
>         g()
>         h()
>
> 2) step into g()
> 3) hit `n' until you see
>
>    --Return--
>
>    in the *gud* buffer
>
> 4) Note that the GUD line marker is still pointing at the last line of g,
>    just as it was before the last `n'
>
> 5) Hit `n' again.  Note that the GUD line marker is now pointing at
>    the first line of h()
>
> It would be more consistent and easier to use if, at step 4, the line
> marker indicated the 3rd line of f(), i.e. the call to h()

I'm not exactly sure what you are requesting here.

To determine what line to jump to, pdb is parsing lines such as:

> /home/skangas/foo.py(2)g()->None
                       ^
> /home/skangas/foo.py(9)f()
                       ^

This works as expected on the latest master branch.

I'm not sure how we could do better here, unless pdb changes it's
output.  I'm therefore leaning towards closing this as notabug.

Please clarify if there is something I'm missing.

Best regards,
Stefan Kangas





  reply	other threads:[~2019-09-13 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04 14:43 bug#6097: 23.1; PDB should pop "up" the stack on return David Abrahams
2019-09-13 11:38 ` Stefan Kangas [this message]
2019-10-14 12:29   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmmMm6852CuMbyD1P1uSaOsSUkx_zK4z9hrvJ25SO4tTMQ@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=6097@debbugs.gnu.org \
    --cc=dave@boostpro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.