Sign in Join

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

Mailing lists / fpc-devel / 2010-06

About ppudump program

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Doriano Blengino

Hi,

I am writing a Freepascal IDE in Linux+GTK2 (using freepascal, of course!). I attach a screenshot for your curiosity, just in case.

At this time I am trying to finish a good auto-completion, so I need to extract symbols from pre-compiled PPUs (especially the runtime standard libraries). Right now I use ppudump(1) to extract symbols, but I could switch in future to the use of ppu.pas. I noticed that different freepascal releases do not share a common PPU file format, so using ppu.pas inside the IDE would force the user to use the same compiler version as the one used to compile the IDE. On the other hand, I noticed that the release 2.4.x is the first one which reports "v100" for a PPU file, which hopefully indicates that future releases could be PPU-compatible...

Now, I would ask an advice: is it better to stick to ppudump, at a price of some reduction in speed, and the risk that its output could change in future, invalidating the IDE parsing routines? Or is it better to use ppu.pas in the IDE, having confidence that ppu.pas will parse PPU file generated by different versions/releases of freepascal?

Thanks in advance for your reply, and best regards.

Doriano Blengino

Reply by email

Michael Van Canneyt
to Doriano Blengino
Doriano Blengino wrote 20 lines
Hi, I am writing a Freepascal IDE in Linux+GTK2 (using freepascal, of course!). I attach a screenshot for your curiosity, just in case. At this time I am trying to finish a good auto-completion, so I need to extract symbols from pre-compiled PPUs (especially the runtime standard libraries). Right now I use ppudump(1) to extract symbols, but I could switch in future to the use of ppu.pas. I noticed that different freepascal releases do not share a common PPU file format, so using ppu.pas inside the IDE would force the user to use the same compiler version as the one used to compile the IDE. On the other hand, I noticed that the release 2.4.x is the first one which reports "v100" for a PPU file, which hopefully indicates that future releases could be PPU-compatible... Now, I would ask an advice: is it better to stick to ppudump, at a price of some reduction in speed, and the risk that its output could change in future, invalidating the IDE parsing routines? Or is it better to use ppu.pas in the IDE, having confidence that ppu.pas will parse PPU file generated by different versions/releases of freepascal?

Well, as far as I know, ppu simply skips blocks that it does not know, so I would think it is safe to use.

Michael.

Reply by email

Jonas Maebe
to Doriano Blengino: I am writing a Freepascal IDE in Linux+GTK2 (using freepascal, of course!). I attach a…

First of all: please mention in the future that you are not subscribed (also in replies, because people may forget), so that people who reply know that they should CC you.

Doriano Blengino wrote 10 lines
At this time I am trying to finish a good auto-completion, so I need to extract symbols from pre-compiled PPUs (especially the runtime standard libraries). Right now I use ppudump(1) to extract symbols, but I could switch in future to the use of ppu.pas. I noticed that different freepascal releases do not share a common PPU file format, so using ppu.pas inside the IDE would force the user to use the same compiler version as the one used to compile the IDE. On the other hand, I noticed that the release 2.4.x is the first one which reports "v100" for a PPU file, which hopefully indicates that future releases could be PPU-compatible...

The "version number" in PPU files is just an increasing byte. 100 is not "1.00", it's "one hundred". It has no special meaning.

Now, I would ask an advice: is it better to stick to ppudump, at a price of some reduction in speed, and the risk that its output could change in future, invalidating the IDE parsing routines?

You should use ppudump.

Jonas

Reply by email

Graeme Geldenhuys
to Doriano Blengino: I am writing a Freepascal IDE in Linux+GTK2 (using freepascal, of course!). I attach a…

Op 2010-06-22 14:40, Doriano Blengino het geskryf:

At this time I am trying to finish a good auto-completion, so I need to extract symbols from pre-compiled PPUs (especially the runtime standard libraries). Right now I use ppudump(1) to extract symbols, but I could

Interesting, is that actually faster/better than parsing the sources?

Regards,
- Graeme -

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

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
Op 2010-06-22 14:40, Doriano Blengino het geskryf: > > At this time I am trying to finish a good auto-completion, so I need to > extract symbols from pre-compiled PPUs (especially the runtime standard > libraries). Right now I use ppudump(1) to extract symbols, but I could Interesting, is that actually faster/better than parsing the sources?

Yes. Additionally, it also works if no sources are available.

Michael.

Reply by email

Hans-Peter Diettrich
to Michael Van Canneyt
Show quoted text 7 lines
>> At this time I am trying to finish a good auto-completion, so I need to >> extract symbols from pre-compiled PPUs (especially the runtime standard >> libraries). Right now I use ppudump(1) to extract symbols, but I could > > Interesting, is that actually faster/better than parsing the sources? Yes. Additionally, it also works if no sources are available.

...and also deserve no knowledge about the compiler settings at compile time.

DoDi

Reply by email

Doriano Blengino
Jonas wrote
First of all: please mention in the future that you are not subscribed (also in replies, because people may forget), so that people who reply know that they should CC you.

Sorry - I didn't notice (is it mentioned somewhere?).

** I'am not subscribed to this list, at present **

Show quoted text 9 lines
>/ Now, I would ask an advice: is it better to stick to ppudump, at a price of />/ some reduction in speed, and the risk that its output could change in future, />/ invalidating the IDE parsing routines? Or is it better to use ppu.pas in the />/ IDE, having confidence that ppu.pas will parse PPU file generated by />/ different versions/releases of freepascal? / Well, as far as I know, ppu simply skips blocks that it does not know, so I would think it is safe to use.

I made some tries with two or three different releases, making ppudump parse "its own" ppu files and ppu files from other releases. At different extents, different problems arose. In one bad case, ppudump (version about 2.2.0) crashed while parsing ppu files from its own release, trying to allocate an enourmous block of memory. A self compiled copy, took from 2.4.0 sources, did the same. Many times it complained about "!! has more information" (who cares), "!! refid out of range" or similar (critical). Anyway, using external ppudump, seems to be the safest way to go... the only problem is that ppudump takes binary informations and converts them in a human-readable form, which are later parsed and converted again in binary form... it takes several seconds to parse the big gtk2.ppu file.

Regards,
Doriano

Reply by email

Jonas Maebe
to Doriano Blengino
Doriano Blengino wrote 6 lines
Jonas wrote: > First of all: please mention in the future that you are not > subscribed (also in replies, because people may forget), so that > people who reply know that they should CC you. > Sorry - I didn't notice (is it mentioned somewhere?).

I think it's normal to expect that people replying to a message on a mailing list may only reply to the mailing list if they don't know that you are not subscribed.

> Well, as far as I know, ppu simply skips blocks that it does not > know, > so I would think it is safe to use.

First of all, it is not safe. While ppudump indeed skips blocks that it doesn't know, the contents of the blocks can also change between different versions.

Show quoted text 8 lines
I made some tries with two or three different releases, making ppudump parse "its own" ppu files and ppu files from other releases. At different extents, different problems arose. In one bad case, ppudump (version about 2.2.0) crashed while parsing ppu files from its own release, trying to allocate an enourmous block of memory. A self compiled copy, took from 2.4.0 sources, did the same. Many times it complained about "!! has more information" (who cares), "!! refid out of range" or similar (critical).

ppudump is indeed often out of date because it's seldom used by compiler developers and not automatically tested.

Jonas

Reply by email