This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Remote debugging xwalk on Tizen 2.1
Dongseong Hwang edited this page Dec 18, 2013
·
7 revisions
Prerequisites:
- Tizen 2.1 chroot environment with crosswalk sources.
- gdb is installed under chroot and gdbserver installed to device.
- For gdb, add "BuildRequires: gdb" to your crosswalk.spec to install gdb in your chroot.
- For gdbserver, download and install gdbserver rpm: http://download.tizen.org/releases/2.1/latest/repos/tizen-base/ia32/packages/i586/
- root mode is enabled with sdb (
sdb root on
)
- Build debug version of xwalk under chroot environment.
- See Development-on-Tizen
- You need to add -Dcomponent=shared_library, because unfortunately ld inside chroot can not handle more than 2GB binary.
./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
...
-Dcomponent=shared_library
make -C src BUILDTYPE=Debug xwalk
- Make a copy of libraries with debug symbols and strip debug info
cp -r src/out/Debug/lib.target src/out/Debug/lib.target_stripped
strip --strip-debug src/out/Debug/lib.target_stripped/*
- Move binaries to device
sdb push src/out/Debug/lib.target_stripped/ /home/developer/xwalk/lib.target/
sdb push src/out/Debug/xwalk /home/developer/xwalk/
sdb push src/out/Debug/xwalk.pak /home/developer/xwalk/
sdb push src/out/Debug/libffmpegsumo.so /home/developer/xwalk/
-
Setup port forwarding with sdb (
sdb forward tcp:1234 tcp:5678
) -
Start gdb server on device
sdb shell gdbserver host:5678 /home/developer/xwalk/xwalk http://www.google.com --no-sandbox --single-process
- Note: --single-process is used to debug gpu and render process also. It means we debug code a bit different from product code.
- Start gdb from CHROOT and attach it to remote server
gdb src/out/Debug/xwalk
(gdb) target remote localhost:1234
- If gdb cannot find symbols, you have to set solib-search-path.
(gdb) set solib-search-path /home/abuild/[xwalk dir]/src/out/Debug/lib.target/.
Happy debugging.