Re: Regression with gdb scripts for Linux kernel

Jan Kiszka <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Sorry for the late reply, got lost under a pile of other stuff. Just now I reproduced the issue with current git master.

On 2014-09-01 14:28, Jan Kratochvil wrote:
> On Wed, 27 Aug 2014 08:34:58 +0200, Jan Kiszka wrote:
>> loading @0xffffffffa05da000: /data/linux/build-dbg/net/netfilter/xt_tcpudp.ko
>> ../../gdb/gdbtypes.c:1779: internal-error: resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) > 0' failed.
>>
>> Any ideas? Do you need a core file?
> 
> The file /data/linux/build-dbg/net/netfilter/xt_tcpudp.ko would be useful if
> it crashes with: gdb -readnow /data/linux/build-dbg/net/netfilter/xt_tcpudp.ko

This doesn't trigger here.

> 
> backtrace of the GDB crash would be also good.

#0  0x00007ffff64f24c9 in raise () from /lib64/libc.so.6
#1  0x00007ffff64f3958 in abort () from /lib64/libc.so.6
#2  0x00000000006874b6 in dump_core () at ../../gdb/utils.c:577
#3  0x00000000006897cc in internal_vproblem (problem=problem@entry=0xbeccc0 <internal_error_problem>, file=<optimized out>, line=<optimized out>, fmt=<optimized out>, ap=ap@entry=0x7fffffffcb68) at ../../gdb/utils.c:785
#4  0x00000000006898a9 in internal_verror (file=<optimized out>, line=<optimized out>, fmt=<optimized out>, ap=ap@entry=0x7fffffffcb68) at ../../gdb/utils.c:811
#5  0x00000000006b90c2 in internal_error (file=file@entry=0x7fc9c5 "../../gdb/gdbtypes.c", line=line@entry=1804, fmt=<optimized out>) at ../../gdb/common/errors.c:55
#6  0x00000000005d9e46 in resolve_dynamic_struct (addr=18446612133224297472, type=0x1dd4df0) at ../../gdb/gdbtypes.c:1804
#7  resolve_dynamic_type_internal (type=0x1dd4df0, addr=18446612133224297472, top_level=1) at ../../gdb/gdbtypes.c:1904
#8  0x000000000056b378 in value_from_contents_and_address (type=type@entry=0x1dd4df0, valaddr=valaddr@entry=0x0, address=address@entry=18446612133224297472) at ../../gdb/value.c:3482
#9  0x00000000005737f7 in get_value_at (type=0x1dd4df0, addr=18446612133224297472, lazy=1) at ../../gdb/valops.c:916
#10 0x0000000000575ff6 in value_at_lazy (addr=<optimized out>, type=0x1dd4df0) at ../../gdb/valops.c:953
#11 value_ind (arg1=0x1f2caf0) at ../../gdb/valops.c:1571
#12 0x0000000000519577 in valpy_dereference (self=0xe8f870, args=<optimized out>) at ../../gdb/python/py-value.c:183
#13 0x00007ffff6b5bf31 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
#14 0x00007ffff6b62ae6 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0
#15 0x00007ffff6b5c5d3 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
#16 0x00007ffff6b5e32c in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
#17 0x00007ffff6b5e32c in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
#18 0x00007ffff6b62811 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0
#19 0x00007ffff6b46a7f in ?? () from /usr/lib64/libpython2.7.so.1.0
#20 0x00007ffff6b41f16 in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0
#21 0x00007ffff6b42dfa in ?? () from /usr/lib64/libpython2.7.so.1.0
#22 0x00007ffff6b41f16 in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0
#23 0x00007ffff6adaed6 in PyObject_CallMethodObjArgs () from /usr/lib64/libpython2.7.so.1.0
#24 0x000000000050893b in cmdpy_function (command=<optimized out>, args=<optimized out>, from_tty=1) at ../../gdb/python/py-cmd.c:151
#25 0x00000000006852ad in execute_command (p=<optimized out>, p@entry=0xc1ab50 "lx-symbols", from_tty=1) at ../../gdb/top.c:476
#26 0x00000000005c5b21 in command_handler (command=0xc1ab50 "lx-symbols") at ../../gdb/event-top.c:432
#27 0x00000000005c5fcc in command_line_handler (rl=<optimized out>) at ../../gdb/event-top.c:629
#28 0x00000000006ceb60 in rl_callback_read_char () at ../../readline/callback.c:220
#29 0x00000000005c5b89 in rl_callback_read_char_wrapper (client_data=<optimized out>) at ../../gdb/event-top.c:166
#30 0x00000000005c4863 in process_event () at ../../gdb/event-loop.c:339
#31 0x00000000005c4bb7 in gdb_do_one_event () at ../../gdb/event-loop.c:403
#32 0x00000000005c4dd7 in start_event_loop () at ../../gdb/event-loop.c:428
#33 0x00000000005be4d3 in captured_command_loop (data=data@entry=0x0) at ../../gdb/main.c:321
#34 0x00000000005bbbe5 in catch_errors (func=func@entry=0x5be4c0 <captured_command_loop>, func_args=func_args@entry=0x0, errstring=errstring@entry=0x793a2c "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237
#35 0x00000000005bf42e in captured_main (data=data@entry=0x7fffffffdc70) at ../../gdb/main.c:1149
#36 0x00000000005bbbe5 in catch_errors (func=func@entry=0x5be9e0 <captured_main>, func_args=func_args@entry=0x7fffffffdc70, errstring=errstring@entry=0x793a2c "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:237
#37 0x00000000005bf8db in gdb_main (args=args@entry=0x7fffffffdc70) at ../../gdb/main.c:1157
#38 0x000000000046a425 in main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:32


HTH - otherwise let me know what I could do.

Jan
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlQ/zKQACgkQitSsb3rl5xTHPgCeO0IBa6ixr8SVulr3+3mTyl2J
eiIAnjUVZduF+PHvUpFVA9uqxN07XGme
=Af6P
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.