$ gdb python
GNU gdb (GDB) 7.6 (Debian 7.6-5)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python2.7...Reading symbols from /usr/lib/debug/usr/bin/python2.7...done.
done.
(gdb) run
Starting program: /usr/bin/python2.7
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 2.7.5+ (default, Sep 17 2013, 15:31:50)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Levenshtein
>>> Levenshtein.seqratio("hallo", "bla")
Program received signal SIGSEGV, Segmentation fault.
extract_stringlist (list='hallo', name=name@entry=0x7ffff64b2c00 "seqratio", n=n@entry=5, sizelist=sizelist@entry=0x7fffffffdd90, strlist=strlist@entry=0x7fffffffdd80) at Levenshtein.c:1166
1166 Levenshtein.c: No such file or directory.
(gdb) bt full
#0 extract_stringlist (list='hallo', name=name@entry=0x7ffff64b2c00 "seqratio", n=n@entry=5, sizelist=sizelist@entry=0x7fffffffdd90, strlist=strlist@entry=0x7fffffffdd80)
at Levenshtein.c:1166
i = <optimized out>
first = <unknown at remote 0x-2bd86a95779d78df>
#1 0x00007ffff64ac59e in setseq_common (args=<optimized out>, name=name@entry=0x7ffff64b2c00 "seqratio", foo=..., lensum=lensum@entry=0x7fffffffddf8) at Levenshtein.c:1319
n1 = 5
n2 = 3
strings1 = 0x0
strings2 = 0x0
sizes1 = 0x0
sizes2 = 0x0
strlist1 = 'hallo'
strlist2 = 'bla'
strseq1 = <optimized out>
strseq2 = ['b', 'l', 'a']
stringtype1 = <optimized out>
stringtype2 = <optimized out>
r = -1
#2 0x00007ffff64b0676 in seqratio_py (self=<optimized out>, args=<optimized out>) at Levenshtein.c:1251
lensum = 8
r = <optimized out>
#3 0x0000000000529e45 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffdf00) at ../Python/ceval.c:4021
flags = <optimized out>
tstate = 0x9410a0
func = <built-in function seqratio>
w = <optimized out>
na = <optimized out>
nk = <optimized out>
n = <optimized out>
pfunc = 0xa2ed08
x = <optimized out>
#4 PyEval_EvalFrameEx (f=f@entry=Frame 0xa2eb90, for file <stdin>, line 1, in <module> (), throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
sp = 0xa2ed10
stack_pointer = <optimized out>
next_instr = 0x7ffff7ee5763 "Fd\002"
opcode = <optimized out>
oparg = <optimized out>
why = WHY_NOT
err = <optimized out>
x = <optimized out>
v = <optimized out>
w = <optimized out>
u = <optimized out>
---Type <return> to continue, or q <return> to quit---
t = <optimized out>
stream = 0x0
fastlocals = 0xa2ed08
freevars = <optimized out>
retval = <optimized out>
tstate = <optimized out>
co = <optimized out>
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = <optimized out>
names = <optimized out>
consts = <optimized out>
enter = '__enter__'
exit = '__exit__'
#5 0x00000000004c6544 in PyEval_EvalCodeEx (closure=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=<optimized out>, globals=<optimized out>, co=0x7ffff7f371b0)
at ../Python/ceval.c:3253
retval = 0x0
fastlocals = 0xa2ed08
freevars = 0xa2ed08
u = <optimized out>
f = Frame 0xa2eb90, for file <stdin>, line 1, in <module> ()
tstate = 0x9410a0
x = <optimized out>
#6 PyEval_EvalCode (locals=<optimized out>, globals=<optimized out>, co=0x7ffff7f371b0) at ../Python/ceval.c:667
No locals.
#7 run_mod.42568 (mod=mod@entry=0xa2cce0, filename=filename@entry=0x5bb2b5 "<stdin>", globals=<optimized out>, locals=<optimized out>, flags=flags@entry=0x7fffffffe0c0,
arena=arena@entry=0x9ab2d0) at ../Python/pythonrun.c:1365
co = 0x7ffff7f371b0
#8 0x000000000043407e in PyRun_InteractiveOneFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", flags=flags@entry=0x7fffffffe0c0)
at ../Python/pythonrun.c:852
m = <optimized out>
d = <optimized out>
v = '>>> '
w = '... '
mod = 0xa2cce0
arena = 0x9ab2d0
ps1 = <optimized out>
ps2 = 0x7ffff7eed3b4 "... "
errcode = 0
#9 0x000000000043419a in PyRun_InteractiveLoopFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", flags=flags@entry=0x7fffffffe0c0)
at ../Python/pythonrun.c:772
v = <optimized out>
---Type <return> to continue, or q <return> to quit---
ret = <optimized out>
local_flags = {cf_flags = 0}
#10 0x000000000043484f in PyRun_AnyFileExFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", closeit=closeit@entry=0,
flags=flags@entry=0x7fffffffe0c0) at ../Python/pythonrun.c:741
err = <optimized out>
#11 0x00000000004353e3 in Py_Main (argc=<optimized out>, argv=0x7fffffffe278) at ../Modules/main.c:640
c = <optimized out>
sts = <optimized out>
command = 0x0
filename = 0x0
module = 0x0
fp = 0x7ffff729d240 <_IO_2_1_stdin_>
p = <optimized out>
unbuffered = <optimized out>
skipfirstline = <optimized out>
stdin_is_interactive = 1
help = <optimized out>
version = <optimized out>
saw_unbuffered_flag = <optimized out>
cf = {cf_flags = 0}
#12 0x00007ffff6f17995 in __libc_start_main (main=0x4354a1 <main>, argc=1, ubp_av=0x7fffffffe278, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe268) at libc-start.c:260
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -2830849066025673389, 5720549, 140737488347760, 0, 0, 2830849065964215635, 2830829193398394195}, mask_was_saved = 0}}, priv = {pad = {
0x0, 0x0, 0x5b8e60 <__libc_csu_init>, 0x7fffffffe278}, data = {prev = 0x0, cleanup = 0x0, canceltype = 6000224}}}
not_first_call = <optimized out>
#13 0x0000000000574a0e in _start ()
No symbol table info available.
(gdb) thread apply all backtrace
Thread 1 (Thread 0x7ffff7fc1700 (LWP 8108)):
#0 extract_stringlist (list='hallo', name=name@entry=0x7ffff64b2c00 "seqratio", n=n@entry=5, sizelist=sizelist@entry=0x7fffffffdd90, strlist=strlist@entry=0x7fffffffdd80)
at Levenshtein.c:1166
#1 0x00007ffff64ac59e in setseq_common (args=<optimized out>, name=name@entry=0x7ffff64b2c00 "seqratio", foo=..., lensum=lensum@entry=0x7fffffffddf8) at Levenshtein.c:1319
#2 0x00007ffff64b0676 in seqratio_py (self=<optimized out>, args=<optimized out>) at Levenshtein.c:1251
#3 0x0000000000529e45 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffdf00) at ../Python/ceval.c:4021
#4 PyEval_EvalFrameEx (f=f@entry=Frame 0xa2eb90, for file <stdin>, line 1, in <module> (), throwflag=throwflag@entry=0) at ../Python/ceval.c:2666
#5 0x00000000004c6544 in PyEval_EvalCodeEx (closure=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=<optimized out>, globals=<optimized out>, co=0x7ffff7f371b0)
at ../Python/ceval.c:3253
#6 PyEval_EvalCode (locals=<optimized out>, globals=<optimized out>, co=0x7ffff7f371b0) at ../Python/ceval.c:667
#7 run_mod.42568 (mod=mod@entry=0xa2cce0, filename=filename@entry=0x5bb2b5 "<stdin>", globals=<optimized out>, locals=<optimized out>, flags=flags@entry=0x7fffffffe0c0,
arena=arena@entry=0x9ab2d0) at ../Python/pythonrun.c:1365
#8 0x000000000043407e in PyRun_InteractiveOneFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", flags=flags@entry=0x7fffffffe0c0)
at ../Python/pythonrun.c:852
#9 0x000000000043419a in PyRun_InteractiveLoopFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", flags=flags@entry=0x7fffffffe0c0)
at ../Python/pythonrun.c:772
#10 0x000000000043484f in PyRun_AnyFileExFlags (fp=fp@entry=0x7ffff729d240 <_IO_2_1_stdin_>, filename=filename@entry=0x5bb2b5 "<stdin>", closeit=closeit@entry=0,
flags=flags@entry=0x7fffffffe0c0) at ../Python/pythonrun.c:741
#11 0x00000000004353e3 in Py_Main (argc=<optimized out>, argv=0x7fffffffe278) at ../Modules/main.c:640
#12 0x00007ffff6f17995 in __libc_start_main (main=0x4354a1 <main>, argc=1, ubp_av=0x7fffffffe278, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe268) at libc-start.c:260
#13 0x0000000000574a0e in _start ()
(gdb) quit
A debugging session is active.
Inferior 1 [process 8108] will be killed.
Quit anyway? (y or n) y