Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-09

Can Lazarus IDE debugger attach to already running process?

42 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

As the subject line says, can Lazarus IDE's debugger attach to a already running process? The running process is a program compiler earlier with Lazarus IDE. I know GDB [via CLI] can do this, but can you do it via the Lazarus IDE, so I have "visual debugging"?

If one can, how do I do it?

Reason I ask:
In Delphi it is a common way to debug CGI applications. You define an infinite loop in the CGI app. Execute the CGI app via the web browser. The infinite loop then gives you a change to attach the Delphi debugger. You then modify the variable of the infinite loop so it exits the loop. You can then step through the CGI application like any normal GUI or Console app. This is much easier than debugging with log files etc.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Sven Barth
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Hi, As the subject line says, can Lazarus IDE's debugger attach to a already running process? The running process is a program compiler earlier with Lazarus IDE. I know GDB [via CLI] can do this, but can you do it via the Lazarus IDE, so I have "visual debugging"? If one can, how do I do it?

According to
http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes current 1.1 versions support attaching to a running process. Never used it yet though.

Regards,
Sven

Reply by email

Graeme Geldenhuys
to Sven Barth
Sven Barth wrote
According to http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes current 1.1 versions support attaching to a running process. Never used it yet though.

OK thanks. I found it under the Run menu but couldn't get it to work. In the mean time I'm continuing to use DDD to achieve what I want - but obviously I would much prefer to do the debugging in Lazarus IDE (more familiar ground to me).

Note to others that want to try this:
- If you want to debug the CGI app under Linux, you must be root user to attach to the process. On my system the CGI app is run as the 'www' user.
- in GDB, Boolean variable values are set as 0 or 1 (not 'true' or 'false')
- When GDB attaches to another process, it immediately stops the other process, so you must use the 'continue' command to start it again.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin
to Graeme Geldenhuys: As the subject line says, can Lazarus IDE's debugger attach to a already running process?…
Graeme Geldenhuys wrote 6 lines
Hi, As the subject line says, can Lazarus IDE's debugger attach to a already running process? The running process is a program compiler earlier with Lazarus IDE. I know GDB [via CLI] can do this, but can you do it via the Lazarus IDE, so I have "visual debugging"?

Yes it can, but you mus know the PID. Lazarus will just ask for the pid.

Open the project, so you have the sources, then in the "run" menu you find the attach command. It will take 2 or 3 secs, and then popup an input for the pid

Show quoted text 11 lines
If one can, how do I do it? Reason I ask: In Delphi it is a common way to debug CGI applications. You define an infinite loop in the CGI app. Execute the CGI app via the web browser. The infinite loop then gives you a change to attach the Delphi debugger. You then modify the variable of the infinite loop so it exits the loop. You can then step through the CGI application like any normal GUI or Console app. This is much easier than debugging with log files etc.

If you use an integer var, you can modify it from the IDE.

Do not modify managed types

Reply by email

Martin
to Graeme Geldenhuys: OK thanks. I found it under the Run menu but couldn't get it to work. In the mean time…
Graeme Geldenhuys wrote 10 lines
On 2013-09-18 16:54, Sven Barth wrote: > According to > http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes > current 1.1 versions support attaching to a running process. Never used > it yet though. OK thanks. I found it under the Run menu but couldn't get it to work. In the mean time I'm continuing to use DDD to achieve what I want - but obviously I would much prefer to do the debugging in Lazarus IDE (more familiar ground to me).

What went wrong?

I use it plenty of time. (on w32 vista). I use it to attach to desktop apps though. But it should make no difference.

Reply by email

Martin Schreiber
to Graeme Geldenhuys: As the subject line says, can Lazarus IDE's debugger attach to a already running process?…
Graeme Geldenhuys wrote 9 lines
Hi, As the subject line says, can Lazarus IDE's debugger attach to a already running process? The running process is a program compiler earlier with Lazarus IDE. I know GDB [via CLI] can do this, but can you do it via the Lazarus IDE, so I have "visual debugging"? If one can, how do I do it?

Instead of using DDD, in MSEide it is 'Target'-'Attach Process'. Hmm, I need to fix the captions of the process ID dialog...

Martin

Reply by email

patspiper
to Martin: What went wrong? I use it plenty of time. (on w32 vista). I use it to attach to desktop…
Martin wrote 13 lines
On 18/09/2013 18:11, Graeme Geldenhuys wrote: > On 2013-09-18 16:54, Sven Barth wrote: >> According to >> http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes >> >> current 1.1 versions support attaching to a running process. Never used >> it yet though. > > OK thanks. I found it under the Run menu but couldn't get it to work. In > the mean time I'm continuing to use DDD to achieve what I want - but > obviously I would much prefer to do the debugging in Lazarus IDE (more > familiar ground to me). What went wrong?

I tried to attach to an external process (Ubuntu 11.04) and (Ooops) the debugger entered the error state; Attach failed. This happens whether the process is a Lazarus compiled app or other.

Lazarus 1.3 r42849 FPC 2.6.3 i386-linux-gtk 2

I am not sure if Graeme has the same symptoms or not.

Stephano

Reply by email

Martin
to patspiper
patspiper wrote 24 lines
On 18/09/13 20:32, Martin wrote: > On 18/09/2013 18:11, Graeme Geldenhuys wrote: >> On 2013-09-18 16:54, Sven Barth wrote: >>> According to >>> http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes >>> >>> current 1.1 versions support attaching to a running process. Never >>> used >>> it yet though. >> >> OK thanks. I found it under the Run menu but couldn't get it to >> work. In >> the mean time I'm continuing to use DDD to achieve what I want - but >> obviously I would much prefer to do the debugging in Lazarus IDE (more >> familiar ground to me). > What went wrong? I tried to attach to an external process (Ubuntu 11.04) and (Ooops) the debugger entered the error state; Attach failed. This happens whether the process is a Lazarus compiled app or other. Lazarus 1.3 r42849 FPC 2.6.3 i386-linux-gtk 2 I am not sure if Graeme has the same symptoms or not.

Can you sent me a log:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

Reply by email

patspiper
to Martin
Martin wrote 12 lines
On 18/09/2013 19:00, patspiper wrote: > > I tried to attach to an external process (Ubuntu 11.04) and (Ooops) > the debugger entered the error state; Attach failed. This happens > whether the process is a Lazarus compiled app or other. > > Lazarus 1.3 r42849 FPC 2.6.3 i386-linux-gtk 2 > > I am not sure if Graeme has the same symptoms or not. Can you sent me a log: http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

Log:

=thread-group-added,id="i1"
(gdb)
<-gdb-set confirm off>
^done
(gdb)
<-gdb-set new-console off>
^error,msg="No symbol table is loaded. Use the \"file\" command." (gdb)
<set width 50000>
&"set width 50000\n"
^done
(gdb)
<-gdb-version>
~"GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2\n"
~"Copyright (C) 2010 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-linux-gnu\".\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
^done
(gdb)
<-file-exec-and-symbols "/home/deleteme/project1"> ^done
(gdb)
<-file-exec-and-symbols >
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<attach 9149>
&"attach 9149\n"
&"Could not attach to process. If your uid matches the uid of the target\nprocess, check the setting of
/proc/sys/kernel/yama/ptrace_scope, or try\nagain as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf\n"
&"ptrace: Operation not permitted.\n"
^error,msg="ptrace: Operation not permitted."
(gdb)
<detach>
&"detach\n"
&"The program is not being run.\n"
^error,msg="The program is not being run."
(gdb)
<kill>

Stephano

Reply by email

patspiper
to patspiper
patspiper wrote 64 lines
On 18/09/13 21:01, Martin wrote: > On 18/09/2013 19:00, patspiper wrote: >> >> I tried to attach to an external process (Ubuntu 11.04) and (Ooops) >> the debugger entered the error state; Attach failed. This happens >> whether the process is a Lazarus compiled app or other. >> >> Lazarus 1.3 r42849 FPC 2.6.3 i386-linux-gtk 2 >> >> I am not sure if Graeme has the same symptoms or not. > Can you sent me a log: > http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working > Log: =thread-group-added,id="i1" (gdb) <-gdb-set confirm off> ^done (gdb) <-gdb-set new-console off> ^error,msg="No symbol table is loaded. Use the \"file\" command." (gdb) <set width 50000> &"set width 50000\n" ^done (gdb) <-gdb-version> ~"GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2\n" ~"Copyright (C) 2010 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n" ~"This GDB was configured as \"i686-linux-gnu\".\nFor bug reporting instructions, please see:\n" ~"<http://www.gnu.org/software/gdb/bugs/>.\n" ^done (gdb) <-file-exec-and-symbols "/home/deleteme/project1"> ^done (gdb) <-file-exec-and-symbols > ^done (gdb) <-gdb-set language pascal> ^done (gdb) <attach 9149> &"attach 9149\n" &"Could not attach to process. If your uid matches the uid of the target\nprocess, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try\nagain as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf\n" &"ptrace: Operation not permitted.\n" ^error,msg="ptrace: Operation not permitted." (gdb) <detach> &"detach\n" &"The program is not being run.\n" ^error,msg="The program is not being run." (gdb) <kill>

In 10-ptrace.conf: kernel.yama.ptrace_scope = 1

"A scope of "1" limits # PTRACE only to direct child processes (e.g. "gdb name-of-program" and # "strace -f name-of-program" work, but gdb's "attach" and "strace -fp $PID" # do not)"
which essentially explains why the debugger fails to attach to the process.

Stephano

Reply by email

Graeme Geldenhuys
to Martin: What went wrong? I use it plenty of time. (on w32 vista). I use it to attach to desktop…
Martin wrote
What went wrong?

The whole IDE froze up - I was using it under FreeBSD 9.1 (64-bit) with LCL-GTK2 compiled IDE. I tried as my normal user first, then noticed the security issue of attaching to a process I don't own. I then copied the .lazarus/ directory to the /root/ directory and tried Lazarus IDE as the root. Same outcome as before.

I use it plenty of time. (on w32 vista). I use it to attach to desktop apps though. But it should make no difference.

Once you press the OK button on the "enter process ID" dialog, what steps do you follow then? Set a breakpoint and press the Play (green triangle) button?

I'll try it again under Windows (32-bit) tonight.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to patspiper: I tried to attach to an external process (Ubuntu 11.04) and (Ooops) the debugger entered…
patspiper wrote
I tried to attach to an external process (Ubuntu 11.04) and (Ooops) the debugger entered the error state; Attach failed.

Ah yes, I had that one too - as my normal user. I deduced it was because I didn't own the process I was trying to debug. The IDE froze as the root user.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Martin: Yes it can, but you mus know the PID. Lazarus will just ask for the pid. Open the…
Martin wrote
If you use an integer var, you can modify it from the IDE. Do not modify managed types

OK, thanks for that tip.

Once I get it working, I'll update the "CGI Web Programming" [http://wiki.freepascal.org/CGI_Web_Programming] wiki page on the alternative way to debugging CGI apps.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin
to Martin
Martin wrote 11 lines
On 18/09/2013 19:52, Graeme Geldenhuys wrote: > On 2013-09-18 18:32, Martin wrote: >> What went wrong? > The whole IDE froze up After orl before you enter the PID/ Can it be that the PID input win was (due to the gck focus/window z order issues) hidden? It is modal, so the rest of the IDE would seem froozen.

Actually, if you got to the permission error before, then you would be past the pid.

Maybe it needs a diff setting for the gdb scheduler locking, if you debug something in the webserver?

Reply by email

Michael Schnell
to Sven Barth: According to http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes…
Sven Barth wrote
http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes current 1.1 versions support attaching to a running process.

The page also states that "remote debugging with gdbserver" is supported.

Dis anybody get this running for a PC as desktop workstation and a ARM-Linux target ?

(Some months ago we unsuccessfully tried to...)

-Michael

Reply by email

Martin
to Michael Schnell
Michael Schnell wrote 10 lines
On 09/18/2013 05:54 PM, Sven Barth wrote: > http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#IDE_Changes > current 1.1 versions support attaching to a running process. The page also states that "remote debugging with gdbserver" is supported. Dis anybody get this running for a PC as desktop workstation and a ARM-Linux target ? (Some months ago we unsuccessfully tried to...)

Does gdb suppor asyncronous mode for this target?

e.g can you

gdb -i mi

-exec-continue &

and while running
interrupt
?

You can always send me a log file.

Also check, please: on my tests, to run gdb asyncrounus in a gdbserver, the -exec-run (or r) command was NOT used (would not work) but -exec-continue was used.

Is that the case for your target too?

I have no arm, I can not test.

Reply by email

Michael Schnell
to Martin: Does gdb suppor asyncronous mode for this target? e.g can you gdb -i mi -exec-continue &…
Martin wrote
Does gdb suppor asyncronous mode for this target?

I don't know.
We tried to attach to gdbserver via TCP/IP.

Show quoted text 6 lines
e.g can you gdb -i mi -exec-continue &

I did not do this myself, but a pal of mine from the German Lazarus forum did these tests. So I can't comment.

In fact I preferred to try to make working to have Lazarus remotely attach to a "full" gdb on the target via SSH. (When I last looked at it there ware some disabled lines of code for this in the Lazarus sources.

and while running interrupt ?

AFAIK, gdbserver does not support interrupting a running program. That is one of the causes why I prefer the SSH way of remote debugging. The other is that for all targets you can easily get a native gdb out of the box, while it might be rather tedious to install all the tools to create the appropriate gdbserver on the target and the cross-gdb executable on the PC you need to attach to it.

You can always send me a log file.

Thanks a lot. I'll try to re-open the dialog with my pal from the German forum...

Show quoted text 7 lines
Also check, please: on my tests, to run gdb asyncrounus in a gdbserver, the -exec-run (or r) command was NOT used (would not work) but -exec-continue was used. Is that the case for your target too?

The target (both for me and my pal) is a gui-less NAT by QNAP.

I was able to (on a Linux PC) build a native fpc compiler for that target and use it there to compile a (in fact productive) program I before developed and tested on a Linux PC.

My pal was able to create a cross-fpc for that target and he said same was able to compile a testing program that ion fact did run on the target.

-Michael

Reply by email

Martin
to Michael Schnell
Michael Schnell wrote 5 lines
In fact I preferred to try to make working to have Lazarus remotely attach to a "full" gdb on the target via SSH. (When I last looked at it there ware some disabled lines of code for this in the Lazarus sources.

look at http://bugs.freepascal.org/view.php?id=21834

In some config it might work.

It does best work in asyncronous mode(see below). It will try this, but should fall back.

Note: in none asyncronous mode, some things are not possible, and can never be possible.
In none async, the debugger can not interrupt the running process., It has to wait until a breakpoint is reached.
That also means, that once the process is running, no breakpoints can be added, or removed, until the process does hit an existing breakpoint. GDB requires the process to be paused in order to change breakpoints (or in order to do anything).

Show quoted text 7 lines
> > and while running > interrupt > ? AFAIK, gdbserver does not support interrupting a running program.

Depends on target (e.g gdbserver on intel/windows or intel/linux can do this.

The issue is that originally the IDE itself did sent a signal to the debuggee. That is not possible if the debuggee is on a remate system. But it works, if gdb or gdb server for that platform support asyncronous mode. (it is possible to start gdb, and ask it, but I need to lookup the command)

IIRC gdbserver supports thi for i386 win and linux (probably intel 64 bit too).
gdb does NOT support it for windows, but iirc for linux (intel)

When using gdbserver, it is enough if gdbserver supports it.

Show quoted text 5 lines
That is one of the causes why I prefer the SSH way of remote debugging. The other is that for all targets you can easily get a native gdb out of the box, while it might be rather tedious to install all the tools to create the appropriate gdbserver on the target and the cross-gdb executable on the PC you need to attach to it.

Try it, send a log, if not working

Show quoted text 5 lines
> > You can always send me a log file. Thanks a lot. I'll try to re-open the dialog with my pal from the German forum...

Was he the one who created the above bug?
If not, please create a new one. The old one contains a lot of solved issues (and some unsolved). So it is time consuming to go through it.

Reply by email

Michael Schnell
to Martin
Martin wrote 7 lines
> The other is that for all targets you can easily get a native gdb out > of the box, while it might be rather tedious to install all the tools > to create the appropriate gdbserver on the target and the cross-gdb > executable on the PC you need to attach to it. Try it, send a log, if not working

He told me that he d/lded and installed the complete ARM SDK by Code Sourcery (several gigabytes, including Eclipse etc) and only after that he was able to create the fpc cross compiler and the remote gdb/gdbserver pair.

He was up to create a paper on how to do this for pushing it in the Lazarus wiki. But for this a more convenient way to get the tool suite would have been appropriate.

He tried to find such a way, but never again, he was able to compile gdb/gdbserver. So he seems to have given up.

Was he the one who created the above bug?

No, he is from Austria, not from Russia. :-)

If not, please create a new one. The old one contains a lot of solved issues (and some unsolved). So it is time consuming to go through it.

Hopefully, one day soon I might be able to get on this issue.... Then I'll be back.

-Michael

Reply by email

Reinier Olislagers
to Michael Schnell
Michael Schnell wrote 5 lines
On 09/19/2013 12:27 PM, Michael Schnell wrote: > He was up to ... pushing it in the Lazarus wiki. In fact he did start to write a report in German, and I promised to translate it for the Wiki, once it is done, and enhance it on how to use the SSH-Remote debugging.

Sounds like an inefficient process. Why doesn't he just upload a German version to the German version of the/a wiki page so the text is already there and anybody that speaks German & English can help translate it...

Reply by email

Michael Schnell
to Reinier Olislagers
Reinier Olislagers wrote
Sounds like an inefficient process. Why doesn't he just upload a German version to the German version of the/a wiki page so the text is already there and anybody that speaks German & English can help translate it...

OK, if we do have something appropriately installable and working I'll see that we do both German and English wiki pages.

-Michael

Reply by email

Graeme Geldenhuys
to Martin: Yes it can, but you mus know the PID. Lazarus will just ask for the pid. Open the…
Martin wrote
If you use an integer var, you can modify it from the IDE. Do not modify managed types

OK, I got the latest Lazarus from Trunk and compiled it with FPC 2.6.2 and using GDB 7.2 under Win2000 (a VM).

I enter the PID and click OK. The Lazarus IDE shows "Debugging..." in the title bar, but I can't do anything else. I can't evaluate local variables, cannot modify the local lDebug (integer) variable. The login.cgi application is also compiled with debug information - contrary to what the GDB log output seems to say.

Not sure if I'm doing wrong. I'll try with GDB command line and MSEide under Windows now.

----8<-------------8<-------------8<-------------8<-------------8<---- <-file-exec-and-symbols "c:/Programming/m2_system/Bin/i386-win32/login.cgi"> ^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<-file-exec-and-symbols >
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<attach 484>
&"attach 484\n"
=thread-group-started,id="i1",pid="484"
=thread-created,id="1",group-id="i1"
~"[New Thread 484.0x3f0]\n"
^running
*running,thread-id="all"
(gdb)
=thread-created,id="2",group-id="i1"
~"[New Thread 484.0x664]\n"
*running,thread-id="all"
=thread-created,id="3",group-id="i1"
~"[New Thread 484.0x640]\n"
*running,thread-id="all"
=library-loaded,id="C:\\WINNT\\system32\\NTDLL.DLL",target-name="C:\\WINNT\\system32\\NTDLL.DLL",host-name="C:\\WINNT\\system32\\NTDLL.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\KERNEL32.DLL",target-name="C:\\WINNT\\system32\\KERNEL32.DLL",host-name="C:\\WINNT\\system32\\KERNEL32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\OLE32.DLL",target-name="C:\\WINNT\\system32\\OLE32.DLL",host-name="C:\\WINNT\\system32\\OLE32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\rpcrt4.dll",target-name="C:\\WINNT\\system32\\rpcrt4.dll",host-name="C:\\WINNT\\system32\\rpcrt4.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\ADVAPI32.DLL",target-name="C:\\WINNT\\system32\\ADVAPI32.DLL",host-name="C:\\WINNT\\system32\\ADVAPI32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\GDI32.DLL",target-name="C:\\WINNT\\system32\\GDI32.DLL",host-name="C:\\WINNT\\system32\\GDI32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\USER32.DLL",target-name="C:\\WINNT\\system32\\USER32.DLL",host-name="C:\\WINNT\\system32\\USER32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\OLEAUT32.DLL",target-name="C:\\WINNT\\system32\\OLEAUT32.DLL",host-name="C:\\WINNT\\system32\\OLEAUT32.DLL",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\imm32.dll",target-name="C:\\WINNT\\system32\\imm32.dll",host-name="C:\\WINNT\\system32\\imm32.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\lpk.dll",target-name="C:\\WINNT\\system32\\lpk.dll",host-name="C:\\WINNT\\system32\\lpk.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\usp10.dll",target-name="C:\\WINNT\\system32\\usp10.dll",host-name="C:\\WINNT\\system32\\usp10.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\indicdll.dll",target-name="C:\\WINNT\\system32\\indicdll.dll",host-name="C:\\WINNT\\system32\\indicdll.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\WINNT\\system32\\COMCTL32.DLL",target-name="C:\\WINNT\\system32\\COMCTL32.DLL",host-name="C:\\WINNT\\system32\\COMCTL32.DLL",symbols-loaded="0",thread-group="i1" ~"[Switching to Thread 484.0x640]\n"
*stopped
(gdb)
<ptype TObject>
&"ptype TObject\n"
&"No symbol \"TObject\" in current context.\n"
^error,msg="No symbol \"TObject\" in current context." (gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC> ^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context." (gdb)
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n" ~"\nNon-debugging symbols:\n"
~"0x004022f0 SYSTEM_FPC_CPUINIT\n"
^done
(gdb)
<ptype TObject>
&"ptype TObject\n"
&"No symbol \"TObject\" in current context.\n"
^error,msg="No symbol \"TObject\" in current context." (gdb)
<ptype Exception>
&"ptype Exception\n"
&"No symbol \"Exception\" in current context.\n"
^error,msg="No symbol \"Exception\" in current context." (gdb)
<ptype Shortstring>
&"ptype Shortstring\n"
&"No symbol \"Shortstring\" in current context.\n" ^error,msg="No symbol \"Shortstring\" in current context." (gdb)
<ptype pointer>
&"ptype pointer\n"
&"No symbol \"pointer\" in current context.\n"
^error,msg="No symbol \"pointer\" in current context." (gdb)
<ptype byte>
&"ptype byte\n"
&"No symbol \"byte\" in current context.\n"
^error,msg="No symbol \"byte\" in current context." (gdb)
<set print elements 2500>
&"set print elements 2500\n"
^done
(gdb)
<info file>
&"info file\n"
~"Symbols from
\"c:\\programming\\m2_system\\Bin\\i386-win32\\html\\mmaths\\login.cgi\".\n" ~"Win32 child process:\n"
~"\tUsing the running image of attached Thread 484.0x640.\n" ~"\tWhile running this, GDB does not access memory from...\n" ~"Local exec file:\n"
~"\t`c:\\programming\\m2_system\\Bin\\i386-win32\\html\\mmaths\\login.cgi', file type pei-i386.\n"
~"\tEntry point: 0x4f1fc0\n"
~"\t0x00401000 - 0x004f2000 is .text\n"
~"\t0x004f2000 - 0x00540efc is .data\n"
~"\t0x00541000 - 0x00547674 is .bss\n"
~"\t0x00549000 - 0x00549db8 is .idata\n"
~"\t0x77f81000 - 0x77fc58f9 is .text in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x77fc6000 - 0x77fca371 is ECODE in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x77fcb000 - 0x77fcedfd is PAGE in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x77fcf000 - 0x77fd1200 is .data in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x77fd2000 - 0x77ff8d18 is .rsrc in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x77ff9000 - 0x77ffaf40 is .reloc in C:\\WINNT\\system32\\NTDLL.DLL\n" ~"\t0x7c4e1000 - 0x7c53f378 is .text in C:\\WINNT\\system32\\KERNEL32.DLL\n" ~"\t0x7c540000 - 0x7c543200 is .data in C:\\WINNT\\system32\\KERNEL32.DLL\n" ~"\t0x7c544000 - 0x7c594548 is .rsrc in C:\\WINNT\\system32\\KERNEL32.DLL\n" ~"\t0x7c595000 - 0x7c598588 is .reloc in
C:\\WINNT\\system32\\KERNEL32.DLL\n"
~"\t0x77a51000 - 0x77b29c24 is .text in C:\\WINNT\\system32\\OLE32.DLL\n" ~"\t0x77b2a000 - 0x77b32705 is .orpc in C:\\WINNT\\system32\\OLE32.DLL\n" ~"\t0x77b33000 - 0x77b38c00 is .data in C:\\WINNT\\system32\\OLE32.DLL\n" ~"\t0x77b3a000 - 0x77b3b5e0 is .rsrc in C:\\WINNT\\system32\\OLE32.DLL\n" ~"\t0x77b3c000 - 0x77b46440 is .reloc in C:\\WINNT\\system32\\OLE32.DLL\n" ~"\t0x77d31000 - 0x77d92f9c is .text in C:\\WINNT\\system32\\rpcrt4.dll\n" ~"\t0x77d93000 - 0x77d9ac27 is .orpc in C:\\WINNT\\system32\\rpcrt4.dll\n" ~"\t0x77d9b000 - 0x77d9be00 is .data in C:\\WINNT\\system32\\rpcrt4.dll\n" ~"\t0x77d9c000 - 0x77d9c3e0 is .rsrc in C:\\WINNT\\system32\\rpcrt4.dll\n" ~"\t0x77d9d000 - 0x77da092c is .reloc in C:\\WINNT\\system32\\rpcrt4.dll\n" ~"\t0x7c2d1000 - 0x7c327162 is .text in C:\\WINNT\\system32\\ADVAPI32.DLL\n" ~"\t0x7c328000 - 0x7c32b200 is .data in C:\\WINNT\\system32\\ADVAPI32.DLL\n" ~"\t0x7c32c000 - 0x7c32d260 is .rsrc in C:\\WINNT\\system32\\ADVAPI32.DLL\n" ~"\t0x7c32e000 - 0x7c331be0 is .reloc in
C:\\WINNT\\system32\\ADVAPI32.DLL\n"
~"\t0x77f41000 - 0x77f7763a is .text in C:\\WINNT\\system32\\GDI32.DLL\n" ~"\t0x77f78000 - 0x77f78a00 is .data in C:\\WINNT\\system32\\GDI32.DLL\n" ~"\t0x77f79000 - 0x77f793a8 is .rsrc in C:\\WINNT\\system32\\GDI32.DLL\n" ~"\t0x77f7a000 - 0x77f7b518 is .reloc in C:\\WINNT\\system32\\GDI32.DLL\n" ~"\t0x77e11000 - 0x77e6829a is .text in C:\\WINNT\\system32\\USER32.DLL\n" ~"\t0x77e69000 - 0x77e69a00 is .data in C:\\WINNT\\system32\\USER32.DLL\n" ~"\t0x77e6a000 - 0x77e71618 is .rsrc in C:\\WINNT\\system32\\USER32.DLL\n" ~"\t0x77e72000 - 0x77e74ae8 is .reloc in C:\\WINNT\\system32\\USER32.DLL\n" ~"\t0x779b1000 - 0x77a38bcd is .text in C:\\WINNT\\system32\\OLEAUT32.DLL\n" ~"\t0x77a39000 - 0x77a3f000 is .data in C:\\WINNT\\system32\\OLEAUT32.DLL\n" ~"\t0x77a41000 - 0x77a412a4 is .rsrc in C:\\WINNT\\system32\\OLEAUT32.DLL\n" ~"\t0x77a42000 - 0x77a49628 is .reloc in
C:\\WINNT\\system32\\OLEAUT32.DLL\n"
~"\t0x75e61000 - 0x75e7267c is .text in C:\\WINNT\\system32\\imm32.dll\n" ~"\t0x75e73000 - 0x75e73200 is .data in C:\\WINNT\\system32\\imm32.dll\n" ~"\t0x75e74000 - 0x75e78c08 is .rsrc in C:\\WINNT\\system32\\imm32.dll\n" ~"\t0x75e79000 - 0x75e79a30 is .reloc in C:\\WINNT\\system32\\imm32.dll\n" ~"\t0x6ca61000 - 0x6ca64e29 is .text in C:\\WINNT\\system32\\lpk.dll\n" ~"\t0x6ca65000 - 0x6ca651a4 is .data in C:\\WINNT\\system32\\lpk.dll\n" ~"\t0x6ca66000 - 0x6ca663c8 is .rsrc in C:\\WINNT\\system32\\lpk.dll\n" ~"\t0x6ca67000 - 0x6ca671ee is .reloc in C:\\WINNT\\system32\\lpk.dll\n" ~"\t0x66651000 - 0x66683d4d is .text in C:\\WINNT\\system32\\usp10.dll\n" ~"\t0x66684000 - 0x66687e00 is .data in C:\\WINNT\\system32\\usp10.dll\n" ~"\t0x6668d000 - 0x6668fe50 is Shared in C:\\WINNT\\system32\\usp10.dll\n" ~"\t0x66690000 - 0x666a1a08 is .rsrc in C:\\WINNT\\system32\\usp10.dll\n" ~"\t0x666a2000 - 0x666a31e0 is .reloc in C:\\WINNT\\system32\\usp10.dll\n" ~"\t0x6e421000 - 0x6e422356 is .text in C:\\WINNT\\system32\\indicdll.dll\n" ~"\t0x6e423000 - 0x6e423000 is .data in C:\\WINNT\\system32\\indicdll.dll\n" ~"\t0x6e424000 - 0x6e424f98 is .rsrc in C:\\WINNT\\system32\\indicdll.dll\n" ~"\t0x6e425000 - 0x6e4251bc is .reloc in
C:\\WINNT\\system32\\indicdll.dll\n"
~"\t0x77b51000 - 0x77bb485c is .text in C:\\WINNT\\system32\\COMCTL32.DLL\n" ~"\t0x77bb5000 - 0x77bb54a8 is .data in C:\\WINNT\\system32\\COMCTL32.DLL\n" ~"\t0x77bb6000 - 0x77bd4948 is .rsrc in C:\\WINNT\\system32\\COMCTL32.DLL\n" ~"\t0x77bd5000 - 0x77bd8790 is .reloc in
C:\\WINNT\\system32\\COMCTL32.DLL\n"
^done
(gdb)
<-data-evaluate-expression sizeof(^char)>
^error,msg="A syntax error in expression, near `^char)'." (gdb)
<info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x409ef0 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4234992>
^done,bkpt={number="7",type="breakpoint",disp="keep",enabled="y",addr="0x00409ef0",at="<fpc_raiseexception>",times="0",original-location="*4234992"} (gdb)
<info address FPC_BREAK_ERROR>
&"info address FPC_BREAK_ERROR\n"
~"Symbol \"FPC_BREAK_ERROR\" is at 0x40baa0 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4242080>
^done,bkpt={number="8",type="breakpoint",disp="keep",enabled="y",addr="0x0040baa0",at="<SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0",original-location="*4242080"} (gdb)
<info address FPC_RUNERROR>
&"info address FPC_RUNERROR\n"
~"Symbol \"FPC_RUNERROR\" is at 0x40bb80 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4242304>
^done,bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="0x0040bb80",at="<SYSTEM_RUNERROR$WORD>",times="0",original-location="*4242304"} (gdb)
<-stack-list-frames 0 0>
^done,stack=[frame={level="0",addr="0x77fa144c",func="ntdll!DbgUiConnectToDbg",from="C:\\WINNT\\system32\\NTDLL.DLL"}] (gdb)
<-data-disassemble -s 2012877856 -e 2012877857 -- 0> ^done,asm_insns=[{address="0x77fa1420",func-name="ntdll!CsrAllocateCaptureBuffer",offset="83",inst="call 0x77fa1439 <ntdll!CsrAllocateCaptureBuffer+108>"}] (gdb)
<-data-disassemble -s 2012877773 -e 2012878084 -- 1> ^done,asm_insns=[{address="0x77fa13cd",func-name="ntdll!CsrAllocateCaptureBuffer",offset="0",inst="push

%ebp"},{address="0x77fa13ce",func-name="ntdll!CsrAllocateCaptureBuffer",offset="1",inst="mov

%esp,%ebp"},{address="0x77fa13d0",func-name="ntdll!CsrAllocateCaptureBuffer",offset="3",inst="push

$0xffffffff"},{address="0x77fa13d2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="5",inst="push

$0x77f99130"},{address="0x77fa13d7",func-name="ntdll!CsrAllocateCaptureBuffer",offset="10",inst="push

$0x77f98191"},{address="0x77fa13dc",func-name="ntdll!CsrAllocateCaptureBuffer",offset="15",inst="mov

%fs:0x0,%eax"},{address="0x77fa13e2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="21",inst="push

%eax"},{address="0x77fa13e3",func-name="ntdll!CsrAllocateCaptureBuffer",offset="22",inst="mov

%esp,%fs:0x0"},{address="0x77fa13ea",func-name="ntdll!CsrAllocateCaptureBuffer",offset="29",inst="push

%ecx"},{address="0x77fa13eb",func-name="ntdll!CsrAllocateCaptureBuffer",offset="30",inst="push

%ecx"},{address="0x77fa13ec",func-name="ntdll!CsrAllocateCaptureBuffer",offset="31",inst="sub

$0x18,%esp"},{address="0x77fa13ef",func-name="ntdll!CsrAllocateCaptureBuffer",offset="34",inst="push

%ebx"},{address="0x77fa13f0",func-name="ntdll!CsrAllocateCaptureBuffer",offset="35",inst="push

%esi"},{address="0x77fa13f1",func-name="ntdll!CsrAllocateCaptureBuffer",offset="36",inst="push

%edi"},{address="0x77fa13f2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="37",inst="andl

$0x0,-0x24(%ebp)"},{address="0x77fa13f6",func-name="ntdll!CsrAllocateCaptureBuffer",offset="41",inst="andl

$0x0,-0x4(%ebp)"},{address="0x77fa13fa",func-name="ntdll!CsrAllocateCaptureBuffer",offset="45",inst="push

$0x77fa13b2"},{address="0x77fa13ff",func-name="ntdll!CsrAllocateCaptureBuffer",offset="50",inst="lea

-0x24(%ebp),%eax"},{address="0x77fa1402",func-name="ntdll!CsrAllocateCaptureBuffer",offset="53",inst="push

%eax"},{address="0x77fa1403",func-name="ntdll!CsrAllocateCaptureBuffer",offset="54",inst="call 0x77fa1216
<ntdll!RtlQueryTagHeap+2008>"},{address="0x77fa1408",func-name="ntdll!CsrAllocateCaptureBuffer",offset="59",inst="mov

%eax,-0x1c(%ebp)"},{address="0x77fa140b",func-name="ntdll!CsrAllocateCaptureBuffer",offset="62",inst="pushl 0x14(%ebp)"},{address="0x77fa140e",func-name="ntdll!CsrAllocateCaptureBuffer",offset="65",inst="pushl 0x10(%ebp)"},{address="0x77fa1411",func-name="ntdll!CsrAllocateCaptureBuffer",offset="68",inst="pushl 0xc(%ebp)"},{address="0x77fa1414",func-name="ntdll!CsrAllocateCaptureBuffer",offset="71",inst="pushl 0x8(%ebp)"},{address="0x77fa1417",func-name="ntdll!CsrAllocateCaptureBuffer",offset="74",inst="call *%eax"},{address="0x77fa1419",func-name="ntdll!CsrAllocateCaptureBuffer",offset="76",inst="mov %eax,-0x28(%ebp)"},{address="0x77fa141c",func-name="ntdll!CsrAllocateCaptureBuffer",offset="79",inst="orl $0xffffffff,-0x4(%ebp)"},{address="0x77fa1420",func-name="ntdll!CsrAllocateCaptureBuffer",offset="83",inst="call 0x77fa1439 <ntdll!CsrAllocateCaptureBuffer+108>"},{address="0x77fa1425",func-name="ntdll!CsrAllocateCaptureBuffer",offset="88",inst="mov -0x28(%ebp),%eax"},{address="0x77fa1428",func-name="ntdll!CsrAllocateCaptureBuffer",offset="91",inst="mov -0x10(%ebp),%ecx" },{address="0x77fa142b",func-name="ntdll!CsrAllocateCaptureBuffer",offset="94",inst="mov %ecx,%fs:0x0"},{address="0x77fa1432",func-name="ntdll!CsrAllocateCaptureBuffer",offset="101",inst="pop %edi"},{address="0x77fa1433",func-name="ntdll!CsrAllocateCaptureBuffer",offset="102",inst="pop %esi"},{address="0x77fa1434",func-name="ntdll!CsrAllocateCaptureBuffer",offset="103",inst="pop %ebx"},{address="0x77fa1435",func-name="ntdll!CsrAllocateCaptureBuffer",offset="104",inst="leave "},{address="0x77fa1436",func-name="ntdll!CsrAllocateCaptureBuffer",offset="105",inst="ret $0x10"},{address="0x77fa1439",func-name="ntdll!CsrAllocateCaptureBuffer",offset="108",inst="cmpl $0x0,-0x24(%ebp)"},{address="0x77fa143d",func-name="ntdll!CsrAllocateCaptureBuffer",offset="112",inst="je 0x77fa1447 <ntdll!CsrAllocateCaptureBuffer+122>"},{address="0x77fa143f",func-name="ntdll!CsrAllocateCaptureBuffer",offset="114",inst="pushl -0x24(%ebp)"},{address="0x77fa1442",func-name="ntdll!CsrAllocat eCaptureBuffer",offset="117",inst="call 0x77f8b5df <ntdll!NtAcceptConnectPort>"},{address="0x77fa1447",func-name="ntdll!CsrAllocateCaptureBuffer",offset="122",inst="ret "},{address="0x77fa1448",func-name="ntdll!RtlShutdownLpcServer",offset="0",inst="ret $0x4"},{address="0x77fa144b",func-name="ntdll!DbgUiConnectToDbg",offset="0",inst="int3 "},{address="0x77fa144c",func-name="ntdll!DbgUiConnectToDbg",offset="1",inst="ret "},{address="0x77fa144d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="0",inst="int3 "},{address="0x77fa144e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="1",inst="ret "},{address="0x77fa144f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="2",inst="mov 0x4(%esp),%eax"},{address="0x77fa1453",func-name="ntdll!LdrAlternateResourcesEnabled",offset="6",inst="int3 "},{address="0x77fa1454",func-name="ntdll!LdrAlternateResourcesEnabled",offset="7",inst="ret $0x4"},{address="0x77fa1457",func-name="ntdll!LdrAlternateResourcesEn abled",offset="10",inst="mov -0x14(%ebp),%eax"},{address="0x77fa145a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="13",inst="mov (%eax),%eax"},{address="0x77fa145c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="15",inst="mov (%eax),%eax"},{address="0x77fa145e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="17",inst="mov %eax,-0x280(%ebp)"},{address="0x77fa1464",func-name="ntdll!LdrAlternateResourcesEnabled",offset="23",inst="push $0x1"},{address="0x77fa1466",func-name="ntdll!LdrAlternateResourcesEnabled",offset="25",inst="pop %eax"},{address="0x77fa1467",func-name="ntdll!LdrAlternateResourcesEnabled",offset="26",inst="ret "},{address="0x77fa1468",func-name="ntdll!LdrAlternateResourcesEnabled",offset="27",inst="mov -0x18(%ebp),%esp"},{address="0x77fa146b",func-name="ntdll!LdrAlternateResourcesEnabled",offset="30",inst="mov -0x280(%ebp),%esi"},{address="0x77fa1471",func-name="ntdll!LdrAlternateResourcesEnabled",offset="36",inst="orl $0xffffffff,-0x4(%ebp)"},{address="0x77fa1475",func-name="ntdll!LdrAlternateResourcesEnabled",offset="40",inst="xor %ebx,%ebx"},{address="0x77fa1477",func-name="ntdll!LdrAlternateResourcesEnabled",offset="42",inst="jmp 0x77f98c7e <ntdll!DbgUiContinue+118>"},{address="0x77fa147c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="47",inst="mov %fs:0x18,%eax"},{address="0x77fa1482",func-name="ntdll!LdrAlternateResourcesEnabled",offset="53",inst="mov %bl,0xf74(%eax)"},{address="0x77fa1488",func-name="ntdll!LdrAlternateResourcesEnabled",offset="59",inst="mov %esi,%eax"},{address="0x77fa148a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="61",inst="jmp 0x77f98ce2 <ntdll!DbgUiContinue+218>"},{address="0x77fa148f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="66",inst="mov $0x200,%eax"},{address="0x77fa1494",func-name="ntdll!LdrAlternateResourcesEnabled",offset="71",inst="movb $0xa,-0x19(%ebp)"},{address="0x77fa1498",func-name="ntdll!LdrAlternate ResourcesEnabled",offset="75",inst="jmp 0x77f98c95 <ntdll!DbgUiContinue+141>"},{address="0x77fa149d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="80",inst="movl $0x40010006,-0x27c(%ebp)"},{address="0x77fa14a7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="90",inst="mov %ebx,-0x274(%ebp)"},{address="0x77fa14ad",func-name="ntdll!LdrAlternateResourcesEnabled",offset="96",inst="movl $0x2,-0x26c(%ebp)"},{address="0x77fa14b7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="106",inst="mov %ebx,-0x278(%ebp)"},{address="0x77fa14bd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="112",inst="movzwl -0x228(%ebp),%eax"},{address="0x77fa14c4",func-name="ntdll!LdrAlternateResourcesEnabled",offset="119",inst="inc %eax"},{address="0x77fa14c5",func-name="ntdll!LdrAlternateResourcesEnabled",offset="120",inst="mov %eax,-0x268(%ebp)"},{address="0x77fa14cb",func-name="ntdll!LdrAlternateResourcesEnabled",offset="126",inst="mov -0x224(%ebp),%eax"},{addre ss="0x77fa14d1",func-name="ntdll!LdrAlternateResourcesEnabled",offset="132",inst="mov %eax,-0x264(%ebp)"},{address="0x77fa14d7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="138",inst="lea -0x27c(%ebp),%eax"},{address="0x77fa14dd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="144",inst="push %eax"},{address="0x77fa14de",func-name="ntdll!LdrAlternateResourcesEnabled",offset="145",inst="call 0x77fb16c8 <ntdll!RtlReAllocateHeap>"},{address="0x77fa14e3",func-name="ntdll!LdrAlternateResourcesEnabled",offset="150",inst="mov %fs:0x18,%eax"},{address="0x77fa14e9",func-name="ntdll!LdrAlternateResourcesEnabled",offset="156",inst="mov %bl,0xf74(%eax)"},{address="0x77fa14ef",func-name="ntdll!LdrAlternateResourcesEnabled",offset="162",inst="xor %eax,%eax"},{address="0x77fa14f1",func-name="ntdll!LdrAlternateResourcesEnabled",offset="164",inst="jmp 0x77f98ce2 <ntdll!DbgUiContinue+218>"},{address="0x77fa14f6",func-name="ntdll!LdrAlternateResourcesEnabled",offse t="169",inst="push $0x1"},{address="0x77fa14f8",func-name="ntdll!LdrAlternateResourcesEnabled",offset="171",inst="call 0x77fa144f <ntdll!LdrAlternateResourcesEnabled+2>"},{address="0x77fa14fd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="176",inst="xor %ecx,%ecx"},{address="0x77fa14ff",func-name="ntdll!LdrAlternateResourcesEnabled",offset="178",inst="jmp 0x77f98cd4 <ntdll!DbgUiContinue+204>"}] (gdb)
<-data-disassemble -s 2012877773 -e 2012877896 -- 1> ^done,asm_insns=[{address="0x77fa13cd",func-name="ntdll!CsrAllocateCaptureBuffer",offset="0",inst="push

%ebp"},{address="0x77fa13ce",func-name="ntdll!CsrAllocateCaptureBuffer",offset="1",inst="mov

%esp,%ebp"},{address="0x77fa13d0",func-name="ntdll!CsrAllocateCaptureBuffer",offset="3",inst="push

$0xffffffff"},{address="0x77fa13d2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="5",inst="push

$0x77f99130"},{address="0x77fa13d7",func-name="ntdll!CsrAllocateCaptureBuffer",offset="10",inst="push

$0x77f98191"},{address="0x77fa13dc",func-name="ntdll!CsrAllocateCaptureBuffer",offset="15",inst="mov

%fs:0x0,%eax"},{address="0x77fa13e2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="21",inst="push

%eax"},{address="0x77fa13e3",func-name="ntdll!CsrAllocateCaptureBuffer",offset="22",inst="mov

%esp,%fs:0x0"},{address="0x77fa13ea",func-name="ntdll!CsrAllocateCaptureBuffer",offset="29",inst="push

%ecx"},{address="0x77fa13eb",func-name="ntdll!CsrAllocateCaptureBuffer",offset="30",inst="push

%ecx"},{address="0x77fa13ec",func-name="ntdll!CsrAllocateCaptureBuffer",offset="31",inst="sub

$0x18,%esp"},{address="0x77fa13ef",func-name="ntdll!CsrAllocateCaptureBuffer",offset="34",inst="push

%ebx"},{address="0x77fa13f0",func-name="ntdll!CsrAllocateCaptureBuffer",offset="35",inst="push

%esi"},{address="0x77fa13f1",func-name="ntdll!CsrAllocateCaptureBuffer",offset="36",inst="push

%edi"},{address="0x77fa13f2",func-name="ntdll!CsrAllocateCaptureBuffer",offset="37",inst="andl

$0x0,-0x24(%ebp)"},{address="0x77fa13f6",func-name="ntdll!CsrAllocateCaptureBuffer",offset="41",inst="andl

$0x0,-0x4(%ebp)"},{address="0x77fa13fa",func-name="ntdll!CsrAllocateCaptureBuffer",offset="45",inst="push

$0x77fa13b2"},{address="0x77fa13ff",func-name="ntdll!CsrAllocateCaptureBuffer",offset="50",inst="lea

-0x24(%ebp),%eax"},{address="0x77fa1402",func-name="ntdll!CsrAllocateCaptureBuffer",offset="53",inst="push

%eax"},{address="0x77fa1403",func-name="ntdll!CsrAllocateCaptureBuffer",offset="54",inst="call 0x77fa1216
<ntdll!RtlQueryTagHeap+2008>"},{address="0x77fa1408",func-name="ntdll!CsrAllocateCaptureBuffer",offset="59",inst="mov

%eax,-0x1c(%ebp)"},{address="0x77fa140b",func-name="ntdll!CsrAllocateCaptureBuffer",offset="62",inst="pushl 0x14(%ebp)"},{address="0x77fa140e",func-name="ntdll!CsrAllocateCaptureBuffer",offset="65",inst="pushl 0x10(%ebp)"},{address="0x77fa1411",func-name="ntdll!CsrAllocateCaptureBuffer",offset="68",inst="pushl 0xc(%ebp)"},{address="0x77fa1414",func-name="ntdll!CsrAllocateCaptureBuffer",offset="71",inst="pushl 0x8(%ebp)"},{address="0x77fa1417",func-name="ntdll!CsrAllocateCaptureBuffer",offset="74",inst="call *%eax"},{address="0x77fa1419",func-name="ntdll!CsrAllocateCaptureBuffer",offset="76",inst="mov %eax,-0x28(%ebp)"},{address="0x77fa141c",func-name="ntdll!CsrAllocateCaptureBuffer",offset="79",inst="orl $0xffffffff,-0x4(%ebp)"},{address="0x77fa1420",func-name="ntdll!CsrAllocateCaptureBuffer",offset="83",inst="call 0x77fa1439 <ntdll!CsrAllocateCaptureBuffer+108>"},{address="0x77fa1425",func-name="ntdll!CsrAllocateCaptureBuffer",offset="88",inst="mov -0x28(%ebp),%eax"},{address="0x77fa1428",func-name="ntdll!CsrAllocateCaptureBuffer",offset="91",inst="mov -0x10(%ebp),%ecx" },{address="0x77fa142b",func-name="ntdll!CsrAllocateCaptureBuffer",offset="94",inst="mov %ecx,%fs:0x0"},{address="0x77fa1432",func-name="ntdll!CsrAllocateCaptureBuffer",offset="101",inst="pop %edi"},{address="0x77fa1433",func-name="ntdll!CsrAllocateCaptureBuffer",offset="102",inst="pop %esi"},{address="0x77fa1434",func-name="ntdll!CsrAllocateCaptureBuffer",offset="103",inst="pop %ebx"},{address="0x77fa1435",func-name="ntdll!CsrAllocateCaptureBuffer",offset="104",inst="leave "},{address="0x77fa1436",func-name="ntdll!CsrAllocateCaptureBuffer",offset="105",inst="ret $0x10"},{address="0x77fa1439",func-name="ntdll!CsrAllocateCaptureBuffer",offset="108",inst="cmpl $0x0,-0x24(%ebp)"},{address="0x77fa143d",func-name="ntdll!CsrAllocateCaptureBuffer",offset="112",inst="je 0x77fa1447 <ntdll!CsrAllocateCaptureBuffer+122>"},{address="0x77fa143f",func-name="ntdll!CsrAllocateCaptureBuffer",offset="114",inst="pushl -0x24(%ebp)"},{address="0x77fa1442",func-name="ntdll!CsrAllocat eCaptureBuffer",offset="117",inst="call 0x77f8b5df <ntdll!NtAcceptConnectPort>"},{address="0x77fa1447",func-name="ntdll!CsrAllocateCaptureBuffer",offset="122",inst="ret "}] (gdb)
<-data-disassemble -s 2012877896 -e 2012877899 -- 1> ^done,asm_insns=[{address="0x77fa1448",func-name="ntdll!RtlShutdownLpcServer",offset="0",inst="ret $0x4"}]
(gdb)
<-data-disassemble -s 2012877899 -e 2012877901 -- 1> ^done,asm_insns=[{address="0x77fa144b",func-name="ntdll!DbgUiConnectToDbg",offset="0",inst="int3

"},{address="0x77fa144c",func-name="ntdll!DbgUiConnectToDbg",offset="1",inst="ret "}]
(gdb)
<-data-disassemble -s 2012877901 -e 2012878079 -- 1> ^done,asm_insns=[{address="0x77fa144d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="0",inst="int3

"},{address="0x77fa144e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="1",inst="ret

"},{address="0x77fa144f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="2",inst="mov

0x4(%esp),%eax"},{address="0x77fa1453",func-name="ntdll!LdrAlternateResourcesEnabled",offset="6",inst="int3

"},{address="0x77fa1454",func-name="ntdll!LdrAlternateResourcesEnabled",offset="7",inst="ret

$0x4"},{address="0x77fa1457",func-name="ntdll!LdrAlternateResourcesEnabled",offset="10",inst="mov

-0x14(%ebp),%eax"},{address="0x77fa145a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="13",inst="mov

(%eax),%eax"},{address="0x77fa145c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="15",inst="mov

(%eax),%eax"},{address="0x77fa145e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="17",inst="mov

%eax,-0x280(%ebp)"},{address="0x77fa1464",func-name="ntdll!LdrAlternateResourcesEnabled",offset="23",inst="push

$0x1"},{address="0x77fa1466",func-name="ntdll!LdrAlternateResourcesEnabled",offset="25",inst="pop

%eax"},{address="0x77fa1467",func-name="ntdll!LdrAlternateResourcesEnabled",offset="26",inst="ret

"},{address="0x77fa1468",func-name="ntdll!LdrAlternateResourcesEnabled",offset="27",inst="mov

-0x18(%ebp),%esp"},{address="0x77fa146b",func-name="ntdll!LdrAlternateResourcesEnabled",offset="30",inst="mov

-0x280(%ebp),%esi"},{address="0x77fa1471",func-name="ntdll!LdrAlternateResourcesEnabled",offset="36",inst="orl

$0xffffffff,-0x4(%ebp)"},{address="0x77fa1475",func-name="ntdll!LdrAlternateResourcesEnabled",offset="40",inst="xor

%ebx,%ebx"},{address="0x77fa1477",func-name="ntdll!LdrAlternateResourcesEnabled",offset="42",inst="jmp 0x77f98c7e
<ntdll!DbgUiContinue+118>"},{address="0x77fa147c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="47",inst="mov

%fs:0x18,%eax"},{address="0x77fa1482",func-name="ntdll!LdrAlternateResourcesEnabled",offset="53",inst="mov

%bl,0xf74(%eax)"},{address="0x77fa1488",func-name="ntdll!LdrAlternateResourcesEnabled",offset="59",inst="mov

%esi,%eax"},{address="0x77fa148a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="61",inst="jmp 0x77f98ce2
<ntdll!DbgUiContinue+218>"},{address="0x77fa148f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="66",inst="mov

$0x200,%eax"},{address="0x77fa1494",func-name="ntdll!LdrAlternateResourcesEnabled",offset="71",inst="movb

$0xa,-0x19(%ebp)"},{address="0x77fa1498",func-name="ntdll!LdrAlternateResourcesEnabled",offset="75",inst="jmp 0x77f98c95
<ntdll!DbgUiContinue+141>"},{address="0x77fa149d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="80",inst="movl

$0x40010006,-0x27c(%ebp)"},{address="0x77fa14a7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="90",inst="mov

%ebx,-0x274(%ebp)"},{address="0x77fa14ad",func-name="ntdll!LdrAlternateResourcesEnabled",offset="96",inst="movl

$0x2,-0x26c(%ebp)"},{address="0x77fa14b7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="106",inst="mov

%ebx,-0x278(%ebp)"},{address="0x77fa14bd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="112",inst="movzwl -0x228(%ebp),%eax"},{address="0x77fa14c4",func-name="ntdll!LdrAlternateResourcesEnabled",offset="119",inst="inc

%eax"},{address="0x77fa14c5",func-name="ntdll!LdrAlternateResourcesEnabled",offset="120",inst="mov

%eax,-0x268(%ebp)"},{address="0x77fa14cb",func-name="ntdll!LdrAlternateResourcesEnabled",offset="126",inst="mov

-0x224(%ebp),%eax"},{address="0x77fa14d1",func-name="ntdll!LdrAlternateResourcesEnabled",offset="132",inst="mov

%eax,-0x264(%ebp)"},{address="0x77fa14d7",func-name="ntdll!LdrAlternateResourcesEnabled",offset="138",inst="lea

-0x27c(%ebp),%eax"},{address="0x77fa14dd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="144",inst="push

%eax"},{address="0x77fa14de",func-name="ntdll!LdrAlternateResourcesEnabled",offset="145",inst="call 0x77fb16c8
<ntdll!RtlReAllocateHeap>"},{address="0x77fa14e3",func-name="ntdll!LdrAlternateResourcesEnabled",offset="150",inst="mov

%fs:0x18,%eax"},{address="0x77fa14e9",func-name="ntdll!LdrAlternateResourcesEnabled",offset="156",inst="mov

%bl,0xf74(%eax)"},{address="0x77fa14ef",func-name="ntdll!LdrAlternateResourcesEnabled",offset="162",inst="xor

%eax,%eax"},{address="0x77fa14f1",func-name="ntdll!LdrAlternateResourcesEnabled",offset="164",inst="jmp 0x77f98ce2
<ntdll!DbgUiContinue+218>"},{address="0x77fa14f6",func-name="ntdll!LdrAlternateResourcesEnabled",offset="169",inst="push

$0x1"},{address="0x77fa14f8",func-name="ntdll!LdrAlternateResourcesEnabled",offset="171",inst="call 0x77fa144f
<ntdll!LdrAlternateResourcesEnabled+2>"},{address="0x77fa14fd",func-name="ntdll!LdrAlternateResourcesEnabled",offset="176",inst="xor %ecx,%ecx"}]
(gdb)
<-data-read-memory 2012877773 x 1 1 306>
^done,addr="0x77fa13cd",nr-bytes="306",total-bytes="306",next-row="0x77fa14ff",prev-row="0x77fa129b",next-page="0x77fa14ff",prev-page="0x77fa129b",memory=[{addr="0x77fa13cd",data=["0x55","0x8b","0xec","0x6a","0xff","0x68","0x30","0x91","0xf9","0x77","0x68","0x91","0x81","0xf9","0x77","0x64","0xa1","0x00","0x00","0x00","0x00","0x50","0x64","0x89","0x25","0x00","0x00","0x00","0x00","0x51","0x51","0x83","0xec","0x18","0x53","0x56","0x57","0x83","0x65","0xdc","0x00","0x83","0x65","0xfc","0x00","0x68","0xb2","0x13","0xfa","0x77","0x8d","0x45","0xdc","0x50","0xe8","0x0e","0xfe","0xff","0xff","0x89","0x45","0xe4","0xff","0x75","0x14","0xff","0x75","0x10","0xff","0x75","0x0c","0xff","0x75","0x08","0xff","0xd0","0x89","0x45","0xd8","0x83","0x4d","0xfc","0xff","0xe8","0x14","0x00","0x00","0x00","0x8b","0x45","0xd8","0x8b","0x4d","0xf0","0x64","0x89","0x0d","0x00","0x00","0x00","0x00","0x5f","0x5e","0x5b","0xc9","0xc2","0x10","0x00","0x83","0x7d","0xdc","0x00","0x74","0x08","0xff","0x75","0xdc", "0xe8","0x98","0xa1","0xfe","0xff","0xc3","0xc2","0x04","0x00","0xcc","0xc3","0xcc","0xc3","0x8b","0x44","0x24","0x04","0xcc","0xc2","0x04","0x00","0x8b","0x45","0xec","0x8b","0x00","0x8b","0x00","0x89","0x85","0x80","0xfd","0xff","0xff","0x6a","0x01","0x58","0xc3","0x8b","0x65","0xe8","0x8b","0xb5","0x80","0xfd","0xff","0xff","0x83","0x4d","0xfc","0xff","0x33","0xdb","0xe9","0x02","0x78","0xff","0xff","0x64","0xa1","0x18","0x00","0x00","0x00","0x88","0x98","0x74","0x0f","0x00","0x00","0x8b","0xc6","0xe9","0x53","0x78","0xff","0xff","0xb8","0x00","0x02","0x00","0x00","0xc6","0x45","0xe7","0x0a","0xe9","0xf8","0x77","0xff","0xff","0xc7","0x85","0x84","0xfd","0xff","0xff","0x06","0x00","0x01","0x40","0x89","0x9d","0x8c","0xfd","0xff","0xff","0xc7","0x85","0x94","0xfd","0xff","0xff","0x02","0x00","0x00","0x00","0x89","0x9d","0x88","0xfd","0xff","0xff","0x0f","0xb7","0x85","0xd8","0xfd","0xff","0xff","0x40","0x89","0x85","0x98","0xfd","0xff","0xff","0x8b","0x85","0xdc","0xfd","0xff","0xff ","0x89","0x85","0x9c","0xfd","0xff","0xff","0x8d","0x85","0x84","0xfd","0xff","0xff","0x50","0xe8","0xe5","0x01","0x01","0x00","0x64","0xa1","0x18","0x00","0x00","0x00","0x88","0x98","0x74","0x0f","0x00","0x00","0x33","0xc0","0xe9","0xec","0x77","0xff","0xff","0x6a","0x01","0xe8","0x52","0xff","0xff","0xff","0x33","0xc9"]}] (gdb)
<-stack-info-depth 30>
^done,depth="4"
(gdb)
<-symbol-list-lines
c:\Programming\m2_system\Source\browser\cgiLoginMain.pas> ^done,lines=[{pc="0x00435d20",line="68"},{pc="0x00435d2c",line="68"},{pc="0x00435d66",line="69"},{pc="0x00435d72",line="70"},{pc="0x00435dfb",line="72"},{pc="0x00435e27",line="75"},{pc="0x00435e39",line="76"},{pc="0x00435e57",line="77"},{pc="0x00435e6d",line="78"},{pc="0x00435eca",line="79"},{pc="0x00435f00",line="80"},{pc="0x00435f3d",line="82"},{pc="0x00435f45",line="83"},{pc="0x00435f61",line="85"},{pc="0x00435fa7",line="85"},{pc="0x00435fb0",line="95"},{pc="0x00435fc8",line="95"},{pc="0x00435ffe",line="96"},{pc="0x0043600a",line="97"},{pc="0x0043600e",line="98"},{pc="0x00436020",line="99"},{pc="0x00436038",line="100"},{pc="0x00436045",line="101"},{pc="0x00436055",line="103"},{pc="0x0043606c",line="105"},{pc="0x00436078",line="106"},{pc="0x00436093",line="108"},{pc="0x004360a7",line="109"},{pc="0x004360bb",line="111"},{pc="0x004360ce",line="113"},{pc="0x004360e1",line="118"},{pc="0x004360ea",line="120"},{pc="0x00436105",line="127"},{pc="0x00436111",line="128"},{pc="0x00436127",line ="129"},{pc="0x0043613b",line="131"},{pc="0x0043614e",line="133"},{pc="0x00436161",line="138"},{pc="0x0043616a",line="140"},{pc="0x0043617b",line="145"},{pc="0x00436187",line="146"},{pc="0x0043619b",line="147"},{pc="0x004361b7",line="148"},{pc="0x004361c3",line="149"},{pc="0x004361dd",line="150"},{pc="0x004361f6",line="157"},{pc="0x00436235",line="155"},{pc="0x0043624f",line="156"},{pc="0x00436251",line="157"},{pc="0x00436292",line="159"},{pc="0x0043629e",line="160"},{pc="0x004362c2",line="162"},{pc="0x004362e3",line="163"},{pc="0x004362eb",line="165"},{pc="0x004362f7",line="167"},{pc="0x00436309",line="169"},{pc="0x00436327",line="170"},{pc="0x0043633a",line="172"},{pc="0x0043633e",line="173"},{pc="0x0043635a",line="178"},{pc="0x00436392",line="179"},{pc="0x004363b1",line="184"},{pc="0x004363bf",line="185"},{pc="0x004363dc",line="187"},{pc="0x004363ed",line="188"},{pc="0x0043642a",line="188"},{pc="0x00436440",line="195"},{pc="0x0043644f",line="195"},{pc="0x0043647b",line="196"},{pc=" 0x00436487",line="197"},{pc="0x0043648f",line="203"},{pc="0x0043649a",line="204"},{pc="0x004364a6",line="205"},{pc="0x004364e1",line="206"},{pc="0x004364fd",line="207"},{pc="0x00436525",line="207"},{pc="0x00436530",line="218"},{pc="0x0043653c",line="218"},{pc="0x00436568",line="219"},{pc="0x00436574",line="220"},{pc="0x004365b5",line="222"},{pc="0x004365bf",line="223"},{pc="0x004365c9",line="224"},{pc="0x00436616",line="225"},{pc="0x00436620",line="226"},{pc="0x0043662a",line="227"},{pc="0x00436634",line="228"},{pc="0x0043663e",line="229"},{pc="0x004366bb",line="230"},{pc="0x004366e3",line="230"},{pc="0x004366f0",line="233"},{pc="0x004366f9",line="234"},{pc="0x00436705",line="235"},{pc="0x0043670f",line="236"},{pc="0x00436719",line="237"},{pc="0x00436723",line="238"},{pc="0x00436730",line="241"},{pc="0x0043673c",line="241"},{pc="0x00436768",line="242"},{pc="0x00436774",line="243"},{pc="0x0043677e",line="245"},{pc="0x00436788",line="246"},{pc="0x00436792",line="247"},{pc="0x0043679c",l ine="248"},{pc="0x004367f5",line="249"},{pc="0x004367ff",line="250"},{pc="0x00436809",line="252"},{pc="0x00436813",line="253"},{pc="0x0043681d",line="254"},{pc="0x00436827",line="255"},{pc="0x00436831",line="256"},{pc="0x0043683b",line="257"},{pc="0x00436845",line="258"},{pc="0x0043684f",line="259"},{pc="0x00436859",line="260"},{pc="0x00436863",line="261"},{pc="0x0043686d",line="262"},{pc="0x00436877",line="263"},{pc="0x00436881",line="265"},{pc="0x0043688b",line="266"},{pc="0x00436895",line="267"},{pc="0x0043689f",line="268"},{pc="0x004368a9",line="269"},{pc="0x004368b3",line="270"},{pc="0x004368bd",line="271"},{pc="0x004368c7",line="272"},{pc="0x004368d1",line="273"},{pc="0x004368db",line="274"},{pc="0x004368e5",line="275"},{pc="0x004368ef",line="276"},{pc="0x004368f9",line="277"},{pc="0x00436903",line="279"},{pc="0x0043690d",line="280"},{pc="0x00436917",line="281"},{pc="0x00436921",line="282"},{pc="0x0043692b",line="283"},{pc="0x00436935",line="285"},{pc="0x0043693f",line="286"},{p c="0x00436949",line="287"},{pc="0x00436953",line="288"},{pc="0x00436992",line="289"},{pc="0x0043699c",line="290"},{pc="0x004369a6",line="291"},{pc="0x004369b0",line="292"},{pc="0x004369ba",line="293"},{pc="0x004369c4",line="294"},{pc="0x004369ce",line="295"},{pc="0x004369d8",line="296"},{pc="0x004369e2",line="297"},{pc="0x004369ec",line="298"},{pc="0x004369f6",line="300"},{pc="0x00436a00",line="301"},{pc="0x00436a0a",line="302"},{pc="0x00436a14",line="303"},{pc="0x00436a1e",line="304"},{pc="0x00436a28",line="305"},{pc="0x00436a8c",line="306"},{pc="0x00436a96",line="307"},{pc="0x00436ae2",line="308"},{pc="0x00436aec",line="309"},{pc="0x00436af6",line="310"},{pc="0x00436b00",line="311"},{pc="0x00436b43",line="312"},{pc="0x00436b4d",line="313"},{pc="0x00436b57",line="314"},{pc="0x00436b61",line="315"},{pc="0x00436b6b",line="316"},{pc="0x00436b75",line="317"},{pc="0x00436b7f",line="318"},{pc="0x00436b89",line="319"},{pc="0x00436b93",line="320"},{pc="0x00436b9d",line="321"},{pc="0x00436ba7 ",line="322"},{pc="0x00436bb1",line="323"},{pc="0x00436bbb",line="324"},{pc="0x00436c1f",line="325"},{pc="0x00436c29",line="326"},{pc="0x00436c33",line="327"},{pc="0x00436c3d",line="328"},{pc="0x00436c47",line="329"},{pc="0x00436c51",line="331"},{pc="0x00436c68",line="333"},{pc="0x00436c72",line="334"},{pc="0x00436c7c",line="335"},{pc="0x00436c86",line="336"},{pc="0x00436c90",line="337"},{pc="0x00436c9a",line="338"},{pc="0x00436cfe",line="339"},{pc="0x00436d08",line="340"},{pc="0x00436d54",line="341"},{pc="0x00436d5e",line="342"},{pc="0x00436d68",line="343"},{pc="0x00436d72",line="344"},{pc="0x00436db5",line="345"},{pc="0x00436dbf",line="346"},{pc="0x00436dc9",line="347"},{pc="0x00436dd3",line="348"},{pc="0x00436ddd",line="349"},{pc="0x00436de7",line="350"},{pc="0x00436df1",line="351"},{pc="0x00436dfb",line="352"},{pc="0x00436e05",line="353"},{pc="0x00436e0f",line="354"},{pc="0x00436e19",line="355"},{pc="0x00436e23",line="356"},{pc="0x00436e2d",line="357"},{pc="0x00436e37",line="358"} ,{pc="0x00436e41",line="359"},{pc="0x00436e4b",line="360"},{pc="0x00436e55",line="361"},{pc="0x00436eb9",line="362"},{pc="0x00436ec3",line="363"},{pc="0x00436ecd",line="364"},{pc="0x00436ed7",line="365"},{pc="0x00436ee1",line="366"},{pc="0x00436eeb",line="375"},{pc="0x00436ef5",line="376"},{pc="0x00436f04",line="377"},{pc="0x00436f2c",line="377"},{pc="0x00436f40",line="382"},{pc="0x00436f58",line="382"},{pc="0x00436f99",line="383"},{pc="0x00436fa5",line="384"},{pc="0x00436fe4",line="387"},{pc="0x00437019",line="388"},{pc="0x00437028",line="390"},{pc="0x00437043",line="392"},{pc="0x00437061",line="393"},{pc="0x004370ad",line="396"},{pc="0x004370ca",line="399"},{pc="0x004370d4",line="400"},{pc="0x004370de",line="401"},{pc="0x0043711d",line="403"},{pc="0x0043713b",line="405"},{pc="0x00437145",line="406"},{pc="0x00437184",line="407"},{pc="0x0043718e",line="408"},{pc="0x004371dd",line="410"},{pc="0x0043720b",line="412"},{pc="0x0043725f",line="414"},{pc="0x00437301",line="415"},{pc="0x00437 31d",line="416"},{pc="0x00437331",line="420"},{pc="0x004373e4",line="424"},{pc="0x004373ee",line="425"},{pc="0x004373fa",line="429"},{pc="0x00437409",line="432"},{pc="0x00437420",line="434"},{pc="0x00437438",line="436"},{pc="0x0043745f",line="438"},{pc="0x00437469",line="439"},{pc="0x004374d0",line="440"},{pc="0x0043754f",line="442"},{pc="0x00437566",line="444"},{pc="0x004375cd",line="445"},{pc="0x0043764c",line="448"},{pc="0x00437664",line="454"},{pc="0x0043767e",line="456"},{pc="0x00437688",line="457"},{pc="0x004376c7",line="458"},{pc="0x004376d1",line="460"},{pc="0x004376e5",line="462"},{pc="0x00437724",line="463"},{pc="0x00437730",line="466"},{pc="0x0043773a",line="468"},{pc="0x00437744",line="472"},{pc="0x0043774e",line="473"},{pc="0x00437758",line="475"},{pc="0x0043776c",line="476"},{pc="0x004377ad",line="478"},{pc="0x004377ec",line="480"},{pc="0x0043782b",line="481"},{pc="0x0043783a",line="482"},{pc="0x0043788f",line="482"},{pc="0x004378a0",line="493"},{pc="0x004378b2",line="49 3"},{pc="0x004378f3",line="494"},{pc="0x004378ff",line="495"},{pc="0x00437903",line="496"},{pc="0x00437917",line="497"},{pc="0x00437924",line="500"},{pc="0x0043793b",line="502"},{pc="0x0043794b",line="503"},{pc="0x00437967",line="505"},{pc="0x0043797f",line="506"},{pc="0x004379c4",line="508"},{pc="0x004379df",line="510"},{pc="0x004379f3",line="512"},{pc="0x00437a02",line="513"},{pc="0x00437a08",line="517"},{pc="0x00437a21",line="519"},{pc="0x00437a3d",line="520"},{pc="0x00437a59",line="521"},{pc="0x00437a73",line="526"},{pc="0x00437a96",line="528"},{pc="0x00437aaa",line="529"},{pc="0x00437ac6",line="531"},{pc="0x00437ae5",line="536"},{pc="0x00437af9",line="538"},{pc="0x00437b02",line="539"},{pc="0x00437b08",line="541"},{pc="0x00437b24",line="545"},{pc="0x00437b3a",line="546"},{pc="0x00437b50",line="547"},{pc="0x00437b61",line="551"},{pc="0x00437b6c",line="552"},{pc="0x00437bbf",line="552"},{pc="0x00437bd0",line="555"},{pc="0x00437bdf",line="556"},{pc="0x00437beb",line="557"},{pc="0x00 437c07",line="559"},{pc="0x00437c0f",line="560"},{pc="0x00437c11",line="563"},{pc="0x00437c23",line="564"},{pc="0x00437c3f",line="565"},{pc="0x00437c51",line="566"},{pc="0x00437c6b",line="567"},{pc="0x00437c70",line="572"},{pc="0x00437c8e",line="572"},{pc="0x00437cb3",line="573"},{pc="0x00437cbf",line="574"},{pc="0x00437cdd",line="575"},{pc="0x00437cf1",line="577"},{pc="0x00437d0c",line="578"},{pc="0x00437d66",line="580"},{pc="0x00437d9b",line="582"},{pc="0x00437daa",line="584"},{pc="0x00437dd7",line="586"},{pc="0x00437e28",line="588"},{pc="0x00437e44",line="589"},{pc="0x00437e53",line="590"},{pc="0x00437e5e",line="594"},{pc="0x00437e89",line="596"},{pc="0x00437eb7",line="598"},{pc="0x00437ed2",line="598"},{pc="0x00437ef0",line="603"},{pc="0x00437eff",line="603"},{pc="0x00437f2b",line="604"},{pc="0x00437f37",line="605"},{pc="0x00437f67",line="607"},{pc="0x00437f83",line="608"},{pc="0x00437ff8",line="610"},{pc="0x00438069",line="612"},{pc="0x00438091",line="612"},{pc="0x004380a0",line= "619"},{pc="0x004380b8",line="619"},{pc="0x00438102",line="620"},{pc="0x00438120",line="621"},{pc="0x00438132",line="636"},{pc="0x0043813e",line="639"},{pc="0x00438153",line="641"},{pc="0x0043815a",line="642"},{pc="0x00438166",line="646"},{pc="0x0043816d",line="648"},{pc="0x00438182",line="649"},{pc="0x0043818e",line="650"},{pc="0x00438196",line="651"},{pc="0x004381a3",line="653"},{pc="0x004381af",line="656"},{pc="0x004381c9",line="657"},{pc="0x004381d3",line="658"},{pc="0x004381e6",line="660"},{pc="0x004381f2",line="661"},{pc="0x0043820f",line="662"},{pc="0x00438248",line="668"},{pc="0x0043828a",line="667"},{pc="0x0043828c",line="668"},{pc="0x004382cd",line="670"},{pc="0x004382d9",line="675"},{pc="0x004382e2",line="677"},{pc="0x004382ee",line="678"},{pc="0x004382f6",line="679"},{pc="0x00438302",line="680"},{pc="0x0043830a",line="681"},{pc="0x00438316",line="682"},{pc="0x0043831e",line="683"},{pc="0x0043832a",line="684"},{pc="0x00438332",line="685"},{pc="0x0043833e",line="686"},{pc="0 x0043834b",line="690"},{pc="0x00438357",line="692"},{pc="0x00438368",line="694"},{pc="0x00438379",line="696"},{pc="0x0043838a",line="698"},{pc="0x00438395",line="704"},{pc="0x004383af",line="704"},{pc="0x004383d7",line="704"},{pc="0x004383e5",line="704"},{pc="0x004383ed",line="704"},{pc="0x004383f5",line="704"},{pc="0x00438432",line="704"},{pc="0x00438472",line="706"},{pc="0x0043847e",line="710"},{pc="0x00438488",line="715"},{pc="0x00438490",line="716"},{pc="0x00438498",line="717"},{pc="0x004384a0",line="718"},{pc="0x004384a8",line="719"},{pc="0x004384b0",line="720"},{pc="0x004384ba",line="725"},{pc="0x004384c2",line="726"},{pc="0x004384ca",line="727"},{pc="0x004384d2",line="728"},{pc="0x004384da",line="729"},{pc="0x004384e2",line="730"},{pc="0x004384ec",line="734"},{pc="0x004384fb",line="740"},{pc="0x00438507",line="742"},{pc="0x00438515",line="743"},{pc="0x00438523",line="744"},{pc="0x0043854c",line="746"},{pc="0x004385b3",line="746"}] (gdb)
<info line "c:\Programming\m2_system\Source\browser\cgiLoginMain.pas":648> &"info line
\"c:\\Programming\\m2_system\\Source\\browser\\cgiLoginMain.pas\":648\n" ~"Line 648 of \"cgiLoginMain.pas\" starts at address 0x43816d <TCGILOGIN__RUN+205> and ends at 0x438182 <TCGILOGIN__RUN+226>.\n" ^done
(gdb)
<-break-insert -f cgiLoginMain.pas:648>
^done,bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr="0x0043816d",func="TCGILOGIN__RUN",file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="648",times="0",original-location="cgiLoginMain.pas:648"} (gdb)
<-break-enable 10>
^done
(gdb)
<-break-insert -f cgiLoginMain.pas:642>
^done,bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr="0x0043815a",func="TCGILOGIN__RUN",file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="642",times="0",original-location="cgiLoginMain.pas:642"} (gdb)
<-break-enable 11>
^done
(gdb)
<-thread-info>
^done,threads=[{id="3",target-id="Thread
484.0x640",frame={level="0",addr="0x77fa144c",func="ntdll!DbgUiConnectToDbg",args=[],from="C:\\WINNT\\system32\\NTDLL.DLL"},state="stopped"},{id="2",target-id="Thread 484.0x664",frame={level="0",addr="0x77f8915e",func="ntdll!ZwDelayExecution",args=[],from="C:\\WINNT\\system32\\NTDLL.DLL"},state="stopped"},{id="1",target-id="Thread 484.0x3f0",frame={level="0",addr="0x0043815c",func="TCGILOGIN__RUN",args=[{name="this",value="0x19da268"}],file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="642"},state="stopped"}],current-thread-id="3" (gdb)
<-stack-info-depth 11>
^done,depth="4"
(gdb)
<-stack-list-arguments 1 0 3>
^done,stack-args=[frame={level="0",args=[]},frame={level="1",args=[]},frame={level="2",args=[]},frame={level="3",args=[]}] (gdb)
<-stack-list-frames 0 3>
^done,stack=[frame={level="0",addr="0x77fa144c",func="ntdll!DbgUiConnectToDbg",from="C:\\WINNT\\system32\\NTDLL.DLL"},frame={level="1",addr="0x7c50dfdb",func="KERNEL32!DebugActiveProcess",from="C:\\WINNT\\system32\\KERNEL32.DLL"},frame={level="2",addr="0x7c4e987c",func="SetThreadExecutionState",from="C:\\WINNT\\system32\\KERNEL32.DLL"},frame={level="3",addr="0x00000000",func="??"}] (gdb)
<-stack-list-arguments 1 0 0>
^done,stack-args=[frame={level="0",args=[]}]
(gdb)
<-stack-select-frame 0>
^done
(gdb)
<-stack-list-locals 1>
^done,locals=[]
(gdb)
<ptype lDebug>
&"ptype lDebug\n"
&"No symbol \"lDebug\" in current context.\n"
^error,msg="No symbol \"lDebug\" in current context." (gdb)
<-data-evaluate-expression parentfp>
^error,msg="No symbol \"parentfp\" in current context." (gdb)
<-gdb-set var lDebug := 0>
^error,msg="No symbol \"lDebug\" in current context." (gdb)
<-break-delete 11>
^done
(gdb)
<-break-insert -f cgiLoginMain.pas:642>
^done,bkpt={number="12",type="breakpoint",disp="keep",enabled="y",addr="0x0043815a",func="TCGILOGIN__RUN",file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="642",times="0",original-location="cgiLoginMain.pas:642"} (gdb)
<-break-enable 12>
^done
(gdb)
<-exec-continue>
^running
*running,thread-id="all"
(gdb)
=thread-exited,id="3",group-id="i1"

----8<-------------8<-------------8<-------------8<-------------8<----

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
On 2013-09-18 18:30, Martin wrote: > If you use an integer var, you can modify it from the IDE. > Do not modify managed types OK, I got the latest Lazarus from Trunk and compiled it with FPC 2.6.2 and using GDB 7.2 under Win2000 (a VM). I enter the PID and click OK. The Lazarus IDE shows "Debugging..." in the title bar, but I can't do anything else.

You do have to run to a breakpoin, see below. Did you?

I can't evaluate local variables, cannot modify the local lDebug (integer) variable. The login.cgi application is also compiled with debug information - contrary to what the GDB log output seems to say.

Actually it is there.

Not sure if I'm doing wrong. I'll try with GDB command line and MSEide under Windows now.

Strange. It has found the debug info:

<info file> ~"Symbols from \"c:\\programming\\m2_system\\Bin\\i386-win32\\html\\mmaths\\login.cgi\".\n"

and

Show quoted text 9 lines
<info line "c:\Programming\m2_system\Source\browser\cgiLoginMain.pas":648> \"c:\\Programming\\m2_system\\Source\\browser\\cgiLoginMain.pas\":648\n" ~"Line 648 of \"cgiLoginMain.pas\" starts at address 0x43816d <TCGILOGIN__RUN+205> and ends at 0x438182 <TCGILOGIN__RUN+226>.\n" ^done (gdb) <-break-insert -f cgiLoginMain.pas:648> ^done,bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr="0x0043816d",func="TCGILOGIN__RUN",file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="648",times="0",original-location="cgiLoginMain.pas:648"} (gdb)

So I would expect, that when you hit run (attach will pause the process, and keep it paused. but it may be somewhere in the kernel...) you would reach one of the breakpoints...

Actually looking at the threads, if you switch to 1, then you need net run, but should see your app.

Show quoted text 10 lines
<-thread-info> ^done,threads=[ {id="3",...,frame={...,func="ntdll!DbgUiConnectToDbg",...,state="stopped"}, {id="2",...,frame={...,func="ntdll!ZwDelayExecution",...,state="stopped"}, {id="1",...,frame={level="0",...,func="TCGILOGIN__RUN", args=[{name="this",value="0x19da268"}],file="cgiLoginMain.pas",fullname="c:/Programming/m2_system/Source/browser/cgiLoginMain.pas",line="642"},state="stopped"}], current-thread-id="3" (gdb)

and then run (F9)

Show quoted text 5 lines
<-exec-continue> ^running *running,thread-id="all" (gdb) =thread-exited,id="3",group-id="i1"

Looks normal too: DbgUiConnectToDbg , is created by windows, when the debugger pauses the app. So it ends on continue. [1]

Your main thread still runs.

[1] Just realising, the attach module does not currently "fix" this extra thread. It should probably automatically select the main thread.

Reply by email

Michael Schnell
to Graeme Geldenhuys: OK, I got the latest Lazarus from Trunk and compiled it with FPC 2.6.2 and using GDB 7.2…
Graeme Geldenhuys wrote
OK, I got the latest Lazarus from Trunk and compiled it with FPC 2.6.2 and using GDB 7.2 under Win2000 (a VM).

Good man.

Doing this I just got (on Linux):

Compiling debugmanager.pas
debugmanager.pas(63,3) Error: Duplicate identifier "GDBMISERVERDEBUGGER"
debugmanager.pas(63,3) Error: Duplicate identifier "GDBMIServerDebugger"

Reply by email

Graeme Geldenhuys
to Martin: You do have to run to a breakpoin, see below. Did you? Actually it is there. Strange. It…
Martin wrote
[1] Just realising, the attach module does not currently "fix" this extra thread. It should probably automatically select the main thread.

OK, selecting thread 1 does help a bit, and after some trial and error I get to the breakpoint of the infinite while look.

I can't evaluate or set the local integer variable [that controls the while loop] though.

Can Lazarus IDE allow me to set the EIP register address? I can view it, and I can change the 'eip' name in the Register window (WTF???), but I can't see how to set the EIP register to another value. What I am trying is to jump over the while loop, seeing that I can't change the local integer variable.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 16 lines
On 2013-09-19 14:05, Martin wrote: > [1] Just realising, the attach module does not currently "fix" this > extra thread. It should probably automatically select the main thread. OK, selecting thread 1 does help a bit, and after some trial and error I get to the breakpoint of the infinite while look. I can't evaluate or set the local integer variable [that controls the while loop] though. Can Lazarus IDE allow me to set the EIP register address? I can view it, and I can change the 'eip' name in the Register window (WTF???), but I can't see how to set the EIP register to another value. What I am trying is to jump over the while loop, seeing that I can't change the local integer variable.

Try the evaluate/modify window: (crtl F7)

You can enter $eip and then set a new value. (return in the "new value" edit)

(Though shamefully admitted, the register window does not show the new value / but it will be set)

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys: As the subject line says, can Lazarus IDE's debugger attach to a already running process?…

Just a follow-up on this thread.

The bad news
------------
No matter what I tried, under Windows, Linux or FreeBSD... I couldn't successfully debug a CGI application that uses multiple threads (I have threads that do "log to file" etc). I tried the infinite loop debug method - as I used to do with Delphi. But Lazarus's integrated debugger just doesn't want to play ball. The multiple threads just screws up the whole debugging, and I can't get it to stay on Thread 1 (the main thread). Thus no stepping through the main thread's code. :-(

The good news
-------------
I found another solution. Insert a Sleep(20000) call in whichever web module I want to debug. 20 seconds gives me enough time to find the CGI process id, and tell Lazarus IDE to attach to that process for debugging.

Once Lazarus IDE attaches to the process, it stops the CGI temporarily. I then set a breakpoint for whatever I want to debug. Then press the Play button to continue running the CGI app. The breakpoint will hit, and I can successfully step through my running CGI app.

The not-so-good news
--------------------
One (kinda big) issue though: I cannot query ANY variables to see their values. This is a bit of a pain, but at least I can step through my CGI app, and often if..then etc statements can be followed, so I can guess the values. I can also follow the execution flow of my application - which is already very useful.

@Martin
Any ideas why using my latest debug method, for CGI apps, doesn't allow me to query variable values? I'm running Lazarus Trunk from about 5 days ago. Windows 2000, using FPC 2.6.2 and GDB 7.2. I also tried GDB 7.4 and that made no difference either.

Regards,
Graeme

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
Just a follow-up on this thread. The bad news ------------ No matter what I tried, under Windows, Linux or FreeBSD... I couldn't successfully debug a CGI application that uses multiple threads (I have threads that do "log to file" etc).

On windows afaik there is not much that can be done.

On linux, you can try iirc set scheduler locking (it can be given al command line arg to gdb, so it can be set in bthe global debug options. But I have not used it myself, ...

Show quoted text 15 lines
The not-so-good news -------------------- One (kinda big) issue though: I cannot query ANY variables to see their values. This is a bit of a pain, but at least I can step through my CGI app, and often if..then etc statements can be followed, so I can guess the values. I can also follow the execution flow of my application - which is already very useful. @Martin Any ideas why using my latest debug method, for CGI apps, doesn't allow me to query variable values? I'm running Lazarus Trunk from about 5 days ago. Windows 2000, using FPC 2.6.2 and GDB 7.2. I also tried GDB 7.4 and that made no difference either.

Can you send me a log for this? You use debug info in the exe, not external?

Though if it can find the line info, then it should also have the info about variables.
What does the thread window show?

If you start the cgi from within lazarus can you see any variables? (as far as it gets, before it fails due to missing environment.)

Reply by email

Graeme Geldenhuys
to Martin
Martin wrote
Can you send me a log for this? You use debug info in the exe, not external?

Yes, debug and line info information is enabled and debug information is inside the executable (not external).

See attached screenshot and archive containing the GDB debug output. I tried to see the values of 4 variables before I terminated the CGI app.

Though if it can find the line info, then it should also have the info about variables. What does the thread window show?

As I said, the breakpoint after the Sleep() call gets trigger. At that point I can step through the code using Lazarus, but I can't query the values of any variables (local or not).

If you start the cgi from within lazarus can you see any variables? (as far as it gets, before it fails due to missing environment.)

Yes I can.

Regards,
Graeme

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-1.png
Type: image/png
Size: 63034 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130927/2e7a4279/attachment-0001.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: dgb-log.zip
Type: application/zip
Size: 8241 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130927/2e7a4279/attachment-0001.zip>

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
On 27/09/13 19:33, Martin wrote: > Can you send me a log for this? You use debug info in the exe, not > external? Yes, debug and line info information is enabled and debug information is inside the executable (not external). See attached screenshot and archive containing the GDB debug output. I tried to see the values of 4 variables before I terminated the CGI app.

Very strange. Some values are clearly there. Open the "Locals" window.

^done,stack-args=[frame={level="0",args=[{name="AREQUEST",value="0x1af38d8"},{name="ARESPONSE",value="0x1a8f0e8"},{name="AHANDLED",value="true"}, ^done,locals=[{name="AREQUEST",value="0x1af38d8"},{name="ARESPONSE",value="0x1a8f0e8"},{name="SESSIONOID",value="0x0"},{name="LURL",value="0x0"}]

Of course from the log, I can not tell, if they are correct. And they are not in the same quality as watches.
Yet GDB refuses to give the "ptype" info.

1) Is that with Dwarf, or Stabs? Did you try changing?

2) In gdbmidebugger

line 5090
function TGDBMIDebuggerCommandAttach.DoExecute: Boolean;
line 5123
   // Attach
   if not ExecuteCommand('attach %s', [FProcessID], R) then
...
line 5145
   // Get PID
   NewPID := 0;
Insert after this
   ExecuteCommand('-gdb-set language pascal', [cfCheckError]);

This is currently done before attach. I dont think it makes a difference, but I also do not think gdb cares much what I think.

And if it is, it would explain. The values by GDB, are all uppercase. The value for the hint is not. If gdb thinks it should be case sensitive....

3)
Try (in the watch window) to display a value, using all uppercase.

Important, the value must not have been tried before. the iDE uses a cache (cleared on every step (F8))

4)
If all else fails, a crude (maybe) workaround
Compile with DBG_WITH_GDB_WATCHES defined

Then in the watches window, you can enter

p SessionOid

or

x foo

in general > gdb command (but do not issue a "run, or step, that will loose the debug session)

Again, this means basic gdb display, none of the IDE corrections to the display.

Reply by email

Martin
to Martin
Martin wrote 23 lines
2) In gdbmidebugger line 5090 function TGDBMIDebuggerCommandAttach.DoExecute: Boolean; line 5123 // Attach if not ExecuteCommand('attach %s', [FProcessID], R) then ... line 5145 // Get PID NewPID := 0; Insert after this ExecuteCommand('-gdb-set language pascal', [cfCheckError]); This is currently done before attach. I dont think it makes a difference, but I also do not think gdb cares much what I think. And if it is, it would explain. The values by GDB, are all uppercase. The value for the hint is not. If gdb thinks it should be case sensitive....

also add the following

|  ExecuteCommand('set case-sensitive off|', []);
and if you want, BEFORE and after
|  ExecuteCommand('show case-sensitive|', []);

so it can be inspected in the log
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130927/bddca63c/attachment.html>

Reply by email

Graeme Geldenhuys
to Martin: Very strange. Some values are clearly there. Open the "Locals" window.…
Martin wrote
ExecuteCommand('-gdb-set language pascal', [cfCheckError]);

Adding that AFTER the attach did the trick. I can now query variables and class instances. Many thanks.

BTW:
In Lazarus IDE my debug info type was set to Auto. So which type does it default to under Windows? STABS? I thought that was strange, as I thought STABS was obsolete, and DWARF was the way to go. Forcing the debug type to DWARF worked too. But it seems the trick was the extra line after the attach command.

Thanks for helping me out!

Regards,
Graeme

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote
On 27/09/13 21:12, Martin wrote: > ExecuteCommand('-gdb-set language pascal', [cfCheckError]); Adding that AFTER the attach did the trick. I can now query variables and class instances. Many thanks.

Well thanks for testing.

I changed this in svn.

BTW: In Lazarus IDE my debug info type was set to Auto. So which type does it default to under Windows?

Its up to fpc what -g chooses.

Reply by email

Michael Schnell
to Graeme Geldenhuys: Just a follow-up on this thread. The bad news ------------ No matter what I tried, under…
Graeme Geldenhuys wrote
The bad news ...

What we always do for complex (and free running) CGI applications is do a miniature CGI program that is perfectly "normal" and does implements nothing but a communication with a Daemon / Service that always runs and does the real work. With this construction debugging and "on site" maintenance of the application can be done with normal means.

Moreover any HTTP server can easily be adapted to and (if using TCP/IP for the said communication) the complex application can be installed in a different (virtual) machine (even using a different OS) than the HTTP-Server. (My colleagues do this using Delphi.)

-Michael

Reply by email