[fpc-pascal] Setting a variable in GDB

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Feb 24 14:31:27 CET 2010

On 24 Feb 2010, at 14:24, Graeme Geldenhuys wrote:

> If I can, how to I set a variable to have an alternative value while
> debugging in via GDB?
> I know the GDB 'set' command, but not sure how to set string values  
> etc...
> Anybody got some hints on this?

The set command only works for simple types (integers, booleans,  
chars). Anything more should probably be implemented using a higher  
level wrapper on top of GDB (such as Lazarus), although on i386 this  
will require regcall support in GDB first so that the RTL helper  
routines can be called properly (and my patch for that to GDB is on  
hold since it seems that the FPC implementation will have to be  
changed for Delphi-compatibility, see http://bugs.freepascal.org/view.php?id=15691) 


More information about the fpc-pascal mailing list