Skip to content

python/pie: gdb.Inferior.attach coring #38

@pmqs

Description

@pmqs

After build the python/pie branch I got a core in _PyArg_ParseTupleAndKeywords_SizeT when I ran this

import gdb
gdb.Inferior().attach(14876)

I got past the core by changing the "attach" entry in inferior_object_methods to include METH_KEYWORDS.

  { "attach", (PyCFunction) infpy_attach, METH_VARARGS | METH_KEYWORDS,
    "attach (PID) -> None.\n\
Attach to the specified process." },

Rerunning the test gave me this, which is much better than a core. Will dig some more.

Traceback (most recent call last):
  File "try1.py", line 2, in <module>
    gdb.Inferior().attach(14876)
gdb.error: cannot attach an already executing inferior

cheers
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions