home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / gdb / bug / 983 < prev    next >
Encoding:
Text File  |  1992-08-17  |  4.0 KB  |  99 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!mtgzy.UUCP!dwex
  3. From: dwex@mtgzy.UUCP
  4. Subject: GDB 4.6 core dump reading dynamically-loaded object symtab
  5. Message-ID: <9208172029.AA26872@mtgzfs3.att.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 17 Aug 1992 20:29:10 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 86
  12.  
  13. GDB version: 4.6
  14. Architecture/OS: Sun SparcStation ELC/SunOS 4.1.1
  15. GDB Compiled With: GCC 2.2.2 (with demangling patch applied)
  16. Application Compiled With: Unknown (probably stock Sun cc)
  17.  
  18. Description:
  19.     Used the 'sharedlibrary' command to force loading of dynamically
  20.     loaded object libraries in an Andrew application, after the
  21.     application died with a SIGSEGV.  GDB dropped core with
  22.     SIGSEGV, dereferencing through a null pointer.  Here's
  23.     the stack backtrace:
  24.  
  25. -----------------------------------------------------------------------------
  26. #0  0x776e4 in read_dbx_symtab (section_offsets=0x42d0f0, objfile=0x41b308, 
  27.     text_addr=0, text_size=8192) at ../../gdb-4.6/gdb/partial-stab.h:518
  28. #1  0x7412c in dbx_symfile_read (objfile=0x41b308, section_offsets=0x42d0f0, 
  29.     mainline=0) at ../../gdb-4.6/gdb/dbxread.c:482
  30. #2  0x36960 in syms_from_objfile (objfile=0x41b308, addr=4149805056, 
  31.     mainline=0, verbo=0) at ../../gdb-4.6/gdb/symfile.c:450
  32. #3  0x36cd0 in symbol_file_add (
  33.     name=0x35f434 "/usr/add-on/andrew/dlib/atk/glist.do", from_tty=0, 
  34.     addr=4149805056, mainline=0, mapped=0, readnow=0)
  35.     at ../../gdb-4.6/gdb/symfile.c:581
  36. #4  0x56748 in symbol_add_stub (arg=0x35f408 "")
  37.     at ../../gdb-4.6/gdb/solib.c:674
  38. #5  0x2478 in catch_errors (func=0x56710 <print_insn+5536>, args=0x35f408 "", 
  39.     errstring=0x567a0 "Error while reading shared library symbols:\n")
  40.     at ../../gdb-4.6/gdb/main.c:367
  41. #6  0x568dc in solib_add (arg_string=0x0, from_tty=1, target=0x0)
  42.     at ../../gdb-4.6/gdb/solib.c:728
  43. #7  0x57208 in sharedlibrary_command (args=0x0, from_tty=1)
  44.     at ../../gdb-4.6/gdb/solib.c:1267
  45. #8  0x3d90 in execute_command (p=0x14000d "", from_tty=1)
  46.     at ../../gdb-4.6/gdb/main.c:915
  47. #9  0x4014 in command_loop () at ../../gdb-4.6/gdb/main.c:976
  48. #10 0x3af4 in main (argc=2, argv=0xf7ffe70c) at ../../gdb-4.6/gdb/main.c:853
  49. -------------------------------------------------------------------------------
  50.  
  51. Here's a patch that appears (at first glance) to solve the problem, or at
  52. least work around it:
  53.  
  54. -------------------------------------------------------------------------------
  55. *** ORIG/partial-stab.h    Mon Aug 17 13:18:04 1992
  56. --- partial-stab.h    Mon Aug 17 13:20:00 1992
  57. ***************
  58. *** 493,499 ****
  59.   #ifdef DBXREAD_ONLY
  60.             /* Kludges for ELF/STABS with Sun ACC */
  61.             last_function_name = namestring;
  62. !           if (pst->textlow == 0)
  63.           pst->textlow = CUR_SYMBOL_VALUE;
  64.   #if 0
  65.             if (startup_file_end == 0)
  66. --- 493,499 ----
  67.   #ifdef DBXREAD_ONLY
  68.             /* Kludges for ELF/STABS with Sun ACC */
  69.             last_function_name = namestring;
  70. !           if (pst && pst->textlow == 0)
  71.           pst->textlow = CUR_SYMBOL_VALUE;
  72.   #if 0
  73.             if (startup_file_end == 0)
  74. ***************
  75. *** 515,521 ****
  76.   #ifdef DBXREAD_ONLY
  77.             /* Kludges for ELF/STABS with Sun ACC */
  78.             last_function_name = namestring;
  79. !           if (pst->textlow == 0)
  80.           pst->textlow = CUR_SYMBOL_VALUE;
  81.   #if 0
  82.             if (startup_file_end == 0)
  83. --- 515,521 ----
  84.   #ifdef DBXREAD_ONLY
  85.             /* Kludges for ELF/STABS with Sun ACC */
  86.             last_function_name = namestring;
  87. !           if (pst && pst->textlow == 0)
  88.           pst->textlow = CUR_SYMBOL_VALUE;
  89.   #if 0
  90.             if (startup_file_end == 0)
  91. ------------------------------------------------------------------------------
  92.  
  93. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  94. David Wexelblat             | dwex@mtgzfs3.att.com  | Somebody get me a
  95. AT&T Bell Laboratories      | ...!att!mtgzfs3!dwex  |    cheeseburger!
  96. 200 Laurel Ave - 4B-421     |                       |       
  97. Middletown, NJ  07748       | (908) 957-5871        | --Steve Miller Band
  98.  
  99.