Skybuck Flying wrote:
----- Original Message ----- From: "Marc Weustink"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, August 22, 2007 10:07 AM
Subject: Re: [lazarus] HelloWorld: gdb.exe crashes
Skybuck Flying wrote:
Hello,
I downloaded and installed the latest Lazarus binary from source forge:
Lazarus-0.9.22-fpc-2.0.4-20070326-win32.exe
Apperently everything that is needed is inside this installer (?)
which is real nice.
I give it test by writing a little HelloWorld program and then during
debugging/running gdb.exe crashes, here is the program:
[snip]
My operating system is:
Windows XP Pro x64 Editition.
A debugger crashing doesn't seem normal to me... ?
I see you're running XP64... me too
Did you try gdb standalone running your app ? And dit it crash while
starting the app ?
I just tried it:
C:\Tools\Lazarus\mingw\bin>gdb.exe HelloWorld.exe
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as
"i686-pc-mingw32"..."C:\Tools\Lazarus\mingw\bin/Hello
World.exe": not in executable format: File format not recognized
How do you compile your exe ?
Which fpc do you use ?
The "File format not recognized" warning worries me. (btw, is your exe
located in "C:\Tools\Lazarus\mingw\bin" ?
When I try:
j:\junk\gdb
gdb is started.
Apperently the gdb folder/path is added to the operating system
environment variables.
I have also installed a free pascal cross compiler which compiles to X64.
Once you have a ppcx64 you dont need to use the crosscompiler anymore.
(I only did it once to create a boorstrap compiler for 64bit)
If you compile the compiler use "make cycle PP=ppcx64" and the 64 bit
Maybe that's causing problems ?
Maybe Lazarus is using the wrong gdb.exe ?
However I explicity set the search path to gdb.exe in Lazarus options...
You need to give the full path to the gdb exe. afaik, Lazarus doesn't
search the path when looking for gdb
But maybe that not helping who knows.
However this theory can go into the waste basket since the cross
compiler only has one executable.
Strange.
Apperently gdb can't read the file format ?
I'll try free pascal's gdb as well:
C:\Tools\Compilers\Free Pascal\2.0.4 Stable for Win32\bin\i386-win32>gdb
j:\junk
\HelloWorld.exe
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as
"i686-pc-cygwin"..."/cygdrive/j/junk/HelloWorld.exe":
not in executable format: File format not recognized
The gdb version delivered with FPC is a cygwin version. Cygwin versions
og GDB don't work with Lazarus. Don't use them in lazarus, it won't
work. (the reason, Lazarus needs real stdin/stdout and cygwin has
implemented its own "console")
Same problem, file format not recgonized.
Maybe I am not using the proper command line options ?
What commandline options ?
Surely Lazarus would use the proper command line options ?!?
I also tried downloading gnu debugger from it's website.
The wacky zip only contains sources codes which is a real bummer.
No binaries.
I shall download your patched binaries and see if they work with
lazarus, etc:
For me they work, that was the reason I created that patch
C:\Tools\GNU Debugger\gdb.6.6.patched>gdb.6.6.patched.exe
j:\junk\HelloWorld.exe
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
"j:\junk\HelloWorld.exe": not in executable format: File format not
recognized
(gdb)
Same problem, I'm probably not using the correct command line options.
Well one last final try with Lazarus ;):
MANY THANKS !
The Patched 6.6 GNU Debugger works with Lazarus, which puts a BIG SMILE
ON MY FACE =D
I must admit I am also running Delphi 2007 next to Lazarus... who
knows.. maybe that could create debugger conflicts.
gdb and the dephi debuger are completely different things, the cannot
conflict
However the first time I tried the GNU Debugger it did execute but after
execution it still kinda crashed...
But maybe this was because other flawed (?) gnu debuggers were still
running in memory.. or maybe it still has a problem... I don't know..
Always keep an eye on your taskmanager (or even better, use Sysinternals
ProcessView)
I termined all gnu debuggers in memory and test the patched 6.6 a couple
of times... and now each time it works ok.
I shall use it in the coming days to test Lazarus and Free Pascal some
more and if I ran into problems I'll let you guys know.
OK,
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives