[Buildroot] Segmentation fault while trying to remote debug with GDB and GDBServer

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Mar 2 20:03:43 UTC 2014


Dear Baruch Siach,

On Sun, 2 Mar 2014 21:48:33 +0200, Baruch Siach wrote:

> On Sun, Mar 02, 2014 at 04:49:03PM +0000, Oded Hanson wrote:
> > What about the include path when compiling from eclipse ? Any
> > chance its using my host include files ?
> 
> This should not happen.

Indeed. Having the cross-compiler include host header files would be
horribly wrong.

> > I can see that its using the cross compiler for sure,  but don't
> > see where the include path is set.
> 
> The cross gcc uses its sysroot as logical root directory for headers
> and libraries. Buildroot sets gcc sysroot to the staging directory.
> For the internal toolchain sysroot is defined at build time (see
> package/gcc/gcc.mk). For external toolchain sysroot is set on gcc
> command line by the external toolchain wrapper (see
> toolchain/toolchain-external/ext-toolchain-wrapper.c).

Correct. Unless there is a bug, the Eclipse plug-in simply calls the
Buildroot cross-compiler, and the Buildroot cross-compiler already
properly looks in the staging directory (which is its sysroot) for
headers and libraries. I remember testing the Eclipse plugin with
several libraries integrated in the toolchain sysroot, with success.

Oded, can you be more specific about the problems you have seen?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list