linux-mips
[Top] [All Lists]

Re: Debugging using GDB and gdbserver

To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
Subject: Re: Debugging using GDB and gdbserver
From: Justin Wojdacki <justin.wojdacki@analog.com>
Date: Sat, 15 Jun 2002 13:29:56 -0700
Cc: linux-mips@oss.sgi.com
Organization: Analog Devices, Communications Processors Group
References: <3D0B9D14.BFE27F7E@analog.com> <20020615151413.A19123@crack.them.org>
Reply-to: justin.wojdacki@analog.com
Sender: owner-linux-mips@oss.sgi.com
Daniel Jacobowitz wrote:
> 
> On Sat, Jun 15, 2002 at 01:01:24PM -0700, Justin Wojdacki wrote:
> >
> > How does GDB work under MIPS Linux? I'm trying to do a bring-up of an
> > embedded device, and it looks like the kernel is missing the code
> > needed to handle software breakpoints. Are there patches that need to
> > be applied to the kernel?
> 
> No.  If you use a current GDB (I recommend 5.2 or CVS) it should work
> just fine, if you are using a recent kernel (you didn't mention what
> version you were looking at).
> 
> --
> Daniel Jacobowitz                           Debian GNU/Linux Developer
> MontaVista Software                         Carnegie Mellon University

Sorry, I'm using the 2.4.10 kernel and GDB 5.2. What I see happening
is the BREAK 5 instruction from a software breakpoint is hit, and the
kernel loops continuously on that, as it appears to have no way to
deal with that exception. I'm running gdbserver on the MIPS target and
gdb as a cross-debugger on an x86 host (RedHat 7.1). To me, it looks
like when the debugging breakpoint is hit, gdbserver should get
scheduled to run and handle the breakpoint, but instead the child
keep's getting scheduled. 

-- 
-------------------------------------------------
Justin Wojdacki        
justin.wojdacki@analog.com         (408) 350-5032
Communications Processors Group -- Analog Devices

<Prev in Thread] Current Thread [Next in Thread>