public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "Tommy Lin" <tommylin74@gmail.com>
To: "Keith Seitz" <keiths@redhat.com>
Cc: insight@sourceware.org
Subject: Re: Problems with SrcWin
Date: Thu, 28 Aug 2008 12:57:00 -0000	[thread overview]
Message-ID: <724307610808260243t5dcdd49ax4d01f0352244c124@mail.gmail.com> (raw)
Message-ID: <20080828125700.WKXF41b0VGK6yJMWMEwYhKULYBklBtaHMEvMtReBrbw@z> (raw)
In-Reply-To: <48B2EA09.2080608@redhat.com>

>>  (1) after Insight is connected to target, the Control menu and
>> button items are still disabled. They'll be enabled after some actions
>> are done (ex. execute 'stepi' from ConsoleWindow.)
>
> This is usually caused by inferior code not setting a fake ptid for the UI.
> This is a very common problem with non-native targets. You can check this by
> inspecting the function gdb_target_has_execution. Check out what  the remote
> target does in extended_remote_create_inferior_1 (it sets inferior_ptid to
> some made up non-NULL entity). The value does not matter -- that it is
> non-NULL is all that is required.

  I found my target's xxxx_create_inferior() isn't called before
gdb_target_has_execution(). Maybe it's not a good port. So, I fix this
issue by removing the inferior_ptid part from
gdb_target_has_execution() directly.
  It seems can be fixed in srcbar.itcl:do_connect by setting Control
$Menu and $Tool into 'normal'.

>>  (2) after Insight is connected to target, the SrcWin displays
>> nothing... (there is no 'file', 'load', and 'symbol-file' command
>> executed.) I think, if there is no corresponding symbolic info, it
>> should fetch memory contents near $PC and display disassembled
>> instructions.
>
> Open a console window and type "list". If gdb does not return something,
> than Insight cannot, either. Insight will disassemble around $PC *if* gdb
> can find a function containing the PC (so that it knows the bounds of the
> function to disassemble). This is a gdb limitation that Insight has not
> worked around yet (and probably never will).

  Yes, I tried it out. Thanks!

  reply	other threads:[~2008-08-26 11:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25  7:24 Tommy
2008-08-25 17:23 ` Keith Seitz
2008-08-26  9:45   ` Tommy Lin [this message]
2008-08-26 12:08     ` Tommy Lin
2008-08-28  1:39     ` Tommy Lin
2008-08-28 12:57     ` Tommy Lin
2008-09-02  9:45     ` Tommy Lin

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=724307610808260243t5dcdd49ax4d01f0352244c124@mail.gmail.com \
    --to=tommylin74@gmail.com \
    --cc=insight@sourceware.org \
    --cc=keiths@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).