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]

ARM/Linux OSABI problems (was 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). 
> 
> Then I strip the gdbserver and uploade it to the arm based bord and
> run(access03 is the program I'm trying to debug):
> 
> # ./gdbserver host:33000 ./access03
> Process ./access03 created; pid = 170

...

The interesting line in the debug output Simon sent me is:
getpkt ("M40002b34,4:fedeffe7");  [sending ack]

That's not an arm-linux breakpoint, it's an ARM breakpoint.  That's why
it isn't working.

Simon, you need to debug the host GDB (particularly
gdbarch_lookup_osabi) and try to establish why it is not selecting the
Linux ABI.

> 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)?

... wait!  I know what's wrong.  Does uClibc provide a .note.ABI-tag
section, like glibc does?  If not, that needs to be corrected, or GDB
needs to find some other way to recognize uClibc binaries.

(I should also test kernel debugging using an arm-linux GDB at some
point.  It used to work, which means that kgdb also expects the linux
ABI breakpoint, but the kernel certainly doesn't (and shouldn't) have
a .note.ABI-tag marking indicating it is a Linux userland binary.)

-- 
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]