debugging vim via gdb, best practices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

debugging vim via gdb, best practices

Greg Mattson
all,

I was wondering, what is the best method to use for debugging vim itself?

I'd like to be able to load up an interactive vim session in one window, and attach to the vim process in another, be able to set breakpoints, etc in such a way that I minimize the interference to the underlying process.

is attaching to the vim pid workable? or is there a better more dedicated solution, one sort of like python's RemotePdb which allows you to telnet into the process itself?

thanks much for any info here.. this is as much for my education as it is to track down any particular bug..

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: debugging vim via gdb, best practices

Shlomi Fish-2
On Fri, 29 Jun 2018 19:58:48 -0700 (PDT)
Greg Mattson <[hidden email]> wrote:

> all,
>
> I was wondering, what is the best method to use for debugging vim itself?
>
> I'd like to be able to load up an interactive vim session in one window, and
> attach to the vim process in another, be able to set breakpoints, etc in such
> a way that I minimize the interference to the underlying process.
>
> is attaching to the vim pid workable?

yes, see
https://stackoverflow.com/questions/14370972/how-to-attach-a-process-in-gdb

> or is there a better more dedicated
> solution, one sort of like python's RemotePdb which allows you to telnet into
> the process itself?
>

https://sourceware.org/gdb/onlinedocs/gdb/Server.html

> thanks much for any info here.. this is as much for my education as it is to
> track down any particular bug..
>



--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
List of Text Editors and IDEs - http://shlom.in/IDEs

As every cat owner knows, nobody owns a cat.
    — Source unknown, via Nadav Har’El.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: debugging vim via gdb, best practices

Bram Moolenaar
In reply to this post by Greg Mattson

Greg Mattson wrote:

> I was wondering, what is the best method to use for debugging vim itself?
>
> I'd like to be able to load up an interactive vim session in one
> window, and attach to the vim process in another, be able to set
> breakpoints, etc in such a way that I minimize the interference to the
> underlying process.
>
> is attaching to the vim pid workable? or is there a better more
> dedicated solution, one sort of like python's RemotePdb which allows
> you to telnet into the process itself?

You can use the terminal debugger.  See ":help terminal-debug".
I made it especially to be able to debug Vim (also while travelling,
thus it doesn't depend on a GUI or IDE).

--
hundred-and-one symptoms of being an internet addict:
146. You experience ACTUAL physical withdrawal symptoms when away
     from your 'puter and the net.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.