mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-18 03:49:21 +02:00
drop 4.x support, fixed 6.2.x support
This commit is contained in:
parent
3d5064ff8c
commit
e32e9da818
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/10/30]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/11/03]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc
|
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc
|
||||||
@ -771,7 +771,7 @@ ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
|||||||
ifeq ($(ECHO),)
|
ifeq ($(ECHO),)
|
||||||
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
|
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(ECHO),)
|
ifeq ($(ECHO),)
|
||||||
ECHO= __missing_command__
|
ECHO= __missing_command_ECHO
|
||||||
else
|
else
|
||||||
ECHO:=$(firstword $(ECHO))
|
ECHO:=$(firstword $(ECHO))
|
||||||
endif
|
endif
|
||||||
@ -785,7 +785,7 @@ DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
|
|||||||
ifeq ($(DATE),)
|
ifeq ($(DATE),)
|
||||||
DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
|
DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(DATE),)
|
ifeq ($(DATE),)
|
||||||
DATE= __missing_command__
|
DATE= __missing_command_DATE
|
||||||
else
|
else
|
||||||
DATE:=$(firstword $(DATE))
|
DATE:=$(firstword $(DATE))
|
||||||
endif
|
endif
|
||||||
@ -799,7 +799,7 @@ GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
|
|||||||
ifeq ($(GINSTALL),)
|
ifeq ($(GINSTALL),)
|
||||||
GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
|
GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(GINSTALL),)
|
ifeq ($(GINSTALL),)
|
||||||
GINSTALL= __missing_command__
|
GINSTALL= __missing_command_GINSTALL
|
||||||
else
|
else
|
||||||
GINSTALL:=$(firstword $(GINSTALL))
|
GINSTALL:=$(firstword $(GINSTALL))
|
||||||
endif
|
endif
|
||||||
@ -811,7 +811,7 @@ export GINSTALL
|
|||||||
ifndef CPPROG
|
ifndef CPPROG
|
||||||
CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
|
CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(CPPROG),)
|
ifeq ($(CPPROG),)
|
||||||
CPPROG= __missing_command__
|
CPPROG= __missing_command_CPPROG
|
||||||
else
|
else
|
||||||
CPPROG:=$(firstword $(CPPROG))
|
CPPROG:=$(firstword $(CPPROG))
|
||||||
endif
|
endif
|
||||||
@ -820,7 +820,7 @@ export CPPROG
|
|||||||
ifndef RMPROG
|
ifndef RMPROG
|
||||||
RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
|
RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(RMPROG),)
|
ifeq ($(RMPROG),)
|
||||||
RMPROG= __missing_command__
|
RMPROG= __missing_command_RMPROG
|
||||||
else
|
else
|
||||||
RMPROG:=$(firstword $(RMPROG))
|
RMPROG:=$(firstword $(RMPROG))
|
||||||
endif
|
endif
|
||||||
@ -829,7 +829,7 @@ export RMPROG
|
|||||||
ifndef MVPROG
|
ifndef MVPROG
|
||||||
MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
|
MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(MVPROG),)
|
ifeq ($(MVPROG),)
|
||||||
MVPROG= __missing_command__
|
MVPROG= __missing_command_MVPROG
|
||||||
else
|
else
|
||||||
MVPROG:=$(firstword $(MVPROG))
|
MVPROG:=$(firstword $(MVPROG))
|
||||||
endif
|
endif
|
||||||
@ -840,7 +840,7 @@ MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
|
|||||||
ifeq ($(MKDIRPROG),)
|
ifeq ($(MKDIRPROG),)
|
||||||
MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
|
MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(MKDIRPROG),)
|
ifeq ($(MKDIRPROG),)
|
||||||
MKDIRPROG= __missing_command__
|
MKDIRPROG= __missing_command_MKDIRPROG
|
||||||
else
|
else
|
||||||
MKDIRPROG:=$(firstword $(MKDIRPROG))
|
MKDIRPROG:=$(firstword $(MKDIRPROG))
|
||||||
endif
|
endif
|
||||||
@ -895,7 +895,7 @@ export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
|
|||||||
ifndef PPUMOVE
|
ifndef PPUMOVE
|
||||||
PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
|
PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(PPUMOVE),)
|
ifeq ($(PPUMOVE),)
|
||||||
PPUMOVE= __missing_command__
|
PPUMOVE= __missing_command_PPUMOVE
|
||||||
else
|
else
|
||||||
PPUMOVE:=$(firstword $(PPUMOVE))
|
PPUMOVE:=$(firstword $(PPUMOVE))
|
||||||
endif
|
endif
|
||||||
@ -904,7 +904,7 @@ export PPUMOVE
|
|||||||
ifndef FPCMAKE
|
ifndef FPCMAKE
|
||||||
FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
|
FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(FPCMAKE),)
|
ifeq ($(FPCMAKE),)
|
||||||
FPCMAKE= __missing_command__
|
FPCMAKE= __missing_command_FPCMAKE
|
||||||
else
|
else
|
||||||
FPCMAKE:=$(firstword $(FPCMAKE))
|
FPCMAKE:=$(firstword $(FPCMAKE))
|
||||||
endif
|
endif
|
||||||
@ -913,7 +913,7 @@ export FPCMAKE
|
|||||||
ifndef ZIPPROG
|
ifndef ZIPPROG
|
||||||
ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
|
ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(ZIPPROG),)
|
ifeq ($(ZIPPROG),)
|
||||||
ZIPPROG= __missing_command__
|
ZIPPROG= __missing_command_ZIPPROG
|
||||||
else
|
else
|
||||||
ZIPPROG:=$(firstword $(ZIPPROG))
|
ZIPPROG:=$(firstword $(ZIPPROG))
|
||||||
endif
|
endif
|
||||||
@ -922,7 +922,7 @@ export ZIPPROG
|
|||||||
ifndef TARPROG
|
ifndef TARPROG
|
||||||
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
|
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
ifeq ($(TARPROG),)
|
ifeq ($(TARPROG),)
|
||||||
TARPROG= __missing_command__
|
TARPROG= __missing_command_TARPROG
|
||||||
else
|
else
|
||||||
TARPROG:=$(firstword $(TARPROG))
|
TARPROG:=$(firstword $(TARPROG))
|
||||||
endif
|
endif
|
||||||
@ -1747,12 +1747,12 @@ makefiles: fpc_makefiles
|
|||||||
ifneq ($(wildcard fpcmake.loc),)
|
ifneq ($(wildcard fpcmake.loc),)
|
||||||
include fpcmake.loc
|
include fpcmake.loc
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_SOURCE)$(CPU_SOURCE),$(OS_TARGET)$(CPU_TARGET))
|
ifeq ($(FULL_SOURCE),$(FULL_TARGET))
|
||||||
ifeq ($(GDBFOUND),1)
|
ifeq ($(GDBFOUND),1)
|
||||||
$(CURRDIR)getver$(EXEEXT) : gdbver.pp
|
$(CURRDIR)getver$(EXEEXT) : gdbver.pp
|
||||||
$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
|
$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
|
||||||
ifndef GOTGDBVER
|
ifndef GOTGDBVER
|
||||||
gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT)
|
gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
|
||||||
$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
|
$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
|
||||||
else
|
else
|
||||||
GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
|
GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
|
||||||
|
@ -58,7 +58,7 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
[rules]
|
[rules]
|
||||||
ifeq ($(OS_SOURCE)$(CPU_SOURCE),$(OS_TARGET)$(CPU_TARGET))
|
ifeq ($(FULL_SOURCE),$(FULL_TARGET))
|
||||||
|
|
||||||
ifeq ($(GDBFOUND),1)
|
ifeq ($(GDBFOUND),1)
|
||||||
# libgdb.a found
|
# libgdb.a found
|
||||||
@ -68,7 +68,7 @@ $(CURRDIR)getver$(EXEEXT) : gdbver.pp
|
|||||||
|
|
||||||
ifndef GOTGDBVER
|
ifndef GOTGDBVER
|
||||||
# gdbver doesn't exists, build it first
|
# gdbver doesn't exists, build it first
|
||||||
gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT)
|
gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
|
||||||
$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
|
$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
|
||||||
else
|
else
|
||||||
# gdbver exists
|
# gdbver exists
|
||||||
|
@ -19,221 +19,126 @@ interface
|
|||||||
|
|
||||||
{.define GDB_HAS_SYSROOT} {versions of gdb >5.3 may need this}
|
{.define GDB_HAS_SYSROOT} {versions of gdb >5.3 may need this}
|
||||||
{main.c exports a string that is empty (not null) for}
|
{main.c exports a string that is empty (not null) for}
|
||||||
{targets that do not support sysroot}
|
{targets that do not support sysroot}
|
||||||
{for now GDB_HAS_SYSROOT is not set here, it has to be done}
|
{for now GDB_HAS_SYSROOT is not set here, it has to be done}
|
||||||
{manually (set it if you have the unresolved symbol gdb_sysroot) }
|
{manually (set it if you have the unresolved symbol gdb_sysroot) }
|
||||||
|
|
||||||
{ this is not needed (PM) $output_format as}
|
|
||||||
|
|
||||||
{.$define Verbose}
|
{.$define Verbose}
|
||||||
{.$define DebugCommand}
|
{.$define DebugCommand}
|
||||||
{$define NotImplemented}
|
{$define NotImplemented}
|
||||||
|
|
||||||
|
{ 6.2.x }
|
||||||
|
{$ifdef GDB_V602}
|
||||||
|
{$define GDB_V6}
|
||||||
|
{$define GDB_HAS_SYSROOT}
|
||||||
|
{$endif def GDB_V602}
|
||||||
|
|
||||||
{ GDB has a simulator for powerpc CPU
|
{ GDB has a simulator for powerpc CPU
|
||||||
it is integrated into GDB by default }
|
it is integrated into GDB by default }
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
{$define GDB_HAS_SIM}
|
{$define GDB_HAS_SIM}
|
||||||
{$endif powerpc}
|
{$endif powerpc}
|
||||||
|
|
||||||
{$ifdef BSD} {v4.x nearly useless for BSD. 5.x is fine}
|
|
||||||
{$DEFINE GDB_V502}
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{$ifdef GDB_V600}
|
|
||||||
{$define GDB_V503}
|
|
||||||
{$define GDB_V6}
|
|
||||||
{$define GDB_HAS_SYSROOT}
|
|
||||||
{$endif def GDB_V600}
|
|
||||||
|
|
||||||
{$ifdef GDB_V621}
|
|
||||||
{$define GDB_V503}
|
|
||||||
{$define GDB_V600}
|
|
||||||
{$define GDB_V6}
|
|
||||||
{$define GDB_HAS_SYSROOT}
|
|
||||||
{$endif def GDB_V621}
|
|
||||||
|
|
||||||
{ Default version for GDB 5 is 5.01 for now PM }
|
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
{$ifndef GDB_V500}
|
|
||||||
{$define GDB_V501}
|
|
||||||
{$endif ndef GDB_V500}
|
|
||||||
{$endif def GDB_V5}
|
|
||||||
|
|
||||||
{$ifdef GDB_V503}
|
|
||||||
{$define GDB_V502}
|
|
||||||
{$define GDB_SYMTAB_HAS_MACROS}
|
|
||||||
{$define GDB_V5}
|
|
||||||
{$endif GDB_V503}
|
|
||||||
|
|
||||||
{$ifdef GDB_V502}
|
|
||||||
{$define GDB_V501}
|
|
||||||
{$define GDB_V5}
|
|
||||||
{$endif GDB_V502}
|
|
||||||
|
|
||||||
{$ifdef GDB_V501}
|
|
||||||
{$define GDB_USES_PTID}
|
|
||||||
{$define GDB_V5}
|
|
||||||
{$endif GDB_V501}
|
|
||||||
|
|
||||||
{$ifdef GDB_V500}
|
|
||||||
{$define GDB_V5}
|
|
||||||
{$endif GDB_V500}
|
|
||||||
|
|
||||||
{ V4.18 is default for now }
|
|
||||||
{ set when starting v5 support PM }
|
|
||||||
{$ifndef GDB_V5}
|
|
||||||
{$ifndef GDB_V416}
|
|
||||||
{$define GDB_V418}
|
|
||||||
{$endif GDB_V416}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
|
|
||||||
{$ifdef go32v2}
|
{$ifdef go32v2}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{ ifdef GDB_V418 changed to ifndef GDB_V416}
|
{$LINKLIB gdb}
|
||||||
{$ifdef USE_GDB_OBJS}
|
|
||||||
{$include gdbobjs.inc}
|
|
||||||
{$else USE_GDB_OBJS}
|
|
||||||
{$LINKLIB gdb}
|
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
{$endif GDB_HAS_SIM}
|
{$endif GDB_HAS_SIM}
|
||||||
{$ifdef GDB_V5}
|
{$LINKLIB bfd}
|
||||||
{$LINKLIB bfd}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB readline}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB history}
|
||||||
{$LINKLIB history}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB intl}
|
||||||
{$LINKLIB intl}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{$endif ndef USE_GDB_OBJS}
|
|
||||||
{$LINKLIB dbg}
|
{$LINKLIB dbg}
|
||||||
{$LINKLIB c}
|
{$LINKLIB c}
|
||||||
{$endif go32v2}
|
{$endif go32v2}
|
||||||
|
|
||||||
{$ifndef bsd}
|
|
||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
|
{$ifndef bsd}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{$ifndef GDB_V5}
|
|
||||||
{$LINKLIB ncurses}
|
|
||||||
{$endif not GDB_V5}
|
|
||||||
{$LINKLIB gdb}
|
{$LINKLIB gdb}
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
{$endif GDB_HAS_SIM}
|
{$endif GDB_HAS_SIM}
|
||||||
{$ifdef GDB_V5}
|
{$LINKLIB bfd}
|
||||||
{$LINKLIB bfd}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB readline}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB history}
|
||||||
{$LINKLIB history}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB ncurses}
|
||||||
{$LINKLIB ncurses}
|
{$LINKLIB m}
|
||||||
{$LINKLIB m}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB dl}
|
||||||
{$LINKLIB dl}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{$LINKLIB c}
|
{$LINKLIB c}
|
||||||
{$LINKLIB gcc}
|
{$LINKLIB gcc}
|
||||||
|
{$endif bsd}
|
||||||
{$endif linux}
|
{$endif linux}
|
||||||
{$endif bsd}
|
|
||||||
|
|
||||||
{$ifdef freebsd}
|
{$ifdef freebsd}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{$ifndef GDB_V5}
|
|
||||||
{$LINKLIB ncurses}
|
|
||||||
{$endif not GDB_V5}
|
|
||||||
{$LINKLIB gdb}
|
{$LINKLIB gdb}
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
{$endif GDB_HAS_SIM}
|
{$endif GDB_HAS_SIM}
|
||||||
{$ifdef GDB_V5}
|
{$LINKLIB bfd}
|
||||||
{$LINKLIB bfd}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB readline}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB history}
|
||||||
{$LINKLIB history}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB ncurses}
|
||||||
{$LINKLIB ncurses}
|
{$LINKLIB m}
|
||||||
{$LINKLIB m}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB intl} { does not seem to exist on netbsd LINKLIB dl,
|
||||||
{$LINKLIB intl} { does not seem to exist on netbsd LINKLIB dl,
|
but I use GDB CVS snapshots for the *BSDs}
|
||||||
but I use GDB CVS snapshots for the *BSDs}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{$LINKLIB c}
|
{$LINKLIB c}
|
||||||
{$LINKLIB gcc}
|
{$LINKLIB gcc}
|
||||||
{$endif freebsd}
|
{$endif freebsd}
|
||||||
|
|
||||||
{$ifdef netbsd}
|
{$ifdef netbsd}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{$ifndef GDB_V5}
|
|
||||||
{$LINKLIB ncurses}
|
|
||||||
{$endif not GDB_V5}
|
|
||||||
{$LINKLIB gdb}
|
{$LINKLIB gdb}
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
{$endif GDB_HAS_SIM}
|
{$endif GDB_HAS_SIM}
|
||||||
{$ifdef GDB_V5}
|
{$LINKLIB bfd}
|
||||||
{$LINKLIB bfd}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB readline}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB history}
|
||||||
{$LINKLIB history}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB ncurses}
|
||||||
{$LINKLIB ncurses}
|
{$LINKLIB m}
|
||||||
{$LINKLIB m}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB intl}
|
||||||
{$LINKLIB intl}
|
{ does not seem to exist on netbsd LINKLIB dl}
|
||||||
{ does not seem to exist on netbsd LINKLIB dl}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{$LINKLIB c}
|
{$LINKLIB c}
|
||||||
{$LINKLIB gcc}
|
{$LINKLIB gcc}
|
||||||
{$endif netbsd}
|
{$endif netbsd}
|
||||||
|
|
||||||
{$ifdef openbsd}
|
{$ifdef openbsd}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{$ifndef GDB_V5}
|
|
||||||
{$LINKLIB curses}
|
|
||||||
{$endif not GDB_V5}
|
|
||||||
{$LINKLIB gdb}
|
{$LINKLIB gdb}
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
{$endif GDB_HAS_SIM}
|
{$endif GDB_HAS_SIM}
|
||||||
{$ifdef GDB_V5}
|
{$LINKLIB bfd}
|
||||||
{$LINKLIB bfd}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB readline}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB history}
|
||||||
{$LINKLIB history}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB ncurses}
|
||||||
{$LINKLIB ncurses}
|
{$LINKLIB m}
|
||||||
{$LINKLIB m}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB intl}
|
||||||
{$LINKLIB intl}
|
{ does not seem to exist on netbsd LINKLIB dl}
|
||||||
{ does not seem to exist on netbsd LINKLIB dl}
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{$LINKLIB c}
|
{$LINKLIB c}
|
||||||
{$LINKLIB gcc}
|
{$LINKLIB gcc}
|
||||||
{$endif netbsd}
|
{$endif netbsd}
|
||||||
|
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
{$undef NotImplemented}
|
{$undef NotImplemented}
|
||||||
{$ifndef GDB_V5}
|
{$define GDB_USES_PTID}
|
||||||
{$LINKLIB cygwin}
|
|
||||||
{$LINKLIB gdb}
|
|
||||||
{$ifdef GDB_HAS_SIM}
|
|
||||||
{$LINKLIB sim}
|
|
||||||
{$endif GDB_HAS_SIM}
|
|
||||||
{$ifdef USE_TERMCAP}
|
|
||||||
{$LINKLIB termcap}
|
|
||||||
{$else not USE_TERMCAP}
|
|
||||||
{$LINKLIB ncurses}
|
|
||||||
{$endif not USE_TERMCAP}
|
|
||||||
{$LINKLIB gcc}
|
|
||||||
{$LINKLIB c}
|
|
||||||
{$LINKLIB cygwin}
|
|
||||||
{ all those are maybe not necessary
|
|
||||||
but at least user32 is required
|
|
||||||
because of clipboard handling PM }
|
|
||||||
{$LINKLIB kernel32}
|
|
||||||
{$LINKLIB user32}
|
|
||||||
{$else GDB_V5}
|
|
||||||
{$LINKLIB gdb}
|
{$LINKLIB gdb}
|
||||||
{$ifdef GDB_HAS_SIM}
|
{$ifdef GDB_HAS_SIM}
|
||||||
{$LINKLIB sim}
|
{$LINKLIB sim}
|
||||||
@ -242,16 +147,16 @@ interface
|
|||||||
{$LINKLIB readline}
|
{$LINKLIB readline}
|
||||||
{$LINKLIB opcodes}
|
{$LINKLIB opcodes}
|
||||||
{$LINKLIB intl}
|
{$LINKLIB intl}
|
||||||
|
{$LINKLIB iconv}
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB termcap}
|
{$LINKLIB termcap}
|
||||||
|
{$LINKLIB iberty}
|
||||||
{$LINKLIB gcc}
|
{$LINKLIB gcc}
|
||||||
{$LINKLIB cygwin} { alias of libm.a and libc.a }
|
{$LINKLIB cygwin} { alias of libm.a and libc.a }
|
||||||
{$LINKLIB iberty}
|
{$LINKLIB ncurses}
|
||||||
{$LINKLIB imagehlp}
|
{$LINKLIB imagehlp}
|
||||||
{$LINKLIB kernel32}
|
{$LINKLIB kernel32}
|
||||||
{$LINKLIB user32}
|
{$LINKLIB user32}
|
||||||
{$endif GDB_V5}
|
|
||||||
|
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
|
|
||||||
{$ifdef go32v2}
|
{$ifdef go32v2}
|
||||||
@ -296,7 +201,6 @@ type
|
|||||||
pframeentry=^tframeentry;
|
pframeentry=^tframeentry;
|
||||||
ppframeentry=^pframeentry;
|
ppframeentry=^pframeentry;
|
||||||
|
|
||||||
{$ifndef GDB_V416}
|
|
||||||
{ needed for handles }
|
{ needed for handles }
|
||||||
{not anymore I textrec.inc}
|
{not anymore I textrec.inc}
|
||||||
|
|
||||||
@ -307,19 +211,6 @@ type
|
|||||||
C_FILE = longint; { at least under DJGPP }
|
C_FILE = longint; { at least under DJGPP }
|
||||||
P_C_FILE = ^C_FILE;
|
P_C_FILE = ^C_FILE;
|
||||||
|
|
||||||
{$ifdef GDB_V418}
|
|
||||||
{ GDB_FILE type }
|
|
||||||
type
|
|
||||||
PGDB_FILE = ^TGDB_FILE;
|
|
||||||
TGDB_FILE = record
|
|
||||||
ts_streamtype : streamtype;
|
|
||||||
ts_filestream : P_C_FILE;
|
|
||||||
ts_strbuf : pchar;
|
|
||||||
ts_buflen : longint;
|
|
||||||
end;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
type
|
type
|
||||||
|
|
||||||
pui_file = ^ui_file;
|
pui_file = ^ui_file;
|
||||||
@ -362,8 +253,6 @@ type
|
|||||||
procedure set_ui_file_write(stream : pui_file;write : ui_file_write_ftype);cdecl;external;
|
procedure set_ui_file_write(stream : pui_file;write : ui_file_write_ftype);cdecl;external;
|
||||||
|
|
||||||
|
|
||||||
{$endif GDB_V5}
|
|
||||||
|
|
||||||
{$ifdef GDB_USES_PTID}
|
{$ifdef GDB_USES_PTID}
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -401,19 +290,13 @@ var _impure_ptr : PREENT;cvar;external;
|
|||||||
|
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
|
|
||||||
{$endif not GDB_V416}
|
|
||||||
|
|
||||||
type
|
type
|
||||||
tgdbbuffer=object
|
tgdbbuffer=object
|
||||||
buf : pchar;
|
buf : pchar;
|
||||||
size,
|
size,
|
||||||
idx : longint;
|
idx : longint;
|
||||||
{$ifdef GDB_V418}
|
|
||||||
link : pgdb_file;
|
|
||||||
{$endif not GDB_V418}
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
gdb_file : pui_file;
|
gdb_file : pui_file;
|
||||||
{$endif not GDB_V5}
|
|
||||||
constructor Init;
|
constructor Init;
|
||||||
destructor Done;
|
destructor Done;
|
||||||
procedure Reset;
|
procedure Reset;
|
||||||
@ -685,10 +568,7 @@ type
|
|||||||
psymtab_and_line = ^symtab_and_line;
|
psymtab_and_line = ^symtab_and_line;
|
||||||
symtab_and_line = record
|
symtab_and_line = record
|
||||||
symtab : psymtab;
|
symtab : psymtab;
|
||||||
{$ifndef GDB_V416}
|
|
||||||
{ v4.16 does not have the section field !! }
|
|
||||||
section : pointer; {^asection;}
|
section : pointer; {^asection;}
|
||||||
{$endif GDB_V416}
|
|
||||||
line : longint;
|
line : longint;
|
||||||
pc : CORE_ADDR;
|
pc : CORE_ADDR;
|
||||||
_end : CORE_ADDR;
|
_end : CORE_ADDR;
|
||||||
@ -1145,9 +1025,9 @@ type
|
|||||||
|
|
||||||
var
|
var
|
||||||
{ external variables }
|
{ external variables }
|
||||||
error_return : jmp_buf;cvar;{$ifndef GDB_V5}external;{$endif}
|
error_return : jmp_buf;cvar;
|
||||||
quit_return : jmp_buf;cvar;{$ifndef GDB_V5}external;{$endif}
|
quit_return : jmp_buf;cvar;
|
||||||
{$ifdef GDB_V621}
|
{$ifdef GDB_V602}
|
||||||
deprecated_create_breakpoint_hook : pointer;cvar;external;
|
deprecated_create_breakpoint_hook : pointer;cvar;external;
|
||||||
{$else}
|
{$else}
|
||||||
create_breakpoint_hook : pointer;cvar;external;
|
create_breakpoint_hook : pointer;cvar;external;
|
||||||
@ -1163,9 +1043,6 @@ var
|
|||||||
display_time : longbool;cvar;public;
|
display_time : longbool;cvar;public;
|
||||||
display_space : longbool;cvar;public;
|
display_space : longbool;cvar;public;
|
||||||
|
|
||||||
{$ifndef GDB_V416}
|
|
||||||
{ the following are also needed from version 4.18 }
|
|
||||||
|
|
||||||
{ Whether this is the command line version or not }
|
{ Whether this is the command line version or not }
|
||||||
tui_version : longint;cvar;public;
|
tui_version : longint;cvar;public;
|
||||||
|
|
||||||
@ -1175,18 +1052,12 @@ var
|
|||||||
{ Whether dbx commands will be handled }
|
{ Whether dbx commands will be handled }
|
||||||
dbx_commands : longint;cvar;public;
|
dbx_commands : longint;cvar;public;
|
||||||
|
|
||||||
{$ifndef GDB_V5}
|
|
||||||
var
|
|
||||||
gdb_stdout : PGDB_FILE;cvar;public;
|
|
||||||
gdb_stderr : PGDB_FILE;cvar;public;
|
|
||||||
{$else GDB_V5}
|
|
||||||
var
|
var
|
||||||
gdb_stdout : pui_file;cvar;public;
|
gdb_stdout : pui_file;cvar;public;
|
||||||
gdb_stderr : pui_file;cvar;public;
|
gdb_stderr : pui_file;cvar;public;
|
||||||
gdb_stdlog : pui_file;cvar;public;
|
gdb_stdlog : pui_file;cvar;public;
|
||||||
gdb_stdtarg : pui_file;cvar;public;
|
gdb_stdtarg : pui_file;cvar;public;
|
||||||
event_loop_p : longint;cvar;public;
|
event_loop_p : longint;cvar;public;
|
||||||
{$endif GDB_V5}
|
|
||||||
{$ifdef GDB_V6}
|
{$ifdef GDB_V6}
|
||||||
(* target IO streams *)
|
(* target IO streams *)
|
||||||
gdb_stdtargin : pui_file;cvar;public;
|
gdb_stdtargin : pui_file;cvar;public;
|
||||||
@ -1194,10 +1065,7 @@ var
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{ used for gdb_stdout and gdb_stderr }
|
{ used for gdb_stdout and gdb_stderr }
|
||||||
function xmalloc(size : longint) : pointer;cdecl;external;
|
function xmalloc(size : longint) : pointer;cdecl;external;
|
||||||
|
|
||||||
{$endif not GDB_V416}
|
|
||||||
|
|
||||||
function find_pc_line(i:CORE_ADDR;l:longint):symtab_and_line;cdecl;external;
|
function find_pc_line(i:CORE_ADDR;l:longint):symtab_and_line;cdecl;external;
|
||||||
function find_pc_function(i:CORE_ADDR):psymbol;cdecl;external;
|
function find_pc_function(i:CORE_ADDR):psymbol;cdecl;external;
|
||||||
function lookup_minimal_symbol_by_pc(i : CORE_ADDR):pminimal_symbol;cdecl;external;
|
function lookup_minimal_symbol_by_pc(i : CORE_ADDR):pminimal_symbol;cdecl;external;
|
||||||
@ -1265,12 +1133,7 @@ const
|
|||||||
constructor tgdbbuffer.init;
|
constructor tgdbbuffer.init;
|
||||||
begin
|
begin
|
||||||
Buf:=nil;
|
Buf:=nil;
|
||||||
{$ifdef GDB_V418}
|
|
||||||
link:=nil;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
gdb_file:=nil;
|
gdb_file:=nil;
|
||||||
{$endif GDB_V5}
|
|
||||||
Size:=0;
|
Size:=0;
|
||||||
Resize(blocksize);
|
Resize(blocksize);
|
||||||
Reset;
|
Reset;
|
||||||
@ -1281,14 +1144,6 @@ destructor tgdbbuffer.done;
|
|||||||
begin
|
begin
|
||||||
if assigned(buf) then
|
if assigned(buf) then
|
||||||
freemem(buf,size);
|
freemem(buf,size);
|
||||||
{$ifdef GDB_V418}
|
|
||||||
if assigned(link) then
|
|
||||||
begin
|
|
||||||
link^.ts_streamtype:=afile;
|
|
||||||
link^.ts_strbuf:=nil;
|
|
||||||
link^.ts_buflen:=0;
|
|
||||||
end;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1340,13 +1195,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
buf:=np;
|
buf:=np;
|
||||||
size:=nsize;
|
size:=nsize;
|
||||||
{$ifdef GDB_V418}
|
|
||||||
if assigned(link) then
|
|
||||||
begin
|
|
||||||
link^.ts_strbuf:=buf;
|
|
||||||
link^.ts_buflen:=size;
|
|
||||||
end;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1558,7 +1406,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ only from version 5.0 }
|
|
||||||
procedure annotate_ignore_count_change;cdecl;public;
|
procedure annotate_ignore_count_change;cdecl;public;
|
||||||
begin
|
begin
|
||||||
{$ifdef Verbose}
|
{$ifdef Verbose}
|
||||||
@ -2052,18 +1900,6 @@ procedure _initialize_annotate;cdecl;public;
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifndef GDB_V5}
|
|
||||||
procedure fputs_unfiltered(linebuffer:pchar;stream:pointer);cdecl;public;
|
|
||||||
begin
|
|
||||||
with curr_gdb^ do
|
|
||||||
{$ifdef gdb_v418}
|
|
||||||
if stream = gdb_stderr then
|
|
||||||
gdberrorbuf.append(linebuffer)
|
|
||||||
else
|
|
||||||
{$endif gdb_v418}
|
|
||||||
gdboutputbuf.append(linebuffer);
|
|
||||||
end;
|
|
||||||
{$else GDB_V5}
|
|
||||||
|
|
||||||
procedure gdbint_ui_file_write(stream : pui_file; p : pchar; len : longint);cdecl;
|
procedure gdbint_ui_file_write(stream : pui_file; p : pchar; len : longint);cdecl;
|
||||||
begin
|
begin
|
||||||
@ -2079,7 +1915,6 @@ begin
|
|||||||
gdberrorbuf.lappend(p,len);
|
gdberrorbuf.lappend(p,len);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$endif GDB_V5}
|
|
||||||
|
|
||||||
|
|
||||||
procedure CreateBreakPointHook(var b:breakpoint);cdecl;
|
procedure CreateBreakPointHook(var b:breakpoint);cdecl;
|
||||||
@ -2125,27 +1960,7 @@ begin
|
|||||||
gdboutputbuf.init;
|
gdboutputbuf.init;
|
||||||
gdberrorbuf.init;
|
gdberrorbuf.init;
|
||||||
record_frames:=true;
|
record_frames:=true;
|
||||||
{$ifdef GDB_V418}
|
|
||||||
(* GDB_FILE *
|
|
||||||
gdb_file_init_astring (n)
|
|
||||||
int n;
|
|
||||||
should we use xmalloc ?
|
|
||||||
gdb could resize the buffer => crash,
|
|
||||||
but normally it should not if unfiltered !! PM *)
|
|
||||||
gdb_stdout^.ts_streamtype := astring;
|
|
||||||
gdb_stdout^.ts_strbuf := gdboutputbuf.buf;
|
|
||||||
gdb_stdout^.ts_buflen := gdboutputbuf.size;
|
|
||||||
gdboutputbuf.link:=gdb_stdout;
|
|
||||||
|
|
||||||
gdb_stderr^.ts_streamtype := astring;
|
|
||||||
gdb_stderr^.ts_strbuf := gdberrorbuf.buf;
|
|
||||||
gdb_stderr^.ts_buflen := gdberrorbuf.size;
|
|
||||||
gdberrorbuf.link:=gdb_stderr;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
|
|
||||||
{$endif GDB_V5}
|
|
||||||
{ This must be placed before gdb__init is called
|
{ This must be placed before gdb__init is called
|
||||||
as gdb_init might issue output PM }
|
as gdb_init might issue output PM }
|
||||||
curr_gdb:=@self;
|
curr_gdb:=@self;
|
||||||
@ -2179,7 +1994,7 @@ procedure tgdbinterface.gdb__init;
|
|||||||
begin
|
begin
|
||||||
gdboutputbuf.reset;
|
gdboutputbuf.reset;
|
||||||
gdberrorbuf.reset;
|
gdberrorbuf.reset;
|
||||||
{$ifdef GDB_V621}
|
{$ifdef GDB_V602}
|
||||||
deprecated_create_breakpoint_hook:=@CreateBreakPointHook;
|
deprecated_create_breakpoint_hook:=@CreateBreakPointHook;
|
||||||
{$else}
|
{$else}
|
||||||
create_breakpoint_hook:=@CreateBreakPointHook;
|
create_breakpoint_hook:=@CreateBreakPointHook;
|
||||||
@ -2197,7 +2012,7 @@ begin
|
|||||||
current_target.to_kill;
|
current_target.to_kill;
|
||||||
current_target.to_close(1);
|
current_target.to_close(1);
|
||||||
end;
|
end;
|
||||||
{$ifdef GDB_V621}
|
{$ifdef GDB_V602}
|
||||||
deprecated_create_breakpoint_hook:=nil;
|
deprecated_create_breakpoint_hook:=nil;
|
||||||
{$else}
|
{$else}
|
||||||
create_breakpoint_hook:=nil;
|
create_breakpoint_hook:=nil;
|
||||||
@ -2218,7 +2033,6 @@ end;
|
|||||||
var
|
var
|
||||||
top_level_val : longint;
|
top_level_val : longint;
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
function catch_errors(func : pointer; command : pchar; from_tty,mask : longint) : longint;cdecl;external;
|
function catch_errors(func : pointer; command : pchar; from_tty,mask : longint) : longint;cdecl;external;
|
||||||
|
|
||||||
function gdbint_execute_command(command : pchar; from_tty,mask : longint) : longint;cdecl;
|
function gdbint_execute_command(command : pchar; from_tty,mask : longint) : longint;cdecl;
|
||||||
@ -2227,7 +2041,6 @@ begin
|
|||||||
execute_command(command,from_tty);
|
execute_command(command,from_tty);
|
||||||
gdbint_execute_command:=0;
|
gdbint_execute_command:=0;
|
||||||
end;
|
end;
|
||||||
{$endif GDB_V5}
|
|
||||||
|
|
||||||
{$ifdef cpui386}
|
{$ifdef cpui386}
|
||||||
type
|
type
|
||||||
@ -2275,9 +2088,7 @@ end;
|
|||||||
procedure tgdbinterface.gdb_command(const s:string);
|
procedure tgdbinterface.gdb_command(const s:string);
|
||||||
var
|
var
|
||||||
command : array[0..256] of char;
|
command : array[0..256] of char;
|
||||||
{$ifdef GDB_V5}
|
|
||||||
mask : longint;
|
mask : longint;
|
||||||
{$endif GDB_V5}
|
|
||||||
s2 : string;
|
s2 : string;
|
||||||
old_quit_return,
|
old_quit_return,
|
||||||
old_error_return : jmp_buf;
|
old_error_return : jmp_buf;
|
||||||
@ -2322,12 +2133,8 @@ begin
|
|||||||
if top_level_val=0 then
|
if top_level_val=0 then
|
||||||
begin
|
begin
|
||||||
quit_return:=error_return;
|
quit_return:=error_return;
|
||||||
{$ifdef GDB_V5}
|
|
||||||
mask:=longint($ffffffff);
|
mask:=longint($ffffffff);
|
||||||
catch_errors(@gdbint_execute_command,@command,0,mask);
|
catch_errors(@gdbint_execute_command,@command,0,mask);
|
||||||
{$else not GDB_V5}
|
|
||||||
execute_command(@command,0);
|
|
||||||
{$endif not GDB_V5}
|
|
||||||
{$ifdef go32v2}
|
{$ifdef go32v2}
|
||||||
reload_fs;
|
reload_fs;
|
||||||
{$endif go32v2}
|
{$endif go32v2}
|
||||||
@ -2558,16 +2365,11 @@ begin
|
|||||||
AllowQuit:=true;
|
AllowQuit:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
var
|
var
|
||||||
version : array[0..0] of char;cvar;external;
|
version : array[0..0] of char;cvar;external;
|
||||||
|
|
||||||
procedure error_init;cdecl;external;
|
procedure error_init;cdecl;external;
|
||||||
|
|
||||||
{$else}
|
|
||||||
var
|
|
||||||
version : pchar;cvar;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
function GDBVersion : string;
|
function GDBVersion : string;
|
||||||
begin
|
begin
|
||||||
@ -2579,14 +2381,6 @@ const next_exit : pointer = nil;
|
|||||||
procedure DoneLibGDB;
|
procedure DoneLibGDB;
|
||||||
begin
|
begin
|
||||||
exitproc:=next_exit;
|
exitproc:=next_exit;
|
||||||
{$ifdef GDB_V418}
|
|
||||||
if assigned(gdb_stdout) then
|
|
||||||
dispose(gdb_stdout);
|
|
||||||
gdb_stdout:=nil;
|
|
||||||
if assigned(gdb_stderr) then
|
|
||||||
dispose(gdb_stderr);
|
|
||||||
gdb_stderr:=nil;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef go32v2}
|
{$ifdef go32v2}
|
||||||
@ -2596,24 +2390,6 @@ var
|
|||||||
c_argv : ppchar;external name '___crt0_argv';
|
c_argv : ppchar;external name '___crt0_argv';
|
||||||
{$endif def go32v2}
|
{$endif def go32v2}
|
||||||
|
|
||||||
{$ifdef GDB_V418}
|
|
||||||
{$ifndef go32v2}
|
|
||||||
{$ifndef win32}
|
|
||||||
var
|
|
||||||
stdout : p_c_file;cvar;external;
|
|
||||||
stderr : p_c_file;cvar;external;
|
|
||||||
{$endif win32}
|
|
||||||
{$else go32v2}
|
|
||||||
{ the type is not really important
|
|
||||||
for external cvars PM
|
|
||||||
but the main problem is that stdout and stderr
|
|
||||||
and defined as macros under DJGPP !! }
|
|
||||||
var
|
|
||||||
__dj_stdout : c_file;cvar;external;
|
|
||||||
__dj_stderr : c_file;cvar;external;
|
|
||||||
{$endif go32v2}
|
|
||||||
{$endif not GDB_V418}
|
|
||||||
|
|
||||||
procedure InitLibGDB;
|
procedure InitLibGDB;
|
||||||
{$ifdef supportexceptions}
|
{$ifdef supportexceptions}
|
||||||
var
|
var
|
||||||
@ -2637,38 +2413,6 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
{$endif supportexceptions}
|
{$endif supportexceptions}
|
||||||
|
|
||||||
{$ifdef GDB_V418}
|
|
||||||
new(gdb_stdout);
|
|
||||||
|
|
||||||
gdb_stdout^.ts_streamtype := afile;
|
|
||||||
{$ifndef go32v2}
|
|
||||||
{$ifdef win32}
|
|
||||||
gdb_stdout^.ts_filestream := _impure_ptr^.stdout;
|
|
||||||
{$else not win32 }
|
|
||||||
gdb_stdout^.ts_filestream := stdout;{p_c_file(textrec(output).handle); was wrong PM }
|
|
||||||
{$endif not win32 }
|
|
||||||
{$else go32v2}
|
|
||||||
gdb_stdout^.ts_filestream := @__dj_stdout;
|
|
||||||
{$endif go32v2}
|
|
||||||
gdb_stdout^.ts_strbuf := nil;
|
|
||||||
gdb_stdout^.ts_buflen := 0;
|
|
||||||
|
|
||||||
new(gdb_stderr);
|
|
||||||
gdb_stderr^.ts_streamtype := afile;
|
|
||||||
{$ifndef go32v2}
|
|
||||||
{$ifdef win32}
|
|
||||||
gdb_stderr^.ts_filestream := _impure_ptr^.stderr;
|
|
||||||
{$else not win32 }
|
|
||||||
gdb_stderr^.ts_filestream := stderr;
|
|
||||||
{$endif not win32 }
|
|
||||||
{$else go32v2}
|
|
||||||
gdb_stderr^.ts_filestream := @__dj_stderr;
|
|
||||||
{$endif go32v2}
|
|
||||||
gdb_stderr^.ts_strbuf := nil;
|
|
||||||
gdb_stderr^.ts_buflen := 0;
|
|
||||||
{$endif GDB_V418}
|
|
||||||
|
|
||||||
{$ifdef GDB_V5}
|
|
||||||
if assigned(gdb_stderr) then
|
if assigned(gdb_stderr) then
|
||||||
ui_file_delete(gdb_stderr);
|
ui_file_delete(gdb_stderr);
|
||||||
if assigned(gdb_stdout) then
|
if assigned(gdb_stdout) then
|
||||||
@ -2680,7 +2424,6 @@ begin
|
|||||||
set_ui_file_write(gdb_stdout,@gdbint_ui_file_write);
|
set_ui_file_write(gdb_stdout,@gdbint_ui_file_write);
|
||||||
set_ui_file_write(gdb_stderr,@gdbint_ui_file_write);
|
set_ui_file_write(gdb_stderr,@gdbint_ui_file_write);
|
||||||
error_init;
|
error_init;
|
||||||
{$endif GDB_V5}
|
|
||||||
{$ifdef GDB_V6}
|
{$ifdef GDB_V6}
|
||||||
// gdb_stdtargin := gdb_stdin;
|
// gdb_stdtargin := gdb_stdin;
|
||||||
gdb_stdtargerr := gdb_stderr;
|
gdb_stdtargerr := gdb_stderr;
|
||||||
@ -2730,7 +2473,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.18 2004-10-04 17:59:19 armin
|
Revision 1.19 2004-11-04 17:56:36 peter
|
||||||
|
drop 4.x support, fixed 6.2.x support
|
||||||
|
|
||||||
|
Revision 1.18 2004/10/04 17:59:19 armin
|
||||||
* added support for gdb 6.0 and 6.2.1
|
* added support for gdb 6.0 and 6.2.1
|
||||||
|
|
||||||
Revision 1.17 2003/11/05 15:41:30 florian
|
Revision 1.17 2003/11/05 15:41:30 florian
|
||||||
|
@ -11,7 +11,7 @@ program find_gdb_version;
|
|||||||
{$ifdef unix}
|
{$ifdef unix}
|
||||||
{$Linklib c}
|
{$Linklib c}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$Linklib gdb}
|
{$Linklib gdb}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -35,7 +35,6 @@ const
|
|||||||
|
|
||||||
var
|
var
|
||||||
v5_version : array[0..0] of char;external name ver_name;
|
v5_version : array[0..0] of char;external name ver_name;
|
||||||
v4_version : pchar;external name ver_name;
|
|
||||||
version : pchar;
|
version : pchar;
|
||||||
subver_str : string;
|
subver_str : string;
|
||||||
i, version_number,
|
i, version_number,
|
||||||
@ -88,8 +87,8 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if not only_ver then
|
if not only_ver then
|
||||||
Writeln('GDB version is ',v4_version);
|
Writeln('Unsupported GDB version');
|
||||||
version_number:=ord(v4_version[0])-ord('0');
|
version_number:=0;
|
||||||
end;
|
end;
|
||||||
freemem(version,Max_version_length+1);
|
freemem(version,Max_version_length+1);
|
||||||
if only_ver then
|
if only_ver then
|
||||||
@ -99,7 +98,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-02-12 15:59:27 peter
|
Revision 1.9 2004-11-04 17:56:36 peter
|
||||||
|
drop 4.x support, fixed 6.2.x support
|
||||||
|
|
||||||
|
Revision 1.8 2004/02/12 15:59:27 peter
|
||||||
* linklib c only for unix
|
* linklib c only for unix
|
||||||
|
|
||||||
Revision 1.7 2004/02/11 20:50:48 peter
|
Revision 1.7 2004/02/11 20:50:48 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user