Insight debugger on Raspberry Pi - Page 1
Forum section: electronics / general

author: radiolistener
author_rank: Super Contributor
timestamp: September 01, 2024, 01:28:09 pm
content: Does anyone tried to useInsight debuggeron Raspberry Pi?Here is the code:https://sourceware.org/git/insight.gitI tried to build it on Raspi OS Bookworm 6.6.32-v8+ aarch64, but there are a lot of missing functions in gdb binaries.Prerequisites:Code:sudo apt install libgmp-dev libmpfr-dev tcl-dev tk-devCode:git clone https://sourceware.org/git/insight.gitcd insightgit submodule initthen nano .gitmodules and replace url:Code:url = https://sourceware.org/git/binutils-gdb.gitthen:Code:git submodule syncgit submodule update --init --recursiveautoconf./configuremakeit require about 2 GB disk space. But fails in the linker with missing functions in gdb binaries. Any idea how to fix?Code:make: Entering directory '/home/pi/SRC/insight/bundle/gdb'CXXLD gdb/usr/bin/ld: aarch64-linux-nat.o: in function `aarch64_linux_nat_target::read_description()':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:893: undefined reference to `aarch64_read_description(aarch64_features const&)'/usr/bin/ld: aarch64-linux-nat.o: in function `aarch64_linux_nat_target::thread_architecture(ptid_t)':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:1007: undefined reference to `aarch64_features_from_target_desc(target_desc const*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:1016: undefined reference to `aarch64_read_description(aarch64_features const&)'/usr/bin/ld: aarch64-linux-nat.o: in function `fill_gregset(regcache const*, unsigned long (*) , int)':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:758: undefined reference to `aarch64_linux_gregset'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:758: undefined reference to `aarch64_linux_gregset'/usr/bin/ld: aarch64-linux-nat.o: in function `supply_gregset(regcache*, unsigned long const (*) )':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:769: undefined reference to `aarch64_linux_gregset'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:769: undefined reference to `aarch64_linux_gregset'/usr/bin/ld: aarch64-linux-nat.o: in function `fill_fpregset(regcache const*, user_fpsimd_struct*, int)':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:782: undefined reference to `aarch64_linux_fpregset'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:782: undefined reference to `aarch64_linux_fpregset'/usr/bin/ld: aarch64-linux-nat.o: in function `supply_fpregset(regcache*, user_fpsimd_struct const*)':/home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:793: undefined reference to `aarch64_linux_fpregset'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/aarch64-linux-nat.c:793: undefined reference to `aarch64_linux_fpregset'/usr/bin/ld: python/py-type.o: in function `typy_lookup_type(demangle_component*, block const*)':/home/pi/SRC/insight/bundle/gdb/python/py-type.c:926: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: python/py-type.o: in function `typy_template_argument(_object*, _object*)':/home/pi/SRC/insight/bundle/gdb/python/py-type.c:954: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: cp-support.o: in function `cp_remove_params_1(char const*, bool)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:918: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:943: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:948: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `cp_canonicalize_string_full(char const*, char const* (*)(type*, void*), void*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:591: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:599: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `inspect_type(demangle_parse_info*, demangle_component*, char const* (*)(type*, void*), void*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:257: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:261: undefined reference to `cp_merge_demangle_parse_infos(demangle_parse_info*, demangle_component*, std::unique_ptr<demangle_parse_info, std::default_delete<demangle_parse_info> >)'/usr/bin/ld: cp-support.o: in function `replace_typedefs(demangle_parse_info*, demangle_component*, char const* (*)(type*, void*), void*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:497: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:419: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `replace_typedefs_qualified_name':/home/pi/SRC/insight/bundle/gdb/cp-support.c:395: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `replace_typedefs_template(demangle_parse_info*, string_file&, demangle_component*, demangle_component*, char const* (*)(type*, void*), void*) [clone .constprop.0]':/home/pi/SRC/insight/bundle/gdb/cp-support.c:319: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `cp_canonicalize_string(char const*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:635: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:641: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `cp_func_name(char const*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:889: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: /home/pi/SRC/insight/bundle/gdb/cp-support.c:896: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `mangled_name_to_comp(char const*, int, void**, std::unique_ptr<char, gdb::xfree_deleter<char> >*) [clone .constprop.0]':/home/pi/SRC/insight/bundle/gdb/cp-support.c:694: undefined reference to `cp_demangled_name_to_comp(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'/usr/bin/ld: cp-support.o: in function `method_name_from_physname(char const*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:871: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: cp-support.o: in function `cp_class_name_from_physname(char const*)':/home/pi/SRC/insight/bundle/gdb/cp-support.c:785: undefined reference to `cp_comp_to_string(demangle_component*, int)'/usr/bin/ld: init.o:(.data+0x0): undefined reference to `_initialize_aarch64_tdep()'/usr/bin/ld: init.o:(.data+0x10): undefined reference to `_initialize_aarch64_linux_tdep()'/usr/bin/ld: init.o:(.data+0x280): undefined reference to `_initialize_cp_name_parser()'collect2: error: ld returned 1 exit statusmake: *** [Makefile:2213: gdb] Error 1make: Leaving directory '/home/pi/SRC/insight/bundle/gdb'make: *** [Makefile:13825: all-gdb] Error 2make: Leaving directory '/home/pi/SRC/insight/bundle'make: *** [Makefile:1028: all] Error 2make: Leaving directory '/home/pi/SRC/insight/bundle'make: *** [Makefile:4: notarget] Error 2

author: xvr
author_rank: Frequent Contributor
timestamp: September 01, 2024, 04:27:59 pm
content: Last Insight version dated by News from July 19, 2009 on its site. I guess that gdb gone far forward for last 15 yearsYou can try to build old version of gdb (from 2009 year), but I afraid of problems with modern compiler and old gdb after thatNo, I'm wrong. They update Insight in git without new releases (and any News), in 'steals' modeAccording to logs you have a problem in building gdb itself. IMHO all unresolved symbols resides in source outside 'binutils/gdb' directory, but inside 'binutils/?' (I can't remember right now in what particular directory they resides).Can you try to build 'vanila' gdb (without Insight)? Just to determine guilty part?