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

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Mar 23 21:07:09 UTC 2014


Dear Arnout Vandecappelle,

On Wed, 05 Mar 2014 07:42:04 +0100, Arnout Vandecappelle wrote:

> > On Sun, 2 Mar 2014 17:10:08 +0100, Thomas Petazzoni wrote:
> > 
> >> 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.
> > 
> > Or now that I think of it, maybe Buildroot should itself generate this
> > gdbinit file. It may be useful even for users not using Eclipse.
> 
>  Even better: buildroot should generate a wrapper (yet another one!) that
> passes -ex 'set sysroot ...' when calling cross-gdb.

Except that as of today, we don't generate any wrapper for the case of
the internal toolchain, while this particular "set sysroot ..." thing
is useful for both internal and external toolchains.

Do we want to switch to use wrappers for the internal toolchain as
well? This would mean that it can no longer be simply installed into
$(HOST_DIR)/usr. To be honest, I'm not sure we want to do make this
change.

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



More information about the buildroot mailing list