Re: [Fish-users] debugging fish

2012-12-28 Thread Nicholas Burlett
A technique I've used in the past is to add a "-playdead" command line switch to the application. The main() function checks for that switch and enters an infinite loop before doing anything else. Then from the debugger it's easy to kick it out of the loop and debug the rest of the startup. -N

Re: [Fish-users] debugging fish

2012-12-28 Thread Jan Kanis
I am familiar with that technique, but you only catch the to-be-debugged fish instance while it's already sitting in its main loop, I wanted to trace all the startup activity as well. I ended up using a different workaround: in one terminal: > sh -c 'echo $$; sleep 15; exec fish' in the other te

Re: [Fish-users] debugging fish

2012-12-27 Thread ridiculous_fish
Hi Jan, I'm not sure how to do that in one terminal, but it's straightforward with two. I do this in the shell targeted for debugging: > echo %self 26414 And in another window: > gdb attach 26414 In case you were't familiar with that technique, hope that helps! _fish On Dec 27, 2012,

[Fish-users] debugging fish

2012-12-27 Thread Jan Kanis
Hi everyone Does anyone know how to run a shell like fish under gdb and separate gdb's and fish's outputs to two different terminals? I tried following thishowto for debugging ncurses programs, but it fails because gdb can't set the sec