Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: XCV <xcviscool@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Re: problem with gdb stub compiling
Date: Tue, 26 Feb 2008 08:28:00 -0000	[thread overview]
Message-ID: <1203990548.19253.300.camel@localhost.localdomain> (raw)
In-Reply-To: <47c36449.16048e0a.4eb0.ffffe024@mx.google.com>

On Tue, 2008-02-26 at 08:58 +0800, XCV wrote:
> 
> >On Mon, 2008-02-25 at 20:14 +0800, XCV wrote:
> >> hello!i've got a problem while try to run a simple example with i386-stub:
> >
> >Wow, this stub code is really ancient, and (evidently) not well
> >maintained.  Overlooking one simple textual patch, the last changelog
> >reference is from 2001, nearly 7 years ago.
> >
> >What's your target?  Is it a bare board, without an operating system?
> >
> >If it's Linux or something, you could probably use gdbserver.
> >
>  Thank you very much for your help!I also noticed that it's a really ancient 
> code,but what i thaught is it's from GDB standard package so it's must be 
> a valuable sample.
> 
> In fact ,my target is a subset of MIPS implemented by ourselves ,and we need a stub on this target. The reason why 
> I try to run the i386-stub (on my x86 pc with linux ) is i want to get a exact correct example to write my
> own stub (i'm a beginner on this).
> 
> And our  requirement is to debug our OS ,so a stub instead of gdbserver is wanted.
> 
> So ,can you plz advise me? Thank you in advance

Cc:ing private response back to public list (hope you don't mind).

Well, it is good example code, it's just OLD example code.
Hardly anyone uses these linked-in stubs any more (self-evidently).

And they've never been treated as part of gdb -- they're only
incidentally mentioned in the Makefile, for instance.

Probably the most recently-maintained one is m32r-stub.c, 
which was rewritten (and therefore presumably working) in 2003 --
if that helps you at all.

The problem is, these files are mostly incomplete, as you have
noticed.  They don't implement certain functions such as, in this
case, handle_exception, exceptionHook, catchException0 (etc).

Those functions would have been implemented separately, in another
module called (for instance) i386_rom.c, and those modules were
implemented back at the old company (Cygnus) - but we could never
figure out where to put them.

There was a library called "libgloss", where I think we talked
about putting them, but I'm looking in there right now and I don't
see them.

It's possible this code was never released -- you might have to
implement the exception handlers yourself.

Just thinking out loud here, trying to dredge up memories from
off-line storage...    ;-/




           reply	other threads:[~2008-02-26  1:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <47c36449.16048e0a.4eb0.ffffe024@mx.google.com>]

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=1203990548.19253.300.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb@sourceware.org \
    --cc=xcviscool@gmail.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