public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: Jason Long <hack3rcon@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: Trace/breakpoint trap.
Date: Fri, 14 May 2021 18:01:06 -0400	[thread overview]
Message-ID: <CAH8yC8=H1gex32EOei1yYfLp7WR9MPif==XSL0Kx9J40xqUBLw@mail.gmail.com> (raw)
In-Reply-To: <1555568360.354077.1621022905086@mail.yahoo.com>

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

      reply	other threads:[~2021-05-14 22:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <895597245.1533806.1619862429301.ref@mail.yahoo.com>
2021-05-01  9:47 ` Jason Long
2021-05-01 21:31   ` Simon Marchi
2021-05-14 19:45     ` Jason Long
2021-05-14 19:52       ` Simon Marchi
2021-05-14 20:08         ` Jason Long
2021-05-14 22:01           ` Jeffrey Walton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH8yC8=H1gex32EOei1yYfLp7WR9MPif==XSL0Kx9J40xqUBLw@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=hack3rcon@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).