public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: "Liang, James" <jliang@sandia.gov>
Cc: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: RE: Developing for Insight
Date: Tue, 22 Apr 2003 21:45:00 -0000	[thread overview]
Message-ID: <1051048030.1534.33.camel@lindt.uglyboxes.com> (raw)
In-Reply-To: <71251C7D5FB1D2119C8F0008C7A44ED103792015@es07snlnt.sandia.gov>

On Tue, 2003-04-22 at 14:34, Liang, James wrote:
> I know it hits gdbtk_tcl_idle because I saw function calls with
> gdbtk_tcl_idle being sent to the Tcl/TK interpreter C code.
> 
> the "tk gdb_target_has_execution" returns 0

That could be a problem. Insight doesn't think that you have an
inferior. I presume that doing "tk set ::gdb_running" returns 0 as well.

> How do I access that flag in C code?

You need to have a ptid set and target_has_execution must be set. Goofy,
but that's what gdb does. Here's the function from
gdbtk/generic/gdbtk-cmds.c:

static int
gdb_target_has_execution_command (ClientData clientData, Tcl_Interp
*interp,
                                  int objc, Tcl_Obj *CONST objv[])
{
  int result = 0;

  if (target_has_execution && ! ptid_equal (inferior_ptid, null_ptid))
    result = 1;

  Tcl_SetBooleanObj (result_ptr->obj_ptr, result);
  return TCL_OK;
}

Normally, target's will set inferior_ptid in their "create_inferior"
target method. When there is no such thing as a pid/tid, we make one up.
remote-sim.c, for example, does this:

	inferior_ptid = pid_to_ptid (42);

Keith


       reply	other threads:[~2003-04-22 21:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792015@es07snlnt.sandia.gov>
2003-04-22 21:45 ` Keith Seitz [this message]
2003-04-22 21:47   ` Keith Seitz
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792016@es07snlnt.sandia.gov>
2003-04-22 23:15 ` Keith Seitz
     [not found] <71251C7D5FB1D2119C8F0008C7A44ED103792014@es07snlnt.sandia.gov>
2003-04-22 21:18 ` Keith Seitz
2003-04-22 20:52 Liang, James
  -- strict thread matches above, loose matches on Subject: below --
2003-04-22 20:39 Liang, James
2003-04-22 20:58 ` Keith Seitz
2003-04-22 18:37 Liang, James
2003-04-22 18:45 ` Keith Seitz
2003-04-22 18:18 Liang, James
2003-04-22 18:43 ` Keith Seitz
2003-04-22 16:53 Liang, James
2003-04-22 17:52 ` Keith Seitz
2003-04-21 22:23 Liang, James
2003-04-21 22:59 ` Martin M. Hunt
2003-04-10 19:47 Liang, James
2003-04-10 20:05 ` Martin M. Hunt

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=1051048030.1534.33.camel@lindt.uglyboxes.com \
    --to=keiths@redhat.com \
    --cc=insight@sources.redhat.com \
    --cc=jliang@sandia.gov \
    /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).