Skip to content

configure: keep relative paths in debug info - #22409

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
S3RK:debug_keep_relative_path
Oct 11, 2021
Merged

fanquake merged 2 commits into
bitcoin:masterfrom
S3RK:debug_keep_relative_path

Conversation

@S3RK

@S3RK S3RK commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

This is a follow-up for #20353 that fixes #21885

It also adds a small section to assist debugging without absolute paths in debug info.

Revert to the state prior to e507acbe and allow debugging
from project root dir with `gdb src/bitcoind`.
@S3RK

S3RK commented Jul 6, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @ajtowns for the idea and consultation

Comment thread doc/developer-notes.md Resolved
@laanwj

laanwj commented Jul 6, 2021

Copy link
Copy Markdown
Member

Concept ACK

@S3RK
S3RK force-pushed the debug_keep_relative_path branch from 4f19a84 to 01d049e Compare July 7, 2021 07:26
Comment thread doc/developer-notes.md Resolved
@S3RK
S3RK force-pushed the debug_keep_relative_path branch from 01d049e to 6205f85 Compare July 8, 2021 06:47
@practicalswift

Copy link
Copy Markdown
Contributor

Concept ACK

1 similar comment
@tryphe

tryphe commented Aug 1, 2021

Copy link
Copy Markdown
Contributor

Concept ACK

@S3RK

S3RK commented Aug 21, 2021

Copy link
Copy Markdown
Contributor Author

@practicalswift @MarcoFalke @ajtowns Interested in doing a full review?

@Zero-1729

Copy link
Copy Markdown
Contributor

Concept ACK

Comment thread doc/developer-notes.md Resolved
Comment thread doc/developer-notes.md Resolved
Comment thread doc/developer-notes.md Resolved
@jonatack

Copy link
Copy Markdown
Member

Concept ACK

@S3RK
S3RK force-pushed the debug_keep_relative_path branch from 6205f85 to 0bc666b Compare August 21, 2021 18:42
@S3RK

S3RK commented Aug 21, 2021

Copy link
Copy Markdown
Contributor Author

Fixed grammar, thanks @Zero-1729

@Zero-1729 Zero-1729 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Light crACK 0bc666b

@maflcko

maflcko commented Aug 25, 2021

Copy link
Copy Markdown
Member

The commit id you reference in the commit message is wrong.

@maflcko

maflcko commented Aug 25, 2021

Copy link
Copy Markdown
Member

I tested this in Clion and it didn't change anything for me: Before and After the same error:

Screenshot from 2021-08-25 13-12-46

Reverting commit e507acb was a working workaround. Maybe #21885 (comment) also works.

@maflcko

maflcko commented Aug 25, 2021

Copy link
Copy Markdown
Member

I tested this in Clion and it didn't change anything for me: Before and After the same error:

I guess I'll still have to apply one of the workarounds you mention in the doc?

@S3RK

S3RK commented Aug 25, 2021 •

Copy link
Copy Markdown
Contributor Author

I referenced merge commit as it has PR number for the expanded context, can change to the other commit once I get to my laptop.

I tested this in Clion and it didn't change anything for me: Before and After the same error:

I guess I'll still have to apply one of the workarounds you mention in the doc?

Yes, unfortunately CLion uses absolute paths to set breakpoints, so you need one of the workarounds. Alternatively, you can use new "Relaxed breakpoints" feature starting from 2021.2 that uses file name only matching.

This PR makes it again possible to debug from the project root dir with gdb arc/bitcoind

@kallewoof

Copy link
Copy Markdown
Contributor

Tested ACK 0bc666b

lldb src/bitcoind on master:

* thread #13, name = 'b-httpworker.2', stop reason = step over
    frame #0: 0x0000000100c87baf bitcoind`LegacyScriptPubKeyMan::IsMine(this=0x000000010cbdb1e0, script=0x0000000110190988) const at scriptpubkeyman.cpp:226:1
Target 0: (bitcoind) stopped.

Using this PR:

* thread #11, name = 'b-httpworker.0', stop reason = breakpoint 1.6
    frame #0: 0x0000000100cfca46 bitcoind`CWallet::IsMine(this=0x000000010490e310, txout=0x00000001090052c0) const at wallet.cpp:1299:5
   1296
   1297	isminetype CWallet::IsMine(const CTxOut& txout) const
   1298	{
-> 1299	    AssertLockHeld(cs_wallet);
   1300	    return IsMine(txout.scriptPubKey);
   1301	}
   1302
Target 0: (bitcoind) stopped.

(note lack of any line numbers in master)

@fanquake

Copy link
Copy Markdown
Member

Going to merge this now, as it's an improvement for debugging (the current issue has tripped up a few people), without losing the behaviour from #20353.

@fanquake
fanquake merged commit 5b7210c into bitcoin:master Oct 11, 2021
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 3, 2022
0bc666b doc: add info for debugging with relative paths (S3RK)
a8b515c configure: keep relative paths in debug info (S3RK)

Pull request description:

  This is a follow-up for bitcoin#20353 that fixes bitcoin#21885

  It also adds a small section to assist debugging without absolute paths in debug info.

ACKs for top commit:
  kallewoof:
    Tested ACK 0bc666b
  Zero-1729:
    Light crACK 0bc666b

Tree-SHA512: d4b75183c3d3a0f59fe786841fb230581de87f6fe04cf7224e4b89c520d45513ba729d4ad8c0e62dd1dbaaa7a25741f04d036bc047f92842e76c9cc31ea47fb2
gades pushed a commit to cosanta/cosanta-core that referenced this pull request May 9, 2022
0bc666b doc: add info for debugging with relative paths (S3RK)
a8b515c configure: keep relative paths in debug info (S3RK)

Pull request description:

  This is a follow-up for bitcoin#20353 that fixes bitcoin#21885

  It also adds a small section to assist debugging without absolute paths in debug info.

ACKs for top commit:
  kallewoof:
    Tested ACK 0bc666b
  Zero-1729:
    Light crACK 0bc666b

Tree-SHA512: d4b75183c3d3a0f59fe786841fb230581de87f6fe04cf7224e4b89c520d45513ba729d4ad8c0e62dd1dbaaa7a25741f04d036bc047f92842e76c9cc31ea47fb2
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugging does not work after commit e507acb (PR #20353)

10 participants