Sign in Join

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

Mailing lists / lazarus / 2009-09

Debugging error in Lazarus

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I'm trying to do debugging in the IDE again - my normal process is outputing data to a log file. Anyway, I am getting the following error evaluation error. Is this something I'm not doing right, or simply one of the many GDB+Pascal limitation.

I'm using the latest "fixes" version of Lazarus v0.9.28 [GTK2 on Ubuntu 9.04 (64bit)]

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot.png
Type: image/png
Size: 11258 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090930/0a4df658/attachment.png>

Reply by email

Paul Ishenin
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I'm trying to do debugging in the IDE again - my normal process is outputing data to a log file. Anyway, I am getting the following error evaluation error. Is this something I'm not doing right, or simply one of the many GDB+Pascal limitation.

Expression evaluation is not implement by lazarus yet. SizeOf(something) is an expression (moreover a function call).

Best regards,
Paul Ishenin.

Reply by email

Graeme Geldenhuys
to Paul Ishenin

2009/9/30 Paul Ishenin :

Expression evaluation is not implement by lazarus yet. SizeOf(something) is an expression (moreover a function call).

Expression evaluation seems to work sometimes, but most of the times not. Example:

pTOCEntry^.Length

1) if I mouse over "Length" I get out of scope error

2) If I select pTOCEntry^.Length and then mouse over selection I get a answer, same as what is shown in the Watch window.

As for the expression SizeOf(...) being a function call... that is allowed in Delphi and Kylix.

Regards,
- Graeme -

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

Reply by email

Mattias Gaertner
to Paul Ishenin: Expression evaluation is not implement by lazarus yet. SizeOf(something) is an expression…
Show quoted text 9 lines
Graeme Geldenhuys wrote: > I'm trying to do debugging in the IDE again - my normal process is > outputing data to a log file. Anyway, I am getting the following > error evaluation error. Is this something I'm not doing right, or > simply one of the many GDB+Pascal limitation. Expression evaluation is not implement by lazarus yet. SizeOf(something) is an expression (moreover a function call).

SizeOf is computed at compile time to a constant. It is not a function.

I can write a function that asks the codetools for every identifier in an expression. Then the debugger can try to evaluate it.

Mattias

Reply by email

Marc Weustink
to Graeme Geldenhuys: 2009/9/30 Paul Ishenin : Expression evaluation seems to work sometimes, but most of the…
Graeme Geldenhuys wrote 10 lines
2009/9/30 Paul Ishenin : > Expression evaluation is not implement by lazarus yet. SizeOf(something) is > an expression (moreover a function call). Expression evaluation seems to work sometimes, but most of the times not. Example: pTOCEntry^.Length 1) if I mouse over "Length" I get out of scope error

Problem is that the in this case only length is passed to the debugger, and not the part before it. So the debugger gets no0 context and has no clue where to find Length

Marc

Reply by email

Marc Weustink
to Graeme Geldenhuys: 2009/9/30 Paul Ishenin : Expression evaluation seems to work sometimes, but most of the…
Graeme Geldenhuys wrote
As for the expression SizeOf(...) being a function call... that is allowed in Delphi and Kylix.

For the .28 release I started some expression parsing, but disabled it since gdb couldn't provide me all te info I needed (pchar and string were reported as the same type)

With this parsing it is possible to handle buildin functions like sizeof()

Marc

Reply by email