Sign in Join

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

Mailing lists / lazarus / 2016-05

HEAPTRACE IFDEF

10 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Aradeonas
to Aradeonas

My bad, I missed this?http://bugs.freepascal.org/view.php?id=24681

But as it marked as "no change required" but I cant understand why we cant benefit from something like this that have an internal option in project option but we cant control to save the output without defining an internal define for project?!

I think using heaptrc unit without this option is not useful enough because showing a program hep output in a message box is not even readable!

Regards,
Ara

http://www.fastmail.com - Access all of your messages and folders wherever you are -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160503/26f03104/attachment.html>

Reply by email

Ondrej Pokorny
to Aradeonas
Aradeonas wrote 5 lines
My bad, I missed this http://bugs.freepascal.org/view.php?id=24681 But as it marked as "no change required" but I cant understand why we cant benefit from something like this that have an internal option in project option but we cant control to save the output without defining an internal define for project?!

AFAIK, it's because it's not technically possible.

Use {$IF DECLARED(useheaptrace)} in your main project file (just like lazarus.pp uses it).

Ondrej

Reply by email

Aradeonas
to Ondrej Pokorny
AFAIK, it's because it's not technically possible.

As an amateur can I ask why?

Use {$IF DECLARED(useheaptrace)} in your main project file (just like lazarus.pp uses it).

Very interesting! I didnt know this ability,Thanks. How it works? what key names it has?
But it has a problem, if you use this define IDE wont color it properly like you use normal defines, it that case it if define is not true it will pale.

Regards,
Ara

http://www.fastmail.com - Does exactly what it says on the tin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160503/22cce871/attachment.html>

Reply by email

Michael Van Canneyt
to Aradeonas
Aradeonas wrote 6 lines
> AFAIK, it's because it's not technically possible. As an amateur can I ask why? > Use {$IF DECLARED(useheaptrace)} in your main project file (just like > lazarus.pp uses it). Very interesting! I didnt know this ability,Thanks. How it works? what key names it has?

We do have documentation, you know. Is it so much to ask to look at it ?

http://www.freepascal.org/docs-html/current/prog/progsu128.html

But it has a problem, if you use this define IDE wont color it properly like you use normal defines, it that case it if define is not true it will pale.

The IDE cannot do this, since it is known only when the compiler is invoked.

Michael.

Reply by email

Mattias Gaertner
to Aradeonas: As an amateur can I ask why? Very interesting! I didnt know this ability,Thanks. How it…
Show quoted text 6 lines
> AFAIK, it's because it's not technically possible. As an amateur can I ask why? > Use {$IF DECLARED(useheaptrace)} in your main project file (just like > lazarus.pp uses it). Very interesting! I didnt know this ability,Thanks. How it works? what key names it has?

UseHeapTrace is a variable in unit heaptrc, which is silently used when compiling with -gh.

But it has a problem, if you use this define IDE wont color it properly like you use normal defines, it that case it if define is not true it will pale.

$IF DECLARED is not supported by codetools.

Mattias

Reply by email

Aradeonas
to Mattias Gaertner
We do have documentation, you know. Is it so much to ask to look at it ? http://www.freepascal.org/docs-html/current/prog/progsu128.html

No it is not but it is not came to my searches and FPC documentation is not much good for searching at least from google and if I know what I want I couldn't guess there is such like this ability and one way I will be left to know about this is that is reading doc for fun everyday like a book and keep reading it's changelog!

UseHeapTrace is a variable in unit heaptrc, which is silently used when compiling with -gh.

Thanks for the explanation.

$IF DECLARED is not supported by codetools.

Should I report it as a bug or it already reported?

Regards,
Ara

http://www.fastmail.com - Access all of your messages and folders wherever you are -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160503/841299f8/attachment-0001.html>

Reply by email

Sven Barth
to Aradeonas: As an amateur can I ask why? Very interesting! I didnt know this ability,Thanks. How it…
"Aradeonas" wrote
> > AFAIK, it's because it's not technically possible. As an amateur can I ask why?

Because -gh does not trigger the recompilation of used units as internally it basically only adds another unit to the main program's uses clause. Thus any define for the presence of the heaptrace unit would only work in the main program file and there you use the variant with declared() anyway...

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160503/ec343caa/attachment.html>

Reply by email

Michael Van Canneyt
to Aradeonas: No it is not but it is not came to my searches and FPC documentation is not much good for…
Aradeonas wrote 9 lines
> We do have documentation, you know. Is it so much to ask to > look at it ? > http://www.freepascal.org/docs-html/current/prog/progsu128.html No it is not but it is not came to my searches and FPC documentation is not much good for searching at least from google and if I know what I want I couldn't guess there is such like this ability and one way I will be left to know about this is that is reading doc for fun everyday like a book and keep reading it's changelog!

I don't know what you typed in Google, but it definitely shows it:

Google search:

"conditional compilation free pascal"

Entry 4. But entries 1-3 also will lead you the answer.

And the documentation changes only once per release. No-one asks you to read it daily.

Show quoted text 5 lines
> UseHeapTrace is a variable in unit heaptrc, which is silently used > when compiling with -gh. Thanks for the explanation. > $IF DECLARED is not supported by codetools. Should I report it as a bug or it already reported?

IMHO it is useless to report it for this case.

As I tried to explain: it cannot be done *correct* by the codetools.

It depends, for example, on actual compiler options. So, in case of lazarus, it depends on build modes. It can also depend on @someconfig.cfg compiler options files. etc.

At best, the codetools can make a guess.

Michael.

Reply by email