* core dump @ 2000-04-19 11:19 Tom Tromey 2000-04-19 12:35 ` Fernando Nasser 0 siblings, 1 reply; 10+ messages in thread From: Tom Tromey @ 2000-04-19 11:19 UTC (permalink / raw) To: Insight List Insight once again got a segv while I had the watch window up. This time (as before, I think) it died when I re-ran my program (gcj). I had rebuilt the program and gdb had to reload it; I don't know whether this happened or not. I avoid the watch window because it causes so many problems :-( Stack trace appended. This is on my x86 Debian 2.0 box. Tom #0 check_typedef (type=0xea7) at ../../src/gdb/gdbtypes.c:1115 #1 0x80ae051 in check_typedef (type=0x881e088) at ../../src/gdb/gdbtypes.c:1191 #2 0x8081e5d in allocate_value (type=0x881e088) at ../../src/gdb/values.c:84 #3 0x80881f2 in value_zero (type=0x881e088, lv=not_lval) at ../../src/gdb/valops.c:412 #4 0x80cf7da in varobj_get_type (var=0x8dd1170) at ../../src/gdb/varobj.c:727 #5 0x80d0569 in value_of_root (var_handle=0xbfff9014, type_changed=0xbfff9008) at ../../src/gdb/varobj.c:1649 #6 0x80cfa5c in varobj_update (var=0x8dd1170, changelist=0xbfff902c) at ../../src/gdb/varobj.c:908 #7 0x80c37c0 in variable_update (interp=0x8323848, var=0x8dd1170) at ../../src/gdb/gdbtk/generic/gdbtk-varobj.c:463 #8 0x80c34f7 in variable_obj_command (clientData=0x8dd1170, interp=0x8323848, objc=2, objv=0x8324540) at ../../src/gdb/gdbtk/generic/gdbtk-varobj.c:273#9 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8df7f28) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #10 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8be4980) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #11 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x8de5458, member=0x8de5470, contextObj=0x8dba400, objc=1, objv=0x8324534) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 #12 0x8189b8d in Itcl_ExecMethod (clientData=0x8de5458, interp=0x8323848, objc=1, objv=0x8324534) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 #13 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dec628) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #14 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x89dbca0) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #15 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x8dd59d8, member=0x8dd59f0, contextObj=0x8dba400, objc=1, objv=0x8324530) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 #16 0x8189b8d in Itcl_ExecMethod (clientData=0x8dd59d8, interp=0x8323848, objc=1, objv=0x8324530) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 #17 0x818f9f2 in Itcl_EvalArgs (interp=0x8323848, objc=1, objv=0x8324530) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_util.c:1337 #18 0x818b42b in Itcl_HandleInstance (clientData=0x8dba400, interp=0x8323848, objc=2, objv=0x832452c) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_objects.c:658 #19 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8832368) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #20 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab498) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #21 0x8254d93 in Tcl_UplevelObjCmd (dummy=0x0, interp=0x8323848, objc=4, objv=0x832451c) at ../../../src/tcl/unix/../generic/tclProc.c:612 #22 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84a6c28) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #23 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417500) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #24 0x82552d1 in TclObjInterpProc (clientData=0x84550c8, interp=0x8323848, objc=2, objv=0x8324514) at ../../../src/tcl/unix/../generic/tclProc.c:996 #25 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84fa2f0) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #26 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x841a4d8) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #27 0x82552d1 in TclObjInterpProc (clientData=0x8451b48, interp=0x8323848, objc=1, objv=0x8324510) at ../../../src/tcl/unix/../generic/tclProc.c:996 #28 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84cbb28) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #29 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417650) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #30 0x82552d1 in TclObjInterpProc (clientData=0x845e880, interp=0x8323848, objc=1, objv=0x832450c) at ../../../src/tcl/unix/../generic/tclProc.c:996 #31 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x88a3218) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #32 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8be5fc8) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #33 0x821ce8a in Tcl_Eval (interp=0x8323848, string=0x8277bb2 "gdbtk_tcl_idle") at ../../../src/tcl/unix/../generic/tclBasic.c:2453 #34 0x80c2b38 in gdbtk_call_command (cmdblk=0x8318100, arg=0x0, from_tty=0) at ../../src/gdb/gdbtk/generic/gdbtk-hooks.c:516 #35 0x80db1d8 in execute_command (p=0x8a97b43 "", from_tty=0) at ../../src/gdb/top.c:1544 #36 0x80bdc4d in gdb_immediate_command (clientData=0x80bdba0, interp=0x8323848, objc=2, objv=0x8324504) at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:906 #37 0x80bd7c8 in wrapped_call (opaque_args=0xbfffbf48) at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:550 #38 0x80da49b in catch_errors (func=0x80bd7b0 <wrapped_call>, args=0xbfffbf48, errstring=0x82772c8 "", mask=6) at ../../src/gdb/top.c:615 #39 0x80bd6f4 in call_wrapper (clientData=0x80bdba0, interp=0x8323848, objc=2, objv=0x8324504) at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:488 #40 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a92058) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #41 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417818) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #42 0x82552d1 in TclObjInterpProc (clientData=0x845a678, interp=0x8323848, objc=1, objv=0x8324500) at ../../../src/tcl/unix/../generic/tclProc.c:996 #43 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a8c578) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #44 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417968) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #45 0x82552d1 in TclObjInterpProc (clientData=0x841fc50, interp=0x8323848, objc=1, objv=0x83244fc) at ../../../src/tcl/unix/../generic/tclProc.c:996 #46 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a8c4f8) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #47 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x89e0340) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #48 0x8227afd in Tcl_SwitchObjCmd (dummy=0x0, interp=0x8323848, objc=3, objv=0x83244f0) at ../../../src/tcl/unix/../generic/tclCmdMZ.c:1732 #49 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a69c38) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #50 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x842b2e8) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #51 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x84c2898, member=0x84c28b0, contextObj=0x84de818, objc=2, objv=0x83244e8) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 #52 0x8189b8d in Itcl_ExecMethod (clientData=0x84c2898, interp=0x8323848, objc=2, objv=0x83244e8) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 #53 0x818f9f2 in Itcl_EvalArgs (interp=0x8323848, objc=2, objv=0x83244e8) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_util.c:1337 #54 0x818b42b in Itcl_HandleInstance (clientData=0x84de818, interp=0x8323848, objc=3, objv=0x83244e4) at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_objects.c:658 #55 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dcff58) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #56 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab768) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #57 0x824e173 in NamespaceInscopeCmd (dummy=0x0, interp=0x8323848, objc=4, objv=0x83244d4) at ../../../src/tcl/unix/../generic/tclNamesp.c:3277 #58 0x824d7b9 in Tcl_NamespaceObjCmd (clientData=0x0, interp=0x8323848, objc=4, objv=0x83244d4) at ../../../src/tcl/unix/../generic/tclNamesp.c:2498 #59 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dfb350) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #60 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab660) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #61 0x821ce8a in Tcl_Eval (interp=0x8323848, string=0xbfffe4d0 "namespace inscope ::GDBSrcBar {::.srcwin0.srcwin inferior run}") at ../../../src/tcl/unix/../generic/tclBasic.c:2453 #62 0x821e5bc in Tcl_GlobalEval (interp=0x8323848, command=0xbfffe4d0 "namespace inscope ::GDBSrcBar {::.srcwin0.srcwin inferior run}") at ../../../src/tcl/unix/../generic/tclBasic.c:3983 #63 0x820e214 in TkCopyAndGlobalEval (interp=0x8323848, script=0x8dfc420 "\207") at ../../../src/tk/unix/../generic/tkBind.c:4547 #64 0x81d469a in TkInvokeButton (butPtr=0x868df88) at ../../../src/tk/unix/../generic/tkButton.c:1136 #65 0x81d3ca4 in ButtonWidgetCmd (clientData=0x868df88, interp=0x8323848, argc=2, argv=0xbfffe5f0) at ../../../src/tk/unix/../generic/tkButton.c:543 #66 0x821c7b6 in TclInvokeStringCommand (clientData=0x869d380, interp=0x8323848, objc=2, objv=0x83244cc) at ../../../src/tcl/unix/../generic/tclBasic.c:1745 #67 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dbfe88) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #68 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x84cf510) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #69 0x8254d6d in Tcl_UplevelObjCmd (dummy=0x0, interp=0x8323848, objc=3, objv=0x83244c0) at ../../../src/tcl/unix/../generic/tclProc.c:609 #70 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a97838) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #71 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x84cf420) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #72 0x82552d1 in TclObjInterpProc (clientData=0x869e290, interp=0x8323848, objc=2, objv=0x83244b8) at ../../../src/tcl/unix/../generic/tclProc.c:996 #73 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8e06030) at ../../../src/tcl/unix/../generic/tclExecute.c:955 #74 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x840fcc0) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 #75 0x821ce8a in Tcl_Eval (interp=0x8323848, string=0xbffff6b8 "TOOLBAR_button_up .srcwin0.srcwin.container.pane0.childsite.con.t.stop") at ../../../src/tcl/unix/../generic/tclBasic.c:2453 #76 0x821e5bc in Tcl_GlobalEval (interp=0x8323848, command=0xbffff6b8 "TOOLBAR_button_up .srcwin0.srcwin.container.pane0.childsite.con.t.stop") at ../../../src/tcl/unix/../generic/tclBasic.c:3983 #77 0x820af5d in Tk_BindEvent (bindingTable=0x83427b0, eventPtr=0x8e00e48, tkwin=0x869e5b0, numObjects=0, objectPtr=0xbffff7b8) at ../../../src/tk/unix/../generic/tkBind.c:1731 #78 0x820ed9c in TkBindEventProc (winPtr=0x869e5b0, eventPtr=0x8e00e48) at ../../../src/tk/unix/../generic/tkCmds.c:242 #79 0x81bd708 in Tk_HandleEvent (eventPtr=0x8e00e48) at ../../../src/tk/unix/../generic/tkEvent.c:657 #80 0x81bda79 in WindowEventProc (evPtr=0x8e00e40, flags=-3) at ../../../src/tk/unix/../generic/tkEvent.c:983 #81 0x824eb50 in Tcl_ServiceEvent (flags=-3) at ../../../src/tcl/unix/../generic/tclNotify.c:444 #82 0x824ed66 in Tcl_DoOneEvent (flags=0) at ../../../src/tcl/unix/../generic/tclNotify.c:683 #83 0x81bdae4 in Tk_MainLoop () at ../../../src/tk/unix/../generic/tkEvent.c:1041 #84 0x80c290c in tk_command_loop () at ../../src/gdb/gdbtk/generic/gdbtk-hooks.c:383 #85 0x807cdb2 in captured_command_loop (data=0x0) at ../../src/gdb/main.c:104 #86 0x80da49b in catch_errors (func=0x807cd90 <captured_command_loop>, args=0x0, errstring=0x8262a4e "", mask=6) at ../../src/gdb/top.c:615 #87 0x807da03 in captured_main (data=0xbffffb58) at ../../src/gdb/main.c:749 #88 0x80da49b in catch_errors (func=0x807cde0 <captured_main>, args=0xbffffb58, errstring=0x8262a4e "", mask=6) at ../../src/gdb/top.c:615 #89 0x807da37 in main (argc=2, argv=0xbffffb7c) at ../../src/gdb/main.c:761 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 11:19 core dump Tom Tromey @ 2000-04-19 12:35 ` Fernando Nasser 2000-04-19 12:46 ` Keith Seitz 0 siblings, 1 reply; 10+ messages in thread From: Fernando Nasser @ 2000-04-19 12:35 UTC (permalink / raw) To: tromey; +Cc: Insight List, gdb-local Tom Tromey wrote: > > Insight once again got a segv while I had the watch window up. This > time (as before, I think) it died when I re-ran my program (gcj). I > had rebuilt the program and gdb had to reload it; I don't know whether > this happened or not. Despite the core happening when inside the update code for watched variables, the problem is unrelated to it. There is no excuse for gdb's value_zero to dump core, but it seems that some variable (whatever you are whatching) had a bad formed type. I would bet it is probably a bug in the gdb symbol reading or some compiler debug info malformation. Unless someone knows of some limitation when calling value_zero(). There is nothing in the code that indicates that. And it seems that it worked once, before Tom reloaded his program Here is how Insight gets the type of a variable: /* To print the type, we simply create a zero value_ptr and cast it to our type. We then typeprint this variable. */ val = value_zero (var->type, not_lval); type_print (VALUE_TYPE (val), "", stb, -1); Inside value_zero() allocate_value() is called and in its turn calls check_typedef(). The latter tries to recurse with TYPE_TARGET_TYPE (type), but that is not valid. Why? Nothing to do with Insight. > > I avoid the watch window because it causes so many problems :-( > I don't think you are being fair. Anyway, it is not to blame in this case. > Stack trace appended. This is on my x86 Debian 2.0 box. > > Tom > > #0 check_typedef (type=0xea7) at ../../src/gdb/gdbtypes.c:1115 > #1 0x80ae051 in check_typedef (type=0x881e088) > at ../../src/gdb/gdbtypes.c:1191 > #2 0x8081e5d in allocate_value (type=0x881e088) at ../../src/gdb/values.c:84 > #3 0x80881f2 in value_zero (type=0x881e088, lv=not_lval) > at ../../src/gdb/valops.c:412 > #4 0x80cf7da in varobj_get_type (var=0x8dd1170) at ../../src/gdb/varobj.c:727 > #5 0x80d0569 in value_of_root (var_handle=0xbfff9014, type_changed=0xbfff9008) > at ../../src/gdb/varobj.c:1649 > #6 0x80cfa5c in varobj_update (var=0x8dd1170, changelist=0xbfff902c) > at ../../src/gdb/varobj.c:908 > #7 0x80c37c0 in variable_update (interp=0x8323848, var=0x8dd1170) > at ../../src/gdb/gdbtk/generic/gdbtk-varobj.c:463 > #8 0x80c34f7 in variable_obj_command (clientData=0x8dd1170, interp=0x8323848, > objc=2, objv=0x8324540) at ../../src/gdb/gdbtk/generic/gdbtk-varobj.c:273#9 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8df7f28) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #10 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8be4980) at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #11 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x8de5458, > member=0x8de5470, contextObj=0x8dba400, objc=1, objv=0x8324534) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 > #12 0x8189b8d in Itcl_ExecMethod (clientData=0x8de5458, interp=0x8323848, > objc=1, objv=0x8324534) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 > #13 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dec628) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #14 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x89dbca0) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #15 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x8dd59d8, > member=0x8dd59f0, contextObj=0x8dba400, objc=1, objv=0x8324530) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 > #16 0x8189b8d in Itcl_ExecMethod (clientData=0x8dd59d8, interp=0x8323848, > objc=1, objv=0x8324530) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 > #17 0x818f9f2 in Itcl_EvalArgs (interp=0x8323848, objc=1, objv=0x8324530) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_util.c:1337 > #18 0x818b42b in Itcl_HandleInstance (clientData=0x8dba400, interp=0x8323848, > objc=2, objv=0x832452c) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_objects.c:658 > #19 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8832368) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #20 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab498) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #21 0x8254d93 in Tcl_UplevelObjCmd (dummy=0x0, interp=0x8323848, objc=4, > objv=0x832451c) at ../../../src/tcl/unix/../generic/tclProc.c:612 > #22 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84a6c28) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #23 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417500) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #24 0x82552d1 in TclObjInterpProc (clientData=0x84550c8, interp=0x8323848, > objc=2, objv=0x8324514) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #25 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84fa2f0) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #26 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x841a4d8) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #27 0x82552d1 in TclObjInterpProc (clientData=0x8451b48, interp=0x8323848, > objc=1, objv=0x8324510) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #28 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x84cbb28) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #29 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417650) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #30 0x82552d1 in TclObjInterpProc (clientData=0x845e880, interp=0x8323848, > objc=1, objv=0x832450c) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #31 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x88a3218) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #32 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8be5fc8) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #33 0x821ce8a in Tcl_Eval (interp=0x8323848, string=0x8277bb2 "gdbtk_tcl_idle") > at ../../../src/tcl/unix/../generic/tclBasic.c:2453 > #34 0x80c2b38 in gdbtk_call_command (cmdblk=0x8318100, arg=0x0, from_tty=0) > at ../../src/gdb/gdbtk/generic/gdbtk-hooks.c:516 > #35 0x80db1d8 in execute_command (p=0x8a97b43 "", from_tty=0) > at ../../src/gdb/top.c:1544 > #36 0x80bdc4d in gdb_immediate_command (clientData=0x80bdba0, > interp=0x8323848, objc=2, objv=0x8324504) > at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:906 > #37 0x80bd7c8 in wrapped_call (opaque_args=0xbfffbf48) > at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:550 > #38 0x80da49b in catch_errors (func=0x80bd7b0 <wrapped_call>, args=0xbfffbf48, > errstring=0x82772c8 "", mask=6) at ../../src/gdb/top.c:615 > #39 0x80bd6f4 in call_wrapper (clientData=0x80bdba0, interp=0x8323848, objc=2, > objv=0x8324504) at ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:488 > #40 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a92058) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #41 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417818) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #42 0x82552d1 in TclObjInterpProc (clientData=0x845a678, interp=0x8323848, > objc=1, objv=0x8324500) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #43 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a8c578) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #44 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8417968) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #45 0x82552d1 in TclObjInterpProc (clientData=0x841fc50, interp=0x8323848, > objc=1, objv=0x83244fc) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #46 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a8c4f8) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #47 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x89e0340) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #48 0x8227afd in Tcl_SwitchObjCmd (dummy=0x0, interp=0x8323848, objc=3, > objv=0x83244f0) at ../../../src/tcl/unix/../generic/tclCmdMZ.c:1732 > #49 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a69c38) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #50 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x842b2e8) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #51 0x81892fa in Itcl_EvalMemberCode (interp=0x8323848, mfunc=0x84c2898, > member=0x84c28b0, contextObj=0x84de818, objc=2, objv=0x83244e8) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1029 > #52 0x8189b8d in Itcl_ExecMethod (clientData=0x84c2898, interp=0x8323848, > objc=2, objv=0x83244e8) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_methods.c:1546 > #53 0x818f9f2 in Itcl_EvalArgs (interp=0x8323848, objc=2, objv=0x83244e8) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_util.c:1337 > #54 0x818b42b in Itcl_HandleInstance (clientData=0x84de818, interp=0x8323848, > objc=3, objv=0x83244e4) > at /x2/egcs-stuff/gdb/src/itcl/itcl/generic/itcl_objects.c:658 > #55 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dcff58) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #56 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab768) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #57 0x824e173 in NamespaceInscopeCmd (dummy=0x0, interp=0x8323848, objc=4, > objv=0x83244d4) at ../../../src/tcl/unix/../generic/tclNamesp.c:3277 > #58 0x824d7b9 in Tcl_NamespaceObjCmd (clientData=0x0, interp=0x8323848, > objc=4, objv=0x83244d4) > at ../../../src/tcl/unix/../generic/tclNamesp.c:2498 > #59 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dfb350) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #60 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x8bab660) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #61 0x821ce8a in Tcl_Eval (interp=0x8323848, > string=0xbfffe4d0 "namespace inscope ::GDBSrcBar {::.srcwin0.srcwin inferior run}") at ../../../src/tcl/unix/../generic/tclBasic.c:2453 > #62 0x821e5bc in Tcl_GlobalEval (interp=0x8323848, > command=0xbfffe4d0 "namespace inscope ::GDBSrcBar {::.srcwin0.srcwin inferior run}") at ../../../src/tcl/unix/../generic/tclBasic.c:3983 > #63 0x820e214 in TkCopyAndGlobalEval (interp=0x8323848, > script=0x8dfc420 "\207") at ../../../src/tk/unix/../generic/tkBind.c:4547 > #64 0x81d469a in TkInvokeButton (butPtr=0x868df88) > at ../../../src/tk/unix/../generic/tkButton.c:1136 > #65 0x81d3ca4 in ButtonWidgetCmd (clientData=0x868df88, interp=0x8323848, > argc=2, argv=0xbfffe5f0) at ../../../src/tk/unix/../generic/tkButton.c:543 > #66 0x821c7b6 in TclInvokeStringCommand (clientData=0x869d380, > interp=0x8323848, objc=2, objv=0x83244cc) > at ../../../src/tcl/unix/../generic/tclBasic.c:1745 > #67 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8dbfe88) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #68 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x84cf510) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #69 0x8254d6d in Tcl_UplevelObjCmd (dummy=0x0, interp=0x8323848, objc=3, > objv=0x83244c0) at ../../../src/tcl/unix/../generic/tclProc.c:609 > #70 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8a97838) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #71 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x84cf420) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #72 0x82552d1 in TclObjInterpProc (clientData=0x869e290, interp=0x8323848, > objc=2, objv=0x83244b8) at ../../../src/tcl/unix/../generic/tclProc.c:996 > #73 0x8236cf2 in TclExecuteByteCode (interp=0x8323848, codePtr=0x8e06030) > at ../../../src/tcl/unix/../generic/tclExecute.c:955 > #74 0x821d0cc in Tcl_EvalObj (interp=0x8323848, objPtr=0x840fcc0) > at ../../../src/tcl/unix/../generic/tclBasic.c:2645 > #75 0x821ce8a in Tcl_Eval (interp=0x8323848, > string=0xbffff6b8 "TOOLBAR_button_up .srcwin0.srcwin.container.pane0.childsite.con.t.stop") at ../../../src/tcl/unix/../generic/tclBasic.c:2453 > #76 0x821e5bc in Tcl_GlobalEval (interp=0x8323848, > command=0xbffff6b8 "TOOLBAR_button_up .srcwin0.srcwin.container.pane0.childsite.con.t.stop") at ../../../src/tcl/unix/../generic/tclBasic.c:3983 > #77 0x820af5d in Tk_BindEvent (bindingTable=0x83427b0, eventPtr=0x8e00e48, > tkwin=0x869e5b0, numObjects=0, objectPtr=0xbffff7b8) > at ../../../src/tk/unix/../generic/tkBind.c:1731 > #78 0x820ed9c in TkBindEventProc (winPtr=0x869e5b0, eventPtr=0x8e00e48) > at ../../../src/tk/unix/../generic/tkCmds.c:242 > #79 0x81bd708 in Tk_HandleEvent (eventPtr=0x8e00e48) > at ../../../src/tk/unix/../generic/tkEvent.c:657 > #80 0x81bda79 in WindowEventProc (evPtr=0x8e00e40, flags=-3) > at ../../../src/tk/unix/../generic/tkEvent.c:983 > #81 0x824eb50 in Tcl_ServiceEvent (flags=-3) > at ../../../src/tcl/unix/../generic/tclNotify.c:444 > #82 0x824ed66 in Tcl_DoOneEvent (flags=0) > at ../../../src/tcl/unix/../generic/tclNotify.c:683 > #83 0x81bdae4 in Tk_MainLoop () > at ../../../src/tk/unix/../generic/tkEvent.c:1041 > #84 0x80c290c in tk_command_loop () > at ../../src/gdb/gdbtk/generic/gdbtk-hooks.c:383 > #85 0x807cdb2 in captured_command_loop (data=0x0) at ../../src/gdb/main.c:104 > #86 0x80da49b in catch_errors (func=0x807cd90 <captured_command_loop>, > args=0x0, errstring=0x8262a4e "", mask=6) at ../../src/gdb/top.c:615 > #87 0x807da03 in captured_main (data=0xbffffb58) at ../../src/gdb/main.c:749 > #88 0x80da49b in catch_errors (func=0x807cde0 <captured_main>, > args=0xbffffb58, errstring=0x8262a4e "", mask=6) at ../../src/gdb/top.c:615 > #89 0x807da37 in main (argc=2, argv=0xbffffb7c) at ../../src/gdb/main.c:761 -- Fernando Nasser Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com 2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311 Toronto, Ontario M4P 2C9 Fax: 416-482-6299 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 12:35 ` Fernando Nasser @ 2000-04-19 12:46 ` Keith Seitz 2000-04-19 13:18 ` Fernando Nasser 0 siblings, 1 reply; 10+ messages in thread From: Keith Seitz @ 2000-04-19 12:46 UTC (permalink / raw) To: Fernando Nasser; +Cc: tromey, Insight List, gdb-local Fernando Nasser wrote: > > Tom Tromey wrote: > > > > Insight once again got a segv while I had the watch window up. This > > time (as before, I think) it died when I re-ran my program (gcj). I > > had rebuilt the program and gdb had to reload it; I don't know whether > > this happened or not. > > > Despite the core happening when inside the update code for watched variables, the problem is > unrelated to it. There is no excuse for gdb's value_zero to dump core, but it seems that some > variable (whatever you are whatching) had a bad formed type. I would bet it is probably a bug in > the gdb symbol reading or some compiler debug info malformation. > > Unless someone knows of some limitation when calling value_zero(). There is nothing in the code > that indicates that. And it seems that it worked once, before Tom reloaded his program > > Here is how Insight gets the type of a variable: > > /* To print the type, we simply create a zero value_ptr and > cast it to our type. We then typeprint this variable. */ > val = value_zero (var->type, not_lval); > type_print (VALUE_TYPE (val), "", stb, -1); > > Inside value_zero() allocate_value() is called and in its turn calls check_typedef(). The latter > tries to recurse with TYPE_TARGET_TYPE (type), but that is not valid. Why? Nothing to do with > Insight. > I think that this kind of thing can also occur because re-running (and reloading symbols) invalidates all of the variable code. The trees that the variable object interface maintain contain LOTS of references to transient memory which is invalidated whenever an executable is re-run or symbols are reloaded. This is what makes it so fast compared to other solutions. The side effect is, though, that gdbtk must be REALLY careful about these buggers pointing to garbage because an objfile has been reread. I seem to recall adding something to gdbtk to catch this: whenever the no_inferior hook is run, it should deletes all variables. Srctextwin, watch, and locals windows should all do this... If not, you get seemingly random crashes like this. Keith -- Why chat when you can Firetalk? Firetalk ID: Keith (10320) www.firetalk.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 12:46 ` Keith Seitz @ 2000-04-19 13:18 ` Fernando Nasser 2000-04-19 13:20 ` Tom Tromey 0 siblings, 1 reply; 10+ messages in thread From: Fernando Nasser @ 2000-04-19 13:18 UTC (permalink / raw) To: Keith Seitz; +Cc: tromey, Insight List, gdb-local Keith Seitz wrote: > > I think that this kind of thing can also occur because re-running (and > reloading symbols) invalidates all of the variable code. The trees that > the variable object interface maintain contain LOTS of references to > transient memory which is invalidated whenever an executable is re-run > or symbols are reloaded. This is what makes it so fast compared to other > solutions. The side effect is, though, that gdbtk must be REALLY careful > about these buggers pointing to garbage because an objfile has been > reread. > > I seem to recall adding something to gdbtk to catch this: whenever the > no_inferior hook is run, it should deletes all variables. Srctextwin, > watch, and locals windows should all do this... If not, you get > seemingly random crashes like this. > This makes sense. But no_inferior (the callback you are refering to) is called and deletes all variable objects. So, the code in VariableWin and WatchedWin is doing the right thing. Unless the hook is not being run... Tom, can you invoke Insight with the debug window and see if "deleteTree" is printed in there when you reload your file? Thanks. -- Fernando Nasser Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com 2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311 Toronto, Ontario M4P 2C9 Fax: 416-482-6299 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:18 ` Fernando Nasser @ 2000-04-19 13:20 ` Tom Tromey 2000-04-19 13:24 ` Fernando Nasser 0 siblings, 1 reply; 10+ messages in thread From: Tom Tromey @ 2000-04-19 13:20 UTC (permalink / raw) To: Fernando Nasser; +Cc: Keith Seitz, tromey, Insight List Fernando> Tom, can you invoke Insight with the debug window and see if Fernando> "deleteTree" is printed in there when you reload your file? I don't see how this can work. Insight crashes when I do this. I won't be able to read the debug window. T ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:20 ` Tom Tromey @ 2000-04-19 13:24 ` Fernando Nasser 2000-04-19 13:44 ` Tom Tromey 0 siblings, 1 reply; 10+ messages in thread From: Fernando Nasser @ 2000-04-19 13:24 UTC (permalink / raw) To: Tom Tromey; +Cc: Keith Seitz, Insight List Tom Tromey wrote: > > Fernando> Tom, can you invoke Insight with the debug window and see if > Fernando> "deleteTree" is printed in there when you reload your file? > > I don't see how this can work. > Insight crashes when I do this. I won't be able to read the debug > window. > Hum, it can scroll out of the window and you you lose it. Why don't you leave the Watch window without any entries. We just want to know if the deleteTree is called. It is done (or not) regardless of you having any expression or not in the Watch window. -- Fernando Nasser Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com 2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311 Toronto, Ontario M4P 2C9 Fax: 416-482-6299 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:24 ` Fernando Nasser @ 2000-04-19 13:44 ` Tom Tromey 2000-04-19 13:57 ` Fernando Nasser 2000-04-19 14:10 ` Fernando Nasser 0 siblings, 2 replies; 10+ messages in thread From: Tom Tromey @ 2000-04-19 13:44 UTC (permalink / raw) To: Fernando Nasser; +Cc: Tom Tromey, Keith Seitz, Insight List Fernando> Hum, it can scroll out of the window and you you lose it. I discovered "debug::log_file stdout". The debug module sure has grown. Fernando> Why don't you leave the Watch window without any entries. Fernando> We just want to know if the deleteTree is called. It is Fernando> done (or not) regardless of you having any expression or not Fernando> in the Watch window. I did this. deleteTree is not called. Tom ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:44 ` Tom Tromey @ 2000-04-19 13:57 ` Fernando Nasser 2000-04-19 14:00 ` Tom Tromey 2000-04-19 14:10 ` Fernando Nasser 1 sibling, 1 reply; 10+ messages in thread From: Fernando Nasser @ 2000-04-19 13:57 UTC (permalink / raw) To: Tom Tromey; +Cc: Keith Seitz, Insight List Tom Tromey wrote: > > Fernando> Why don't you leave the Watch window without any entries. > Fernando> We just want to know if the deleteTree is called. It is > Fernando> done (or not) regardless of you having any expression or not > Fernando> in the Watch window. > > I did this. > deleteTree is not called. > Just to make sure, your sources are newer than 1999-09-23, isn't it? I noticed that the lines in the stack trace are different from the current sources, are you working on a branch? -- Fernando Nasser Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com 2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311 Toronto, Ontario M4P 2C9 Fax: 416-482-6299 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:57 ` Fernando Nasser @ 2000-04-19 14:00 ` Tom Tromey 0 siblings, 0 replies; 10+ messages in thread From: Tom Tromey @ 2000-04-19 14:00 UTC (permalink / raw) To: Fernando Nasser; +Cc: Tom Tromey, Keith Seitz, Insight List Fernando> Just to make sure, your sources are newer than 1999-09-23, Fernando> isn't it? I noticed that the lines in the stack trace are Fernando> different from the current sources, are you working on a Fernando> branch? I updated and rebuilt yesterday. I believe I'm using the trunk gdb. I have no explanation why the line numbers might be different. I can't do a clean rebuild right now. Debugging the debugger is only incidental to what I'm doing... Tom ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: core dump 2000-04-19 13:44 ` Tom Tromey 2000-04-19 13:57 ` Fernando Nasser @ 2000-04-19 14:10 ` Fernando Nasser 1 sibling, 0 replies; 10+ messages in thread From: Fernando Nasser @ 2000-04-19 14:10 UTC (permalink / raw) To: Tom Tromey; +Cc: Keith Seitz, Insight List Tom Tromey wrote: > > Fernando> Hum, it can scroll out of the window and you you lose it. > > I discovered "debug::log_file stdout". The debug module sure has > grown. > > Fernando> Why don't you leave the Watch window without any entries. > Fernando> We just want to know if the deleteTree is called. It is > Fernando> done (or not) regardless of you having any expression or not > Fernando> in the Watch window. > > I did this. > deleteTree is not called. > OK, congrats. You just found a bug. The hook Keith was referring too is just run if you use (explicitly) the "detach" command. Gdb must run it whenever the inferior is gone, maybe in generic_mourn() I will try to fix it tomorrow. Will you be willing to retest it with my patch if I mail it to you? -- Fernando Nasser Cygnus Solutions (a Red Hat company) E-Mail: fnasser@cygnus.com 2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311 Toronto, Ontario M4P 2C9 Fax: 416-482-6299 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2000-04-19 14:10 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-04-19 11:19 core dump Tom Tromey 2000-04-19 12:35 ` Fernando Nasser 2000-04-19 12:46 ` Keith Seitz 2000-04-19 13:18 ` Fernando Nasser 2000-04-19 13:20 ` Tom Tromey 2000-04-19 13:24 ` Fernando Nasser 2000-04-19 13:44 ` Tom Tromey 2000-04-19 13:57 ` Fernando Nasser 2000-04-19 14:00 ` Tom Tromey 2000-04-19 14:10 ` Fernando Nasser
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).