mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 20:32:02 +02:00
amicommon: basic common debug facilities, influenced by Debug/DebugLn of the AROS port
git-svn-id: trunk@28694 -
This commit is contained in:
parent
ba324b1bf0
commit
55d85fffad
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7866,6 +7866,8 @@ rtl/aix/unxfunc.inc svneol=native#text/plain
|
||||
rtl/amicommon/README.TXT svneol=native#text/plain
|
||||
rtl/amicommon/classes.pp svneol=native#text/plain
|
||||
rtl/amicommon/dos.pp svneol=native#text/plain
|
||||
rtl/amicommon/osdebug.inc svneol=native#text/plain
|
||||
rtl/amicommon/osdebugh.inc svneol=native#text/plain
|
||||
rtl/amicommon/rtldefs.inc svneol=native#text/plain
|
||||
rtl/amicommon/sysdir.inc svneol=native#text/plain
|
||||
rtl/amicommon/sysfile.inc svneol=native#text/plain
|
||||
|
44
rtl/amicommon/osdebug.inc
Normal file
44
rtl/amicommon/osdebug.inc
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2014 by Free Pascal development team
|
||||
|
||||
Platform specific debug functions for Amiga-like systems
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program 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.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{ Basic system-specific debug facility. Logs to the primary log source, which is
|
||||
usually the serial port or where the serial log is redirected to (eg. RamDebug
|
||||
on MorphOS) We could also use some barely-documented RawDoFmt() blackmagic here
|
||||
specifying "1" as PutChProc pointer, but it doesn't really matter, because
|
||||
RawDoFmt() will just call RawPutChar internally in that case (KB) }
|
||||
|
||||
procedure SysDebug(const s: RawByteString); platform;
|
||||
var
|
||||
i: LongInt;
|
||||
begin
|
||||
if s <> '' then
|
||||
for i:=1 to Length(s) do
|
||||
RawPutChar(s[i]);
|
||||
end;
|
||||
|
||||
procedure SysDebugLn(const s: RawByteString); platform;
|
||||
var
|
||||
i: LongInt;
|
||||
begin
|
||||
if s <> '' then
|
||||
for i:=1 to Length(s) do
|
||||
RawPutChar(LongWord(s[i]));
|
||||
RawPutChar(LongWord(#10));
|
||||
end;
|
||||
|
||||
procedure SysDebugLn; {$IFDEF SYSTEMINLINE}inline;{$ENDIF} platform;
|
||||
begin
|
||||
RawPutChar(LongWord(#10));
|
||||
end;
|
18
rtl/amicommon/osdebugh.inc
Normal file
18
rtl/amicommon/osdebugh.inc
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2014 by Free Pascal development team
|
||||
|
||||
Platform specific debug functions for Amiga-like systems
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program 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.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
procedure SysDebug(const s: RawByteString);
|
||||
procedure SysDebugLn(const s: RawByteString);
|
||||
procedure SysDebugLn;
|
Loading…
Reference in New Issue
Block a user