Skip to content

Commit

Permalink
Naive attempt to fix gdbinit
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Feb 13, 2023
1 parent 808950a commit 1ece35d
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions Misc/gdbinit
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,7 @@ end
# A rewrite of the Python interpreter's line number calculator in GDB's
# command language
define lineno
set $__continue = 1
set $__co = f->f_code
set $__lasti = f->f_lasti
set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
set $__li = $__co->co_firstlineno
set $__ad = 0
while ($__sz-1 >= 0 && $__continue)
set $__sz = $__sz - 1
set $__ad = $__ad + *$__p
set $__p = $__p + 1
if ($__ad > $__lasti)
set $__continue = 0
else
set $__li = $__li + *$__p
set $__p = $__p + 1
end
end
printf "%d", $__li
printf "%d", f->f_lineno
end

define pyframev
Expand Down

0 comments on commit 1ece35d

Please sign in to comment.