mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-10 04:47:52 +02:00
IDE: Enable the new Heaptrc output window by default. Part of issue #19837
git-svn-id: trunk@41169 -
This commit is contained in:
parent
6caeb8a5d6
commit
d784e09e7d
@ -38,9 +38,7 @@ program Lazarus;
|
|||||||
{off $DEFINE IDE_MEM_CHECK}
|
{off $DEFINE IDE_MEM_CHECK}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF HEAPTRC_WINDOW}
|
|
||||||
redirect_stderr,
|
redirect_stderr,
|
||||||
{$ENDIF HEAPTRC_WINDOW}
|
|
||||||
{$IF defined(UNIX) and not defined(DisableMultiThreading)}
|
{$IF defined(UNIX) and not defined(DisableMultiThreading)}
|
||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
@ -1,16 +1,42 @@
|
|||||||
|
{
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
ToDo...
|
||||||
|
}
|
||||||
unit raw_window;
|
unit raw_window;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$IFDEF Windows}
|
||||||
uses
|
uses
|
||||||
SysUtils, Windows, Messages;
|
SysUtils, Windows, Messages;
|
||||||
|
|
||||||
procedure ShowWindow(AStr : String);
|
procedure ShowWindow(AStr : String);
|
||||||
|
{$ENDIF Windows}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{$IFDEF Windows}
|
||||||
Var
|
Var
|
||||||
WndHandle,
|
WndHandle,
|
||||||
ButtonHandle,
|
ButtonHandle,
|
||||||
@ -63,7 +89,6 @@ Begin
|
|||||||
PostMessage(ButtonHandle, BM_CLICK, 0, 0);
|
PostMessage(ButtonHandle, BM_CLICK, 0, 0);
|
||||||
Exit(0);
|
Exit(0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
Result := CallWindowProc(OldSubProc, Ahwnd, uMsg, wParam, lParam);
|
Result := CallWindowProc(OldSubProc, Ahwnd, uMsg, wParam, lParam);
|
||||||
@ -158,6 +183,9 @@ Begin
|
|||||||
|
|
||||||
UnregisterClass(WndClass.lpszClassName, WndClass.hInstance);
|
UnregisterClass(WndClass.lpszClassName, WndClass.hInstance);
|
||||||
end;
|
end;
|
||||||
|
{$ELSE Windows}
|
||||||
|
// If some action is needed in non-Windows systems, add it here.
|
||||||
|
{$ENDIF Windows}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1,17 +1,43 @@
|
|||||||
|
{
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Abstract:
|
||||||
|
ToDo...
|
||||||
|
}
|
||||||
unit redirect_stderr;
|
unit redirect_stderr;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$IFDEF Windows}
|
||||||
uses
|
uses
|
||||||
heaptrc, SysUtils, raw_window;
|
heaptrc, SysUtils, raw_window;
|
||||||
|
{$ENDIF Windows}
|
||||||
|
|
||||||
Var
|
Var
|
||||||
DoShowWindow : Boolean = True;
|
DoShowWindow : Boolean = True;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{$IFDEF Windows}
|
||||||
const
|
const
|
||||||
ErrorBufferLength = 2 * 1024;
|
ErrorBufferLength = 2 * 1024;
|
||||||
|
|
||||||
@ -102,7 +128,9 @@ initialization
|
|||||||
AssignError(MyStdErr);
|
AssignError(MyStdErr);
|
||||||
SetHeapTraceOutput(MyStdErr);
|
SetHeapTraceOutput(MyStdErr);
|
||||||
|
|
||||||
finalization
|
{$ELSE Windows}
|
||||||
|
// If some action is needed in non-Windows systems, add it here.
|
||||||
|
{$ENDIF Windows}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ program StartLazarus;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF HEAPTRC_WINDOW}
|
|
||||||
redirect_stderr,
|
redirect_stderr,
|
||||||
{$ENDIF HEAPTRC_WINDOW}
|
|
||||||
Interfaces, SysUtils,
|
Interfaces, SysUtils,
|
||||||
Forms,
|
Forms,
|
||||||
LazarusManager;
|
LazarusManager;
|
||||||
@ -44,9 +42,7 @@ var
|
|||||||
ALazarusManager: TLazarusManager;
|
ALazarusManager: TLazarusManager;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$IFDEF HEAPTRC_WINDOW}
|
|
||||||
redirect_stderr.DoShowWindow := False;
|
redirect_stderr.DoShowWindow := False;
|
||||||
{$ENDIF HEAPTRC_WINDOW}
|
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
ALazarusManager := TLazarusManager.Create(nil);
|
ALazarusManager := TLazarusManager.Create(nil);
|
||||||
ALazarusManager.Initialize;
|
ALazarusManager.Initialize;
|
||||||
|
Loading…
Reference in New Issue
Block a user