-data-disassemble segmetation fault

Bob Rossi bob@brasko.net
Wed Jul 30 02:39:00 GMT 2003


Hi,

I tried using the -data-disassemble command on the attached file.
I ran this command,
-data-disassemble -f basic.c -l 25 -n -1 -- 1
and gdb segfaulted.

I am concerned that the MI code is being presented as an alternative 
interface to GDB, but it is mainly untested when it comes to building 
a practical application on top of it. Either that, or I just found the
needle in the haystack crash, since it was the first or second command I
ran.

Please let me know if I am doing anything wrong.

I have attached the file that reproduced the crash ( basic.c ), and I also
attached a backtrace. I was running a gdb out of cvs, freshly updated
tonight ( 07/29/2003 ).

Thanks,
Bob Rossi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basic.c
Type: text/x-csrc
Size: 1110 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20030730/9dcaee70/attachment.bin>
-------------- next part --------------
$ gdb /home/bob/cvs/src/gdb/gdb core 
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...
Core was generated by `/home/bob/cvs/src/gdb/gdb -i=mi ./basic'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libthread_db.so.1...done.
Loaded symbols for /lib/libthread_db.so.1
#0  0x08122735 in ui_file_rewind (file=0x0) at ui-file.c:184
184     file->to_rewind (file);
(gdb) bt
#0  0x08122735 in ui_file_rewind (file=0x0) at ui-file.c:184
#1  0x080afa2a in dump_insns (uiout=0x83f7808, di=0xbfffef28, low=134514080, high=134514102, 
    how_many=-1, stb=0x8400510) at disasm.c:134
#2  0x080afdce in do_mixed_source_and_assembly (uiout=0x83f7808, di=0xbfffef28, nlines=58, 
    le=0x84340ac, low=134513836, high=134514396, symtab=0x8434054, how_many=-1, stb=0x8400510)
    at disasm.c:281
#3  0x080b0032 in gdb_disassembly (uiout=0x83f7808, file_string=0x841a300 "basic.c", line_num=25, 
    mixed_source_and_assembly=1, how_many=-1, low=134513836, high=134514396) at disasm.c:370
#4  0x080977a1 in mi_cmd_disassemble (command=0x83edf80 "data-disassemble", argv=0x8400674, argc=8)
    at ./mi/mi-cmd-disas.c:157
#5  0x08099877 in mi_cmd_execute (parse=0x83f0a48) at ./mi/mi-main.c:1276
#6  0x0809944e in captured_mi_execute_command (uiout=0x83f7808, data=0xbffff1d0)
    at ./mi/mi-main.c:1105
#7  0x0811dc25 in catcher (func=0x80993f0 <captured_mi_execute_command>, func_uiout=0x83f7808, 
    func_args=0xbffff1d0, func_val=0xbffff184, func_caught=0xbffff188, errstring=0x82f7e1e "", 
    mask=6) at top.c:429
#8  0x0811dce1 in catch_exceptions (uiout=0x83f7808, func=0x80993f0 <captured_mi_execute_command>, 
    func_args=0xbffff1d0, errstring=0x82f7e1e "", mask=6) at top.c:479
#9  0x080996a6 in mi_execute_command (
    cmd=0x841a1d0 "-data-disassemble -f basic.c -l 25 -n -1 -- 1", from_tty=1)
    at ./mi/mi-main.c:1205
#10 0x08097dd1 in mi_execute_command_wrapper (
    cmd=0x841a1d0 "-data-disassemble -f basic.c -l 25 -n -1 -- 1") at ./mi/mi-interp.c:321
#11 0x080ddb6c in gdb_readline2 (client_data=0x0) at event-top.c:877
#12 0x080dd2bd in stdin_event_handler (error=0, client_data=0x0) at event-top.c:416
#13 0x080dc6b6 in handle_file_event (event_file_desc=0) at event-loop.c:721
#14 0x080dc1c6 in process_event () at event-loop.c:334
#15 0x080dc205 in gdb_do_one_event (data=0x0) at event-loop.c:371
#16 0x0811dd53 in do_catch_errors (uiout=0x83f7808, data=0xbffff414) at top.c:497
#17 0x0811dc25 in catcher (func=0x811dd40 <do_catch_errors>, func_uiout=0x83f7808, 
    func_args=0xbffff414, func_val=0xbffff40c, func_caught=0xbffff410, errstring=0x830dd00 "", 
    mask=6) at top.c:429
#18 0x0811dd93 in catch_errors (func=0x80dc1dc <gdb_do_one_event>, func_args=0x0, 
    errstring=0x830dd00 "", mask=6) at top.c:509
#19 0x080dc243 in start_event_loop () at event-loop.c:422
#20 0x08097e55 in mi_command_loop (mi_version=2) at ./mi/mi-interp.c:387
#21 0x08097df8 in mi2_command_loop () at ./mi/mi-interp.c:333
#22 0x080dbc49 in current_interp_command_loop () at interps.c:274
#23 0x0808d48b in captured_command_loop (data=0x0) at ./main.c:97
#24 0x0811dd53 in do_catch_errors (uiout=0x83f7808, data=0xbffff5d4) at top.c:497
#25 0x0811dc25 in catcher (func=0x811dd40 <do_catch_errors>, func_uiout=0x83f7808, 
    func_args=0xbffff5d4, func_val=0xbffff5cc, func_caught=0xbffff5d0, errstring=0x82f0b60 "", 
    mask=6) at top.c:429
#26 0x0811dd93 in catch_errors (func=0x808d480 <captured_command_loop>, func_args=0x0, 
    errstring=0x82f0b60 "", mask=6) at top.c:509
#27 0x0808e203 in captured_main (data=0xbffff8bc) at ./main.c:811
#28 0x0811dd53 in do_catch_errors (uiout=0x8398b00, data=0xbffff874) at top.c:497
#29 0x0811dc25 in catcher (func=0x811dd40 <do_catch_errors>, func_uiout=0x8398b00, 
    func_args=0xbffff874, func_val=0xbffff86c, func_caught=0xbffff870, errstring=0x82f0b60 "", 
    mask=6) at top.c:429
#30 0x0811dd93 in catch_errors (func=0x808d4c0 <captured_main>, func_args=0xbffff8bc, 
    errstring=0x82f0b60 "", mask=6) at top.c:509
#31 0x0808e22b in gdb_main (args=0xbffff8bc) at ./main.c:820
#32 0x0808d47c in main (argc=3, argv=0xbffff934) at gdb.c:35
(gdb)


More information about the Gdb mailing list