Bitcoin Forum
May 21, 2024, 04:47:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Debug bitcoin core on Ubuntu  (Read 131 times)
maplelake (OP)
Jr. Member
*
Offline Offline

Activity: 47
Merit: 8


View Profile
March 04, 2020, 01:41:11 PM
 #1

1. Build bitcoin core with steps by build-unix.md.
2. Debug it with gdb. I like to layout view of code/debug. So i use the following cmd
          cmd:  gdb -tui
3. for "n" , the ip often jumps unexpected back and forth

Is it caused by some optimization compile? it is a little annoying ...

any way to improve it ?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
March 04, 2020, 01:56:46 PM
 #2

Do you need to debug it? I just compiled the binaries and ran it from there imo...

I'm guessing gdb is going to use an interface between itself and gcc and gcc is known for needing a lot of memory, how much do you have avaliable?
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
March 04, 2020, 02:05:27 PM
Merited by achow101 (2), odolvlobo (1), ABCbits (1), aliashraf (1)
 #3

Hi,

any way to improve it ?

You should enable the compiler debugging flags with `--enable-debug`. You can list the configuration flags with `configure --help`.
maplelake (OP)
Jr. Member
*
Offline Offline

Activity: 47
Merit: 8


View Profile
March 05, 2020, 12:36:25 AM
 #4

Quote
Do you need to debug it?
yes, just reading code is not enough.you have to hand on by debugging
maplelake (OP)
Jr. Member
*
Offline Offline

Activity: 47
Merit: 8


View Profile
March 05, 2020, 12:39:23 AM
 #5

Because I'd like to create something on bitcoin. but i do not know what it is ..
hmmm, sounds funny ? actually it is .
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!