public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Timo Ketola <Timo.Ketola@Epec.fi>
Cc: gdb@sourceware.cygnus.com
Subject: Re: Remote Debugging
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <38B4A12F.C3BE09F1@cygnus.com> (raw)
Message-ID: <20000401000000.KgQUYxaqS658YawiQY57cdhnCMqhVNnXfsfqaM4J7MQ@z> (raw)
In-Reply-To: <38B4017A.2F64A9C3@Epec.fi>

Timo Ketola wrote:
> 
> Hi all,
> 
> I just subscribed to this list...
> 
> I'm adapting the gdb and the remote stub for our embedded system.
> Debugging works already over a RS232 line but I have a couple of
> questions for which I can't find an answer:
> 
> 1) I want to be able to debug also over a CAN network. I think I have to
> write a new interface for the gdb. Namely the getpkt and putpkt of the
> remote.c should be reimplemented. But what is a clean way? Could someone
> assist me a bit.

A alternative might be to modify gdbserver (or the like) and use GDB's
remote protocol (target extended-remote).  (I'm not sure what a CAN
network is).

> 2) When I 'load' a new executable into the target the loading works well
> but the symbols are not loaded. At the end of generic_load function
> comment asks whether symbol_file_add function should be called. Is that
> exactly the right thing to do?

Are you loading different files or the same file?

	(gdb) file  foo.out
	(gdb) target .....
	(gdb) load

both loads the file and updates the symbols.  There are also commands
for loading symbols from a specific file.

> 3) How do I get a clean information about the load of the new executable
> in the stub? Before a new executable is started (or an old one
> restarted) the stub needs to do a couple of things (for example clean up
> the stack).

I've seen this done two ways:

	o	the embedded equivalent of crt0.o
		initialises the stack (and zero's
		bss)

	o	*_create_inferior() performs
		the initialize operation.
		(see remote-sim.c)

enjoy,
	Andrew

  reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-01  0:00 Timo Ketola
2000-02-23 19:12 ` Andrew Cagney [this message]
2000-04-01  0:00   ` Andrew Cagney
2000-08-15 10:13 remote debugging Shaun Jackman
2000-08-15 12:23 ` Fernando Nasser
2000-11-28  0:59 Remote debugging Yu Xuanwei
2000-11-29 19:52 Remote Debugging Yu Xuanwei
2000-11-30 22:27 Yu Xuanwei
2000-12-01 11:40 ` Fernando Nasser
2001-01-23 22:23 remote debugging malar kavi
2001-01-24  6:16 ` Fernando Nasser
2001-01-24 10:52 ` J.T. Conklin
2001-01-25  5:27 malar kavi
2001-01-25 11:46 ` J.T. Conklin
2002-07-22  9:35 Vinayak P Risbud
2002-12-12  9:29 Remote Debugging Tim
2002-12-12 10:30 ` Daniel Jacobowitz
2003-03-20  7:45 remote debugging Patricia Alba
2003-06-13  7:50 Brijesh Shukla
2003-06-13 13:28 ` Quality Quorum
2003-06-13 14:24 nak26
2004-03-19 17:59 Remote debugging luca risso
2004-03-19 18:43 ` Daniel Jacobowitz
2004-03-22 14:23 luca risso
2015-03-07 13:52 Russell Shaw
2015-03-07 14:09 ` Ofir Cohen
2015-03-08  7:48   ` Russell Shaw

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=38B4A12F.C3BE09F1@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=Timo.Ketola@Epec.fi \
    --cc=gdb@sourceware.cygnus.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).