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

Fix gdbinit for Python 3.0 #47860

Closed
vstinner opened this issue Aug 20, 2008 · 4 comments
Closed

Fix gdbinit for Python 3.0 #47860

vstinner opened this issue Aug 20, 2008 · 4 comments
Labels
type-feature A feature request or enhancement

Comments

@vstinner
Copy link
Member

BPO 3610
Nosy @smontanaro, @vstinner
Files
  • gdbinit.patch: Patch to Misc/gdbinit (py3k)
  • 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 2009-01-29.23:15:26.105>
    created_at = <Date 2008-08-20.01:08:17.280>
    labels = ['type-feature']
    title = 'Fix gdbinit for Python 3.0'
    updated_at = <Date 2009-01-30.13:27:38.344>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2009-01-30.13:27:38.344>
    actor = 'skip.montanaro'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-01-29.23:15:26.105>
    closer = 'vstinner'
    components = ['None']
    creation = <Date 2008-08-20.01:08:17.280>
    creator = 'vstinner'
    dependencies = []
    files = ['11167']
    hgrepos = []
    issue_num = 3610
    keywords = ['patch']
    message_count = 4.0
    messages = ['71501', '71869', '80792', '80816']
    nosy_count = 3.0
    nosy_names = ['skip.montanaro', 'nnorwitz', 'vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3610'
    versions = ['Python 3.0']

    @vstinner
    Copy link
    Member Author

    I'm trying to track down a bug in Python 3.0 (or my program?). I fixed
    some functions of gdbinit:

    • pystack and pylocals: use the new function py_printstr
    • lineno: call CPython "PyCode_Addr2Line" instead of ugly gdb
      reimplementation

    New functions:

    • py_decref: decrement the reference counter and *always* call
      _Py_Dealloc(obj)
    • py_printstr: display a string as UTF-8 using printf "%s" and
      PyUnicodeUCS2_AsUTF8String()

    Problem: PyUnicode_AsUTF8String() is unknown, so I have to use
    PyUnicodeUCS2_AsUTF8String... (but it can be UCS4)

    I'm unable to test pylocals, I don't know the good context to test it.
    In PyEval_EvalFrameEx if fails because "f" is unknown but pystack
    works and pystack calls lineno which uses "f" !?

    @vstinner vstinner added the type-feature A feature request or enhancement label Aug 20, 2008
    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Aug 24, 2008

    I fixed some problems in r66016. This patch seems like it has other
    things which might be useful, so I'll keep it open until it's handled.

    @vstinner
    Copy link
    Member Author

    The patch is now outdated.

    @smontanaro
    Copy link
    Contributor

    The gdbinit file for Python 3 is still broken. I've not been able to
    figure out how to get a string encoded as utf-8 from a Unicode object
    without needing a process around. If you require a process then
    gdbinit becomes much less useful since it won't work with core files.

    @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-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants