Re: [BLACKBOX] Debugging dll accessing programs

From: [at]} <Frank>
Date: Tue, 15 Mar 2011 12:49:31 -0300

----boundary-LibPST-iamunique-2017170047_-_-
Content-type: text/plain

On 03/15/2011 08:52 AM, Romiras wrote:
>> Some Gtk structs contain arrays. A C array variable is a pointer to the
>> first array element. So it should translate to Component Pascal as
>> POINTER TO ARRAY [untagged]<size> OF<base type>
>> Correct?

> Yes. And some C structures (RECORD) need [noalign] system flag instead
> of [untagged].
>
> Additionally you can check GTK+ bindings for Modula-2, converted to
> XDS compiler. Look at
> https://sourceforge.net/projects/xds-gtk2/files/1.0/xds-gtk2-1.0/ .
>
>> From your answer I deduce that these data aren't of much use for a simple
>> application programmer. Debugging consists of staring at the source code in
>> such a case, correct?

> A provided subsystem 'Gtk' was initially converted by dmitrys99 from
> Free Pascal's definition modules (that converted from original C
> headers). I did just a small modifications. I may contain (and
> contains, I believe) a some portion of incorrect definitions of
> headers. It still in alpha status (some demos worked Ok).
>
> I think this subsystem is far to be production-ready because it
> incomplete and I advice to refrain from using it, but only in small
> GUI applications for educational/experimental purposes.
> It will be very helpful to write wrapper modules, because there is a
> lot of type casting in GTK programs and module SYSTEM used everywhere
> (bad programming style).

Thanks for pointing this out. I will have a closer look on the parts I use.

>>>> I wrote a simple test program which uses gtk and calls an expose event
>>>> handler. I first wrote a C version, which works fine, and translated
>>>> it then line by line to Component Pascal. My interface modules were
>>>> strongly inspired from a link (which I don't remember (is there an
>>>> archive of this list?)) from romiras.
> You can retrieve them from OberonRevival project from SVN repository at
> https://oberonrevival.svn.sourceforge.net/svnroot/oberonrevival/bbox-components/Gtk/
> (or by menu Code -> SVN Browse of a SF project's page from web
> browser)

I came across the home page of this project several times and really
miss some information in english about it (I don't know russian at all).

-- 
Frank Hrebabetzky		+55 / 48 / 3235 1106
Florianopolis, Brazil
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2017170047_-_-
Content-type: application/rtf
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