reading PPU files

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

reading PPU files

Mattias Gaertner
I want to read ppu files like the ppudump tool.
ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
installed by default. At least not on debian.

Should I make a copy of this unit?
Will this work for the various compilers (e.g. compiling the tool with
2.2.3 and reading 2.2.x and 2.3.x ppu files)?

Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Florian Klämpfl
Mattias Gaertner schrieb:
> I want to read ppu files like the ppudump tool.
> ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
> installed by default. At least not on debian.
>
> Should I make a copy of this unit?

No ;)

> Will this work for the various compilers (e.g. compiling the tool with
> 2.2.3 and reading 2.2.x and 2.3.x ppu files)?

Sometimes it works, sometimes not. ppudump is also often out of date.
What exactly do you want to achive?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Mattias Gaertner
On Tue, 24 Jun 2008 23:14:34 +0200
Florian Klaempfl <[hidden email]> wrote:

> Mattias Gaertner schrieb:
> > I want to read ppu files like the ppudump tool.
> > ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
> > installed by default. At least not on debian.
> >
> > Should I make a copy of this unit?
>
> No ;)
>
> > Will this work for the various compilers (e.g. compiling the tool
> > with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
>
> Sometimes it works, sometimes not. ppudump is also often out of date.
> What exactly do you want to achive?

Reading ppu files with the codetools. First getting information about
unit dependencies and initialization/finalization sections. Later some
type information.


Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Florian Klämpfl
Mattias Gaertner schrieb:

> On Tue, 24 Jun 2008 23:14:34 +0200
> Florian Klaempfl <[hidden email]> wrote:
>
>> Mattias Gaertner schrieb:
>>> I want to read ppu files like the ppudump tool.
>>> ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
>>> installed by default. At least not on debian.
>>>
>>> Should I make a copy of this unit?
>> No ;)
>>
>>> Will this work for the various compilers (e.g. compiling the tool
>>> with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
>> Sometimes it works, sometimes not. ppudump is also often out of date.
>> What exactly do you want to achive?
>
> Reading ppu files with the codetools. First getting information about
> unit dependencies and initialization/finalization sections. Later some
> type information.

Well, if you really dare to do so, the best is probably copying from
time to time the necessary fpc sources.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Peter Vreman
Florian Klaempfl wrote:

> Mattias Gaertner schrieb:
>> On Tue, 24 Jun 2008 23:14:34 +0200
>> Florian Klaempfl <[hidden email]> wrote:
>>
>>> Mattias Gaertner schrieb:
>>>> I want to read ppu files like the ppudump tool.
>>>> ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
>>>> installed by default. At least not on debian.
>>>>
>>>> Should I make a copy of this unit?
>>> No ;)
>>>
>>>> Will this work for the various compilers (e.g. compiling the tool
>>>> with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
>>> Sometimes it works, sometimes not. ppudump is also often out of date.
>>> What exactly do you want to achive?
>>
>> Reading ppu files with the codetools. First getting information about
>> unit dependencies and initialization/finalization sections. Later some
>> type information.
>
> Well, if you really dare to do so, the best is probably copying from
> time to time the necessary fpc sources.

The ppu unit from the compiler and ppudump has become too much dependent
on other units of the compiler that i don't think it is recommended to
be used by other projects. The current dependencies are below:

Compiling ppudump.pp
Compiling /home/peter/fpc/compiler/constexp.pas
Compiling /home/peter/fpc/compiler/ppu.pas
Compiling /home/peter/fpc/compiler/globtype.pas
Compiling /home/peter/fpc/compiler/systems.pas
Compiling /home/peter/fpc/compiler/cutils.pas
Compiling /home/peter/fpc/compiler/fpccrc.pas
Compiling /home/peter/fpc/compiler/cclasses.pas
Compiling /home/peter/fpc/compiler/cstreams.pas
Compiling /home/peter/fpc/compiler/i386/cpuinfo.pas
Compiling /home/peter/fpc/compiler/version.pas

It might be better to write a clean PPU reader using streams. The PPU
format is stable and TLV based so multiple ppu-versions can be
supported. For the compiler and ppudump this is not a requirement, but
for lazarus it is needed especially if it wants to use type information.

Peter
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Peter Vreman
Peter Vreman wrote:

> Florian Klaempfl wrote:
>> Mattias Gaertner schrieb:
>>> On Tue, 24 Jun 2008 23:14:34 +0200
>>> Florian Klaempfl <[hidden email]> wrote:
>>>
>>>> Mattias Gaertner schrieb:
>>>>> I want to read ppu files like the ppudump tool.
>>>>> ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
>>>>> installed by default. At least not on debian.
>>>>>
>>>>> Should I make a copy of this unit?
>>>> No ;)
>>>>
>>>>> Will this work for the various compilers (e.g. compiling the tool
>>>>> with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
>>>> Sometimes it works, sometimes not. ppudump is also often out of
>>>> date. What exactly do you want to achive?
>>>
>>> Reading ppu files with the codetools. First getting information about
>>> unit dependencies and initialization/finalization sections. Later some
>>> type information.
>>
>> Well, if you really dare to do so, the best is probably copying from
>> time to time the necessary fpc sources.
>
> The ppu unit from the compiler and ppudump has become too much dependent
> on other units of the compiler that i don't think it is recommended to
> be used by other projects. The current dependencies are below:
>
> Compiling ppudump.pp
> Compiling /home/peter/fpc/compiler/constexp.pas
> Compiling /home/peter/fpc/compiler/ppu.pas
> Compiling /home/peter/fpc/compiler/globtype.pas
> Compiling /home/peter/fpc/compiler/systems.pas
> Compiling /home/peter/fpc/compiler/cutils.pas
> Compiling /home/peter/fpc/compiler/fpccrc.pas
> Compiling /home/peter/fpc/compiler/cclasses.pas
> Compiling /home/peter/fpc/compiler/cstreams.pas
> Compiling /home/peter/fpc/compiler/i386/cpuinfo.pas
> Compiling /home/peter/fpc/compiler/version.pas
>
> It might be better to write a clean PPU reader using streams. The PPU
> format is stable and TLV based so multiple ppu-versions can be
> supported. For the compiler and ppudump this is not a requirement, but
> for lazarus it is needed especially if it wants to use type information.

An idea might be to create a new fcl-ppu package that contains such a
new unit. The ppudump and ppumove tools can then be moved to this new
package to. The package provides a clean and independent code base for
ppu reading/writing. The ppu package can depedent on regular units and
packages like classes and hash intsead of compiler local copies.

Maybe some parts of ppudump can be put in a separate unit to have a
common class available that can be used for type name and location
resolving.

Peter
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Michael Van Canneyt
In reply to this post by Peter Vreman


On Wed, 25 Jun 2008, Peter Vreman wrote:

> Florian Klaempfl wrote:
> > Mattias Gaertner schrieb:
> > > On Tue, 24 Jun 2008 23:14:34 +0200
> > > Florian Klaempfl <[hidden email]> wrote:
> > >
> > > > Mattias Gaertner schrieb:
> > > > > I want to read ppu files like the ppudump tool.
> > > > > ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
> > > > > installed by default. At least not on debian.
> > > > >
> > > > > Should I make a copy of this unit?
> > > > No ;)
> > > >
> > > > > Will this work for the various compilers (e.g. compiling the tool
> > > > > with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
> > > > Sometimes it works, sometimes not. ppudump is also often out of date.
> > > > What exactly do you want to achive?
> > >
> > > Reading ppu files with the codetools. First getting information about
> > > unit dependencies and initialization/finalization sections. Later some
> > > type information.
> >
> > Well, if you really dare to do so, the best is probably copying from time to
> > time the necessary fpc sources.
>
> The ppu unit from the compiler and ppudump has become too much dependent on
> other units of the compiler that i don't think it is recommended to be used by
> other projects. The current dependencies are below:
>
> Compiling ppudump.pp
> Compiling /home/peter/fpc/compiler/constexp.pas
> Compiling /home/peter/fpc/compiler/ppu.pas
> Compiling /home/peter/fpc/compiler/globtype.pas
> Compiling /home/peter/fpc/compiler/systems.pas
> Compiling /home/peter/fpc/compiler/cutils.pas
> Compiling /home/peter/fpc/compiler/fpccrc.pas
> Compiling /home/peter/fpc/compiler/cclasses.pas
> Compiling /home/peter/fpc/compiler/cstreams.pas
> Compiling /home/peter/fpc/compiler/i386/cpuinfo.pas
> Compiling /home/peter/fpc/compiler/version.pas
>
> It might be better to write a clean PPU reader using streams. The PPU format
> is stable and TLV based so multiple ppu-versions can be supported. For the
> compiler and ppudump this is not a requirement, but for lazarus it is needed
> especially if it wants to use type information.

I would also recommend this way, and think that if it is implemented, we
make a FPC package from this.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Michael Van Canneyt
In reply to this post by Peter Vreman


On Wed, 25 Jun 2008, Peter Vreman wrote:

> Peter Vreman wrote:
> > Florian Klaempfl wrote:
> > > Mattias Gaertner schrieb:
> > > > On Tue, 24 Jun 2008 23:14:34 +0200
> > > > Florian Klaempfl <[hidden email]> wrote:
> > > >
> > > > > Mattias Gaertner schrieb:
> > > > > > I want to read ppu files like the ppudump tool.
> > > > > > ppudump uses the unit compiler/ppu.pp, but ppu.ppu is not
> > > > > > installed by default. At least not on debian.
> > > > > >
> > > > > > Should I make a copy of this unit?
> > > > > No ;)
> > > > >
> > > > > > Will this work for the various compilers (e.g. compiling the tool
> > > > > > with 2.2.3 and reading 2.2.x and 2.3.x ppu files)?
> > > > > Sometimes it works, sometimes not. ppudump is also often out of date.
> > > > > What exactly do you want to achive?
> > > >
> > > > Reading ppu files with the codetools. First getting information about
> > > > unit dependencies and initialization/finalization sections. Later some
> > > > type information.
> > >
> > > Well, if you really dare to do so, the best is probably copying from time
> > > to time the necessary fpc sources.
> >
> > The ppu unit from the compiler and ppudump has become too much dependent on
> > other units of the compiler that i don't think it is recommended to be used
> > by other projects. The current dependencies are below:
> >
> > Compiling ppudump.pp
> > Compiling /home/peter/fpc/compiler/constexp.pas
> > Compiling /home/peter/fpc/compiler/ppu.pas
> > Compiling /home/peter/fpc/compiler/globtype.pas
> > Compiling /home/peter/fpc/compiler/systems.pas
> > Compiling /home/peter/fpc/compiler/cutils.pas
> > Compiling /home/peter/fpc/compiler/fpccrc.pas
> > Compiling /home/peter/fpc/compiler/cclasses.pas
> > Compiling /home/peter/fpc/compiler/cstreams.pas
> > Compiling /home/peter/fpc/compiler/i386/cpuinfo.pas
> > Compiling /home/peter/fpc/compiler/version.pas
> >
> > It might be better to write a clean PPU reader using streams. The PPU format
> > is stable and TLV based so multiple ppu-versions can be supported. For the
> > compiler and ppudump this is not a requirement, but for lazarus it is needed
> > especially if it wants to use type information.
>
> An idea might be to create a new fcl-ppu package that contains such a new
> unit. The ppudump and ppumove tools can then be moved to this new package to.
> The package provides a clean and independent code base for ppu
> reading/writing. The ppu package can depedent on regular units and packages
> like classes and hash intsead of compiler local copies.
>
> Maybe some parts of ppudump can be put in a separate unit to have a common
> class available that can be used for type name and location resolving.

I'm all for this idea :)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: reading PPU files

Mattias Gaertner
In reply to this post by Michael Van Canneyt
On Wed, 25 Jun 2008 13:06:58 +0200 (CEST)
Michael Van Canneyt <[hidden email]> wrote:

>
>
> On Wed, 25 Jun 2008, Peter Vreman wrote:
>
>[...]
> > The ppu unit from the compiler and ppudump has become too much
> > dependent on other units of the compiler that i don't think it is
> > recommended to be used by other projects. The current dependencies
> > are below:
> >
> > Compiling ppudump.pp
> > Compiling /home/peter/fpc/compiler/constexp.pas
> > Compiling /home/peter/fpc/compiler/ppu.pas
> > Compiling /home/peter/fpc/compiler/globtype.pas
> > Compiling /home/peter/fpc/compiler/systems.pas
> > Compiling /home/peter/fpc/compiler/cutils.pas
> > Compiling /home/peter/fpc/compiler/fpccrc.pas
> > Compiling /home/peter/fpc/compiler/cclasses.pas
> > Compiling /home/peter/fpc/compiler/cstreams.pas
> > Compiling /home/peter/fpc/compiler/i386/cpuinfo.pas
> > Compiling /home/peter/fpc/compiler/version.pas
> >
> > It might be better to write a clean PPU reader using streams. The
> > PPU format is stable and TLV based so multiple ppu-versions can be
> > supported. For the compiler and ppudump this is not a requirement,
> > but for lazarus it is needed especially if it wants to use type
> > information.
>
> I would also recommend this way, and think that if it is implemented,
> we make a FPC package from this.

Ok. Great.


Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal