This is the mail archive of the gdb@sources.redhat.com 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: breakpoints not working in gdbserver


On Wed, Aug 14, 2002 at 12:30:42AM +0200, Simon Posnjak wrote:
> Hi all,
> 
> I'm trying out a cross-debuger for arm/ia32 development. I have build
> gdb for arm that runs on ia32 (./configure --host=i686-pc-linux-gnu
> --target=armv4l-unknown-linux --prefix=/usr/local/arm/
> --exec-prefix=/usr/local/arm/ --program-prefix=arm-) 
> and gdbserver for arm (sh configure --target=armv4l-unknown-linux). 

That's not right.  You have to configure gdbserver using
--host=armv4l-unknown-linux, not --target.

> Program received signal SIGILL, Illegal instruction.
> 0x40002b38 in _dl_debug_state ()
>    from /staff2/4pot/buildroot/build/stage/lib/ld-uClibc.so.0
> (gdb) bt
> #0  0x40002b38 in _dl_debug_state ()
>    from /staff2/4pot/buildroot/build/stage/lib/ld-uClibc.so.0
> #1  0x40001c74 in _dl_parse_copy_information ()
>    from /staff2/4pot/buildroot/build/stage/lib/ld-uClibc.so.0
> (gdb)
> 
> The program dies with Illegal instruction - if I run it without
> gdbserver it is working fine.
> 
> I'm using a home-made linux system:
> kernel 2.4.18
> uClibc 0.9.14
> gcc-2.95.3
> 
> Is this maybe a problem with uclibc... or is this problem of
> gdb(server)?

Now, I just checked, and the FSF tree does indeed have the correct
breakpoint instruction on ARM.  And GDB is placing that breakpoint
anyway, not gdbserver.  I assume you're actually running a Linux kernel
- Linux has a different breakpoint convention from ARM hardware.

Need a little more information.  Please set remote_debug to 1 and
rebuild gdbserver, and send the output...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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