Sign in Join

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

Mailing lists / lazarus / 2003-06

Win32 Interface

13 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt
to hjamilis: I want to know if somebody is still working on the Win32 interface for Lazarus. I was…
hjamilis wrote 13 lines
Hi, I want to know if somebody is still working on the Win32 interface for Lazarus. I was following the lazarus mailing list for a long time, and I think I could help on the Win32 interface. I also beleve, once the Win32 interface works many developers will join the lazarus project. I think I have my development enviroment ready for this. I downloaded from CVS the lattest fpc (1.0.8) and Lazarus. Fpc compiles both, itself and Lazarus, but as we know, lazarus does almost nothing yet. What I don't know is how to debug? I downloaded the gdb which comes with Fpc 1.0.6... could I use it? How? I never used it.

1. compile everyting with debug info. Adding 'DEBUG=1' to the make command-line should do this.

2. Run
gdbw lazarus.
(or a demo app)

That should be it. There is a cygwin tool called 'insight', which is a nice tcl/tk graphical shell around gdb for windows. Using that should really make it easy to work on the Windows shell.

Michael.

Reply by email

hjamilis

Hi,

I want to know if somebody is still working on the Win32 interface for Lazarus.

I was following the lazarus mailing list for a long time, and I think I could help on the Win32 interface. I also beleve, once the Win32 interface works many developers will join the lazarus project.

I think I have my development enviroment ready for this. I downloaded from CVS the lattest fpc (1.0.8) and Lazarus. Fpc compiles both, itself and Lazarus, but as we know, lazarus does almost nothing yet.

What I don't know is how to debug?
I downloaded the gdb which comes with Fpc 1.0.6... could I use it? How? I never used it.

Thanks in advance

Horacio Jamilis

Reply by email

Mattias Gaertner
to Horacio Jamilis: � I was trying to compile lazarus under Win32 to start debuging it. � When I tried to…
Show quoted text 6 lines
Hi, I was trying to compile lazarus under Win32 to start debuging it. When I tried to "make DEBUG=1 clean all" to build lazarus with debuging information, it fails.

Under linux with the gtk-interface, I also got a few compiler warnings when DEBUG=1. I fixed them. But running the IDE failed with range check errors. Marc, the debugger goes into an endless loop on the range check.

Mattias

Show quoted text 71 lines
Here are the last lines. HELP!!!!! Horacio Jamilis Compiling Debug Version Free Pascal Compiler version 1.0.8 [2003/06/14] for i386 Copyright (c) 1993-2003 by Florian Klaempfl Target OS: Win32 for i386 Compiling interfaces.pp Compiling win32int.pp Compiling win32def.pp Compiling winext.pas winext.pas(154,32) Warning: Local variable LASTP does not seem to be initialized win32proc.inc(603,33) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(575,55) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(577,38) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(582,35) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(545,55) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(547,38) Warning: Mixing signed expressions and cardinals here may cause a range check error win32proc.inc(552,32) Warning: Mixing signed expressions and cardinals here may cause a range check error win32listsl.inc(36,16) Warning: Local variable ASTR does not seem to be initiali zed win32listsl.inc(37,16) Warning: Local variable BSTR does not seem to be initiali zed win32listsl.inc(87,52) Warning: Mixing signed expressions and cardinals here may cause a range check error win32callback.inc(498,33) Warning: Mixing signed expressions and cardinals here may cause a range check error win32callback.inc(56,3) Note: Local variable C not used win32callback.inc(57,3) Note: Local variable LIST not used win32object.inc(232,62) Warning: Mixing signed expressions and cardinals here ma y cause a range check error win32object.inc(846,83) Error: range check error while evaluating constants win32object.inc(1140,8) Warning: Mixing signed expressions and cardinals here ma y cause a range check error win32object.inc(1683,20) Warning: Local variable HANDLE does not seem to be init ialized win32object.inc(2558,75) Warning: Mixing signed expressions and cardinals here m ay cause a range check error win32object.inc(2554,26) Warning: Mixing signed expressions and cardinals here m ay cause a range check error win32object.inc(2608,5) Warning: Local variable STYLE does not seem to be initia lized win32winapi.inc(584,45) Note: Mixing signed expressions and cardinals uses 64bit computation win32int.pp(285) Fatal: There were 1 errors compiling module, stopping make[4]: *** [interfaces.ppw] Error 1 make[4]: Leaving directory `C:/Desar/Lazarus/lazarus/lcl/interfaces/win32' make[3]: *** [all] Error 2 make[3]: Leaving directory `C:/Desar/Lazarus/lazarus/lcl/interfaces/win32' make[2]: *** [win32_all] Error 2 make[2]: Leaving directory `C:/Desar/Lazarus/lazarus/lcl/interfaces' make[1]: *** [interfaces] Error 2 make[1]: Leaving directory `C:/Desar/Lazarus/lazarus/lcl' make: *** [lcl] Error 2 C:\Desar\Lazarus\lazarus>

Reply by email

Horacio Jamilis

Hi,
�
I was trying to compile lazarus under Win32 to
start debuging it.
�
When I tried to "make DEBUG=1 clean all" to build
lazarus with debuging information, it fails.
�
Here�are the last lines.
�
HELP!!!!!
�
Horacio Jamilis
�
Compiling Debug VersionFree Pascal Compiler
version 1.0.8 [2003/06/14] for i386Copyright (c) 1993-2003 by Florian KlaempflTarget OS: Win32 for i386Compiling interfaces.ppCompiling win32int.ppCompiling win32def.ppCompiling
winext.paswinext.pas(154,32) Warning: Local variable LASTP does not seem to be initialized
�
win32proc.inc(603,33) Warning: Mixing signed
expressions and cardinals here maycause a range check errorwin32proc.inc(575,55) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32proc.inc(577,38) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32proc.inc(582,35) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32proc.inc(545,55) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32proc.inc(547,38) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32proc.inc(552,32) Warning: Mixing signed expressions and cardinals here maycause a range check errorwin32listsl.inc(36,16) Warning: Local variable ASTR does not seem to be initializedwin32listsl.inc(37,16) Warning: Local variable BSTR does not seem to be initializedwin32listsl.inc(87,52) Warning: Mixing signed expressions and cardinals here may�cause a range check errorwin32callback.inc(498,33) Warning: Mixing signed expressions and cardinals heremay cause a range check errorwin32callback.inc(56,3) Note: Local variable C not usedwin32callback.inc(57,3) Note: Local variable LIST not usedwin32object.inc(232,62) Warning: Mixing signed expressions and cardinals here may cause a range check errorwin32object.inc(846,83) Error: range check error while evaluating constantswin32object.inc(1140,8) Warning: Mixing signed expressions and cardinals here may cause a range check errorwin32object.inc(1683,20) Warning: Local variable HANDLE does not seem to be initializedwin32object.inc(2558,75) Warning: Mixing signed expressions and cardinals here may cause a range check errorwin32object.inc(2554,26) Warning: Mixing signed expressions and cardinals here may cause a range check errorwin32object.inc(2608,5) Warning: Local variable STYLE does not seem to be
initializedwin32winapi.inc(584,45) Note: Mixing signed expressions and cardinals uses 64bit�computationwin32int.pp(285) Fatal: There were 1 errors compiling module, stoppingmake[4]: *** [interfaces.ppw] Error 1make[4]: Leaving directory
`C:/Desar/Lazarus/lazarus/lcl/interfaces/win32'make[3]: *** [all] Error 2make[3]: Leaving directory
`C:/Desar/Lazarus/lazarus/lcl/interfaces/win32'make[2]: *** [win32_all] Error 2make[2]: Leaving directory
`C:/Desar/Lazarus/lazarus/lcl/interfaces'make[1]: *** [interfaces] Error 2make[1]: Leaving directory `C:/Desar/Lazarus/lazarus/lcl'make: *** [lcl] Error 2
�
<FONT face=Arial
size=2>C:\Desar\Lazarus\lazarus>

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Sun, 22 Jun 2003 14:37:42 +0200 Just build lazarus with "make DEBUG=1 clean all" and…
[snip] Ehm... can you give an example where the debugger doesn't stop ?

Whatever you did with your last update, the endless loop is gone and so is the endless loop of the debugged lazarus also. Now the compiler stops on the range check error. But without a valid error line. The callstack says the same: debugmanager line 1698. The range check error happens somewhere in the debugger initialization. The sad thing is, that the debugged IDE still shows its splash screen, which hides any message dialog and this makes your X unusable.
So, I have improved a few things:
- the lcl now sets its own exception handler earlier (Application.Initialize)
- the lcl now hides all forms with FormStyle=fsStayOnTop, before showing the error message
- I added a --no-splash-screen option to the command line options of the IDE

Now we can start fixing the range check errors. First one is: debugger.pp 2900.

Mattias

Reply by email

Mattias Gaertner
to Horacio Jamilis: � I was trying to compile lazarus under Win32 to start debuging it. � When I tried to…
Show quoted text 17 lines
At 10:56 22-6-2003 +0200, Mattias Gaertner wrote: >On Sat, 21 Jun 2003 22:52:57 -0300 >"Horacio Jamilis" wrote: > > > Hi, > > > > I was trying to compile lazarus under Win32 to start debuging it. > > > > When I tried to "make DEBUG=1 clean all" to build lazarus with > > debuging information, it fails. > >Under linux with the gtk-interface, I also got a few compiler warnings >when DEBUG=1. I fixed them. But running the IDE failed with range check >errors. Marc, the debugger goes into an endless loop on the range check. YM, when you build with rangecheck and you hit a range error ? Or is building enough ?

Just build lazarus with "make DEBUG=1 clean all" and run it. There are some cardinal/longint checks, that causes a range check error at runtime, but not at compile time. For example passing a TColor to a parameter of type TColorRef. Normally, the compiler should warn, but it does not. So, we have to spot these things by debugging. But, as you know, gdb does not stop on range check errors (it needs some breakpoints). It would save some time, if the IDE could debug itself and stop automatically on range check errors.

Mattias

Reply by email

Marc Weustink
to Mattias Gaertner
Marc Weustink wrote 31 lines
At 16:32 22-6-2003 +0200, Mattias Gaertner wrote: >On Sun, 22 Jun 2003 14:37:42 +0200 >Marc Weustink wrote: > > > At 10:56 22-6-2003 +0200, Mattias Gaertner wrote: > > >On Sat, 21 Jun 2003 22:52:57 -0300 > > >"Horacio Jamilis" wrote: > > > > > > > Hi, > > > > > > > > I was trying to compile lazarus under Win32 to start debuging it. > > > > > > > > When I tried to "make DEBUG=1 clean all" to build lazarus with > > > > debuging information, it fails. > > > > > >Under linux with the gtk-interface, I also got a few compiler warnings > > >when DEBUG=1. I fixed them. But running the IDE failed with range check > > >errors. Marc, the debugger goes into an endless loop on the range check. > > > > YM, when you build with rangecheck and you hit a range error ? Or is > > building enough ? > >Just build lazarus with "make DEBUG=1 clean all" and run it. There are some >cardinal/longint checks, that causes a range check error at runtime, but not >at compile time. For example passing a TColor to a parameter of type >TColorRef. Normally, the compiler should warn, but it does not. So, we have >to spot these things by debugging. But, as you know, gdb does not stop on >range check errors (it needs some breakpoints). It would save some time, if >the IDE could debug itself and stop automatically on range check errors. OK, I'll add them.

Ehm... can you give an example where the debugger doesn't stop ?

Something like the following raises an excepton and stops

var
   c: Cardinal;
begin
   c := 12345;
   {$R+}
   c := -c;
   {$R-}
end;

Marc

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Mon, 23 Jun 2003 00:06:56 +0200 Whatever you did with your last update, the endless…
Show quoted text 39 lines
+ From: Mattias Gaertner + Sent: maandag 23 juni 2003 12:07 + + On Mon, 23 Jun 2003 00:06:56 +0200 + Marc Weustink wrote: + + > [snip] + > Ehm... can you give an example where the debugger doesn't stop ? + + Whatever you did with your last update, the endless loop is gone and so is+ the endless loop of the debugged lazarus also. Now the compiler + stops on the range check error. I'm not aware of such a change last week. + But without a valid error line. The callstack says the + same: debugmanager line 1698. The range check error happens + somewhere in the debugger initialization. ??? In the sample I gave it shows the correct line. If even the callstack gives it then I don't know what's going on. (On exception handling I retrieve the exception line separate form the call stack) + The sad thing is, that the debugged IDE still shows + its splash screen, which hides any message dialog and this makes your X + unusable. :-) + So, I have improved a few things: + - the lcl now sets its own exception handler earlier + (Application.Initialize) + - the lcl now hides all forms with FormStyle=fsStayOnTop, before + showing the error message It would have been no problem if messagedialogs were shown on top of fsStayOnTop.

gtk has no fsStayOnTop in the sense of win32. It has transient windows and toolwindows. Transient windows stay on top of another window and toolwindows stay on top of everything. The only solution to put a message dialog on top of a toolwindow aka SplashScreen is to hide the toolwindow.

Show quoted text 9 lines
+ - I added a --no-splash-screen option to the command line options + of the IDE + + Now we can start fixing the range check errors. First one is: debugger.pp+ 2900. I always found those range checks and such to strict (or better, not practical), but whats wrong with: Result := TBaseException(inherited Add);

Good question.

Mattias

Reply by email

Marc Weustink
to Horacio Jamilis: � I was trying to compile lazarus under Win32 to start debuging it. � When I tried to…

From: Horacio Jamilis
Sent: zondag 22 juni 2003 3:53

+ Hi,

+ I was trying to compile lazarus under Win32 to start debuging it.
+ When I tried to "make DEBUG=1 clean all" to build lazarus with
+ debuging information, it fails.
+
+ Here are the last lines.
+
+ HELP!!!!!

At he moment, using DEBUG=1 enables to many checks which cause Lazarus to crash. For now, better use OPT=-g (this onlyt enables debuginfo, which is enough to debug.

Marc

Reply by email

Marc Weustink
to Horacio Jamilis: � I was trying to compile lazarus under Win32 to start debuging it. � When I tried to…
Mattias Gaertner wrote 13 lines
On Sat, 21 Jun 2003 22:52:57 -0300 "Horacio Jamilis" wrote: > Hi, > > I was trying to compile lazarus under Win32 to start debuging it. > > When I tried to "make DEBUG=1 clean all" to build lazarus with debuging > information, it fails. Under linux with the gtk-interface, I also got a few compiler warnings when DEBUG=1. I fixed them. But running the IDE failed with range check errors. Marc, the debugger goes into an endless loop on the range check.

YM, when you build with rangecheck and you hit a range error ? Or is building enough ?

Marc

Reply by email

Manuel Pérez López
to Mattias Gaertner: On Mon, 23 Jun 2003 00:06:56 +0200 Whatever you did with your last update, the endless…

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi:

Has been TFillStyle implemented in GraphType unit yet?

Thanks

- --

Saludos
Manuel P�rez L�pez

- -----------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+9wacYvl2oJ24QTwRAs2hAJ9K16sRdGXbm+XCo8ZgyTntmAR2/wCfbYIn H3ClI4xyiVdE2PBSVBREicI=
=Oyqs
-----END PGP SIGNATURE-----

Reply by email

Marc Weustink
to Marc Weustink: YM, when you build with rangecheck and you hit a range error ? Or is building enough ?…
Mattias Gaertner wrote 28 lines
On Sun, 22 Jun 2003 14:37:42 +0200 Marc Weustink wrote: > At 10:56 22-6-2003 +0200, Mattias Gaertner wrote: > >On Sat, 21 Jun 2003 22:52:57 -0300 > >"Horacio Jamilis" wrote: > > > > > Hi, > > > > > > I was trying to compile lazarus under Win32 to start debuging it. > > > > > > When I tried to "make DEBUG=1 clean all" to build lazarus with > > > debuging information, it fails. > > > >Under linux with the gtk-interface, I also got a few compiler warnings > >when DEBUG=1. I fixed them. But running the IDE failed with range check > >errors. Marc, the debugger goes into an endless loop on the range check. > > YM, when you build with rangecheck and you hit a range error ? Or is > building enough ? Just build lazarus with "make DEBUG=1 clean all" and run it. There are some cardinal/longint checks, that causes a range check error at runtime, but not at compile time. For example passing a TColor to a parameter of type TColorRef. Normally, the compiler should warn, but it does not. So, we have to spot these things by debugging. But, as you know, gdb does not stop on range check errors (it needs some breakpoints). It would save some time, if the IDE could debug itself and stop automatically on range check errors.

OK, I'll add them.

Marc

Reply by email

Marc Weustink
to Mattias Gaertner: On Mon, 23 Jun 2003 00:06:56 +0200 Whatever you did with your last update, the endless…

+ From: Mattias Gaertner
+ Sent: maandag 23 juni 2003 12:07
+
+ On Mon, 23 Jun 2003 00:06:56 +0200
+ Marc Weustink wrote:
+
+ > [snip]
+ > Ehm... can you give an example where the debugger doesn't stop ? +
+ Whatever you did with your last update, the endless loop is gone and so is
+ the endless loop of the debugged lazarus also. Now the compiler
+ stops on the range check error.

I'm not aware of such a change last week.

+ But without a valid error line. The callstack says the
+ same: debugmanager line 1698. The range check error happens
+ somewhere in the debugger initialization.

???

In the sample I gave it shows the correct line. If even the callstack gives it then I don't know what's going on. (On exception handling I retrieve the exception line separate form the call stack)

+ The sad thing is, that the debugged IDE still shows
+ its splash screen, which hides any message dialog and this makes your X
+ unusable.

:-)

+ So, I have improved a few things:
+ - the lcl now sets its own exception handler earlier
+ (Application.Initialize)
+ - the lcl now hides all forms with FormStyle=fsStayOnTop, before
+ showing the error message

It would have been no problem if messagedialogs were shown on top of fsStayOnTop.

+ - I added a --no-splash-screen option to the command line options
+ of the IDE
+
+ Now we can start fixing the range check errors. First one is: debugger.pp
+ 2900.

I always found those range checks and such to strict (or better, not practical), but whats wrong with:

   Result := TBaseException(inherited Add);

Marc

Reply by email