Author Topic: Insight debugger on Raspberry Pi  (Read 1001 times)

0 Members and 1 Guest are viewing this topic.

Offline radiolistenerTopic starter

  • Super Contributor
  • ***
  • Posts: 4007
  • Country: ua
Insight debugger on Raspberry Pi
« on: September 01, 2024, 01:28:09 pm »
Does anyone tried to use Insight debugger on Raspberry Pi?

Here is the code: https://sourceware.org/git/insight.git

I 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: [Select]
sudo apt install libgmp-dev libmpfr-dev tcl-dev tk-dev

Code: [Select]
git clone https://sourceware.org/git/insight.git
cd insight
git submodule init

then nano .gitmodules and replace url:
Code: [Select]
        url = https://sourceware.org/git/binutils-gdb.git
then:
Code: [Select]
git submodule sync
git submodule update --init --recursive
autoconf
./configure
make

it require about 2 GB disk space. But fails in the linker with missing functions in gdb binaries. Any idea how to fix?

Code: [Select]
make[3]: 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 (*) [34], 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 (*) [34])':
/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 status
make[3]: *** [Makefile:2213: gdb] Error 1
make[3]: Leaving directory '/home/pi/SRC/insight/bundle/gdb'
make[2]: *** [Makefile:13825: all-gdb] Error 2
make[2]: Leaving directory '/home/pi/SRC/insight/bundle'
make[1]: *** [Makefile:1028: all] Error 2
make[1]: Leaving directory '/home/pi/SRC/insight/bundle'
make: *** [Makefile:4: notarget] Error 2
« Last Edit: September 01, 2024, 01:35:33 pm by radiolistener »
 

Online xvr

  • Frequent Contributor
  • **
  • Posts: 416
  • Country: ie
    • LinkedIn
Re: Insight debugger on Raspberry Pi
« Reply #1 on: September 01, 2024, 04:27:59 pm »
Last Insight version dated by News from July 19, 2009 on its site. I guess that gdb gone far forward for last 15 years  :-//
You can try to build old version of gdb (from 2009 year), but I afraid of problems with modern compiler and old gdb after that  |O


No, I'm wrong. They update Insight in git without new releases (and any News), in 'steals' mode  :-/O

According 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?
« Last Edit: September 01, 2024, 05:02:55 pm by xvr »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf