Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: expand %(libgcc_s_dir) when generating usr.manifest
The manifest skeleton files like usr.manifest.skel have an entry for libgcc_s_dir looking like this: /usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 This actually gets expanded quite late during the build process by upload_manifest.py. The unfortunate consequence of this is that loader.py used during debugging which reads usr.manifest does not have any logic to load libgcc_s.so.1. And this makes stack traces look useless in those cases that involve libgcc_s.so.1. So this patch slightly changes the scripts/build and scripts/module.py to expand %(libgcc_s_dir) when writing to build/release/usr.manifest. As a result of this the stack trace of the crash I have been working on looks much more reasonable: (gdb) bt '#0 0x00000000403047c2 in processor::cli_hlt () at arch/x64/processor.hh:247 #1 arch::halt_no_interrupts () at arch/x64/arch.hh:48 #2 osv::halt () at arch/x64/power.cc:29 #3 0x0000000040239504 in abort (fmt=fmt@entry=0x405b1e93 "Aborted\n") at runtime.cc:142 #4 0x0000000040202e80 in abort () at runtime.cc:106 #5 0x000010000002b6b6 in ?? () #6 0x000010000003f5cb in _Unwind_Resume () #7 0x0000100000062daa in ?? () #8 0x0000100000075b5c in boost::execution_monitor::vexecute(boost::function<void ()> const&) () #9 0x000010000007f0a9 in boost::unit_test::framework::init(bool (*)(), int, char**) () #10 0x000010000009254d in boost::unit_test::unit_test_main(bool (*)(), int, char**) () #11 0x000000004039d021 in osv::application::run_main (this=0xffffa00000bd8c10) at core/app.cc:416 #12 0x000000004039d22d in operator() (app=<optimized out>, __closure=0x0) at core/app.cc:236 #13 _FUN () at core/app.cc:238 #14 0x00000000403d089a in operator() (__closure=0xffffa00000d57800) at libc/pthread.cc:116 #15 std::__invoke_impl<void, pthread_private::pthread::pthread(void* (*)(void*), void*, sigset_t, const pthread_private::thread_attr*)::<lambda()>&> (__f=...) at /usr/include/c++/11/bits/invoke.h:61 #16 std::__invoke_r<void, pthread_private::pthread::pthread(void* (*)(void*), void*, sigset_t, const pthread_private::thread_attr*)::<lambda()>&> (__fn=...) at /usr/include/c++/11/bits/invoke.h:154 #17 std::_Function_handler<void(), pthread_private::pthread::pthread(void* (*)(void*), void*, sigset_t, const pthread_private::thread_attr*)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/11/bits/std_function.h:290 #18 0x000000004036b5ae in sched::thread::main (this=0xffff800000f6a040) at core/sched.cc:1267 #19 sched::thread_main_c (t=0xffff800000f6a040) at arch/x64/arch-switch.hh:325 #20 0x00000000402fda43 in thread_main () at arch/x64/entry.S:116 Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]>
- Loading branch information