[fpc-pascal] setting variables with DWARF in gdb

Seth Grover sethdgrover at gmail.com
Fri Oct 29 18:58:40 CEST 2010


When I compile an FPC program for debug with DWARF symbols, GDB
seemingly ignores my commands to set variables or registers when
debugging:

With STABS (or whatever the default is, ie., -gw is not set):

Breakpoint 1, DOIT () at /home/tlacuache/tmp/project1.lpr:14
14	    writeln(MYVAR);
(gdb) print MYVAR
$1 = 1
(gdb) set MYVAR=32
(gdb) print MYVAR
$2 = 32

With DWARF:

Breakpoint 1, DOIT () at project1.lpr:14
14	    writeln(MYVAR);
(gdb) print MYVAR
$1 = 1
(gdb) SET MYVAR=32
(gdb) print MYVAR
$2 = 1

Am I doing something wrong? Should I log a bug in mantis?

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover
sethdgrover[at]gmail[dot]com



More information about the fpc-pascal mailing list