Debugging without sandbox

#1

I am unable to debug a HelloWorld application in developer studio when it runs with [color=#BF0040]sandboxed: false[/color]

Launching it on remote, without debugging works fine.
Manually running GDBServer on the remote and connecting to it works fine too

Has anyone had any issues with this before?

Errors I get when debugging in developer studio:
[ul]
[li]Program exit with 1 when starting to run
[/li]
[li]Previous error, causes GDB server to shut down =>
[/li][/ul]

My setup:
[ul]
[li]MangOH developer board version - REV 7 (not MangOH green)[/li]
[li]WP85xx module[/li]
[li]Ubuntu 15.10[/li]
[li]Developer Studio Build Version 4.0.0.201602241605[/li]
[li]Legato Framework.16.1.0.Beta[/li][/ul]

Reasons for running without a sandbox:
[ul]
[li]setup + access to ttyHSL0[/li]
[li]setup + access to eth0, setup via [color=#0000BF]ioctl()[/color][/li][/ul]

0 Likes

#2

Thanks for the feedback.
DS is using execInApp on-target tool to run the gdbserver. This tool launches a process in the application context, and this should be working whatever if the app is sandboxed or not, but it appears that this is not working when it is not.
This will be fixed in next Legato release.

0 Likes

#3

Thank you Daav for the insight.

In the mean time I have managed to set up a native debugger in eclipse CDT as follows:

[ul]
[li]Step 1) Launch your application (to upload the binary)[/li]
[li]Step 2) Debug using C/C++ Remote Application (See screenshots for setup)[/li]
[li]Step 3) When the debugger breaks on main(), load the shared libraries by typing ‘[color=#00BF00]shared[/color]’ in the gdb console[/li][/ul]
[li] Step 4) Happy debugging!

[ul]In main tab:
GDB Debugger: /home/[USER]/legato/packages/legato.toolchain.1.7.2.fw_SWI9X15Y_07080200-wp85-native-x86_64-201602121108/resources/wp85/wrapper/arm-poky-linux-gnueabi-gdb
GDB Command file: [empty][/li]
[li]In GdbServer Settings tab:
keep defaults[/li][/ul]

0 Likes

#4

Thanks for the workaround.
Please note that the issue was identified here, and the fix will be integrated in next Legato release.

0 Likes