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]

Cross-gdb not built with XML support causing issues


Hello,

Again, I've used ct-ng last week, and I had some issues with cross-gdb
and gdbserver (version 7.1). When cross-gdb connects to the gdbserver,
it says "Remote g packet too long", with a dump of the packet. After a
bit of research, it seems to be caused by the fact that the cross-gdb
was build without XML support and therefore does not know some details
about the target architecture.

My understanding is that ct-ng relies on the host providing the expat
library to build the cross-gdb with XML support. On this machine, the
host system was a Ubuntu 10.04 32 bits, with libexpat1-dev installed.

The build.log.bz2 says :

[ALL  ]    checking for libexpat... no
[ALL  ]    configure: WARNING: expat is missing or unusable; some features may be unavailable.

And the cross-gdb config.log says :

configure:9374: gcc -static -o conftest -g -O2     conftest.c -ltermcap -lm    -lexpat >&5
conftest.c:53:19: error: expat.h: No such file or directory
conftest.c: In function 'main':
conftest.c:57: error: 'XML_Parser' undeclared (first use in this function)
conftest.c:57: error: (Each undeclared identifier is reported only once
conftest.c:57: error: for each function it appears in.)
conftest.c:57: error: expected ';' before 'p'
configure:9374: $? = 1

However, libexpat is installed on the host, including development
files. Here is a sample test:

/tmp$ cat test.c 
#include "expat.h"

int main(void) {}

/tmp$ gcc -static -o test test.c -lexpat
/tmp$ 

On another Ubuntu 11.04 host with libexpat1-dev installed, the
cross-gdb was correctly built with XML support and the "Remote g packet
too long" error did not appear and the debugging session could work
properly.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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