Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging editor using dlv debugger #15

Closed
rythmkraze opened this issue Nov 21, 2018 · 2 comments
Closed

debugging editor using dlv debugger #15

rythmkraze opened this issue Nov 21, 2018 · 2 comments

Comments

@rythmkraze
Copy link

dlv fails to debug editor binary and returns the following error.

dlv debug editor
could not launch process: could not get .debug_frame section: could not find .debug_frame section

The object dump indeed shows that the binary has an .eh_frame

objdump -g  editor | grep -i eh_frame
Contents of the .eh_frame section:

dlv cannot read .eh_frame https://github.com/derekparker/delve/issues/467

How would I go about debugging editor using the dlv debugger. How do you debug the code?

@jmigpin
Copy link
Owner

jmigpin commented Nov 21, 2018

I haven't used delve, so I can't advise you on that.

For debugging, I would like to get the values of variables in time (go back and forth) and I don't think traditional debuggers allow that other then breakpoints and then go forward.

I mostly just code with the occasional printf, but It's getting to the point where the GoDebug cmd is usable.

For example: for the #13, i'm calling this line inside the editor (editor.go directory).
GoDebug run --dirs=core editor.go --sessionname=onefiledebug

Inside the instance launched (a new editor with a session prepared for some tests) I'm calling a 4k.sh with the example from #13.

On the original editor, the files core/erow.go and core/terminalfilter.go start getting annotations where I can go back and forth in the values to try to understand the program better after it has crashed.

It's not perfect and a bit slow but it is starting to serve me well.

@jmigpin
Copy link
Owner

jmigpin commented Jan 25, 2019

This issue seems to be connected with the plugin package: golang/go#23733, go-delve/delve#1439.
There are mentions of it getting fixed in go1.12.

In any case, this is not an issue with the editor.

@jmigpin jmigpin closed this as completed Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants