mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 18:19:45 +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
|
||||
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)
|
||||
override PACKAGE_NAME=ide
|
||||
override PACKAGE_VERSION=1.9.4
|
||||
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
|
||||
ifeq ($(wildcard units/$(FULL_TARGET)/finput.*),)
|
||||
override FPCOPT+=-dCOMPILER_1_0
|
||||
endif
|
||||
ifndef GDBINT
|
||||
GDBINT=gdbint
|
||||
endif
|
||||
ifeq ($(GDB),1)
|
||||
ifndef NOGDB
|
||||
ifdef GDBLIBDIR
|
||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||
endif
|
||||
@ -249,15 +233,17 @@ endif
|
||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||
endif
|
||||
ifeq ($(LIBGDBFILE),)
|
||||
override GDB=
|
||||
endif
|
||||
endif
|
||||
ifeq ($(GDB),1)
|
||||
override LIBDIR+=$(GDBLIBDIR)
|
||||
GDB=
|
||||
else
|
||||
override BUILDFAKEGDB=fakegdbunits
|
||||
GDB=1
|
||||
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 INSTALL_DATADIR=$(INSTALL_BASEDIR)/ide
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
@ -453,14 +439,14 @@ ifeq ($(CPU_TARGET),i386)
|
||||
ifneq ($(findstring x86_64,$(shell uname -a)),)
|
||||
ifeq ($(BINUTILSPREFIX),)
|
||||
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
|
||||
else
|
||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
||||
endif
|
||||
else
|
||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
||||
endif
|
||||
else
|
||||
GCCLIBDIR:=$(shell dirname `$(BINUTILSPREFIX)gcc -print-libgcc-file-name`)
|
||||
endif
|
||||
endif
|
||||
ifndef GCCLIBDIR
|
||||
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifneq ($(CROSSGCC),)
|
||||
GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
|
||||
endif
|
||||
endif
|
||||
ifndef OTHERLIBDIR
|
||||
@ -785,7 +771,7 @@ ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
ECHO= __missing_command__
|
||||
ECHO= __missing_command_ECHO
|
||||
else
|
||||
ECHO:=$(firstword $(ECHO))
|
||||
endif
|
||||
@ -799,7 +785,7 @@ DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(DATE),)
|
||||
DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(DATE),)
|
||||
DATE= __missing_command__
|
||||
DATE= __missing_command_DATE
|
||||
else
|
||||
DATE:=$(firstword $(DATE))
|
||||
endif
|
||||
@ -813,7 +799,7 @@ GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(GINSTALL),)
|
||||
GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(GINSTALL),)
|
||||
GINSTALL= __missing_command__
|
||||
GINSTALL= __missing_command_GINSTALL
|
||||
else
|
||||
GINSTALL:=$(firstword $(GINSTALL))
|
||||
endif
|
||||
@ -825,7 +811,7 @@ export GINSTALL
|
||||
ifndef CPPROG
|
||||
CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(CPPROG),)
|
||||
CPPROG= __missing_command__
|
||||
CPPROG= __missing_command_CPPROG
|
||||
else
|
||||
CPPROG:=$(firstword $(CPPROG))
|
||||
endif
|
||||
@ -834,7 +820,7 @@ export CPPROG
|
||||
ifndef RMPROG
|
||||
RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(RMPROG),)
|
||||
RMPROG= __missing_command__
|
||||
RMPROG= __missing_command_RMPROG
|
||||
else
|
||||
RMPROG:=$(firstword $(RMPROG))
|
||||
endif
|
||||
@ -843,7 +829,7 @@ export RMPROG
|
||||
ifndef MVPROG
|
||||
MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(MVPROG),)
|
||||
MVPROG= __missing_command__
|
||||
MVPROG= __missing_command_MVPROG
|
||||
else
|
||||
MVPROG:=$(firstword $(MVPROG))
|
||||
endif
|
||||
@ -854,7 +840,7 @@ MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(MKDIRPROG),)
|
||||
MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(MKDIRPROG),)
|
||||
MKDIRPROG= __missing_command__
|
||||
MKDIRPROG= __missing_command_MKDIRPROG
|
||||
else
|
||||
MKDIRPROG:=$(firstword $(MKDIRPROG))
|
||||
endif
|
||||
@ -909,7 +895,7 @@ export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
|
||||
ifndef PPUMOVE
|
||||
PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(PPUMOVE),)
|
||||
PPUMOVE= __missing_command__
|
||||
PPUMOVE= __missing_command_PPUMOVE
|
||||
else
|
||||
PPUMOVE:=$(firstword $(PPUMOVE))
|
||||
endif
|
||||
@ -918,7 +904,7 @@ export PPUMOVE
|
||||
ifndef FPCMAKE
|
||||
FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(FPCMAKE),)
|
||||
FPCMAKE= __missing_command__
|
||||
FPCMAKE= __missing_command_FPCMAKE
|
||||
else
|
||||
FPCMAKE:=$(firstword $(FPCMAKE))
|
||||
endif
|
||||
@ -927,7 +913,7 @@ export FPCMAKE
|
||||
ifndef ZIPPROG
|
||||
ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ZIPPROG),)
|
||||
ZIPPROG= __missing_command__
|
||||
ZIPPROG= __missing_command_ZIPPROG
|
||||
else
|
||||
ZIPPROG:=$(firstword $(ZIPPROG))
|
||||
endif
|
||||
@ -936,7 +922,7 @@ export ZIPPROG
|
||||
ifndef TARPROG
|
||||
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(TARPROG),)
|
||||
TARPROG= __missing_command__
|
||||
TARPROG= __missing_command_TARPROG
|
||||
else
|
||||
TARPROG:=$(firstword $(TARPROG))
|
||||
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_makefiles: fpc_makefile fpc_makefile_dirs
|
||||
TARGET_DIRS_COMPILER=1
|
||||
TARGET_DIRS_FAKEGDB=1
|
||||
ifdef TARGET_DIRS_COMPILER
|
||||
compiler_all:
|
||||
$(MAKE) -C compiler all
|
||||
@ -1952,51 +1937,6 @@ compiler:
|
||||
$(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
|
||||
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
|
||||
smart: fpc_smart
|
||||
release: fpc_release
|
||||
@ -2022,47 +1962,44 @@ endif
|
||||
clean_compiler clean testgdb postgdbinfo
|
||||
clean: fpc_cleanall
|
||||
distclean: clean compilerclean
|
||||
ifneq ($(wildcard $(UNITDIR_FV)/fvconsts$(PPUEXT)),)
|
||||
override COMPILER+=-dFVISION
|
||||
endif
|
||||
ifeq ($(GDB),1)
|
||||
ifneq ($(GDBFOUND),0)
|
||||
override COMPILER+=-dWITH_GDB
|
||||
endif
|
||||
endif
|
||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||
ifndef NOGDB
|
||||
ifdef GDB
|
||||
testgdb:
|
||||
ifneq ($(GDBFOUND),0)
|
||||
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
||||
postgdbinfo:
|
||||
@$(ECHO) LibGDB was found, IDE has Debugger support
|
||||
else
|
||||
override COMPILER+=-dNODEBUG
|
||||
testgdb:
|
||||
@$(ECHO) LibGDB not found
|
||||
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
||||
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
||||
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
||||
endif
|
||||
postgdbinfo:
|
||||
ifeq ($(GDBFOUND),0)
|
||||
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
||||
endif
|
||||
else
|
||||
testgdb:
|
||||
@$(ECHO) Building without Debugger
|
||||
postgdbinfo:
|
||||
@$(ECHO) Debugger disabled, IDE has no Debugger support
|
||||
override COMPILER+=-dNODEBUG
|
||||
endif # NOGDB
|
||||
compilerunits : compiler/$(FPCMADE)
|
||||
compiler/$(FPCMADE):
|
||||
$(MAKE) -C compiler all
|
||||
compilerclean :
|
||||
$(MAKE) -C compiler clean
|
||||
fakegdbunits : fakegdb/$(FPCMADE)
|
||||
fakegdb/$(FPCMADE):
|
||||
$(MAKE) -C fakegdb all
|
||||
fakegdbclean :
|
||||
$(MAKE) -C fakegdb clean
|
||||
fakegdbinfo:
|
||||
@$(ECHO) Using FakeGDB, IDE has no Debugger support
|
||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||
buildfp:
|
||||
$(MAKE) compilerunits $(BUILDFAKEGDB)
|
||||
$(MAKE) compilerunits
|
||||
$(MAKE) testgdb
|
||||
$(MAKE) fpc_all
|
||||
$(MAKE) postgdbinfo
|
||||
gdb:
|
||||
$(MAKE) testgdb buildfp postgdbinfo GDB=1
|
||||
$(MAKE) buildfp
|
||||
nogdb:
|
||||
$(MAKE) buildfp fakegdbinfo
|
||||
$(MAKE) buildfp NOGDB=1
|
||||
all: gdb
|
||||
clean: cleanall
|
||||
ifndef UNIXINSTALLDIR
|
||||
|
123
ide/Makefile.fpc
123
ide/Makefile.fpc
@ -9,7 +9,7 @@ name=ide
|
||||
version=1.9.4
|
||||
|
||||
[target]
|
||||
dirs=compiler fakegdb
|
||||
dirs=compiler
|
||||
programs=fp
|
||||
rst=fpstrings
|
||||
|
||||
@ -28,47 +28,13 @@ libc=y
|
||||
fpcdir=..
|
||||
|
||||
[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
|
||||
#
|
||||
|
||||
# when including debugger include the gdbinterface
|
||||
ifndef GDBINT
|
||||
GDBINT=gdbint
|
||||
endif
|
||||
ifndef NOGDB
|
||||
|
||||
# Try to find GDB library
|
||||
ifeq ($(GDB),1)
|
||||
|
||||
# Look for a valid GDBLIBDIR environment variable
|
||||
ifdef GDBLIBDIR
|
||||
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
|
||||
@ -87,19 +53,24 @@ endif
|
||||
|
||||
# Disable GDB when no libgdb.a found
|
||||
ifeq ($(LIBGDBFILE),)
|
||||
override GDB=
|
||||
GDB=
|
||||
else
|
||||
GDB=1
|
||||
endif
|
||||
|
||||
# end GDB defined
|
||||
endif
|
||||
|
||||
ifeq ($(GDB),1)
|
||||
ifdef GDB
|
||||
# The gdbint is already included due the gdbint package dependency
|
||||
override LIBDIR+=$(GDBLIBDIR)
|
||||
else
|
||||
override BUILDFAKEGDB=fakegdbunits
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
# Disable
|
||||
GDB=
|
||||
|
||||
endif #NOGDB
|
||||
|
||||
|
||||
[rules]
|
||||
.PHONY: compilerunits compilerclean \
|
||||
nogdb gdb all \
|
||||
@ -110,35 +81,38 @@ clean: fpc_cleanall
|
||||
distclean: clean compilerclean
|
||||
|
||||
#
|
||||
# FVision or old FV detection
|
||||
# GDB detection
|
||||
#
|
||||
ifneq ($(wildcard $(UNITDIR_FV)/fvconsts$(PPUEXT)),)
|
||||
override COMPILER+=-dFVISION
|
||||
endif
|
||||
|
||||
ifeq ($(GDB),1)
|
||||
ifneq ($(GDBFOUND),0)
|
||||
override COMPILER+=-dWITH_GDB
|
||||
endif
|
||||
endif
|
||||
|
||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||
ifndef NOGDB
|
||||
|
||||
ifdef GDB
|
||||
testgdb:
|
||||
ifneq ($(GDBFOUND),0)
|
||||
@$(ECHO) LibGDB found in $(LIBGDBFILE)
|
||||
|
||||
postgdbinfo:
|
||||
@$(ECHO) LibGDB was found, IDE has Debugger support
|
||||
|
||||
else
|
||||
override COMPILER+=-dNODEBUG
|
||||
testgdb:
|
||||
@$(ECHO) LibGDB not found
|
||||
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
|
||||
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
|
||||
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
|
||||
endif
|
||||
|
||||
postgdbinfo:
|
||||
ifeq ($(GDBFOUND),0)
|
||||
@$(ECHO) LibGDB was not found, IDE has no Debugger support
|
||||
endif
|
||||
|
||||
else
|
||||
testgdb:
|
||||
@$(ECHO) Building without Debugger
|
||||
postgdbinfo:
|
||||
@$(ECHO) Debugger disabled, IDE has no Debugger support
|
||||
override COMPILER+=-dNODEBUG
|
||||
endif # NOGDB
|
||||
|
||||
|
||||
#
|
||||
# Compiler
|
||||
#
|
||||
@ -150,45 +124,33 @@ compiler/$(FPCMADE):
|
||||
compilerclean :
|
||||
$(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
|
||||
#
|
||||
# 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
|
||||
# required because it needs to detect which compiler version
|
||||
# to use.
|
||||
#
|
||||
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
|
||||
|
||||
buildfp:
|
||||
$(MAKE) compilerunits $(BUILDFAKEGDB)
|
||||
$(MAKE) compilerunits
|
||||
$(MAKE) testgdb
|
||||
$(MAKE) fpc_all
|
||||
$(MAKE) postgdbinfo
|
||||
|
||||
gdb:
|
||||
$(MAKE) testgdb buildfp postgdbinfo GDB=1
|
||||
$(MAKE) buildfp
|
||||
|
||||
nogdb:
|
||||
$(MAKE) buildfp fakegdbinfo
|
||||
$(MAKE) buildfp NOGDB=1
|
||||
|
||||
#
|
||||
# Default targets
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
# This is necessary because we don't have all units separate in the
|
||||
@ -222,7 +184,10 @@ clean_compiler:
|
||||
|
||||
#
|
||||
# $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
|
||||
#
|
||||
# Revision 1.25 2004/11/05 13:25:10 peter
|
||||
|
@ -23,11 +23,15 @@ uses
|
||||
Windows,
|
||||
{$endif win32}
|
||||
Objects,Dialogs,Drivers,Views,
|
||||
GDBCon,GDBInt,Menus,
|
||||
{$ifndef NODEBUG}
|
||||
GDBCon,GDBInt,
|
||||
{$endif NODEBUG}
|
||||
Menus,
|
||||
WViews,WEditor,
|
||||
FPViews;
|
||||
|
||||
type
|
||||
{$ifndef NODEBUG}
|
||||
PDebugController=^TDebugController;
|
||||
TDebugController=object(TGDBController)
|
||||
InvalidSourceLine : boolean;
|
||||
@ -81,6 +85,7 @@ type
|
||||
function GetLongintAt(addr : CORE_ADDR) : longint;
|
||||
function GetPointerAt(addr : CORE_ADDR) : CORE_ADDR;
|
||||
end;
|
||||
{$endif NODEBUG}
|
||||
|
||||
BreakpointType = (bt_function,bt_file_line,bt_watch,
|
||||
bt_awatch,bt_rwatch,bt_address,bt_invalid);
|
||||
@ -297,7 +302,9 @@ const
|
||||
= ( 'enabled','disabled','invalid',''{'to be deleted' should never be used});
|
||||
|
||||
var
|
||||
{$ifndef NODEBUG}
|
||||
Debugger : PDebugController;
|
||||
{$endif NODEBUG}
|
||||
BreakpointsCollection : PBreakpointCollection;
|
||||
WatchesCollection : PwatchesCollection;
|
||||
|
||||
@ -316,6 +323,7 @@ procedure RegisterFPDebugViews;
|
||||
|
||||
procedure UpdateDebugViews;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -449,6 +457,9 @@ function GDBFileName(st : string) : string;
|
||||
var i : longint;
|
||||
{$endif Unix}
|
||||
begin
|
||||
{$ifdef NODEBUG}
|
||||
GDBFileName:=st;
|
||||
{$else NODEBUG}
|
||||
{$ifdef Unix}
|
||||
GDBFileName:=st;
|
||||
{$else}
|
||||
@ -476,6 +487,7 @@ begin
|
||||
{$endif go32v2}
|
||||
GDBFileName:=LowerCaseStr(st);
|
||||
{$endif}
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
function OSFileName(st : string) : string;
|
||||
@ -487,9 +499,11 @@ begin
|
||||
OSFileName:=st;
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
{$ifndef NODEBUG}
|
||||
{ for win32 we should convert /cygdrive/e/ into e:\ PM }
|
||||
if pos(CygDrivePrefix+'/',st)=1 then
|
||||
st:=st[Length(CygdrivePrefix)+2]+':\'+copy(st,length(CygdrivePrefix)+4,length(st));
|
||||
{$endif NODEBUG}
|
||||
{$endif win32}
|
||||
{ support spaces in the name by escaping them but without changing '\ ' into '\\ ' }
|
||||
for i:=Length(st) downto 2 do
|
||||
@ -523,8 +537,10 @@ procedure UpdateDebugViews;
|
||||
StackWindow^.Update;
|
||||
If assigned(RegistersWindow) then
|
||||
RegistersWindow^.Update;
|
||||
{$ifndef NODEBUG}
|
||||
If assigned(Debugger) then
|
||||
Debugger^.ReadWatches;
|
||||
{$endif NODEBUG}
|
||||
If assigned(FPUWindow) then
|
||||
FPUWindow^.Update;
|
||||
DeskTop^.UnLock;
|
||||
@ -533,6 +549,8 @@ procedure UpdateDebugViews;
|
||||
{$endif SUPPORT_REMOTE}
|
||||
end;
|
||||
|
||||
{$ifndef NODEBUG}
|
||||
|
||||
constructor TDebugController.Init;
|
||||
begin
|
||||
inherited Init;
|
||||
@ -677,23 +695,6 @@ begin
|
||||
BreakpointsCollection^.ForEach(@DoResetVal);
|
||||
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;
|
||||
begin
|
||||
{ kill the program if running }
|
||||
@ -1327,10 +1328,30 @@ begin
|
||||
{$endif win32}
|
||||
end;
|
||||
|
||||
{$endif NODEBUG}
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
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);
|
||||
begin
|
||||
typ:=bt_function;
|
||||
@ -1481,6 +1502,7 @@ procedure TBreakpoint.Insert;
|
||||
p,p2 : pchar;
|
||||
st : string;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
Remove;
|
||||
Debugger^.last_breakpoint_number:=0;
|
||||
@ -1557,33 +1579,40 @@ begin
|
||||
Enable
|
||||
else if (GDBState=bs_enabled) and (state=bs_disabled) then
|
||||
Disable;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
procedure TBreakpoint.Remove;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
if GDBIndex>0 then
|
||||
Debugger^.Command('delete '+IntToStr(GDBIndex));
|
||||
GDBIndex:=0;
|
||||
GDBState:=bs_deleted;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
procedure TBreakpoint.Enable;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
if GDBIndex>0 then
|
||||
Debugger^.Command('enable '+IntToStr(GDBIndex))
|
||||
else
|
||||
Insert;
|
||||
GDBState:=bs_enabled;
|
||||
GDBState:=bs_disabled;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
procedure TBreakpoint.Disable;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
if GDBIndex>0 then
|
||||
Debugger^.Command('disable '+IntToStr(GDBIndex));
|
||||
GDBState:=bs_disabled;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
procedure TBreakpoint.ResetValues;
|
||||
@ -1641,11 +1670,13 @@ end;
|
||||
|
||||
procedure TBreakpointCollection.Update;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
if assigned(Debugger) then
|
||||
begin
|
||||
Debugger^.RemoveBreakpoints;
|
||||
Debugger^.InsertBreakpoints;
|
||||
end;
|
||||
{$endif NODEBUG}
|
||||
if assigned(BreakpointsWindow) then
|
||||
BreakpointsWindow^.Update;
|
||||
end;
|
||||
@ -2538,6 +2569,7 @@ procedure TWatch.rename(s : string);
|
||||
end;
|
||||
|
||||
procedure TWatch.Get_new_value;
|
||||
{$ifndef NODEBUG}
|
||||
var p, q : pchar;
|
||||
i, j, curframe, startframe : longint;
|
||||
s,s2 : string;
|
||||
@ -2661,6 +2693,10 @@ procedure TWatch.Get_new_value;
|
||||
strdispose(p);
|
||||
GDBRunCount:=Debugger^.RunCount;
|
||||
end;
|
||||
{$else NODEBUG}
|
||||
begin
|
||||
end;
|
||||
{$endif NODEBUG}
|
||||
|
||||
procedure TWatch.Force_new_value;
|
||||
begin
|
||||
@ -3163,8 +3199,10 @@ begin
|
||||
begin
|
||||
NameIL^.GetData(S1);
|
||||
Watch^.Rename(S1);
|
||||
{$ifndef NODEBUG}
|
||||
If assigned(Debugger) then
|
||||
Debugger^.ReadWatches;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
Execute:=R;
|
||||
end;
|
||||
@ -3184,10 +3222,10 @@ end;
|
||||
W : PSourceWindow;
|
||||
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
{ call backtrace command }
|
||||
If not assigned(Debugger) then
|
||||
exit;
|
||||
{$ifndef NODEBUG}
|
||||
DeskTop^.Lock;
|
||||
Clear;
|
||||
{ forget all old frames }
|
||||
@ -3238,7 +3276,7 @@ end;
|
||||
if Debugger^.WindowWidth<>-1 then
|
||||
Debugger^.Command('set width '+IntToStr(Debugger^.WindowWidth));
|
||||
DeskTop^.Unlock;
|
||||
{$endif}
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
function TFramesListBox.GetLocalMenu: PMenu;
|
||||
@ -3248,33 +3286,35 @@ end;
|
||||
|
||||
procedure TFramesListBox.GotoSource;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
{ select frame for watches }
|
||||
If not assigned(Debugger) then
|
||||
exit;
|
||||
{$ifndef NODEBUG}
|
||||
Debugger^.Command('f '+IntToStr(Focused));
|
||||
{ for local vars }
|
||||
Debugger^.RereadWatches;
|
||||
{$endif}
|
||||
{$endif NODEBUG}
|
||||
{ goto source }
|
||||
inherited GotoSource;
|
||||
end;
|
||||
|
||||
procedure TFramesListBox.GotoAssembly;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
{ select frame for watches }
|
||||
If not assigned(Debugger) then
|
||||
exit;
|
||||
{$ifndef NODEBUG}
|
||||
Debugger^.Command('f '+IntToStr(Focused));
|
||||
{ for local vars }
|
||||
Debugger^.RereadWatches;
|
||||
{$endif}
|
||||
{$endif}
|
||||
{ goto source/assembly mixture }
|
||||
InitDisassemblyWindow;
|
||||
DisassemblyWindow^.LoadFunction('');
|
||||
{$ifndef NODEBUG}
|
||||
DisassemblyWindow^.SetCurAddress(Debugger^.frames[Focused]^.address);
|
||||
DisassemblyWindow^.SelectInDebugSession;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
|
||||
@ -3453,6 +3493,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
{ init debugcontroller }
|
||||
{$ifndef NODEBUG}
|
||||
if not assigned(Debugger) then
|
||||
begin
|
||||
PushStatus(msg_startingdebugger);
|
||||
@ -3460,6 +3501,7 @@ begin
|
||||
PopStatus;
|
||||
end;
|
||||
Debugger^.SetExe(ExeFile);
|
||||
{$endif NODEBUG}
|
||||
{$ifdef GDBWINDOW}
|
||||
InitGDBWindow;
|
||||
{$endif def GDBWINDOW}
|
||||
@ -3472,9 +3514,11 @@ begin
|
||||
If IDEApp.IsRunning then
|
||||
PushStatus('Closing debugger');
|
||||
{$endif}
|
||||
{$ifndef NODEBUG}
|
||||
if assigned(Debugger) then
|
||||
dispose(Debugger,Done);
|
||||
Debugger:=nil;
|
||||
{$endif NODEBUG}
|
||||
{$ifdef DOS}
|
||||
If assigned(UserScreen) then
|
||||
PDosScreen(UserScreen)^.FreeGraphBuffer;
|
||||
@ -3592,7 +3636,10 @@ end.
|
||||
|
||||
{
|
||||
$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
|
||||
* Open dialog starts in dir of last editted file
|
||||
|
||||
|
@ -48,9 +48,7 @@ uses Dos,
|
||||
Video,
|
||||
Views,App,HistList,BrowCol,
|
||||
WUtils,WResourc,WViews,WEditor,
|
||||
{$ifndef NODEBUG}
|
||||
fpdebug,
|
||||
{$endif ndef NODEBUG}
|
||||
{$ifdef Unix}
|
||||
FPKeys,
|
||||
{$endif Unix}
|
||||
@ -946,7 +944,10 @@ end;
|
||||
END.
|
||||
{
|
||||
$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
|
||||
still possible from the breakpoint list
|
||||
* COMPILER_1_0, FVISION, GABOR defines removed, only support new
|
||||
|
@ -131,11 +131,14 @@ uses
|
||||
|
||||
procedure RegisterFPRegsViews;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Strings,
|
||||
{$ifndef NODEBUG}
|
||||
GDBCon,GDBInt,
|
||||
{$endif NODEBUG}
|
||||
App,Menus,
|
||||
WViews,WEditor,
|
||||
{$ifdef powerpc}
|
||||
@ -379,6 +382,9 @@ Const
|
||||
|
||||
begin
|
||||
inherited draw;
|
||||
{$ifdef NODEBUG}
|
||||
WriteStr(1,0,'<no values available>',7);
|
||||
{$else NODEBUG}
|
||||
If not assigned(Debugger) then
|
||||
begin
|
||||
WriteStr(1,0,'<no values available>',7);
|
||||
@ -530,6 +536,7 @@ Const
|
||||
else
|
||||
WriteStr(0,0,'<debugger error>',7);
|
||||
InDraw:=false;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
destructor TRegistersView.Done;
|
||||
@ -819,6 +826,9 @@ Const
|
||||
|
||||
begin
|
||||
inherited draw;
|
||||
{$ifdef NODEBUG}
|
||||
WriteStr(1,0,'<no values available>',7);
|
||||
{$else NODEBUG}
|
||||
If not assigned(Debugger) then
|
||||
begin
|
||||
WriteStr(1,0,'<no values available>',7);
|
||||
@ -930,6 +940,7 @@ Const
|
||||
else
|
||||
WriteStr(0,0,'<debugger error>',7);
|
||||
InDraw:=false;
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
destructor TFPUView.Done;
|
||||
@ -1058,7 +1069,10 @@ end.
|
||||
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.2 2002/12/16 15:51:13 pierre
|
||||
|
@ -2243,6 +2243,7 @@ begin
|
||||
CommandCalled:=false;
|
||||
if Pos(GDBPrompt,S)=1 then
|
||||
Delete(S,1,length(GDBPrompt));
|
||||
{$ifndef NODEBUG}
|
||||
if assigned(Debugger) then
|
||||
if S<>'' then
|
||||
begin
|
||||
@ -2259,6 +2260,7 @@ begin
|
||||
Debugger^.Command(LastCommand);
|
||||
CommandCalled:=true;
|
||||
end;
|
||||
{$endif NODEBUG}
|
||||
InsertNewLine:=inherited InsertNewLine;
|
||||
If CommandCalled then
|
||||
InsertText(GDBPrompt);
|
||||
@ -2294,8 +2296,10 @@ begin
|
||||
{ Empty files are buggy !! }
|
||||
Editor^.AddLine('');
|
||||
Insert(Editor);
|
||||
{$ifndef NODEBUG}
|
||||
if assigned(Debugger) then
|
||||
Debugger^.SetWidth(Size.X-1);
|
||||
{$endif NODEBUG}
|
||||
Editor^.silent:=false;
|
||||
Editor^.AutoRepeat:=true;
|
||||
Editor^.InsertText(GDBPrompt);
|
||||
@ -2558,6 +2562,7 @@ procedure TDisassemblyWindow.LoadFunction(Const FuncName : string);
|
||||
var
|
||||
p : pchar;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
Debugger^.Command('set print sym on');
|
||||
Debugger^.Command('set width 0xffffffff');
|
||||
@ -2566,12 +2571,14 @@ begin
|
||||
ProcessPChar(p);
|
||||
if (Debugger^.IsRunning) and (FuncName='') then
|
||||
Editor^.GetCurrentLine(Debugger^.current_pc);
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
procedure TDisassemblyWindow.LoadAddress(Addr : cardinal);
|
||||
var
|
||||
p : pchar;
|
||||
begin
|
||||
{$ifndef NODEBUG}
|
||||
If not assigned(Debugger) then Exit;
|
||||
Debugger^.Command('set print sym on');
|
||||
Debugger^.Command('set width 0xffffffff');
|
||||
@ -2582,6 +2589,7 @@ begin
|
||||
(Debugger^.current_pc>=Editor^.MinAddress) and
|
||||
(Debugger^.current_pc<=Editor^.MaxAddress) then
|
||||
Editor^.GetCurrentLine(Debugger^.current_pc);
|
||||
{$endif NODEBUG}
|
||||
end;
|
||||
|
||||
|
||||
@ -4455,7 +4463,10 @@ end;
|
||||
END.
|
||||
{
|
||||
$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
|
||||
* Open dialog starts in dir of last editted file
|
||||
|
||||
|
@ -17,6 +17,8 @@ Unit windebug;
|
||||
|
||||
interface
|
||||
|
||||
{$ifndef NODEBUG}
|
||||
|
||||
type
|
||||
DebuggeeState = (Running_State,Stopped_State);
|
||||
|
||||
@ -27,8 +29,13 @@ const
|
||||
|
||||
main_pid_valid : boolean = false;
|
||||
|
||||
{$endif NODEBUG}
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$ifndef NODEBUG}
|
||||
|
||||
uses
|
||||
gdbint,
|
||||
strings,
|
||||
@ -149,4 +156,6 @@ function GetWindowHandle(H : HWND; state : LPARAM) : WINBOOL;stdcall;
|
||||
EnumWindows(EnumWindowsProc(@GetWindowHandle),longint(State));
|
||||
end;
|
||||
|
||||
{$endif NODEBUG}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user