From: Andrew Cagney <cagney@gnu.org>
To: Andrew Batchelor <A.C.Batchelor-99@student.lboro.ac.uk>
Cc: GDB Newsgroup <gdb@sources.redhat.com>
Subject: Re: Adding-new-target difficulties
Date: Wed, 26 Nov 2003 14:56:00 -0000 [thread overview]
Message-ID: <3FC4BF09.3000708@gnu.org> (raw)
In-Reply-To: <1069856145.1130.292.camel@And.Linux>
> Hello,
>
> [Note: I'm adding support for ARMs RealView ICE to GDB]
>
> I'm trying to add a new target to GDB, but I'm not sure whether
> following the procedure in the user guide is going to give me what I
> want. Is there a more straightforward way?
>
> I need a new target which allows me to communicate via tcp/ip but allows
> me to change the Remote Serial Protocol to RV-MSG (RealView Protocol).
> The different protocol affects everything device; connect/disconnection,
> code loading, breakpoints, etc.
(GDB's remote serial protocol?)
It sounds like you're trying to on-the-fly replace one target stack
(gdb's remote) with a second (your protocol)?
Could you hack your new target (that used serial for tcp communication)
fudge enough GDB remote protocol commands to trigger the mode switch?
> Where exactly does GDB spit stuff out for a TCP/IP connection? I've
> been looking at remote.c and serial.c which seems to have functions
> related to it and another that looks promising is ser-tcp.c. Could I
> simply add a switch to the command 'target remote host?' Or add a case
> clause that detects if the hostname is 'RV-ICE' or something? I could
> perhaps then branch off to my code, calling GDB functions as and when?
Normally new remote targets are added as new commands vis:
target remote
target m32r
target pmon
target ...
this occures because the target*.c file has registered itself (see the
_initialize function). When the user enters "target ..." the
corresponding ..._target_open being called. After that it is a case of
working through each of the vectors implementing those that are needed.
For the transport, yes serial.[hc] is used.
You may also want to look at the async code - it lets you implement
things in a more event driven style.
Andrew
prev parent reply other threads:[~2003-11-26 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-26 14:15 Andrew Batchelor
2003-11-26 14:56 ` Andrew Cagney [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=3FC4BF09.3000708@gnu.org \
--to=cagney@gnu.org \
--cc=A.C.Batchelor-99@student.lboro.ac.uk \
--cc=gdb@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