public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: hg@technosis.de
Cc: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: Re: Insight 6.0 and Dlls
Date: Thu, 05 Feb 2004 18:19:00 -0000	[thread overview]
Message-ID: <1076005443.1587.67.camel@lindt.uglyboxes.com> (raw)
In-Reply-To: <200402051641.42648.hg@technosis.de>

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, &current_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




  reply	other threads:[~2004-02-05 18:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-06 14:06 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 [this message]
2004-02-07 16:51         ` Heiko Gerdau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1076005443.1587.67.camel@lindt.uglyboxes.com \
    --to=keiths@redhat.com \
    --cc=hg@technosis.de \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).