Re: CGDB

2016-05-23 Thread Mooffie
On 5/23/16, Nicolas Rybkin  wrote:
> Is it possible to debug MC using GDB/CGDB?

Sure. There are ways to make gdb and mc use two different terminals
(as Slava mentioned, and see later), but, depending on what you want,
this is often not needed.

>
> I can't debug it with pure GDB too, because I can't use
> keyboard when MC is running.

- Did you remember to resume mc's execution by, for example, typing
'cont' in gdb?
- Maybe the fact that mc's screen is garbled leads you to think
(erroneously) that it doesn't respond to keys. Press C-l to make mc
redraw the screen (after 'cont').

Anyway, there are ways to make gdb and mc use different terminals
(but, again, it may not have been this issue that tripped you):

(1) Run './mc' in one terminal and 'sudo gdb -p 1234' (or 'sudo gdb
./mc 1234') in another, where 1234 is mc's PID (which you can find by
executing 'echo $PPID' in mc). (Drop the 'sudo' to get instruction on
how to do without.) In gdb, set breakpoints or whatever, and do 'cont'
to resume mc (you can return to gdb even without breakpoints, by
pressing C-g). (The disadvantage of this simple method is that you
don't get a chance to inspect mc's startup.)

(2) Use 'gdbserver'.

(3) Use gdb's 'tty' command.

I once wrote some notes explaining methods (2) and (3). They're not
quite suitable for public consumption, but here they are:
http://pastebin.com/pqdk1NfB .
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: CGDB

2016-05-23 Thread Slava Zanko
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi Nicolas,

Try to use gdbserver:
http://www.thegeekstuff.com/2014/04/gdbserver-example/ and run
gdbserver+mc and gdb+mc on different terminals

- --
*From:* Nicolas Rybkin
*To:* Mc Devel
*Subject:* Re: CGDB
*Sent:* 23.05.2016 10:42:50

> 
> 
> 23.05.2016, 01:42, "Nicolas Rybkin" <mfkore...@yandex.ru>:
>> Is it possible to debug MC using CGDB? There's a problem with the
>> terminal. ___ 
>> mc-devel mailing list 
>> https://mail.gnome.org/mailman/listinfo/mc-devel
> 
> Ah, excuse me. I can't debug it with pure GDB too, because I can't
> use keyboard when MC is runnng. 
> ___ mc-devel mailing
> list https://mail.gnome.org/mailman/listinfo/mc-devel
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAldCtLkACgkQb3oGR6aVLppSPgCffaVSH5JN3x7/u4weqBC6toOV
EHMAnA2CaXoYxkTEIdMy3e8m5tXBid+d
=uTDs
-END PGP SIGNATURE-
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: CGDB

2016-05-22 Thread Nicolas Rybkin


23.05.2016, 01:42, "Nicolas Rybkin" :
> Is it possible to debug MC using CGDB? There's a problem with the terminal.
> ___
> mc-devel mailing list
> https://mail.gnome.org/mailman/listinfo/mc-devel

Ah, excuse me. I can't debug it with pure GDB too, because I can't use keyboard 
when MC is runnng.
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel