Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gdbinit
1 parent 808950a commit 1ece35dCopy full SHA for 1ece35d
Misc/gdbinit
@@ -54,25 +54,7 @@ end
54
# A rewrite of the Python interpreter's line number calculator in GDB's
55
# command language
56
define lineno
57
- set $__continue = 1
58
- set $__co = f->f_code
59
- set $__lasti = f->f_lasti
60
- set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
61
- set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
62
- set $__li = $__co->co_firstlineno
63
- set $__ad = 0
64
- while ($__sz-1 >= 0 && $__continue)
65
- set $__sz = $__sz - 1
66
- set $__ad = $__ad + *$__p
67
- set $__p = $__p + 1
68
- if ($__ad > $__lasti)
69
- set $__continue = 0
70
- else
71
- set $__li = $__li + *$__p
72
73
- end
74
75
- printf "%d", $__li
+ printf "%d", f->f_lineno
76
end
77
78
define pyframev
0 commit comments