[Lazarus] debugging parts of rtl from within lazarus
Sven Barth
pascaldragon at googlemail.com
Mon Mar 17 22:35:53 CET 2014
Am 17.03.2014 20:23 schrieb "Marc Santhoff" <M.Santhoff at web.de>:
> > The IDE doesn't rebuild RTL , or fpc packages. But if you have your own
> > fpc build, you can always rebuild and install it with debug info.
>
> I have no own build but the sources. Reading the FAQ it should work to
> cd to .../rtl/unix, build with -gl, and afterwards install the new ppu
> to the same location as the compiler.
You should merely go to $fpcsrc/rtl and do "make clean all OPT=-gl". Your
source should be of the same compiler version as the compiler you build
with. Also if you use a unit (or a package) that depends on any of the
recompiled units that will need to be recompiled as well. So for RTL I
would suggest you to only copy the Serial unit as dependencies on that
should be rather low. Additionally you won't be annoyed by having the
debugger step all helper routines used by the compiler.
Note: the location "same as compiler" would be wrong. You need to copy the
unit to the location where the "normal" serial.ppu and serial.o are stored
(and you should make a backup of course). Normally thus should he something
like /usr/lib/fpc/2.6.4/units/i386-linux/rtl or so...
>
> I'd like better if I could switch a standard version and a debugging
> version of the RTL. If it works in general this could be done by some
> conditionals in .fpc.cfg, I think.
In that case you should recompile the complete source (inside the $fpcsrc
directory) with OPT=-gl and then you'll need to install the units to a
different location (e.g. /usr/lib/2.6.4/units-dbg) and then adjust the
fpc.cfg to use a different set of paths if you specify a special define on
the command line (e.g. -dDEBUG_UNITS)
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140317/c385988e/attachment-0003.html>
More information about the Lazarus
mailing list