[Lazarus] Single-stepping assembler

Martin lazarus at mfriebe.de
Sat Sep 10 22:28:38 CEST 2011


On 10/09/2011 21:16, Martin wrote:
> On 10/09/2011 20:50, Mark Morgan Lloyd wrote:
>>
>> << TCmdLineDebugger.ReadLn "(gdb) "
>> >> TCmdLineDebugger.SendCmdLn "set inferior-tty /dev/pts/2"
>
> Ok, so we may have 2 issues at and.
>
> the debugger never returns on
>   set inferior-tty /dev/pts/2
> which should have been created by the IDE.
>
> or the IDE never gets the result, because something went wrong with 
> creating it => but then it should not have gotten as far as sending 
> the above...
>
> So still the below stacktrace,. shows the IDE waiting for gdb to 
> return output. yet it should do processMessages, so the ide should be 
> responsive.
> Strange
>
>
> anyway:
> in options, on the debugger tab (where you select /usr/bin/gdb), is a 
> list of setting (in an object inspector like grid)
> One of the settings is
>    ConsoleTty
> it is empty by default.
> Put /dev/null in there  and see if it helps.
>
> Or if you need to see the debugged apps terminal output, then open a 
> terminal (xterm, or any other) yourself, type "pty", and it will give 
> you something like /dev/pts/<n>  which you can put into that setting 
> (so long as you leave that terminal open.
>
> I wonder why that hangs. Nothing there should have changed...
> unless some file/handle stuff in fpc changed? getpt() fcntl() 
> tcsetattr() __write()  ....
>
>
>> ^C
>> Program received signal SIGINT, Interrupt.
>> [Switching to Thread 0xf7f6daa0 (LWP 13397)]
>> 0xf7f0f25c in __read_nocancel () from /lib/libpthread.so.0
>> (gdb) bt
>> #0  0xf7f0f25c in __read_nocancel () from /lib/libpthread.so.0
>> #1  0x00ae7450 in TPSEUDOTERMINAL__READ (this=0xf61fe580, result=0x0)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmimiscclasses.pp:539
>> #2  0x00ae7570 in TPSEUDOTERMINAL__CHECKCANREAD (this=0xf61fe580)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmimiscclasses.pp:546

Argh, no => I overlooked the top 2 frames...

I do NOT like them (I do not know yet why not ..)

try the /dev/null
It should work around

At this point there should not be any data to be read.
So the question is why on your system is read triggered.


>> #3  0x00aae40c in TGDBMIDEBUGGER__PROCESSWHILEWAITFORHANDLES 
>> (this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:6878
>> #4  0x00a72cd4 in TCMDLINEDEBUGGER__WAITFORHANDLES 
>> (AHANDLES=<incomplete type>, ATIMEOUT=-1, highAHANDLES=0,
>>     this=0xf61cad20) at 
>> /usr/local/share/lazarus-trunk/debugger/cmdlinedebugger.pp:166
>> #5  0x00a738e8 in TCMDLINEDEBUGGER__READLINE (APEEK=false, 
>> ATIMEOUT=-1, this=0xf61cad20, result=0x0)
>>     at /usr/local/share/lazarus-trunk/debugger/cmdlinedebugger.pp:423
>> #6  0x00a735bc in TCMDLINEDEBUGGER__READLINE (ATIMEOUT=-1, 
>> this=0xf61cad20, result=0x0)
>>     at /usr/local/share/lazarus-trunk/debugger/cmdlinedebugger.pp:352
>> #7  0x00aba070 in TGDBMIDEBUGGERCOMMAND__PROCESSRESULT 
>> (ARESULT={STATE = DSNONE, VALUES = 0x0, FLAGS = []},
>>     ATIMEOUT=-1, this=0xf5b7b980) at 
>> /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:9301
>> #8  0x00ab95bc in TGDBMIDEBUGGERCOMMAND__EXECUTECOMMAND 
>> (ACOMMAND=0xf5b94cd8 'set inferior-tty /dev/pts/2',
>>     ARESULT={STATE = DSNONE, VALUES = 0x0, FLAGS = []}, AFLAGS=[], 
>> ATIMEOUT=-1, this=0xf5b7b980)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:9123
>> #9  0x00ab9f88 in TGDBMIDEBUGGERCOMMAND__EXECUTECOMMAND 
>> (ACOMMAND=0x10d0e78 'set inferior-tty %s',
>>     AVALUES=<incomplete type>, ARESULT={STATE = DSNONE, VALUES = 0x0, 
>> FLAGS = []}, AFLAGS=[], ATIMEOUT=-1,
>>     highAVALUES=0, this=0xf5b7b980) at 
>> /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:9162
>> #10 0x00a9d074 in TGDBMIDEBUGGERCOMMANDSTARTDEBUGGING__DOEXECUTE 
>> (this=0xf5b7b980)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:3813
>> #11 0x00abe1e4 in TGDBMIDEBUGGERCOMMAND__EXECUTE (this=0xf5b7b980)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:9904
>> #12 0x00aaa150 in TGDBMIDEBUGGER__RUNQUEUE (this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:5863
>> #13 0x00aaaa98 in TGDBMIDEBUGGER__QUEUECOMMAND (ACOMMAND=0xf5b7b980, 
>> FORCEQUEUE=false, this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:5984
>> #14 0x00aae394 in TGDBMIDEBUGGER__STARTDEBUGGING 
>> (ACONTINUECOMMAND=0xf5ccfaa0, this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:6867
>> #15 0x00aae29c in TGDBMIDEBUGGER__STARTDEBUGGING 
>> (ACONTINUECOMMAND=ECTCONTINUE, this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:6851
>> #16 0x00aabd7c in TGDBMIDEBUGGER__GDBRUN (this=0xf61cad20)
>>     at /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:6228
>> #17 0x00aad050 in TGDBMIDEBUGGER__REQUESTCOMMAND (ACOMMAND=DCRUN, 
>> APARAMS=<incomplete type>, highAPARAMS=-1,
>>     this=0xf61cad20) at 
>> /usr/local/share/lazarus-trunk/debugger/gdbmidebugger.pp:6641
>> #18 0x005cdf14 in TDEBUGGER__REQCMD (ACOMMAND=DCRUN, 
>> APARAMS=<incomplete type>, highAPARAMS=-1,
>>     this=0xf61cad20) at 
>> /usr/local/share/lazarus-trunk/debugger/debugger.pp:5454
>> #19 0x005ce030 in TDEBUGGER__RUN (this=0xf61cad20) at 
>> /usr/local/share/lazarus-trunk/debugger/debugger.pp:5468
>> #20 0x005bf1e4 in TDEBUGMANAGER__RUNDEBUGGER (this=0xf6b842f0) at 
>> debugmanager.pas:2220
>> #21 0x005b6dcc in TDEBUGMANAGER__ONRUNTIMER (SENDER=0xf6226c80, 
>> this=0xf6b842f0) at debugmanager.pas:661
>> #22 0x003512b4 in TCUSTOMTIMER__DOONTIMER (this=0xf6226c80) at 
>> customtimer.pas:181
>> #23 0x003511d8 in TCUSTOMTIMER__TIMER (this=0xf6226c80) at 
>> customtimer.pas:156
>> #24 0x00322b98 in GTKTIMERCB (DATA=0xf61f0fd0) at gtk2callback.inc:2430
>> #25 0xf7840b40 in ?? () from /usr/lib/libglib-2.0.so.0
>> #26 0xf7840b40 in ?? () from /usr/lib/libglib-2.0.so.0
>> Backtrace stopped: previous frame identical to this frame (corrupt 
>> stack?)
>>
>> 0 1>markMLl at pye-dev-04:/usr/local/share/lazarus$ gdb --version
>> GNU gdb 6.8-debian
>> Copyright (C) 2008 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later 
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show 
>> copying"
>> and "show warranty" for details.
>> This GDB was configured as "sparc-linux-gnu".
>>
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list