[M3devel] Pretty-printing REFANYs?

Mika Nystrom mika at async.caltech.edu
Sun Sep 28 07:49:58 CEST 2008


Right, I am aware of those interfaces.. just wondering what was
out there.  Do I really need to look at .M3WEB?  I thought
that m3gdb could figure out things without anything outside
of the binary...

I'm looking for essentially what m3gdb offers, say prints
at minimum the name of the type (this I recall is trivial with
some of the RT* interfaces) but hopefully also with field names
and values, but doesn't expand references recursively.. something
like that?

    Mika

Darko writes:
>You can use RTTipe to read the fields and values within a type. If you  
>also want the type and field names you can interpret the .M3WEB file.  
>I have a couple of modules that do something like that but they are  
>not what you would call finished. What level of detail are you after?
>
>
>On 28/09/2008, at 6:45 AM, Mika Nystrom wrote:
>
>> Hello Modula-3 people,
>>
>> I am working on a writing an interpreter that I'd like to embed in
>> various Modula-3 programs.  It so happens that this interpreter
>> might from time to time be manipulating arbitrary M3 REFs, and just
>> from the point of view of providing information to a human user,
>> it might be nice to be able to pretty-print these.  Does anyone
>> have any code that accomplishes this, at least partly?  I'm thinking
>> that since m3gdb can do it, the information must all be in the
>> binary---somehow.  (Even enumeration names, right?)  And since the
>> pickler can pickle things... hmm.
>>
>> I would greatly appreciate any guidance that's out there...
>>
>>    Best regards,
>>       Mika Nystrom



More information about the M3devel mailing list