Sign in Join

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

Mailing lists / fpc-devel / 2015-08

Debug/Logging information: unit path

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Steve Hildebrandt

I'm currently trying to implement logging with trace information. If I use the generated debug information function, unit and name are extracted from the address.
How would I go about finding the unit path, if this is possible at all? Also I'm using packages, dunno if this has some impact on the aproach.

Regards,
Steve Hildebrandt

Reply by email

Gennady Agranov
to Steve Hildebrandt

Hi,

1. I have code that heavily uses enums/sets

When I use ppudump to print *.ppu files I see some sets reported with null ElType and I do not understand what causes them :(

And I do not believe that they are referenced at all...

Any ideas why "set" is reported with no ElType?

Thanks,
Gennady

Example:

json version:

{
"Type": "set",
"Id": 236,
"Size": 1,
"Base": 0,
"Max": 0,
"ElType": null
},

text version:

** Definition Id 236 **
Set definition
Type symbol : (7357) Nil
DefOptions :
DefStates :
Element type : (7361) Nil
Size : 1
Set Base : 0
Set Max : 0

xml version:

<set>
<id>236</id>
<size>1</size>
<base>0</base>
<max>0</max>
<eltype></eltype>
</set>

{
"Type": "set",
"Id": 92,
"Size": 1,
"Base": 0,
"Max": 0,
"ElType": null
}

Reply by email

Pierre Free Pascal
to Gennady Agranov

Maybe you are using empty sets in your source code?

An empty set:

[]

has no elements and thus the compiler cannot know what the type of the elements are.

In the hope that this will help,

Pierre Muller

Show quoted text 69 lines
-----Message d'origine----- De : [mailto:fpc-devel- De la part de Gennady Agranov Envoyé : dimanche 23 août 2015 00:46 À : Objet : [fpc-devel] ppudump question Hi, 1. I have code that heavily uses enums/sets When I use ppudump to print *.ppu files I see some sets reported with null ElType and I do not understand what causes them :( And I do not believe that they are referenced at all... Any ideas why "set" is reported with no ElType? Thanks, Gennady Example: json version: { "Type": "set", "Id": 236, "Size": 1, "Base": 0, "Max": 0, "ElType": null }, text version: ** Definition Id 236 ** Set definition Type symbol : (7357) Nil DefOptions : DefStates : Element type : (7361) Nil Size : 1 Set Base : 0 Set Max : 0 xml version: <set> <id>236</id> <size>1</size> <base>0</base> <max>0</max> <eltype></eltype> </set> { "Type": "set", "Id": 92, "Size": 1, "Base": 0, "Max": 0, "ElType": null } _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Gennady Agranov
to Pierre Free Pascal

Thanks!

It was a great suggestion!

It is probably related to empty sets - but there is also something else
- i have *.pp with "[]" passed as parameter but *.ppu does not mention set with empty ElType :(

Thanks again!

Gennady

Pierre Free Pascal wrote 87 lines
Maybe you are using empty sets in your source code? An empty set: [] has no elements and thus the compiler cannot know what the type of the elements are. In the hope that this will help, Pierre Muller > -----Message d'origine----- > De : [mailto:fpc-devel- > De la part de Gennady Agranov > Envoyé : dimanche 23 août 2015 00:46 > À : > Objet : [fpc-devel] ppudump question > > Hi, > > 1. I have code that heavily uses enums/sets > > When I use ppudump to print *.ppu files I see some sets reported with > null ElType and I do not understand what causes them :( > > And I do not believe that they are referenced at all... > > Any ideas why "set" is reported with no ElType? > > Thanks, > Gennady > > Example: > > json version: > > { > "Type": "set", > "Id": 236, > "Size": 1, > "Base": 0, > "Max": 0, > "ElType": null > }, > > text version: > > ** Definition Id 236 ** > Set definition > Type symbol : (7357) Nil > DefOptions : > DefStates : > Element type : (7361) Nil > Size : 1 > Set Base : 0 > Set Max : 0 > > xml version: > > <set> > <id>236</id> > <size>1</size> > <base>0</base> > <max>0</max> > <eltype></eltype> > </set> > > > { > "Type": "set", > "Id": 92, > "Size": 1, > "Base": 0, > "Max": 0, > "ElType": null > } > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email