title: gdb remote cross debugging fails with "Remote 'g' packet reply is too long"
body: <p>I have a problem with remote debugging. </p>
  
  <p>Host: laptop intel i5 with ubuntu 10.10 x86 
  Target: Freescale iMX35 (iMX35 PDK) arm 11
  Development environment: Qt Creator 2.1RC and Qt4.7.1 libraries.
  Arm compiler in path: /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin</p>
  
  <p>arm-none-linux-gnueabi-gcc-4.1.2  arm-none-linux-gnueabi-objdump
  arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-gccbug<br>
  arm-none-linux-gnueabi-ranlib     arm-none-linux-gnueabi-ar<br>
  arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-readelf
  arm-none-linux-gnueabi-as<br>
  arm-none-linux-gnueabi-run        arm-none-linux-gnueabi-c++<br>
  arm-none-linux-gnueabi-size       arm-none-linux-gnueabi-c++filt<br>
  arm-none-linux-gnueabi-gprof      arm-none-linux-gnueabi-strings
  arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-ld<br>
  arm-none-linux-gnueabi-strip      arm-none-linux-gnueabi-g++<br>
  arm-none-linux-gnueabi-nm         arm-none-linux-gnueabi-gcc<br>
  arm-none-linux-gnueabi-objcopy  </p>
  
  <p>The goal is to debug a project created with Qt. 
  So I simply created a Qt Quick Project -> Qt Quick Application
  which creates a simple Hello World application (C++/Qml)
  I cross compile it (in debug or release) and it works fine 
  on the target. So I'm quite sure that cross compilation 
  is not related to the problem I'll show you.  </p>
  
  <p>I downloaded gdb 7.2 and performed the following operation:</p>
  
  <blockquote>
    <p>$ export PATH=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin:$PATH<br>
    $ cd /home/elux/iMX35/gdb-7.2/<br>
    $ ./configure --target=arm-none-linux-gnueabi --build=i686<br>
    $ make<br>
    $ sudo make install  </p>
    
    <p>$ export CC=arm-none-linux-gnueabi-gcc<br>
    $ export LD=arm-none-linux-gnueabi-ld<br>
    $ cd gdb/gdbserver/<br>
    $ ./configure --build=i386 --host=arm-none-linux-gnueabi --target=arm-none-linux-
    gnueabi<br>
    $ make  </p>
    
    <p>$ sudo cp gdbserver /home/elux/MX35/ltib/rootfs/usr/bin/ (to copy gdbserver to target)</p>
  </blockquote>
  
  <p>Then on the target:</p>
  
  <blockquote>
    <p>$ gdbserver 10.10.10.1:4000 Test<br>
    Process Test created; pid = 2194<br>
    Listening on port 4000</p>
  </blockquote>
  
  <p>On the target:</p>
  
  <blockquote>
    <p>$ arm-none-linux-gnueabi-gdb Test   (Test is cross-compiled it Qt Creator in debug mode)
    GNU gdb (GDB) 7.2<br>
    Copyright (C) 2010 Free Software Foundation, Inc.<br>
    License GPLv3+: GNU GPL version 3 or later <a href="http://gnu.org/licenses/gpl.html" rel="noreferrer">http://gnu.org/licenses/gpl.html</a><br>
    This is free software: you are free to change and redistribute it.<br>
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>
    and "show warranty" for details.<br>
    This GDB was configured as "--host=i686 --target=arm-none-linux-gnueabi".<br>
    For bug reporting instructions, please see:<br>
    <a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer">http://www.gnu.org/software/gdb/bugs/</a>...<br>
    Reading symbols from /home/elux/iMX35/ltib/rpm/BUILD/qt-everywhere-opensource-src-4.7.1  /platform/Test-build-arm/Test...done.<br>
    (gdb) target remote 10.10.10.2:4000<br>
    Remote debugging using 10.10.10.2:4000<br>
    <strong>warning: Can not parse XML target description; XML support was disabled at compile time</strong><br>
    <strong>warning: Unable to find dynamic linker breakpoint function.</strong><br>
    <strong>GDB will be unable to debug shared library initializers</strong><br>
    <strong>and track explicitly loaded dynamic code.</strong><br>
    0x400007e0 in ?? ()<br>
    (gdb)  </p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>(gdb) set solib-absolute-prefix /home/elux/iMX35/ltib/rootfs/<br>
    Reading symbols from /home/elux/iMX35/ltib/rootfs/lib/ld-linux.so.3...done.<br>
    Loaded symbols for /home/elux/iMX35/ltib/rootfs/lib/ld-linux.so.3  </p>
  </blockquote>
  
  <p>but</p>
  
  <blockquote>
    <p>(gdb) set architecture armv5te<br>
    The target architecture is assumed to be armv5te<br>
    Remote 'g' packet reply is too long:   00000000a7ee8ebe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0ed8ebe00000000e007004010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</p>
    
    <p>(gdb) b main<br>
    Remote 'g' packet reply is too long:   00000000a7ee8ebe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0ed8ebe00000000e007004010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</p>
  </blockquote>
  
  <p>Have you got any idea what this problem is related to? How can I resolve it?</p>