From: Keith Seitz <keiths@redhat.com>
To: vincent chen <bartfj00@gmail.com>
Cc: insight@sourceware.org
Subject: Re: how to port insight to a new target
Date: Thu, 06 May 2010 15:30:00 -0000 [thread overview]
Message-ID: <4BE2E07E.3000409@redhat.com> (raw)
In-Reply-To: <j2yd09cdbb61005060333ufbcce64cse2c9ea267567ff62@mail.gmail.com>
On 05/06/2010 03:33 AM, vincent chen wrote:
> I have ported GDB by adding a new target in sim,and the gdb appears to
> run properly on simulator.
You've already got most of the work done, then.
> I've no idea about which start by,it's better to show me the approach
> on porting insight,
Unfortunately, there is no documentation on how to do this, so you're
just gong to have to tackle the problems one-by-one. Honestly, this
sholudn't take very long at all.
The most important thing to do is add your target to the target database
in TargetSelection::init_target_db
(src/gdb/gdbtk/library/targetselection.itb). If your -tdep file is
written correctly, that should be all that is necessary.
However, there are usually some minor problems. One of the most common
is that insight doesn't notice that the target is "running" (the toolbar
buttons Run/Stop, Step, Next, etc are all disabled/grayed out). This
happens because the test "gdb_target_has_execution" fails (in Tcl). This
command is implemented in src/gdb/gdbtk/generic/gdbtk-cmds.c in the
function "gdb_target_has_execution_command". remote.c should contain
bits of this that will demonstrate how to pass this test.
The only other thing that usually crops up is that while the target is
running, the GUI locks up. This is because the (deprecated_)ui_loop_hook
isn't being called to allow the Tcl event loop to run. [A sad
consequence of the design of gdb at the time.] Make sure this function
gets called at reasonable intervals in your simulator. Other simulators
in the repository should already do this.
Of course, if there are any other problems, just send them to the list,
and I'll try to help you through them.
Good luck,
Keith
prev parent reply other threads:[~2010-05-06 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 10:33 vincent chen
2010-05-06 15:30 ` Keith Seitz [this message]
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=4BE2E07E.3000409@redhat.com \
--to=keiths@redhat.com \
--cc=bartfj00@gmail.com \
--cc=insight@sourceware.org \
/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).