Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-02

Setting a variable in GDB

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

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?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
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) .

Jonas

Reply by email