You are not logged in.

#1 2019-01-21 00:32:16

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

[solved] vim Termdebug doesn't show source code

Subj.

terminal.txt
...
To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the
command name, for example: >
	:Termdebug vim

This opens two windows:

gdb window	A terminal window in which "gdb vim" is executed.  Here you
		can directly interact with gdb.  The buffer name is "!gdb".

program window	A terminal window for the executed program.  When "run" is
		used in gdb the program I/O will happen in this window, so
		that it does not interfere with controlling gdb.  The buffer
		name is "gdb program".

The current window is used to show the source code.  When gdb pauses the
source file location will be displayed, if possible.  A sign is used to
highlight the current position, using highlight group debugPC.	 
...

Termdebug.png

Last edited by Kirill Bugaev (2019-01-24 21:55:40)

Offline

#2 2019-01-24 21:34:46

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] vim Termdebug doesn't show source code

I have tested it on old virtual machine and on Raspberry PI. It doesn't work in both cases. Maybe I compile not proper way. What do you think? I do `gcc -g <filename>`.

Last edited by Kirill Bugaev (2019-01-24 21:36:34)

Offline

#3 2019-01-24 21:37:52

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: [solved] vim Termdebug doesn't show source code

What is the actual problem? What do you expect to see that you do not and where? What have you tried?

All the best,

-HG

Offline

#4 2019-01-24 21:41:31

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] vim Termdebug doesn't show source code

I expect that vim will show source code in bottom window after `:Termdebug <program_name>` and walk around it when I `step` and `next` while debugging.

Last edited by Kirill Bugaev (2019-01-24 21:42:08)

Offline

#5 2019-01-24 21:55:15

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] vim Termdebug doesn't show source code

Sorry, I am stupid as usual. I should open source file manually then vim follows it while debugging. It seems I have checked it before, it turns out that I was wrong.

Last edited by Kirill Bugaev (2019-01-24 22:03:43)

Offline

#6 2019-01-24 22:16:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,586

Re: [solved] vim Termdebug doesn't show source code

Runs pretty damn awesome for me (on real metal) - if the source isn't already open, you'll have to "run" it first to see some sources.
Try to "break main", SIGINT might get you into whatnot unsourced  loop.

Online

#7 2019-01-24 22:23:40

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] vim Termdebug doesn't show source code

@seth, thanks. I will keep it in my mind.

Offline

#8 2019-03-18 14:22:22

pdoherty
Member
Registered: 2019-03-18
Posts: 1

Re: [solved] vim Termdebug doesn't show source code

> Sorry, I am stupid as usual. I should open source file manually then vim follows it while debugging. It seems I have checked it before, it turns out that I was wrong.

Your assumption here does not lead me to believe you're stupid. IMO, Termdebug should behave as you're expecting it to.

Offline

#9 2019-03-18 14:40:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,586

Re: [solved] vim Termdebug doesn't show source code

And how would you suggest anything would pull that magic trick?

Online

Board footer

Powered by FluxBB