mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 10:49:20 +02:00
* applied Peter's patch from yesterday
This commit is contained in:
parent
161cbe3824
commit
8acd96fa67
157
ide/Makefile
157
ide/Makefile
@ -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/09]
|
||||||
#
|
#
|
||||||
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
|
||||||
@ -221,23 +221,7 @@ endif
|
|||||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
||||||
override PACKAGE_NAME=ide
|
override PACKAGE_NAME=ide
|
||||||
override PACKAGE_VERSION=1.9.4
|
override PACKAGE_VERSION=1.9.4
|
||||||
ifeq ($(OS_TARGET),linux)
|
ifndef NOGDB
|
||||||
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
||||||
override FPCOPT+=-dUNIX
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),freebsd)
|
|
||||||
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
||||||
override FPCOPT+=-dUNIX
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(wildcard units/$(FULL_TARGET)/finput.*),)
|
|
||||||
override FPCOPT+=-dCOMPILER_1_0
|
|
||||||
endif
|
|
||||||
ifndef GDBINT
|
|
||||||
GDBINT=gdbint
|
|
||||||
endif
|
|
||||||
ifeq ($(GDB),1)
|
|
||||||
ifdef GDBLIBDIR
|
ifdef GDBLIBDIR
|
||||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||||
endif
|
endif
|
||||||
@ -249,15 +233,17 @@ endif
|
|||||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||||
endif
|
endif
|
||||||
ifeq ($(LIBGDBFILE),)
|
ifeq ($(LIBGDBFILE),)
|
||||||
override GDB=
|
GDB=
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(GDB),1)
|
|
||||||
override LIBDIR+=$(GDBLIBDIR)
|
|
||||||
else
|
else
|
||||||
override BUILDFAKEGDB=fakegdbunits
|
GDB=1
|
||||||
endif
|
endif
|
||||||
override TARGET_DIRS+=compiler fakegdb
|
ifdef GDB
|
||||||
|
override LIBDIR+=$(GDBLIBDIR)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
GDB=
|
||||||
|
endif #NOGDB
|
||||||
|
override TARGET_DIRS+=compiler
|
||||||
override TARGET_PROGRAMS+=fp
|
override TARGET_PROGRAMS+=fp
|
||||||
override INSTALL_DATADIR=$(INSTALL_BASEDIR)/ide
|
override INSTALL_DATADIR=$(INSTALL_BASEDIR)/ide
|
||||||
override INSTALL_FPCPACKAGE=y
|
override INSTALL_FPCPACKAGE=y
|
||||||
@ -453,14 +439,14 @@ ifeq ($(CPU_TARGET),i386)
|
|||||||
ifneq ($(findstring x86_64,$(shell uname -a)),)
|
ifneq ($(findstring x86_64,$(shell uname -a)),)
|
||||||
ifeq ($(BINUTILSPREFIX),)
|
ifeq ($(BINUTILSPREFIX),)
|
||||||
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
|
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
|
||||||
else
|
|
||||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
|
||||||
endif
|
endif
|
||||||
else
|
endif
|
||||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
endif
|
||||||
|
ifndef GCCLIBDIR
|
||||||
|
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
|
ifneq ($(CROSSGCC),)
|
||||||
|
GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifndef OTHERLIBDIR
|
ifndef OTHERLIBDIR
|
||||||
@ -785,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
|
||||||
@ -799,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
|
||||||
@ -813,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
|
||||||
@ -825,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
|
||||||
@ -834,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
|
||||||
@ -843,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
|
||||||
@ -854,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
|
||||||
@ -909,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
|
||||||
@ -918,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
|
||||||
@ -927,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
|
||||||
@ -936,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
|
||||||
@ -1906,7 +1892,6 @@ fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIR
|
|||||||
fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
|
fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
|
||||||
fpc_makefiles: fpc_makefile fpc_makefile_dirs
|
fpc_makefiles: fpc_makefile fpc_makefile_dirs
|
||||||
TARGET_DIRS_COMPILER=1
|
TARGET_DIRS_COMPILER=1
|
||||||
TARGET_DIRS_FAKEGDB=1
|
|
||||||
ifdef TARGET_DIRS_COMPILER
|
ifdef TARGET_DIRS_COMPILER
|
||||||
compiler_all:
|
compiler_all:
|
||||||
$(MAKE) -C compiler all
|
$(MAKE) -C compiler all
|
||||||
@ -1952,51 +1937,6 @@ compiler:
|
|||||||
$(MAKE) -C compiler all
|
$(MAKE) -C compiler all
|
||||||
.PHONY: compiler_all compiler_debug compiler_smart compiler_release compiler_units compiler_examples compiler_shared compiler_install compiler_sourceinstall compiler_exampleinstall compiler_distinstall compiler_zipinstall compiler_zipsourceinstall compiler_zipexampleinstall compiler_zipdistinstall compiler_clean compiler_distclean compiler_cleanall compiler_info compiler_makefiles compiler
|
.PHONY: compiler_all compiler_debug compiler_smart compiler_release compiler_units compiler_examples compiler_shared compiler_install compiler_sourceinstall compiler_exampleinstall compiler_distinstall compiler_zipinstall compiler_zipsourceinstall compiler_zipexampleinstall compiler_zipdistinstall compiler_clean compiler_distclean compiler_cleanall compiler_info compiler_makefiles compiler
|
||||||
endif
|
endif
|
||||||
ifdef TARGET_DIRS_FAKEGDB
|
|
||||||
fakegdb_all:
|
|
||||||
$(MAKE) -C fakegdb all
|
|
||||||
fakegdb_debug:
|
|
||||||
$(MAKE) -C fakegdb debug
|
|
||||||
fakegdb_smart:
|
|
||||||
$(MAKE) -C fakegdb smart
|
|
||||||
fakegdb_release:
|
|
||||||
$(MAKE) -C fakegdb release
|
|
||||||
fakegdb_units:
|
|
||||||
$(MAKE) -C fakegdb units
|
|
||||||
fakegdb_examples:
|
|
||||||
$(MAKE) -C fakegdb examples
|
|
||||||
fakegdb_shared:
|
|
||||||
$(MAKE) -C fakegdb shared
|
|
||||||
fakegdb_install:
|
|
||||||
$(MAKE) -C fakegdb install
|
|
||||||
fakegdb_sourceinstall:
|
|
||||||
$(MAKE) -C fakegdb sourceinstall
|
|
||||||
fakegdb_exampleinstall:
|
|
||||||
$(MAKE) -C fakegdb exampleinstall
|
|
||||||
fakegdb_distinstall:
|
|
||||||
$(MAKE) -C fakegdb distinstall
|
|
||||||
fakegdb_zipinstall:
|
|
||||||
$(MAKE) -C fakegdb zipinstall
|
|
||||||
fakegdb_zipsourceinstall:
|
|
||||||
$(MAKE) -C fakegdb zipsourceinstall
|
|
||||||
fakegdb_zipexampleinstall:
|
|
||||||
$(MAKE) -C fakegdb zipexampleinstall
|
|
||||||
fakegdb_zipdistinstall:
|
|
||||||
$(MAKE) -C fakegdb zipdistinstall
|
|
||||||
fakegdb_clean:
|
|
||||||
$(MAKE) -C fakegdb clean
|
|
||||||
fakegdb_distclean:
|
|
||||||
$(MAKE) -C fakegdb distclean
|
|
||||||
fakegdb_cleanall:
|
|
||||||
$(MAKE) -C fakegdb cleanall
|
|
||||||
fakegdb_info:
|
|
||||||
$(MAKE) -C fakegdb info
|
|
||||||
fakegdb_makefiles:
|
|
||||||
$(MAKE) -C fakegdb makefiles
|
|
||||||
fakegdb:
|
|
||||||
$(MAKE) -C fakegdb all
|
|
||||||
.PHONY: fakegdb_all fakegdb_debug fakegdb_smart fakegdb_release fakegdb_units fakegdb_examples fakegdb_shared fakegdb_install fakegdb_sourceinstall fakegdb_exampleinstall fakegdb_distinstall fakegdb_zipinstall fakegdb_zipsourceinstall fakegdb_zipexampleinstall fakegdb_zipdistinstall fakegdb_clean fakegdb_distclean fakegdb_cleanall fakegdb_info fakegdb_makefiles fakegdb
|
|
||||||
endif
|
|
||||||
debug: fpc_debug
|
debug: fpc_debug
|
||||||
smart: fpc_smart
|
smart: fpc_smart
|
||||||
release: fpc_release
|
release: fpc_release
|
||||||
@ -2022,47 +1962,44 @@ endif
|
|||||||
clean_compiler clean testgdb postgdbinfo
|
clean_compiler clean testgdb postgdbinfo
|
||||||
clean: fpc_cleanall
|
clean: fpc_cleanall
|
||||||
distclean: clean compilerclean
|
distclean: clean compilerclean
|
||||||
ifneq ($(wildcard $(UNITDIR_FV)/fvconsts$(PPUEXT)),)
|
ifndef NOGDB
|
||||||
override COMPILER+=-dFVISION
|
ifdef GDB
|
||||||
endif
|
|
||||||
ifeq ($(GDB),1)
|
|
||||||
ifneq ($(GDBFOUND),0)
|
|
||||||
override COMPILER+=-dWITH_GDB
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
|
||||||
testgdb:
|
testgdb:
|
||||||
ifneq ($(GDBFOUND),0)
|
|
||||||
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
||||||
|
postgdbinfo:
|
||||||
|
@$(ECHO) LibGDB was found, IDE has Debugger support
|
||||||
else
|
else
|
||||||
|
override COMPILER+=-dNODEBUG
|
||||||
|
testgdb:
|
||||||
@$(ECHO) LibGDB not found
|
@$(ECHO) LibGDB not found
|
||||||
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
||||||
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
||||||
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
||||||
endif
|
|
||||||
postgdbinfo:
|
postgdbinfo:
|
||||||
ifeq ($(GDBFOUND),0)
|
|
||||||
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
testgdb:
|
||||||
|
@$(ECHO) Building without Debugger
|
||||||
|
postgdbinfo:
|
||||||
|
@$(ECHO) Debugger disabled, IDE has no Debugger support
|
||||||
|
override COMPILER+=-dNODEBUG
|
||||||
|
endif # NOGDB
|
||||||
compilerunits : compiler/$(FPCMADE)
|
compilerunits : compiler/$(FPCMADE)
|
||||||
compiler/$(FPCMADE):
|
compiler/$(FPCMADE):
|
||||||
$(MAKE) -C compiler all
|
$(MAKE) -C compiler all
|
||||||
compilerclean :
|
compilerclean :
|
||||||
$(MAKE) -C compiler clean
|
$(MAKE) -C compiler clean
|
||||||
fakegdbunits : fakegdb/$(FPCMADE)
|
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||||
fakegdb/$(FPCMADE):
|
|
||||||
$(MAKE) -C fakegdb all
|
|
||||||
fakegdbclean :
|
|
||||||
$(MAKE) -C fakegdb clean
|
|
||||||
fakegdbinfo:
|
|
||||||
@$(ECHO) Using FakeGDB, IDE has no Debugger support
|
|
||||||
buildfp:
|
buildfp:
|
||||||
$(MAKE) compilerunits $(BUILDFAKEGDB)
|
$(MAKE) compilerunits
|
||||||
|
$(MAKE) testgdb
|
||||||
$(MAKE) fpc_all
|
$(MAKE) fpc_all
|
||||||
|
$(MAKE) postgdbinfo
|
||||||
gdb:
|
gdb:
|
||||||
$(MAKE) testgdb buildfp postgdbinfo GDB=1
|
$(MAKE) buildfp
|
||||||
nogdb:
|
nogdb:
|
||||||
$(MAKE) buildfp fakegdbinfo
|
$(MAKE) buildfp NOGDB=1
|
||||||
all: gdb
|
all: gdb
|
||||||
clean: cleanall
|
clean: cleanall
|
||||||
ifndef UNIXINSTALLDIR
|
ifndef UNIXINSTALLDIR
|
||||||
|
123
ide/Makefile.fpc
123
ide/Makefile.fpc
@ -9,7 +9,7 @@ name=ide
|
|||||||
version=1.9.4
|
version=1.9.4
|
||||||
|
|
||||||
[target]
|
[target]
|
||||||
dirs=compiler fakegdb
|
dirs=compiler
|
||||||
programs=fp
|
programs=fp
|
||||||
rst=fpstrings
|
rst=fpstrings
|
||||||
|
|
||||||
@ -28,47 +28,13 @@ libc=y
|
|||||||
fpcdir=..
|
fpcdir=..
|
||||||
|
|
||||||
[prerules]
|
[prerules]
|
||||||
#
|
|
||||||
# Linux->Unix transistion fix
|
|
||||||
#
|
|
||||||
ifeq ($(OS_TARGET),linux)
|
|
||||||
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
||||||
override FPCOPT+=-dUNIX
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),freebsd)
|
|
||||||
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
||||||
override FPCOPT+=-dUNIX
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Automatic detection of the compiler version
|
|
||||||
#
|
|
||||||
# compilers 1.0.x need to define COMPILER_1_0.
|
|
||||||
#
|
|
||||||
# To detect 1.0.x compilers we look for finput.ppu. If this unit
|
|
||||||
# is not found then we include 1.0.x compiler
|
|
||||||
#
|
|
||||||
ifeq ($(wildcard units/$(FULL_TARGET)/finput.*),)
|
|
||||||
override FPCOPT+=-dCOMPILER_1_0
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Automatic detection if libgdb.a is present
|
# Automatic detection if libgdb.a is present
|
||||||
#
|
#
|
||||||
|
|
||||||
# when including debugger include the gdbinterface
|
ifndef NOGDB
|
||||||
ifndef GDBINT
|
|
||||||
GDBINT=gdbint
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Try to find GDB library
|
# Try to find GDB library
|
||||||
ifeq ($(GDB),1)
|
|
||||||
|
|
||||||
# Look for a valid GDBLIBDIR environment variable
|
# Look for a valid GDBLIBDIR environment variable
|
||||||
ifdef GDBLIBDIR
|
ifdef GDBLIBDIR
|
||||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||||
@ -87,19 +53,24 @@ endif
|
|||||||
|
|
||||||
# Disable GDB when no libgdb.a found
|
# Disable GDB when no libgdb.a found
|
||||||
ifeq ($(LIBGDBFILE),)
|
ifeq ($(LIBGDBFILE),)
|
||||||
override GDB=
|
GDB=
|
||||||
|
else
|
||||||
|
GDB=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# end GDB defined
|
ifdef GDB
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GDB),1)
|
|
||||||
# The gdbint is already included due the gdbint package dependency
|
# The gdbint is already included due the gdbint package dependency
|
||||||
override LIBDIR+=$(GDBLIBDIR)
|
override LIBDIR+=$(GDBLIBDIR)
|
||||||
else
|
|
||||||
override BUILDFAKEGDB=fakegdbunits
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# Disable
|
||||||
|
GDB=
|
||||||
|
|
||||||
|
endif #NOGDB
|
||||||
|
|
||||||
|
|
||||||
[rules]
|
[rules]
|
||||||
.PHONY: compilerunits compilerclean \
|
.PHONY: compilerunits compilerclean \
|
||||||
nogdb gdb all \
|
nogdb gdb all \
|
||||||
@ -110,35 +81,38 @@ clean: fpc_cleanall
|
|||||||
distclean: clean compilerclean
|
distclean: clean compilerclean
|
||||||
|
|
||||||
#
|
#
|
||||||
# FVision or old FV detection
|
# GDB detection
|
||||||
#
|
#
|
||||||
ifneq ($(wildcard $(UNITDIR_FV)/fvconsts$(PPUEXT)),)
|
ifndef NOGDB
|
||||||
override COMPILER+=-dFVISION
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GDB),1)
|
|
||||||
ifneq ($(GDBFOUND),0)
|
|
||||||
override COMPILER+=-dWITH_GDB
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
|
||||||
|
|
||||||
|
ifdef GDB
|
||||||
testgdb:
|
testgdb:
|
||||||
ifneq ($(GDBFOUND),0)
|
|
||||||
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
||||||
|
|
||||||
|
postgdbinfo:
|
||||||
|
@$(ECHO) LibGDB was found, IDE has Debugger support
|
||||||
|
|
||||||
else
|
else
|
||||||
|
override COMPILER+=-dNODEBUG
|
||||||
|
testgdb:
|
||||||
@$(ECHO) LibGDB not found
|
@$(ECHO) LibGDB not found
|
||||||
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
||||||
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
||||||
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
||||||
endif
|
|
||||||
|
|
||||||
postgdbinfo:
|
postgdbinfo:
|
||||||
ifeq ($(GDBFOUND),0)
|
|
||||||
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
testgdb:
|
||||||
|
@$(ECHO) Building without Debugger
|
||||||
|
postgdbinfo:
|
||||||
|
@$(ECHO) Debugger disabled, IDE has no Debugger support
|
||||||
|
override COMPILER+=-dNODEBUG
|
||||||
|
endif # NOGDB
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compiler
|
# Compiler
|
||||||
#
|
#
|
||||||
@ -150,45 +124,33 @@ compiler/$(FPCMADE):
|
|||||||
compilerclean :
|
compilerclean :
|
||||||
$(MAKE) -C compiler clean
|
$(MAKE) -C compiler clean
|
||||||
|
|
||||||
#
|
|
||||||
# Fake GDB
|
|
||||||
#
|
|
||||||
|
|
||||||
fakegdbunits : fakegdb/$(FPCMADE)
|
|
||||||
fakegdb/$(FPCMADE):
|
|
||||||
$(MAKE) -C fakegdb all
|
|
||||||
|
|
||||||
fakegdbclean :
|
|
||||||
$(MAKE) -C fakegdb clean
|
|
||||||
|
|
||||||
fakegdbinfo:
|
|
||||||
@$(ECHO) Using FakeGDB, IDE has no Debugger support
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build targets
|
# Build targets
|
||||||
#
|
#
|
||||||
# building happends in 2 steps, first the packages, compiler and fakegdb
|
# building happends in 2 steps, first the packages, compiler
|
||||||
# dirs are build. In the second step the IDE is build. This is
|
# dirs are build. In the second step the IDE is build. This is
|
||||||
# required because it needs to detect which compiler version
|
# required because it needs to detect which compiler version
|
||||||
# to use.
|
# to use.
|
||||||
#
|
#
|
||||||
|
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||||
|
|
||||||
buildfp:
|
buildfp:
|
||||||
$(MAKE) compilerunits $(BUILDFAKEGDB)
|
$(MAKE) compilerunits
|
||||||
|
$(MAKE) testgdb
|
||||||
$(MAKE) fpc_all
|
$(MAKE) fpc_all
|
||||||
|
$(MAKE) postgdbinfo
|
||||||
|
|
||||||
gdb:
|
gdb:
|
||||||
$(MAKE) testgdb buildfp postgdbinfo GDB=1
|
$(MAKE) buildfp
|
||||||
|
|
||||||
nogdb:
|
nogdb:
|
||||||
$(MAKE) buildfp fakegdbinfo
|
$(MAKE) buildfp NOGDB=1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Default targets
|
# Default targets
|
||||||
#
|
#
|
||||||
|
|
||||||
# By default we try to create the ide with full debugging support,
|
# By default we try to create the ide with full debugging support,
|
||||||
# if gdbint and libgdb is not available it will fallback to use
|
|
||||||
# fakegdb
|
|
||||||
all: gdb
|
all: gdb
|
||||||
|
|
||||||
# This is necessary because we don't have all units separate in the
|
# This is necessary because we don't have all units separate in the
|
||||||
@ -222,7 +184,10 @@ clean_compiler:
|
|||||||
|
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
# Revision 1.26 2004-11-05 19:10:18 peter
|
# Revision 1.27 2004-11-11 15:20:52 florian
|
||||||
|
# * applied Peter's patch from yesterday
|
||||||
|
#
|
||||||
|
# Revision 1.26 2004/11/05 19:10:18 peter
|
||||||
# * report where libgdb.a is found
|
# * report where libgdb.a is found
|
||||||
#
|
#
|
||||||
# Revision 1.25 2004/11/05 13:25:10 peter
|
# Revision 1.25 2004/11/05 13:25:10 peter
|
||||||
|
@ -23,11 +23,15 @@ uses
|
|||||||
Windows,
|
Windows,
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
Objects,Dialogs,Drivers,Views,
|
Objects,Dialogs,Drivers,Views,
|
||||||
GDBCon,GDBInt,Menus,
|
{$ifndef NODEBUG}
|
||||||
|
GDBCon,GDBInt,
|
||||||
|
{$endif NODEBUG}
|
||||||
|
Menus,
|
||||||
WViews,WEditor,
|
WViews,WEditor,
|
||||||
FPViews;
|
FPViews;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{$ifndef NODEBUG}
|
||||||
PDebugController=^TDebugController;
|
PDebugController=^TDebugController;
|
||||||
TDebugController=object(TGDBController)
|
TDebugController=object(TGDBController)
|
||||||
InvalidSourceLine : boolean;
|
InvalidSourceLine : boolean;
|
||||||
@ -81,6 +85,7 @@ type
|
|||||||
function GetLongintAt(addr : CORE_ADDR) : longint;
|
function GetLongintAt(addr : CORE_ADDR) : longint;
|
||||||
function GetPointerAt(addr : CORE_ADDR) : CORE_ADDR;
|
function GetPointerAt(addr : CORE_ADDR) : CORE_ADDR;
|
||||||
end;
|
end;
|
||||||
|
{$endif NODEBUG}
|
||||||
|
|
||||||
BreakpointType = (bt_function,bt_file_line,bt_watch,
|
BreakpointType = (bt_function,bt_file_line,bt_watch,
|
||||||
bt_awatch,bt_rwatch,bt_address,bt_invalid);
|
bt_awatch,bt_rwatch,bt_address,bt_invalid);
|
||||||
@ -297,7 +302,9 @@ const
|
|||||||
= ( 'enabled','disabled','invalid',''{'to be deleted' should never be used});
|
= ( 'enabled','disabled','invalid',''{'to be deleted' should never be used});
|
||||||
|
|
||||||
var
|
var
|
||||||
|
{$ifndef NODEBUG}
|
||||||
Debugger : PDebugController;
|
Debugger : PDebugController;
|
||||||
|
{$endif NODEBUG}
|
||||||
BreakpointsCollection : PBreakpointCollection;
|
BreakpointsCollection : PBreakpointCollection;
|
||||||
WatchesCollection : PwatchesCollection;
|
WatchesCollection : PwatchesCollection;
|
||||||
|
|
||||||
@ -316,6 +323,7 @@ procedure RegisterFPDebugViews;
|
|||||||
|
|
||||||
procedure UpdateDebugViews;
|
procedure UpdateDebugViews;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -449,6 +457,9 @@ function GDBFileName(st : string) : string;
|
|||||||
var i : longint;
|
var i : longint;
|
||||||
{$endif Unix}
|
{$endif Unix}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef NODEBUG}
|
||||||
|
GDBFileName:=st;
|
||||||
|
{$else NODEBUG}
|
||||||
{$ifdef Unix}
|
{$ifdef Unix}
|
||||||
GDBFileName:=st;
|
GDBFileName:=st;
|
||||||
{$else}
|
{$else}
|
||||||
@ -476,6 +487,7 @@ begin
|
|||||||
{$endif go32v2}
|
{$endif go32v2}
|
||||||
GDBFileName:=LowerCaseStr(st);
|
GDBFileName:=LowerCaseStr(st);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function OSFileName(st : string) : string;
|
function OSFileName(st : string) : string;
|
||||||
@ -487,9 +499,11 @@ begin
|
|||||||
OSFileName:=st;
|
OSFileName:=st;
|
||||||
{$else}
|
{$else}
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
|
{$ifndef NODEBUG}
|
||||||
{ for win32 we should convert /cygdrive/e/ into e:\ PM }
|
{ for win32 we should convert /cygdrive/e/ into e:\ PM }
|
||||||
if pos(CygDrivePrefix+'/',st)=1 then
|
if pos(CygDrivePrefix+'/',st)=1 then
|
||||||
st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
|
st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
|
||||||
|
{$endif NODEBUG}
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
{ support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
|
{ support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
|
||||||
for i:=Length(st) downto 2 do
|
for i:=Length(st) downto 2 do
|
||||||
@ -523,8 +537,10 @@ procedure UpdateDebugViews;
|
|||||||
StackWindow^.Update;
|
StackWindow^.Update;
|
||||||
If assigned(RegistersWindow) then
|
If assigned(RegistersWindow) then
|
||||||
RegistersWindow^.Update;
|
RegistersWindow^.Update;
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If assigned(Debugger) then
|
If assigned(Debugger) then
|
||||||
Debugger^.ReadWatches;
|
Debugger^.ReadWatches;
|
||||||
|
{$endif NODEBUG}
|
||||||
If assigned(FPUWindow) then
|
If assigned(FPUWindow) then
|
||||||
FPUWindow^.Update;
|
FPUWindow^.Update;
|
||||||
DeskTop^.UnLock;
|
DeskTop^.UnLock;
|
||||||
@ -533,6 +549,8 @@ procedure UpdateDebugViews;
|
|||||||
{$endif SUPPORT_REMOTE}
|
{$endif SUPPORT_REMOTE}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifndef NODEBUG}
|
||||||
|
|
||||||
constructor TDebugController.Init;
|
constructor TDebugController.Init;
|
||||||
begin
|
begin
|
||||||
inherited Init;
|
inherited Init;
|
||||||
@ -677,23 +695,6 @@ begin
|
|||||||
BreakpointsCollection^.ForEach(@DoResetVal);
|
BreakpointsCollection^.ForEach(@DoResetVal);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ActiveBreakpoints : boolean;
|
|
||||||
var
|
|
||||||
IsActive : boolean;
|
|
||||||
|
|
||||||
procedure TestActive(PB : PBreakpoint);
|
|
||||||
begin
|
|
||||||
If PB^.state=bs_enabled then
|
|
||||||
IsActive:=true;
|
|
||||||
end;
|
|
||||||
begin
|
|
||||||
IsActive:=false;
|
|
||||||
If assigned(BreakpointsCollection) then
|
|
||||||
BreakpointsCollection^.ForEach(@TestActive);
|
|
||||||
ActiveBreakpoints:=IsActive;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
destructor TDebugController.Done;
|
destructor TDebugController.Done;
|
||||||
begin
|
begin
|
||||||
{ kill the program if running }
|
{ kill the program if running }
|
||||||
@ -1327,10 +1328,30 @@ begin
|
|||||||
{$endif win32}
|
{$endif win32}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$endif NODEBUG}
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TBreakpoint
|
TBreakpoint
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
function ActiveBreakpoints : boolean;
|
||||||
|
var
|
||||||
|
IsActive : boolean;
|
||||||
|
|
||||||
|
procedure TestActive(PB : PBreakpoint);
|
||||||
|
begin
|
||||||
|
If PB^.state=bs_enabled then
|
||||||
|
IsActive:=true;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
IsActive:=false;
|
||||||
|
If assigned(BreakpointsCollection) then
|
||||||
|
BreakpointsCollection^.ForEach(@TestActive);
|
||||||
|
ActiveBreakpoints:=IsActive;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor TBreakpoint.Init_function(Const AFunc : String);
|
constructor TBreakpoint.Init_function(Const AFunc : String);
|
||||||
begin
|
begin
|
||||||
typ:=bt_function;
|
typ:=bt_function;
|
||||||
@ -1481,6 +1502,7 @@ procedure TBreakpoint.Insert;
|
|||||||
p,p2 : pchar;
|
p,p2 : pchar;
|
||||||
st : string;
|
st : string;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
Remove;
|
Remove;
|
||||||
Debugger^.last_breakpoint_number:=0;
|
Debugger^.last_breakpoint_number:=0;
|
||||||
@ -1557,33 +1579,40 @@ begin
|
|||||||
Enable
|
Enable
|
||||||
else if (GDBState=bs_enabled) and (state=bs_disabled) then
|
else if (GDBState=bs_enabled) and (state=bs_disabled) then
|
||||||
Disable;
|
Disable;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakpoint.Remove;
|
procedure TBreakpoint.Remove;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
if GDBIndex>0 then
|
if GDBIndex>0 then
|
||||||
Debugger^.Command('delete '+IntToStr(GDBIndex));
|
Debugger^.Command('delete '+IntToStr(GDBIndex));
|
||||||
GDBIndex:=0;
|
GDBIndex:=0;
|
||||||
GDBState:=bs_deleted;
|
GDBState:=bs_deleted;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakpoint.Enable;
|
procedure TBreakpoint.Enable;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
if GDBIndex>0 then
|
if GDBIndex>0 then
|
||||||
Debugger^.Command('enable '+IntToStr(GDBIndex))
|
Debugger^.Command('enable '+IntToStr(GDBIndex))
|
||||||
else
|
else
|
||||||
Insert;
|
Insert;
|
||||||
GDBState:=bs_enabled;
|
GDBState:=bs_disabled;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakpoint.Disable;
|
procedure TBreakpoint.Disable;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
if GDBIndex>0 then
|
if GDBIndex>0 then
|
||||||
Debugger^.Command('disable '+IntToStr(GDBIndex));
|
Debugger^.Command('disable '+IntToStr(GDBIndex));
|
||||||
GDBState:=bs_disabled;
|
GDBState:=bs_disabled;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBreakpoint.ResetValues;
|
procedure TBreakpoint.ResetValues;
|
||||||
@ -1641,11 +1670,13 @@ end;
|
|||||||
|
|
||||||
procedure TBreakpointCollection.Update;
|
procedure TBreakpointCollection.Update;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
if assigned(Debugger) then
|
if assigned(Debugger) then
|
||||||
begin
|
begin
|
||||||
Debugger^.RemoveBreakpoints;
|
Debugger^.RemoveBreakpoints;
|
||||||
Debugger^.InsertBreakpoints;
|
Debugger^.InsertBreakpoints;
|
||||||
end;
|
end;
|
||||||
|
{$endif NODEBUG}
|
||||||
if assigned(BreakpointsWindow) then
|
if assigned(BreakpointsWindow) then
|
||||||
BreakpointsWindow^.Update;
|
BreakpointsWindow^.Update;
|
||||||
end;
|
end;
|
||||||
@ -2538,6 +2569,7 @@ procedure TWatch.rename(s : string);
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWatch.Get_new_value;
|
procedure TWatch.Get_new_value;
|
||||||
|
{$ifndef NODEBUG}
|
||||||
var p, q : pchar;
|
var p, q : pchar;
|
||||||
i, j, curframe, startframe : longint;
|
i, j, curframe, startframe : longint;
|
||||||
s,s2 : string;
|
s,s2 : string;
|
||||||
@ -2661,6 +2693,10 @@ procedure TWatch.Get_new_value;
|
|||||||
strdispose(p);
|
strdispose(p);
|
||||||
GDBRunCount:=Debugger^.RunCount;
|
GDBRunCount:=Debugger^.RunCount;
|
||||||
end;
|
end;
|
||||||
|
{$else NODEBUG}
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
{$endif NODEBUG}
|
||||||
|
|
||||||
procedure TWatch.Force_new_value;
|
procedure TWatch.Force_new_value;
|
||||||
begin
|
begin
|
||||||
@ -3163,8 +3199,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
NameIL^.GetData(S1);
|
NameIL^.GetData(S1);
|
||||||
Watch^.Rename(S1);
|
Watch^.Rename(S1);
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If assigned(Debugger) then
|
If assigned(Debugger) then
|
||||||
Debugger^.ReadWatches;
|
Debugger^.ReadWatches;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
Execute:=R;
|
Execute:=R;
|
||||||
end;
|
end;
|
||||||
@ -3184,10 +3222,10 @@ end;
|
|||||||
W : PSourceWindow;
|
W : PSourceWindow;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
{ call backtrace command }
|
{ call backtrace command }
|
||||||
If not assigned(Debugger) then
|
If not assigned(Debugger) then
|
||||||
exit;
|
exit;
|
||||||
{$ifndef NODEBUG}
|
|
||||||
DeskTop^.Lock;
|
DeskTop^.Lock;
|
||||||
Clear;
|
Clear;
|
||||||
{ forget all old frames }
|
{ forget all old frames }
|
||||||
@ -3238,7 +3276,7 @@ end;
|
|||||||
if Debugger^.WindowWidth<>-1 then
|
if Debugger^.WindowWidth<>-1 then
|
||||||
Debugger^.Command('set width '+IntToStr(Debugger^.WindowWidth));
|
Debugger^.Command('set width '+IntToStr(Debugger^.WindowWidth));
|
||||||
DeskTop^.Unlock;
|
DeskTop^.Unlock;
|
||||||
{$endif}
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFramesListBox.GetLocalMenu: PMenu;
|
function TFramesListBox.GetLocalMenu: PMenu;
|
||||||
@ -3248,33 +3286,35 @@ end;
|
|||||||
|
|
||||||
procedure TFramesListBox.GotoSource;
|
procedure TFramesListBox.GotoSource;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
{ select frame for watches }
|
{ select frame for watches }
|
||||||
If not assigned(Debugger) then
|
If not assigned(Debugger) then
|
||||||
exit;
|
exit;
|
||||||
{$ifndef NODEBUG}
|
|
||||||
Debugger^.Command('f '+IntToStr(Focused));
|
Debugger^.Command('f '+IntToStr(Focused));
|
||||||
{ for local vars }
|
{ for local vars }
|
||||||
Debugger^.RereadWatches;
|
Debugger^.RereadWatches;
|
||||||
{$endif}
|
{$endif NODEBUG}
|
||||||
{ goto source }
|
{ goto source }
|
||||||
inherited GotoSource;
|
inherited GotoSource;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFramesListBox.GotoAssembly;
|
procedure TFramesListBox.GotoAssembly;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
{ select frame for watches }
|
{ select frame for watches }
|
||||||
If not assigned(Debugger) then
|
If not assigned(Debugger) then
|
||||||
exit;
|
exit;
|
||||||
{$ifndef NODEBUG}
|
|
||||||
Debugger^.Command('f '+IntToStr(Focused));
|
Debugger^.Command('f '+IntToStr(Focused));
|
||||||
{ for local vars }
|
{ for local vars }
|
||||||
Debugger^.RereadWatches;
|
Debugger^.RereadWatches;
|
||||||
{$endif}
|
{$endif}
|
||||||
{ goto source/assembly mixture }
|
{ goto source/assembly mixture }
|
||||||
InitDisassemblyWindow;
|
InitDisassemblyWindow;
|
||||||
DisassemblyWindow^.LoadFunction('');
|
DisassemblyWindow^.LoadFunction('');
|
||||||
|
{$ifndef NODEBUG}
|
||||||
DisassemblyWindow^.SetCurAddress(Debugger^.frames[Focused]^.address);
|
DisassemblyWindow^.SetCurAddress(Debugger^.frames[Focused]^.address);
|
||||||
DisassemblyWindow^.SelectInDebugSession;
|
DisassemblyWindow^.SelectInDebugSession;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -3453,6 +3493,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
{ init debugcontroller }
|
{ init debugcontroller }
|
||||||
|
{$ifndef NODEBUG}
|
||||||
if not assigned(Debugger) then
|
if not assigned(Debugger) then
|
||||||
begin
|
begin
|
||||||
PushStatus(msg_startingdebugger);
|
PushStatus(msg_startingdebugger);
|
||||||
@ -3460,6 +3501,7 @@ begin
|
|||||||
PopStatus;
|
PopStatus;
|
||||||
end;
|
end;
|
||||||
Debugger^.SetExe(ExeFile);
|
Debugger^.SetExe(ExeFile);
|
||||||
|
{$endif NODEBUG}
|
||||||
{$ifdef GDBWINDOW}
|
{$ifdef GDBWINDOW}
|
||||||
InitGDBWindow;
|
InitGDBWindow;
|
||||||
{$endif def GDBWINDOW}
|
{$endif def GDBWINDOW}
|
||||||
@ -3472,9 +3514,11 @@ begin
|
|||||||
If IDEApp.IsRunning then
|
If IDEApp.IsRunning then
|
||||||
PushStatus('Closing debugger');
|
PushStatus('Closing debugger');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ifndef NODEBUG}
|
||||||
if assigned(Debugger) then
|
if assigned(Debugger) then
|
||||||
dispose(Debugger,Done);
|
dispose(Debugger,Done);
|
||||||
Debugger:=nil;
|
Debugger:=nil;
|
||||||
|
{$endif NODEBUG}
|
||||||
{$ifdef DOS}
|
{$ifdef DOS}
|
||||||
If assigned(UserScreen) then
|
If assigned(UserScreen) then
|
||||||
PDosScreen(UserScreen)^.FreeGraphBuffer;
|
PDosScreen(UserScreen)^.FreeGraphBuffer;
|
||||||
@ -3592,7 +3636,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.54 2004-11-08 21:55:09 peter
|
Revision 1.55 2004-11-11 15:20:52 florian
|
||||||
|
* applied Peter's patch from yesterday
|
||||||
|
|
||||||
|
Revision 1.54 2004/11/08 21:55:09 peter
|
||||||
* fixed run directory
|
* fixed run directory
|
||||||
* Open dialog starts in dir of last editted file
|
* Open dialog starts in dir of last editted file
|
||||||
|
|
||||||
|
@ -48,9 +48,7 @@ uses Dos,
|
|||||||
Video,
|
Video,
|
||||||
Views,App,HistList,BrowCol,
|
Views,App,HistList,BrowCol,
|
||||||
WUtils,WResourc,WViews,WEditor,
|
WUtils,WResourc,WViews,WEditor,
|
||||||
{$ifndef NODEBUG}
|
|
||||||
fpdebug,
|
fpdebug,
|
||||||
{$endif ndef NODEBUG}
|
|
||||||
{$ifdef Unix}
|
{$ifdef Unix}
|
||||||
FPKeys,
|
FPKeys,
|
||||||
{$endif Unix}
|
{$endif Unix}
|
||||||
@ -946,7 +944,10 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2004-11-08 20:28:26 peter
|
Revision 1.11 2004-11-11 15:20:52 florian
|
||||||
|
* applied Peter's patch from yesterday
|
||||||
|
|
||||||
|
Revision 1.10 2004/11/08 20:28:26 peter
|
||||||
* Breakpoints are now deleted when removed from source, disabling is
|
* Breakpoints are now deleted when removed from source, disabling is
|
||||||
still possible from the breakpoint list
|
still possible from the breakpoint list
|
||||||
* COMPILER_1_0, FVISION, GABOR defines removed, only support new
|
* COMPILER_1_0, FVISION, GABOR defines removed, only support new
|
||||||
|
@ -131,11 +131,14 @@ uses
|
|||||||
|
|
||||||
procedure RegisterFPRegsViews;
|
procedure RegisterFPRegsViews;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Strings,
|
Strings,
|
||||||
|
{$ifndef NODEBUG}
|
||||||
GDBCon,GDBInt,
|
GDBCon,GDBInt,
|
||||||
|
{$endif NODEBUG}
|
||||||
App,Menus,
|
App,Menus,
|
||||||
WViews,WEditor,
|
WViews,WEditor,
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
@ -379,6 +382,9 @@ Const
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
inherited draw;
|
inherited draw;
|
||||||
|
{$ifdef NODEBUG}
|
||||||
|
WriteStr(1,0,'<no values available>',7);
|
||||||
|
{$else NODEBUG}
|
||||||
If not assigned(Debugger) then
|
If not assigned(Debugger) then
|
||||||
begin
|
begin
|
||||||
WriteStr(1,0,'<no values available>',7);
|
WriteStr(1,0,'<no values available>',7);
|
||||||
@ -530,6 +536,7 @@ Const
|
|||||||
else
|
else
|
||||||
WriteStr(0,0,'<debugger error>',7);
|
WriteStr(0,0,'<debugger error>',7);
|
||||||
InDraw:=false;
|
InDraw:=false;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TRegistersView.Done;
|
destructor TRegistersView.Done;
|
||||||
@ -819,6 +826,9 @@ Const
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
inherited draw;
|
inherited draw;
|
||||||
|
{$ifdef NODEBUG}
|
||||||
|
WriteStr(1,0,'<no values available>',7);
|
||||||
|
{$else NODEBUG}
|
||||||
If not assigned(Debugger) then
|
If not assigned(Debugger) then
|
||||||
begin
|
begin
|
||||||
WriteStr(1,0,'<no values available>',7);
|
WriteStr(1,0,'<no values available>',7);
|
||||||
@ -930,6 +940,7 @@ Const
|
|||||||
else
|
else
|
||||||
WriteStr(0,0,'<debugger error>',7);
|
WriteStr(0,0,'<debugger error>',7);
|
||||||
InDraw:=false;
|
InDraw:=false;
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TFPUView.Done;
|
destructor TFPUView.Done;
|
||||||
@ -1058,7 +1069,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2004-02-06 21:34:43 jonas
|
Revision 1.4 2004-11-11 15:20:52 florian
|
||||||
|
* applied Peter's patch from yesterday
|
||||||
|
|
||||||
|
Revision 1.3 2004/02/06 21:34:43 jonas
|
||||||
* fixed ppc compilation error
|
* fixed ppc compilation error
|
||||||
|
|
||||||
Revision 1.2 2002/12/16 15:51:13 pierre
|
Revision 1.2 2002/12/16 15:51:13 pierre
|
||||||
|
@ -2243,6 +2243,7 @@ begin
|
|||||||
CommandCalled:=false;
|
CommandCalled:=false;
|
||||||
if Pos(GDBPrompt,S)=1 then
|
if Pos(GDBPrompt,S)=1 then
|
||||||
Delete(S,1,length(GDBPrompt));
|
Delete(S,1,length(GDBPrompt));
|
||||||
|
{$ifndef NODEBUG}
|
||||||
if assigned(Debugger) then
|
if assigned(Debugger) then
|
||||||
if S<>'' then
|
if S<>'' then
|
||||||
begin
|
begin
|
||||||
@ -2259,6 +2260,7 @@ begin
|
|||||||
Debugger^.Command(LastCommand);
|
Debugger^.Command(LastCommand);
|
||||||
CommandCalled:=true;
|
CommandCalled:=true;
|
||||||
end;
|
end;
|
||||||
|
{$endif NODEBUG}
|
||||||
InsertNewLine:=inherited InsertNewLine;
|
InsertNewLine:=inherited InsertNewLine;
|
||||||
If CommandCalled then
|
If CommandCalled then
|
||||||
InsertText(GDBPrompt);
|
InsertText(GDBPrompt);
|
||||||
@ -2294,8 +2296,10 @@ begin
|
|||||||
{ Empty files are buggy !! }
|
{ Empty files are buggy !! }
|
||||||
Editor^.AddLine('');
|
Editor^.AddLine('');
|
||||||
Insert(Editor);
|
Insert(Editor);
|
||||||
|
{$ifndef NODEBUG}
|
||||||
if assigned(Debugger) then
|
if assigned(Debugger) then
|
||||||
Debugger^.SetWidth(Size.X-1);
|
Debugger^.SetWidth(Size.X-1);
|
||||||
|
{$endif NODEBUG}
|
||||||
Editor^.silent:=false;
|
Editor^.silent:=false;
|
||||||
Editor^.AutoRepeat:=true;
|
Editor^.AutoRepeat:=true;
|
||||||
Editor^.InsertText(GDBPrompt);
|
Editor^.InsertText(GDBPrompt);
|
||||||
@ -2558,6 +2562,7 @@ procedure TDisassemblyWindow.LoadFunction(Const FuncName : string);
|
|||||||
var
|
var
|
||||||
p : pchar;
|
p : pchar;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
Debugger^.Command('set print sym on');
|
Debugger^.Command('set print sym on');
|
||||||
Debugger^.Command('set width 0xffffffff');
|
Debugger^.Command('set width 0xffffffff');
|
||||||
@ -2566,12 +2571,14 @@ begin
|
|||||||
ProcessPChar(p);
|
ProcessPChar(p);
|
||||||
if (Debugger^.IsRunning) and (FuncName='') then
|
if (Debugger^.IsRunning) and (FuncName='') then
|
||||||
Editor^.GetCurrentLine(Debugger^.current_pc);
|
Editor^.GetCurrentLine(Debugger^.current_pc);
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDisassemblyWindow.LoadAddress(Addr : cardinal);
|
procedure TDisassemblyWindow.LoadAddress(Addr : cardinal);
|
||||||
var
|
var
|
||||||
p : pchar;
|
p : pchar;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef NODEBUG}
|
||||||
If not assigned(Debugger) then Exit;
|
If not assigned(Debugger) then Exit;
|
||||||
Debugger^.Command('set print sym on');
|
Debugger^.Command('set print sym on');
|
||||||
Debugger^.Command('set width 0xffffffff');
|
Debugger^.Command('set width 0xffffffff');
|
||||||
@ -2582,6 +2589,7 @@ begin
|
|||||||
(Debugger^.current_pc>=Editor^.MinAddress) and
|
(Debugger^.current_pc>=Editor^.MinAddress) and
|
||||||
(Debugger^.current_pc<=Editor^.MaxAddress) then
|
(Debugger^.current_pc<=Editor^.MaxAddress) then
|
||||||
Editor^.GetCurrentLine(Debugger^.current_pc);
|
Editor^.GetCurrentLine(Debugger^.current_pc);
|
||||||
|
{$endif NODEBUG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -4455,7 +4463,10 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.48 2004-11-08 21:55:09 peter
|
Revision 1.49 2004-11-11 15:20:52 florian
|
||||||
|
* applied Peter's patch from yesterday
|
||||||
|
|
||||||
|
Revision 1.48 2004/11/08 21:55:09 peter
|
||||||
* fixed run directory
|
* fixed run directory
|
||||||
* Open dialog starts in dir of last editted file
|
* Open dialog starts in dir of last editted file
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ Unit windebug;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$ifndef NODEBUG}
|
||||||
|
|
||||||
type
|
type
|
||||||
DebuggeeState = (Running_State,Stopped_State);
|
DebuggeeState = (Running_State,Stopped_State);
|
||||||
|
|
||||||
@ -27,8 +29,13 @@ const
|
|||||||
|
|
||||||
main_pid_valid : boolean = false;
|
main_pid_valid : boolean = false;
|
||||||
|
|
||||||
|
{$endif NODEBUG}
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{$ifndef NODEBUG}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
gdbint,
|
gdbint,
|
||||||
strings,
|
strings,
|
||||||
@ -149,4 +156,6 @@ function GetWindowHandle(H : HWND; state : LPARAM) : WINBOOL;stdcall;
|
|||||||
EnumWindows(EnumWindowsProc(@GetWindowHandle),longint(State));
|
EnumWindows(EnumWindowsProc(@GetWindowHandle),longint(State));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$endif NODEBUG}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user