From 4706e9b222a80dcc537b61ddd0d305740fd33ad4 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 20 Sep 2013 11:23:26 +0000 Subject: [PATCH] FpDbg: ifdef windows specific code git-svn-id: trunk@42901 - --- components/fpdebug/fpdbgdisasx86.pp | 10 +++++++++- components/fpdebug/fpdbgsymbols.pas | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/fpdebug/fpdbgdisasx86.pp b/components/fpdebug/fpdbgdisasx86.pp index 9501d85459..20e5e0cab5 100644 --- a/components/fpdebug/fpdbgdisasx86.pp +++ b/components/fpdebug/fpdbgdisasx86.pp @@ -39,7 +39,11 @@ interface {.$define verbose_string_instructions} uses - SysUtils, Windows, FpDbgUtil, FpDbgWinExtra, FpDbgClasses; + SysUtils, +{$ifdef windows} + Windows, +{$endif} + FpDbgUtil, FpDbgWinExtra, FpDbgClasses; { The function Disassemble decodes the instruction at the given address. @@ -54,9 +58,11 @@ uses } +{$ifdef windows} procedure Disassemble(var AAddress: Pointer; const A64Bit: Boolean; out ACodeBytes: String; out ACode: String); procedure Disassemble(const AProcess: Handle; const A64Bit: Boolean; var AAddress: TDbgPtr; out ACodeBytes: String; out ACode: String); function Disassemble(const AProcess: Handle; const A64Bit: Boolean; var AAddress: TDbgPtr): String; +{$endif} implementation @@ -82,6 +88,7 @@ type TOperandFlag = (ofMemory); TOperandFlags = set of TOperandFlag; +{$ifdef windows} function Disassemble(const AProcess: Handle; const A64Bit: Boolean; var AAddress: TDbgPtr): String; var S: String; @@ -3124,6 +3131,7 @@ begin ACodeBytes := S; Inc(AAddress, CodeIdx); end; +{$endif} end. diff --git a/components/fpdebug/fpdbgsymbols.pas b/components/fpdebug/fpdbgsymbols.pas index 455695f134..ab09dad46d 100644 --- a/components/fpdebug/fpdbgsymbols.pas +++ b/components/fpdebug/fpdbgsymbols.pas @@ -38,13 +38,19 @@ unit FpDbgSymbols; interface uses - Windows, Classes, SysUtils, FpDbgClasses, FpDbgWinExtra, FpDbgPETypes, FpDbgDwarf, FpDbgUtil; +{$ifdef windows} + Windows, +{$endif} + Classes, SysUtils, FpDbgClasses, FpDbgWinExtra, FpDbgPETypes, FpDbgDwarf, FpDbgUtil; +{$ifdef windows} procedure AddSymbols(AParent: TDbgSymbol; AModule: THandle); +{$endif} implementation +{$ifdef windows} procedure AddSymbols(AParent: TDbgSymbol; AModule: THandle); var ModulePtr: Pointer; @@ -236,6 +242,7 @@ begin Sections.Free; end; end; +{$endif} end.