~ubuntu-branches/ubuntu/vivid/lazarus/vivid

« back to all changes in this revision

Viewing changes to components/fpdebug/app/fpd/fpd.lpr

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Paul Gevers
  • Date: 2014-02-22 10:25:57 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140222102557-ors9d31r84nz31jq
Tags: 1.2~rc2+dfsg-1
[ Abou Al Montacir ]
* New upstream pre-release.
  + Moved ideintf to components directory.
  + Added new package cairocanvas.
* Remove usage of depreciated parameters form of find. (Closes: Bug#724776)
* Bumped standard version to 3.9.5.
* Clean the way handling make files generation and removal.

[ Paul Gevers ]
* Remove nearly obsolete bzip compression for binary packages
  (See https://lists.debian.org/debian-devel/2014/01/msg00542.html)
* Update d/copyright for newly added dir in examples and components
* Update Vcs-* fields with new packaging location
* Update d/watch file to properly (Debian way) change upstreams versions
* Prevent 46MB of package size by sym linking duplicate files
* Patches
  - refresh to remove fuzz
  - add more Lintian found spelling errors
  - new patch to add shbang to two scripts in lazarus-src
* Drop lcl-# from Provides list of lcl-units-#
* Make lazarus-ide-qt4-# an arch all until it really contains stuff
* Make all metapackages arch all as the usecase for arch any doesn't
  seem to warrant the addition archive hit
* Fix permissions of non-scripts in lazarus-src-#

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{ $Id: fpd.lpr 42802 2013-09-15 10:59:04Z martin $ }
 
2
{
 
3
 ---------------------------------------------------------------------------
 
4
 fpd  -  FP standalone windows debugger
 
5
 ---------------------------------------------------------------------------
 
6
 
 
7
 fpwd is a concept Free Pascal Windows Debugger. It is mainly used to thest
 
8
 the windebugger classes, but it may grow someday to a fully functional
 
9
 debugger written in pascal.
 
10
 
 
11
 ---------------------------------------------------------------------------
 
12
 
 
13
 @created(Mon Apr 10th WET 2006)
 
14
 @lastmod($Date: 2013-09-15 12:59:04 +0200 (So, 15 Sep 2013) $)
 
15
 @author(Marc Weustink <marc@@dommelstein.nl>)
 
16
 
 
17
 ***************************************************************************
 
18
 *                                                                         *
 
19
 *   This source is free software; you can redistribute it and/or modify   *
 
20
 *   it under the terms of the GNU General Public License as published by  *
 
21
 *   the Free Software Foundation; either version 2 of the License, or     *
 
22
 *   (at your option) any later version.                                   *
 
23
 *                                                                         *
 
24
 *   This code is distributed in the hope that it will be useful, but      *
 
25
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
26
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 
27
 *   General Public License for more details.                              *
 
28
 *                                                                         *
 
29
 *   A copy of the GNU General Public License is available on the World    *
 
30
 *   Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also      *
 
31
 *   obtain it by writing to the Free Software Foundation,                 *
 
32
 *   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.        *
 
33
 *                                                                         *
 
34
 ***************************************************************************
 
35
}
 
36
program fpd;
 
37
{$mode objfpc}{$H+}
 
38
{$APPTYPE CONSOLE}
 
39
uses
 
40
  SysUtils,
 
41
  Windows,
 
42
  FPDCommand,
 
43
  FPDGlobal,
 
44
  FPDLoop,
 
45
  FPDPEImage,
 
46
  FPDType,
 
47
  FpDbgClasses, FpDbgWinExtra, FpDbgPETypes, FpDbgDwarfConst, FpDbgDwarf;
 
48
 
 
49
function CtrlCHandler(CtrlType: Cardinal): BOOL; stdcall;
 
50
begin
 
51
  Result := False;
 
52
  case CtrlType of
 
53
    CTRL_C_EVENT,
 
54
    CTRL_BREAK_EVENT: begin
 
55
      if GState <> dsRun then Exit;
 
56
      if GMainProcess = nil then Exit;
 
57
      GMainProcess.Interrupt;
 
58
 
 
59
      Result := True;
 
60
    end;
 
61
    CTRL_CLOSE_EVENT: begin
 
62
      if (GState in [dsRun, dsPause]) and (GMainProcess <> nil)
 
63
      then TerminateProcess(GMainProcess.Handle, 0);
 
64
//      GState := dsQuit;
 
65
    end;
 
66
  end;
 
67
end;
 
68
 
 
69
var
 
70
  S, Last: String;
 
71
begin
 
72
  Write('FPDebugger on ', {$I %FPCTARGETOS%}, ' for ', {$I %FPCTARGETCPU%});
 
73
  WriteLn(' (', {$I %DATE%}, ' ', {$I %TIME%}, ' FPC: ', {$I %FPCVERSION%}, ')' );
 
74
  WriteLn('Copyright (c) 2006-2009 by Marc Weustink');
 
75
  WriteLN('starting....');
 
76
  
 
77
  if ParamCount > 0
 
78
  then begin
 
79
    GFileName := ParamStr(1);
 
80
    WriteLN('Using file: ', GFileName);
 
81
  end;
 
82
 
 
83
  SetConsoleCtrlHandler(@CtrlCHandler, True);
 
84
  repeat
 
85
    Write('FPD>');
 
86
    ReadLn(S);
 
87
    if S <> ''
 
88
    then Last := S;
 
89
    if Last = '' then Continue;
 
90
    HandleCommand(Last);
 
91
  until GState = dsQuit;
 
92
  SetConsoleCtrlHandler(@CtrlCHandler, False);
 
93
end.
 
94