This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: problem with gdb stub compiling


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...    ;-/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]