* Insight 6.0 and Dlls @ 2004-01-06 14:06 Heiko Gerdau 2004-01-21 14:51 ` Keith Seitz 0 siblings, 1 reply; 6+ messages in thread From: Heiko Gerdau @ 2004-01-06 14:06 UTC (permalink / raw) To: insight Hi, I'm using insight 6.0 and try to debug a programm that loads dlls (I'm on SuSE Linux 8.2). The problem: After running the programm and breaking in main insight should have access to the dll symbols and sources but does not show them in the dropdown list of available source files. If I load the source manually using the file menu insight does not recognize it as part of the application (no dashes at the beginnings of lines). It works though if I use the console and set a breakpoint like "foo.cpp:234". After hitting the source line insight displays the source. Is this a bug or what should I do to set a dll breakpoint using the gui and not the console? Greetings Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insight 6.0 and Dlls 2004-01-06 14:06 Insight 6.0 and Dlls Heiko Gerdau @ 2004-01-21 14:51 ` Keith Seitz 2004-01-24 0:27 ` Heiko Gerdau 0 siblings, 1 reply; 6+ messages in thread From: Keith Seitz @ 2004-01-21 14:51 UTC (permalink / raw) To: hg; +Cc: insight On Tue, 2004-01-06 at 06:05, Heiko Gerdau wrote: > The problem: After running the programm and breaking in main insight should > have access to the dll symbols and sources but does not show them in the > dropdown list of available source files. I think that the real problem is that Insight doesn't get any library-loaded events. Nonetheless, I thought that I'd worked around this problem by restuffing the source window's combo boxes whenever we read symbols. I can see in src/gdb/gdbtk/library/interface.tcl that the procedure gdbtk_tcl_post_add_symbol does, indeed, attempt to refill the combo boxes. Is this not being called when the shared library is loaded (You can put a "puts" in there or a debug statement that will show up in the debug window)? Keith ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insight 6.0 and Dlls 2004-01-21 14:51 ` Keith Seitz @ 2004-01-24 0:27 ` Heiko Gerdau 2004-02-05 15:43 ` Heiko Gerdau 0 siblings, 1 reply; 6+ messages in thread From: Heiko Gerdau @ 2004-01-24 0:27 UTC (permalink / raw) To: insight On Wednesday 21 January 2004 15:56, Keith Seitz wrote: > On Tue, 2004-01-06 at 06:05, Heiko Gerdau wrote: > > The problem: After running the programm and breaking in main insight > > should have access to the dll symbols and sources but does not show > > them in the dropdown list of available source files. > > I think that the real problem is that Insight doesn't get any > library-loaded events. Nonetheless, I thought that I'd worked around > this problem by restuffing the source window's combo boxes whenever we > read symbols. > > I can see in src/gdb/gdbtk/library/interface.tcl that the procedure > gdbtk_tcl_post_add_symbol does, indeed, attempt to refill the combo > boxes. Is this not being called when the shared library is loaded (You > can put a "puts" in there or a debug statement that will show up in the > debug window)? gdbtk_tcl_post_add_symbol seems to be never called. At least I can't see any output from my puts and debug statements at any time. Just to make sure: I have also put some similar debug statements into the function fillNameCB and I see those messages only from the combobox filling at startup. Greetings Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insight 6.0 and Dlls 2004-01-24 0:27 ` Heiko Gerdau @ 2004-02-05 15:43 ` Heiko Gerdau 2004-02-05 18:19 ` Keith Seitz 0 siblings, 1 reply; 6+ messages in thread From: Heiko Gerdau @ 2004-02-05 15:43 UTC (permalink / raw) To: insight Hi, is there anybody who can reproduce this. Or does it happen just with my configuration? Thanks Heiko On Saturday 24 January 2004 01:26, Heiko Gerdau wrote: > On Wednesday 21 January 2004 15:56, Keith Seitz wrote: > > On Tue, 2004-01-06 at 06:05, Heiko Gerdau wrote: > > > The problem: After running the programm and breaking in main insight > > > should have access to the dll symbols and sources but does not show > > > them in the dropdown list of available source files. > > > > I think that the real problem is that Insight doesn't get any > > library-loaded events. Nonetheless, I thought that I'd worked around > > this problem by restuffing the source window's combo boxes whenever we > > read symbols. > > > > I can see in src/gdb/gdbtk/library/interface.tcl that the procedure > > gdbtk_tcl_post_add_symbol does, indeed, attempt to refill the combo > > boxes. Is this not being called when the shared library is loaded (You > > can put a "puts" in there or a debug statement that will show up in > > the debug window)? > > gdbtk_tcl_post_add_symbol seems to be never called. At least I can't see > any output from my puts and debug statements at any time. > > Just to make sure: I have also put some similar debug statements into > the function fillNameCB and I see those messages only from the combobox > filling at startup. > > Greetings > Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insight 6.0 and Dlls 2004-02-05 15:43 ` Heiko Gerdau @ 2004-02-05 18:19 ` Keith Seitz 2004-02-07 16:51 ` Heiko Gerdau 0 siblings, 1 reply; 6+ messages in thread From: Keith Seitz @ 2004-02-05 18:19 UTC (permalink / raw) To: hg; +Cc: insight On Thu, 2004-02-05 at 07:41, Heiko Gerdau wrote: > Hi, > > is there anybody who can reproduce this. Or does it happen just with my > configuration? > Ok, I don't know why, but I've spent a few minutes browsing the sources to see what might be going on. The problem lies within gdb -- not insight. Of course, like many things, the problem is really only visible inside a GUI. :-( Most of the action is in src/gdb/win32-nat.c. This file contains all the native code for cygwin and it contains the main target event loop for windows hosts. The function child_wait is this event loop. It loops indefinitely calling get_child_debug_event. If you look at this function, you'll see that one of the events that it knows about is LOAD_DLL_DEBUG_EVENT. This informs the "tdep" code (the "t"arget "dep"endent code -- not core gdb) that a DLL has been loaded. This returns that status TARGET_WAITKIND_LOADED to core gdb. In turn, if you look where this event is handled in infrun.c's handle_inferior_event, you'll see that it calls SOLIB_ADD to notify the rest of gdb that a shared library/DLL was loaded. For cygwin, src/gdb/config/i386/tm-cygwin.h defines SOLIB_ADD as "child_solib_add". Eventually, this calls symbol_file_add in src/gdb/symfile.c. Look closely at the call to SOLIB_ADD: SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); The second parameter here, "0" is the "from_tty" argument. Sadly, this is problematic. If you look at symbol_file_add now, we see that the pre/post_add_symbol_hooks are ONLY called if from_tty != 0 or "info verbose" has been set. Now, I cannot tell you that setting "info verbose" in gdb proper will not interfere with insight, but I do think that there is a fundamental problem with the hooks not being called in this case. Should from_tty be non-zero? I don't know. Should the hooks be called no matter what? I don't remember. I have vague recollections that there was a reason for the from_tty thing. :-( I've run through the CVS history, and I see that SOLIB_ADD has always had from_tty set to 0. Yet I remember clearly that this used to work. From the looks of it, it would appear that this shouldn't work on unix, either. Well, that's all I have right now. You migt as well try setting info verbose and seeing if that helps works around it for now. Keith ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Insight 6.0 and Dlls 2004-02-05 18:19 ` Keith Seitz @ 2004-02-07 16:51 ` Heiko Gerdau 0 siblings, 0 replies; 6+ messages in thread From: Heiko Gerdau @ 2004-02-07 16:51 UTC (permalink / raw) To: insight On Thursday 05 February 2004 19:24, Keith Seitz wrote: > On Thu, 2004-02-05 at 07:41, Heiko Gerdau wrote: > If you look at symbol_file_add now, we see that the > pre/post_add_symbol_hooks are ONLY called if from_tty != 0 or "info > verbose" has been set. > > Now, I cannot tell you that setting "info verbose" in gdb proper will > not interfere with insight, but I do think that there is a fundamental > problem with the hooks not being called in this case. > > Should from_tty be non-zero? I don't know. > Should the hooks be called no matter what? I don't remember. I have > vague recollections that there was a reason for the from_tty thing. :-( > > I've run through the CVS history, and I see that SOLIB_ADD has always > had from_tty set to 0. Yet I remember clearly that this used to work. > From the looks of it, it would appear that this shouldn't work on unix, > either. > > Well, that's all I have right now. You migt as well try setting info > verbose and seeing if that helps works around it for now. Thanks for pointing this out. If I do the two changes below in function "symbol_file_add_with_addrs_or_offsets" in symfile.c the insight combobox is blinking heavily on startup but gets all the source files from all the libraries with debugginjg information. I commented out: lines 887 and 963 in symfile.c each containing /* if (from_tty || info_verbose) */ Thanks Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-07 16:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-01-06 14:06 Insight 6.0 and Dlls Heiko Gerdau 2004-01-21 14:51 ` Keith Seitz 2004-01-24 0:27 ` Heiko Gerdau 2004-02-05 15:43 ` Heiko Gerdau 2004-02-05 18:19 ` Keith Seitz 2004-02-07 16:51 ` Heiko Gerdau
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).