Re: Trace/breakpoint trap.

Jeffrey Walton via Gdb
2021-05-14T22:01:41Z

On Fri, May 14, 2021 at 5:39 PM Jason Long via Gdb <gdb@sourceware.org> wrote:
>
> Thank you.
> Why you selected "0x0000555557425000 - 0x000055555c440280 is .text" ?
> How to build with debug information?
> Disassembly? I must use a disassembler?

From the top level directory, where you run configure, change CFLAGS
and CXXFLAGS to include:

-g3 -O1 -fdebug-prefix-map=${PWD}=/opt/src/wallet

Then, after you perform 'sudo make install', perform the following to
copy the sources to /opt/src/wallet.

IFS= find "./" \( -name '*.h' -o -name '*.hpp' -o -name '*.hxx' -o \
-name '*.c' -o -name '*.cc' -o \
-name '*.cpp' -o -name '*.cxx' -o -name '*.CC' -o \
-name '*.s' -o -name '*.S' \) -print | while read -r file
do
# This trims the leading "./" in "./foo.c".
file=$(echo -n "${file}" | tr -s '/' | cut -c 3-);
cp --parents --preserve=timestamps "${file}" /opt/src/wallet
done

After the sources are in /opt/src/wallet, GDB will start working as expected.

Jeff