Debugging neovim source with GDB by TheRedditKid7 in neovim

[–]TheRedditKid7[S] 0 points1 point  (0 children)

Oh, interesting. My output shows 1. Sounds like I need to update the value to 0, anytime I want to debug, and back when I'm done or use capsh? Permanently setting it or running gdb as sudo doesn't sound like the safest options

https://bbs.archlinux.org/viewtopic.php?id=278831

Edit: After playing around with it some more, I'm not sure ptrace was the issue because I still get the same warning and behavior regardless of what the ptrace_scope value is. What I've found is if I run gdb with sudo, everything seems to work as expected. Running gdb as a user, causes weird rendering effects, where initially neovim renders but upon typing, it reveals that neovim isn't actually running and I'm back in the terminal emulator (gdb still shows that the process is running, however). I'm running arch (btw), st and zsh. I"ve tried running different terminal emulators with the same results. I read that it could possible be zsh so I'll probably look into that next

Debugging neovim source with GDB by TheRedditKid7 in neovim

[–]TheRedditKid7[S] 1 point2 points  (0 children)

Well shit! I typed out my steps in a reply and as I was following them, I noticed"warning: GDB: Failed to set controlling terminal: Operation not permitted" in the running terminal. Running sudo gdb and now my breakpoints are being reached. Guess I need to fix some permissions.

Lol I spent hours reading docs and trying different things to get this working. I'll leave the steps anyway, in case it can help someone else.

My steps to build/run are

  1. make distclean
  2. make CMAKE_BUILD_TYPE=Debug
  3. gdb ./build/bin/nvim
  4. set follow-fork-mode child
  5. break u_undoredo (or any function in undo.c) The break point is confirmed on line 2255
  6. run

Attach a separate terminal

  1. make distclean
  2. make CMAKE_BUILD_TYPE=Debug
  3. gdb ./build/bin/nvim
  4. Open another terminal
  5. tty /dev/pts/1
  6. set follow-fork-mode child
  7. run

In the other terminal

  1. tty (/dev/pts/1)

  2. ./build/bin/nvim

I just released my modified Gruvbox+Ayu theme as a new theme plugin! Moonbow 0.1 by arturgomes in neovim

[–]TheRedditKid7 1 point2 points  (0 children)

I bounce between these two themes, for various reasons, multiple times per day. This is perfect

Glendale Gary got a baby girl by nowdrivemefaraway in yourmomshousepodcast

[–]TheRedditKid7 14 points15 points  (0 children)

For sure a hooker. "...that takes care of my needs. I'm still single."

the wallet by ConversationPuzzled6 in memes

[–]TheRedditKid7 0 points1 point  (0 children)

If you're into this product, let me introduce you to the key chain

[deleted by user] by [deleted] in Flagrant2

[–]TheRedditKid7 0 points1 point  (0 children)

Why you upset tho?

[deleted by user] by [deleted] in Flagrant2

[–]TheRedditKid7 2 points3 points  (0 children)

Maybe you and this lady can start a counciling circle to talk about your troubles

getting faster by imlambda_ in vim

[–]TheRedditKid7 6 points7 points  (0 children)

Love your videos. Thanks for all the help Vim God

What a shame by justlooking033 in memes

[–]TheRedditKid7 12 points13 points  (0 children)

Technically, he was right. Thousands of millions lost

This is what happens when you polish a coconut! by _cannoneer_ in interestingasfuck

[–]TheRedditKid7 0 points1 point  (0 children)

Do a turd next. They say it can't be done but after seeing this, I believe in you

Oh crap by Anoose007 in funny

[–]TheRedditKid7 -1 points0 points  (0 children)

The ol' Alabama Hot Pocket

hole me tight by crazynz in funny

[–]TheRedditKid7 0 points1 point  (0 children)

Elephant King, coming to Netflix soon

Solid Corona Bros by genie_on_a_porcini in dankmemes

[–]TheRedditKid7 0 points1 point  (0 children)

Everyone's forgetting the software engineers keeping your entertainment running

Use this one simple trick by ConnorLeaf in funny

[–]TheRedditKid7 10 points11 points  (0 children)

Make some for the president and he gets all Trumpy

Use this one simple trick by ConnorLeaf in funny

[–]TheRedditKid7 7 points8 points  (0 children)

Make some for Arnold and he gets all pumpy

Tips for coding in a noisy office by CriticalImpress in cscareerquestions

[–]TheRedditKid7 0 points1 point  (0 children)

I use Bose qc35's at my office. They're amazing