Subject: Re: Using gdb with NetBSD
To: Ferrari, Stephen <smf@pirus.com>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 08/29/2000 11:39:12
<smf@pirus.com> (Ferrari, Stephen) writes:

> Some stuff seems to work pretty nicely:  I've had luck setting breakpoints
> and having them hit, and usually "info stack" looks quite reasonable.

Good.

> 
> However, "info threads" gives "warning: RMT ERROR : failed to get remote
> thread list" whenever I try it,

The fact that this fails isn't surprising. I doubt that gdb's notion
of threads in a process has much in common with the various processes
that the kernel is running.


> and if I do "next" I invariably get "Program
> received signal SIGSEGV, Segmentation fault. 0xc0100cdd in calltrap
> ()".

That's wrong, though. 

> Is what I'm trying to do something that seems like it should clearly work,
> am I doing something obviously wrong, or is this mixed combo of host and
> target a bit shaky?  I don't know how stable the interfaces are between gcc,
> NetBSD, and gdb.  Do I need to carefully choose a compatible combination, or
> should I be fine with NetBSD 1.4.2 built with gcc egcs-1.1.1 and gdb built
> with gcc egcs-2.91.57?

I've been using gdb-4.17 between two i386 1.5E boxes for kernel
debugging, and it's fine. I'd try a version of gdb from that
generation first, before switching compilers.

        - Nathan