403
回編集
(→デバッグ) |
|||
== デバッグ ==
<nowiki>
git clone -b kirkstone https://git.openembedded.org/meta-openembedded
bitbake-layers add-layer meta-oe
bitbake-layers add-layer meta-python
</nowiki>
local.conf
<nowiki>
CORE_IMAGE_EXTRA_INSTALL += " python3 apache2 gdb gdbserver"
DISTRO_FEATURES += " debuginfod"
</nowiki>
=== debuginfod ===
local.conf
<nowiki>
gdb /bin/cat
</nowiki>
ホスト
<nowiki>
oe-debuginfod
</nowiki>
=== gdbserver ===
local.conf
<nowiki>
IMAGE_GEN_DEBUGFS = "1"
IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
EXTRA_IMAGE_FEATURES:append = " tools-debug"
</nowiki>
<nowiki>
mkdir debugfs
cd debugfs
tar xjf build/tmp/deploy/images/qemuarm64/core-image-minimal-qemuarm64.rootfs.tar.bz2
tar xjf build/tmp/deploy/images/qemuarm64/core-image-minimal-qemuarm64.rootfs-dbg.tar.bz2
</nowiki>
<nowiki>
build-dir/tmp/sysrootfs/host/usr/bin/architecture/architecture-gdb
</nowiki>
<nowiki>
gdbserver localhost:1234 /bin/gzip -help
</nowiki>
<nowiki>
cd debugfs
aarch64-poky-linux-gdb
(gdb) set sysroot debugfs
(gdb) set substitute-path /usr/src/debug debugfs/usr/src/debug
(gdb) target remote IP-of-target:1234
</nowiki>
~/.gdbinit
<nowiki>
bitback bash
bitbake -c devshell bash
cd ..
scp packages-split/bash/bin/bash target:/bin/bash
cp -a packages-split/bash-dbg/* path/debugfs
</nowiki>
== USBブート ==
|