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

See the CrossGCC FAQ for lots more information.


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

Problem with debugging on ARM


Hi there,

I built gdb 6.3 under ARM XScale chip (to be executed on the board itself),
and tried to debug my simple program:

  1  #include <stdio.h>
  2  
  3  int main()
  4  {
  5      printf("a\n");
  6      printf("b\n");
  7  
  8      return 0;
  9  }

  # arm-linux-gcc -g test.c -o test

(logging on the ARM XScale platform)

  # gdb -q ./test
  Using host libthread_db library "/lib/libthread_db.so.1".
  (gdb) br 5
  Breakpoint 1 at 0x8498: file test.c, line 5.
  (gdb) run
  Starting program: /mnt/shared/test 
  
  Breakpoint 1, main () at test.c:5
  5           printf("a\n");
  (gdb) next
  0x00008384 in ?? ()
  (gdb) next
  Cannot find bounds of current function
  (gdb)

And, the further steps are also impossible :-/

I also tried to solve that also with gdb hosted on x86 with target ARM,
plus gdbserver on ARM, but got the same result.


Gdb was built as suggested in mailing list,

  # export bash_cv_have_mbstate_t=yes
  # ../gdb-6.3/configure --host=arm-linux --build=i686-pc-linux-gnu --target=arm-linux --prefix=/usr/local/arm-linux/arm-linux

The additional information that might be useful:

  # uname -a
  Linux 192.168.0.199 2.6.10 #3 Tue Mar 21 09:34:44 EST 2006 armv5tel unknown

  # arm-linux-gcc -v
  Reading specs from /olosdk/OLO-Alpha3L.04/host/olo_gpl/gcc-3.4.4-glibc-2.3.5/arm-linux/bin/../lib/gcc/arm-linux/3.4.4/specs
  Configured with: /home/cegbuild/assp/IP17/gcc/crosstool-0.38/build/arm-linux/gcc-3.4.4-glibc-2.3.5/gcc-3.4.4/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/home/cegbuild/assp/IP17/gcc/crosstool-olo/gcc-3.4.4-glibc-2.3.5/arm-linux --with-float=soft --with-cpu=xscale --enable-cxx-flags=-mcpu=xscale --with-headers=/home/cegbuild/assp/IP17/gcc/crosstool-olo/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/include --with-local-prefix=/home/cegbuild/assp/IP17/gcc/crosstool-olo/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
  Thread model: posix
  gcc version 3.4.4


Where am I wrong?
Much thanks!


-- 
Best regards,
Timur Elzhov
Warelex LLC

--
For unsubscribe information see http://sourceware.org/lists.html#faq


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