[fpc-pascal] Debugger support for FP (issues with libgdb.a)

Joost van der Sluis joost at cnoc.nl
Mon Dec 22 10:54:43 CET 2008


Op zondag 21-12-2008 om 17:29 uur [tijdzone +0000], schreef Andrea:

> I've tried to use the debugger in FP 2.2.2 and I got this error

> "No debugger support available"

I see below that you used the Fedora/RHEL fpc-rpm's?

> The I read online and found that I need to get libgdb.a from a build of gdb and copy it in fpc.
> I've done that and copied to
> 
> /fpcsrc/libgdb/linux/libgdb.a

I don't know if this helps, but you do not only need libgdb.a, but also
some other files. You can download them here:
ftp://ftp.freepascal.org/fpc/contrib/libgdb/v6.2.1 

Further you have to make sure that there are no other copies of those
files somewhere on your system so that the linker may find them.

> Now I get this linker error (+ many more similar)
> 
> make[3]: Entering directory `/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/ide'
> 
> /home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/compiler/ppc386 -di386
> -Fl/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/libgdb/linux -Ur -Xs -O2 -n -Sg
> -Fu/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/rtl/units/i386-linux
> -Fu/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/packages/fv/units/i386-linux
> -Fu/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/packages/gdbint/units/i386-linux
> -Fu/home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/packages/regexpr/units/i386-linux -FE.
> -FUunits/i386-linux -Fl/usr/lib/gcc/i386-redhat-linux/4.3.0 -Flinclude -Flld.so.conf.d/*.conf
> -k"--build-id -z noexecstack" -gl -dRELEASE fp.pas
> 
> /home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/libgdb/linux/libgdb.a(exec.o): In function
> `generic_skip_trampoline_code':
> /home/andrea/rpmbuild/BUILD/gdb-6.8/build-i386-redhat-linux-gnu/gdb/../../gdb/arch-utils.c:58:
> multiple definition of `generic_skip_trampoline_code'
> 
> /home/andrea/rpmbuild/BUILD/fpcbuild-2.2.2/fpcsrc/libgdb/linux/libgdb.a(arch-utils.o):/home/andrea/rpmbuild/BUILD/gdb-6.8/build-i386-redhat-linux-gnu/gdb/../../gdb/arch-utils.c:58:
> first defined here
> 
> Have I done it correctly?
> I was wondering if there is a documentation about that.

You tried to re-build the rpm, there's no documentation about that.
Maybe it's easier to build then ide manually. Extract the source, copy
the libgdb-files, go to the ide directory and do a 'make clean all'

But the rpm-approach should also work.

Joost.




More information about the fpc-pascal mailing list