Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
db664aeb
Commit
db664aeb
authored
Dec 15, 2010
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made libpython.py compatible with gdb 7.1
parent
af9fbdbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
Cython/Debugger/libpython.py
Cython/Debugger/libpython.py
+17
-15
No files found.
Cython/Debugger/libpython.py
View file @
db664aeb
...
@@ -2211,19 +2211,6 @@ class PyCont(ExecutionControlCommandBase):
...
@@ -2211,19 +2211,6 @@ class PyCont(ExecutionControlCommandBase):
invoke = ExecutionControlCommandBase.cont
invoke = ExecutionControlCommandBase.cont
# Wrap py-step and py-next in gdb defines to make them repeatable.
py_step = PyStep('
-
py
-
step
', PythonInfo())
py_next = PyNext('
-
py
-
next
', PythonInfo())
register_defines()
py_finish = PyFinish('
py
-
finish
', PythonInfo())
py_run = PyRun('
py
-
run
', PythonInfo())
py_cont = PyCont('
py
-
cont
', PythonInfo())
gdb.execute('
set
breakpoint
pending
on
')
Py_single_input = 256
Py_file_input = 257
Py_eval_input = 258
def _pointervalue(gdbval):
def _pointervalue(gdbval):
"""
"""
...
@@ -2266,7 +2253,11 @@ def get_inferior_unicode_postfix():
...
@@ -2266,7 +2253,11 @@ def get_inferior_unicode_postfix():
return
''
return
''
class
PythonCodeExecutor
(
object
):
class
PythonCodeExecutor
(
object
):
Py_single_input
=
256
Py_file_input
=
257
Py_eval_input
=
258
def
malloc
(
self
,
size
):
def
malloc
(
self
,
size
):
chunk
=
(
gdb
.
parse_and_eval
(
"(void *) malloc((size_t) %d)"
%
size
))
chunk
=
(
gdb
.
parse_and_eval
(
"(void *) malloc((size_t) %d)"
%
size
))
...
@@ -2439,7 +2430,7 @@ class PyExec(gdb.Command):
...
@@ -2439,7 +2430,7 @@ class PyExec(gdb.Command):
def
readcode
(
self
,
expr
):
def
readcode
(
self
,
expr
):
if
expr
:
if
expr
:
return
expr
,
Py_single_input
return
expr
,
Py
thonCodeExecutor
.
Py
_single_input
else
:
else
:
lines
=
[]
lines
=
[]
while
True
:
while
True
:
...
@@ -2469,7 +2460,18 @@ class PyExec(gdb.Command):
...
@@ -2469,7 +2460,18 @@ class PyExec(gdb.Command):
executor
.
evalcode
(
expr
,
input_type
,
global_dict
,
local_dict
)
executor
.
evalcode
(
expr
,
input_type
,
global_dict
,
local_dict
)
gdb
.
execute
(
'set breakpoint pending on'
)
if
hasattr
(
gdb
,
'GdbError'
):
if
hasattr
(
gdb
,
'GdbError'
):
# Wrap py-step and py-next in gdb defines to make them repeatable.
py_step
=
PyStep
(
'-py-step'
,
PythonInfo
())
py_next
=
PyNext
(
'-py-next'
,
PythonInfo
())
register_defines
()
py_finish
=
PyFinish
(
'py-finish'
,
PythonInfo
())
py_run
=
PyRun
(
'py-run'
,
PythonInfo
())
py_cont
=
PyCont
(
'py-cont'
,
PythonInfo
())
py_exec
=
FixGdbCommand
(
'py-exec'
,
'-py-exec'
)
py_exec
=
FixGdbCommand
(
'py-exec'
,
'-py-exec'
)
_py_exec
=
PyExec
(
"-py-exec"
,
gdb
.
COMMAND_DATA
,
gdb
.
COMPLETE_NONE
)
_py_exec
=
PyExec
(
"-py-exec"
,
gdb
.
COMMAND_DATA
,
gdb
.
COMPLETE_NONE
)
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment