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
71ce17dd
Commit
71ce17dd
authored
Nov 13, 2010
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'cy select' command
parent
59b75c3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
Cython/Debugger/libcython.py
Cython/Debugger/libcython.py
+27
-0
No files found.
Cython/Debugger/libcython.py
View file @
71ce17dd
...
...
@@ -598,6 +598,7 @@ class CyCy(CythonCommand):
finish
=
CyFinish
.
register
(),
up
=
CyUp
.
register
(),
down
=
CyDown
.
register
(),
select
=
CySelect
.
register
(),
bt
=
CyBacktrace
.
register
(),
list
=
CyList
.
register
(),
print_
=
CyPrint
.
register
(),
...
...
@@ -949,6 +950,32 @@ class CyDown(CyUp):
_command
=
'down'
class
CySelect
(
CythonCodeStepper
):
"""
Select a frame. Use frame numbers as listed in `cy backtrace`.
This command is useful because `cy backtrace` prints a reversed backtrace.
"""
name
=
'cy select'
def
invoke
(
self
,
stackno
,
from_tty
):
try
:
stackno
=
int
(
stackno
)
except
ValueError
:
raise
gdb
.
GdbError
(
"Not a valid number: %r"
%
(
stackno
,))
frame
=
gdb
.
selected_frame
()
while
frame
.
newer
():
frame
=
frame
.
newer
()
stackdepth
=
self
.
_stackdepth
(
frame
)
try
:
gdb
.
execute
(
'select %d'
%
(
stackdepth
-
stackno
-
1
,))
except
RuntimeError
,
e
:
raise
gdb
.
GdbError
(
*
e
.
args
)
class
CyBacktrace
(
CythonCommand
):
'Print the Cython stack'
...
...
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