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

Oded Hanson OHanson at xsightsys.com
Sun Mar 2 16:49:03 UTC 2014


What about the include path when compiling from eclipse ? Any chance its using my host include files ?

I can see that its using the cross compiler for sure,  but don't see where the include path is set.

Oded

On Mar 2, 2014 6:10 PM, Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
Dear Oded Hanson,

(Adding Mélanie Bats in Cc, since she is responsible for the Eclipse
plugin development)

On Sun, 2 Mar 2014 12:44:23 +0000, Oded Hanson wrote:

> For the completeness of the answer, I will add, that in eclipse plugin you can set the GDB command file. Pointing to a file with the set sysroot command in it, solves the issue also in eclipse and I can debug now from eclipse.
>
> I guess this should be fixed in the eclipse plugin setup.

The Eclipse plugin does set the solib-path (see
https://github.com/mbats/eclipse-buildroot-toolchain-plugin/blob/master/org.buildroot.cdt.toolchain/src/org/buildroot/cdt/toolchain/BuildrootLaunchConfigurationTabGroup.java#L70),
but that is apparently insufficient for gdb to find the correct dynamic
linker, especially when the host and target architectures are identical.

Since there is apparently no way in Eclipse to set a gdb sysroot, I
believe the only solution is for the Eclipse plugin to generate a
simple gdbinit file:

set sysroot /path/to/staging/directory

and then instruct Eclipse to use it.

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140302/b833bd83/attachment-0002.html>


More information about the buildroot mailing list