This is to report a bug and my fix to gdb-5.0. Version information: GNU gdb 5.0Copyright 2000 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome 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 "--host=i686-pc-linux-gnu --target=m68k-bdm-elf". The BDM version is: gdb-bdm-20000904 Problem #1: Listing some functions causes gdb to either cause the BDM to hang or gdb to crash with an "Segmentation fault". This is caused either by stepping into the function or searching for the function. The backtrace is: #0 0x80fddc5 in finish_block (symbol=0x65626972, listhead=0x81ba5f0, old_blocks=0x63736275, start=114, end=160, objfile=0x83bf740) at ./../../Source/gdb-5.0/gdb/buildsym.c:265 #1 0x80d7e40 in process_one_symbol (type=36, desc=0, valu=46, name=0x401c3449 "", section_offsets=0x842ce30, objfile=0x83bf740) at ../../../Source/gdb-5.0/gdb/dbxread.c:1972 #2 0x80d7cc7 in read_ofile_symtab (pst=0x828d524) at ./../../Source/gdb-5.0/gdb/dbxread.c:1829 #3 0x80d78c1 in dbx_psymtab_to_symtab_1 (pst=0x828d524) at ./../../Source/gdb-5.0/gdb/dbxread.c:1663 #4 0x80d7945 in dbx_psymtab_to_symtab (pst=0x828d524) at ./../../Source/gdb-5.0/gdb/dbxread.c:1705 #5 0x80842ff in psymtab_to_symtab (pst=0x828d524) at ./../../Source/gdb-5.0/gdb/symfile.c:392 #6 0x8080277 in find_pc_sect_symtab (pc=321160, section=0x0) at ./../../Source/gdb-5.0/gdb/symtab.c:1446 #7 0x80bf815 in blockvector_for_pc_sect (pc=321160, section=0x0, pindex=0xbffff5f4, symtab=0x0) at ./../../Source/gdb-5.0/gdb/blockframe.c:627 #8 0x80bf8bb in block_for_pc_sect (pc=321160, section=0x0) at ./../../Source/gdb-5.0/gdb/blockframe.c:690 #9 0x80bf902 in find_pc_sect_function (pc=321160, section=0x0) at ./../../Source/gdb-5.0/gdb/blockframe.c:714 #10 0x807ca75 in build_address_symbolic (addr=321160, do_demangle=1, name=0xbffff6a4, offset=0xbffff694, filename=0xbffff6a0, line=0xbffff698, unmapped=0xbffff69c) at ./../../Source/gdb-5.0/gdb/printcmd.c:657 #11 0x807c925 in print_address_symbolic (addr=321160, stream=0x81ba918, do_demangle=1, leadin=0x814a903 " ") at ./../../Source/gdb-5.0/gdb/printcmd.c:569 Cause: The crash problem is in dbxread.c line 1969. pop_context() popped to context_stack_depth=-1 and provided an invalid pointer. This was passed to finish_block() which accessed the structure and faulted. Solution: Modified buildsym.h line 179 the definition of pop_context() to #define pop_context() (context_stack_depth > 0) ? (&context_stack[--context_stack_depth]) : (&context_stack[context_stack_depth]) ======================================================================= Problem #2 With fixed the debugger still crashed with a "Segment Fault" at buildsym.c line 386. In this case 'pblock' equaled 0 and the search failed. Solution: Changed line 384 to: for (pblock = pending_blocks; pblock != 0 && plock != old_blocks; pblock = pblock->next) ================================================================= With these changes I have not had any crashes nor lost access to the BDM. I have not noticed any invalid values or unusual operation. With the addition of Dave Fiddes GCC for the ColdFire and DDD I have found the GNU tools to be of high quality and very productive. Thank you for your efforts. David B. Rein, Software Engineer DBR Consulting, LLC [EMAIL PROTECTED] _______________________________________________ Bug-gdb mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gdb