34f77d47 | 13-Jan-2022 |
Andrew Jeffery <andrew@aj.id.au> |
bbdbg: Set source directory location
This allows gdb to resolve source lines by installation of source IPKs.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e5bab6ff6fb97ec2a74ac67f6f4
bbdbg: Set source directory location
This allows gdb to resolve source lines by installation of source IPKs.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e5bab6ff6fb97ec2a74ac67f6f4ccfb8a6a2cbe
show more ...
|
661cc8d0 | 10-Jan-2022 |
Andrew Jeffery <andrew@aj.id.au> |
bbdbg: Debug a target environment generated by bitbake
bbdbg does the legwork to give you a gdb instance tailored for a target environment generated from a local bitbake build tree. This saves the t
bbdbg: Debug a target environment generated by bitbake
bbdbg does the legwork to give you a gdb instance tailored for a target environment generated from a local bitbake build tree. This saves the time otherwise spent by building and installing an SDK for the same.
Documentation:
``` 3 15:52:42 andrew@mistburn:~/src/openbmc/openbmc-tools/bbdbg (bbdbg) $ ./bbdbg ./bbdbg: 26: 1: parameter not set NAME bbdbg - debug applications in a target environment built by bitbake
SYNOPSIS bbdbg PATH FILE CORE PACKAGES
DESCRIPTION PATH is the path to the root of a bitbake build directory FILE is the absolute path to the binary of interest in the target environment CORE is an optional core file generated by FILE. Pass '-' for no core file PACKAGES will be used to populate a temporary rootfs for debugging FILE
EXAMPLE bbdbg ~/src/openbmc/openbmc/build/p10bmc \ /usr/bin/nvmesensor - \ dbus-sensors dbus-sensors-dbg ```
Example use:
``` 3 15:50:40 andrew@mistburn:~/src/openbmc/openbmc-tools/bbdbg (bbdbg) $ ./bbdbg ~/src/openbmc/openbmc/build/p10bmc /usr/bin/nvmesensor obmcdump_3_1641877435/core.nvmesensor.0.db0e4de236a6448e9005e85a0dffb348.1554.1641877432000000 dbus-sensors dbus-sensors-dbg + bbdbg_opkg update + LD_LIBRARY_PATH=/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/sysroots-components/x86_64/libsolv-native/usr/lib /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg -V0 -f /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/opkg.conf -o /tmp/bbdbg.375 update + bbdbg_opkg install dbus-sensors dbus-sensors-dbg + LD_LIBRARY_PATH=/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/sysroots-components/x86_64/libsolv-native/usr/lib /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg -V0 -f /home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/opkg.conf -o /tmp/bbdbg.375 install dbus-sensors dbus-sensors-dbg + [ - = obmcdump_3_1641877435/core.nvmesensor.0.db0e4de236a6448e9005e85a0dffb348.1554.1641877432000000 ] + echo obmcdump_3_1641877435/core.nvmesensor.0.db0e4de236a6448e9005e85a0dffb348.1554.1641877432000000 + gdb-multiarch -q -iex set solib-absolute-prefix /tmp/bbdbg.375 -iex add-auto-load-safe-path /tmp/bbdbg.375 /tmp/bbdbg.375/usr/bin/nvmesensor obmcdump_3_1641877435/core.nvmesensor.0.db0e4de236a6448e9005e85a0dffb348.1554.1641877432000000 Reading symbols from /tmp/bbdbg.375/usr/bin/nvmesensor... Reading symbols from /tmp/bbdbg.375/usr/bin/.debug/nvmesensor... [New LWP 1554] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/bin/nvmesensor'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x76b88f50 in epoll_wait (epfd=<optimised out>, events=0x7edf1478, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x76b88f50 in epoll_wait (epfd=<optimised out>, events=0x7edf1478, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x0044adf4 in boost::asio::detail::epoll_reactor::run (ops=..., usec=<optimised out>, this=<optimised out>) at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:501 #2 boost::asio::detail::scheduler::do_run_one (ec=..., this_thread=..., lock=<synthetic pointer>..., this=0x17b1ea8) at /usr/include/boost/asio/detail/impl/scheduler.ipp:470 #3 boost::asio::detail::scheduler::run (ec=..., this=0x17b1ea8) at /usr/include/boost/asio/detail/impl/scheduler.ipp:204 #4 boost::asio::io_context::run (this=0x7edf1234, this=0x7edf1234) at /usr/include/boost/asio/impl/io_context.ipp:63 #5 main () at ../../../../../../workspace/sources/dbus-sensors/src/NVMeSensorMain.cpp:274 (gdb) quit + set +x 3 15:51:10 andrew@mistburn:~/src/openbmc/openbmc-tools/bbdbg (bbdbg) $ ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I82f5872742253351c7ac8d25b479ac8194e07afd
show more ...
|