Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdb list shows unexpected code when stack frame includes a try / finally block #61393

Closed
AbramClark mannequin opened this issue Feb 12, 2013 · 3 comments
Closed

pdb list shows unexpected code when stack frame includes a try / finally block #61393

AbramClark mannequin opened this issue Feb 12, 2013 · 3 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@AbramClark
Copy link
Mannequin

AbramClark mannequin commented Feb 12, 2013

BPO 17191
Nosy @xdegaye, @serhiy-storchaka
Files
  • pdb_list_bug_reproduce.py: program to reproduce unexpected pdb behavior
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-05-31.12:51:09.421>
    created_at = <Date 2013-02-12.10:47:37.091>
    labels = ['type-bug']
    title = 'pdb list shows unexpected code when stack frame includes a try / finally block'
    updated_at = <Date 2020-05-31.12:51:09.420>
    user = 'https://bugs.python.org/AbramClark'

    bugs.python.org fields:

    activity = <Date 2020-05-31.12:51:09.420>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-31.12:51:09.421>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2013-02-12.10:47:37.091>
    creator = 'AbramClark'
    dependencies = []
    files = ['29047']
    hgrepos = []
    issue_num = 17191
    keywords = []
    message_count = 3.0
    messages = ['181951', '182270', '370431']
    nosy_count = 3.0
    nosy_names = ['xdegaye', 'serhiy.storchaka', 'AbramClark']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue17191'
    versions = ['Python 2.7']

    @AbramClark
    Copy link
    Mannequin Author

    AbramClark mannequin commented Feb 12, 2013

    The list command in pdb shows an unexpected portion of code after an up command enters a try / finally block in the call stack.

    To reproduce:

    pdb pdb_list_bug_reproduce.py
    c
    up
    list

    Expected behavior: Show 11 lines around line 8, "throw_something()", which was the entry point to the lower stack frame.

    Actual behavior: Shows code centered around line 10, in the finally block, which is likely cleanup code that has nothing to do with the exception thrown.

    @AbramClark AbramClark mannequin added the type-bug An unexpected behavior, bug, or error label Feb 12, 2013
    @xdegaye
    Copy link
    Mannequin

    xdegaye mannequin commented Feb 17, 2013

    This is fixed in python 3.2 by changeset 670d4cbf1464, and indeed the
    '>>' marker is shown at line 8 of pdb_list_bug_reproduce.py when
    debugging this (modified for py3) script with python 3.2.

    @serhiy-storchaka
    Copy link
    Member

    Python 2.7 is no longer supported.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant