Re: [BLACKBOX] Debugging dll accessing programs

From: [at]} <Romiras>
Date: Tue, 15 Mar 2011 13:52:04 +0200

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

> 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).

>>> 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)

Romiras


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1312083895_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZ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IHRvIExJU1RTRVJWQExJU1RTLk9C
RVJPTi5DSH19ADpCTEE
----boundary-LibPST-iamunique-1312083895_-_---
Received on Tue Mar 15 2011 - 12:52:04 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:17 UTC