You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any documentation on this which I've missed?
I am trying to use gdb to debug clboss but I'm getting tied up in knots. I'm probably doing something really stupid, but I can't get it to work.
I see there is a --debugger command line option to clboss. The only way I can find to persuade c-lightning to start the clboss plugin with this option is to use a wrapper script:
#!/bin/bash
cd $HOME/src/clboss
./clboss --debugger $*
and then tell lightning-cli to start that wrapper:
$ lightning-cli plugin start `pwd`/debug-wrap.sh
This fires up a terminal with gdb attached to clboss, but (even though as far as I can tell the paths are correct) it doesn't seem to be able to find the source, e.g.
(gdb) list Boss/Mod/OnchainFundsIgnorer.cpp:30
No source file named Boss/Mod/OnchainFundsIgnorer.cpp.
(gdb) shell
$ ls -l Boss/Mod/OnchainFundsIgnorer.cpp
-rw-rw-r-- 1 steve steve 6353 May 20 17:57 Boss/Mod/OnchainFundsIgnorer.cpp
I also seem to be struggling to step through the code because the event framework is constantly receiving SIGSTOP signals, but this may be normal or may be a side effect of these other problems.
As far as I can tell my clboss executable does have debug symbols - "objdump --syms clboss | c++filt" shows lots of clboss symbols. Do I need to pass some special arguments to the configure script to get proper symbols?
If there's any interest, I'm happy to write up a starter "how to work with clboss for developers" document once I know how to do it myself.
Any advice would be appreciated, thanks!
(For what it's worth, one of my local code changes is making clboss crash on startup and I'm trying to debug that. But I have temporarily reverted back to the upstream clboss code while I figure out how to use the debugger with clboss, so unless I made a mistake that shouldn't be the problem here.)
It feels a bit like I'm abusing the issues section by asking this question here, if there's somewhere else to ask this kind of thing please let me know.
The text was updated successfully, but these errors were encountered:
I've had some luck with the debugging symbols by running configure like this:
CPPFLAGS=-g LDFLAGS=-g ./configure --enable-debug
I don't know if some of that is unnecessary, but it does seem to be working. I am currently fighting with the "can't debug properly for all the SIGSTOP signals" problem, so I haven't got that much further and it may be the debug symbols are still wrong/incomplete somehow.
Thanks! I think gdb is doing that automatically - they were just incomprehensible because of all the templates, not because they were mangled. :-) But I am slowly getting to grips with things and making what feels like progress on my prototype for #202.
Is there any documentation on this which I've missed?
I am trying to use gdb to debug clboss but I'm getting tied up in knots. I'm probably doing something really stupid, but I can't get it to work.
I see there is a --debugger command line option to clboss. The only way I can find to persuade c-lightning to start the clboss plugin with this option is to use a wrapper script:
and then tell lightning-cli to start that wrapper:
This fires up a terminal with gdb attached to clboss, but (even though as far as I can tell the paths are correct) it doesn't seem to be able to find the source, e.g.
I also seem to be struggling to step through the code because the event framework is constantly receiving SIGSTOP signals, but this may be normal or may be a side effect of these other problems.
As far as I can tell my clboss executable does have debug symbols - "objdump --syms clboss | c++filt" shows lots of clboss symbols. Do I need to pass some special arguments to the configure script to get proper symbols?
If there's any interest, I'm happy to write up a starter "how to work with clboss for developers" document once I know how to do it myself.
Any advice would be appreciated, thanks!
(For what it's worth, one of my local code changes is making clboss crash on startup and I'm trying to debug that. But I have temporarily reverted back to the upstream clboss code while I figure out how to use the debugger with clboss, so unless I made a mistake that shouldn't be the problem here.)
It feels a bit like I'm abusing the issues section by asking this question here, if there's somewhere else to ask this kind of thing please let me know.
The text was updated successfully, but these errors were encountered: