Re: [BLACKBOX] Debugging dll accessing programs

From: [at]} <Josef>
Date: Mon, 14 Mar 2011 19:27:21 +0100

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

Are you sure that the [ccall] option is required?
The docu (Dev/Docu/P-S-I.odc) says that no special handling is required for
callback procedures.

Please read the said document very carefully.
Check the parameter list and the involved data types.
It is not always an easy task to call external procedures successfully.

The <system> lines refer to procedures on the call stack that
are 'outside' of BlackBox, i.e. that have no debugging information
available for the BlackBox trap handler.
In this case, it displays all it knows, which is the program counter (pc)
and the frame pointer (fp).

- JT


----- Original Message -----
From: "Frank Hrebabetzky" <hreba{([at]})nowhere.xy
To: <BLACKBOX{([at]})nowhere.xy
Sent: Monday, March 14, 2011 1:11 PM
Subject: [BLACKBOX] Debugging dll accessing programs


> Hi all,
>
> 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.
>
> Execution results in the trap shown below. The call to Gdk.draw_arc is
> marked.
>
> My problems are:
> 1. The components of noaligned or untagged records and arrays cannot be
> displayed in trap windows
> 2. I have no idea what to do with those <system> lines.
>
> So how do I debug this?
>
> ---------------------------------------------------------------------
> illegal memory read (ad = DADADCDCH)
>
> GtkDraw.Expose [00000074H]
> .data POINTER NIL
> .event POINTER [0022E320H]
> .widget POINTER [62EAC580H]
> <system> (pc=63B6A099H, fp=0022DF90H)
> <system> (pc=63A45AC9H, fp=0022E010H)
> <system> (pc=63A5698FH, fp=0022E0F0H)
> <system> (pc=63A5DE8DH, fp=0022E210H)
> <system> (pc=63A5E1F5H, fp=0022E230H)
> <system> (pc=63C8A2BEH, fp=0022E290H)
> <system> (pc=63B68A06H, fp=0022E2F0H)
> <system> (pc=6C363FF0H, fp=0022E390H)
> <system> (pc=6C363FA4H, fp=0022E430H)
> <system> (pc=6C35F4D1H, fp=0022E4A0H)
> <system> (pc=6C3612AAH, fp=0022E4E0H)
> <system> (pc=6C36131AH, fp=0022E4F0H)
> <system> (pc=6C34137BH, fp=0022E520H)
> <system> (pc=685F09EAH, fp=0022E5A0H)
> <system> (pc=685F1204H, fp=0022E620H)
> <system> (pc=685F1740H, fp=0022E660H)
> <system> (pc=63B6780FH, fp=0022E6C0H)

> GtkDraw.Main [00000155H]
> .argc POINTER NIL
> .argv POINTER NIL
> .drawingArea POINTER [62EAC580H]
> .window POINTER [62EAE000H]
> Kernel.Call [00001A63H]
> .adr INTEGER 1652490770
> ...
> ---------------------------------------------------------
>
> with GtkDraw.Expose being:
>
> ---------------------------------------------------------
>
> PROCEDURE [ccall] Expose (
> widget: Gtk.WidgetP; event: Gdk.EventExposeP; data: G.pointer): G.boolean;
> BEGIN
> (**) Out.String("widget.state="); Out.Int(ORD(widget.state),0); Out.Ln;
> Gdk.draw_arc (
> widget.window, widget.style.fg_gc[ORD(widget.state)],
> G.TRUE, 0, 0, widget.allocation.width, widget.allocation.height,
> 0, 64 * 360);
> Out.String ("expose_event"); Out.Ln;
> RETURN G.TRUE;
> END Expose;
>
> -------------------------------------------------------------
> --
> Frank Hrebabetzky +55 / 48 / 3235 1106
> Florianopolis, Brazil
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-770640917_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b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vic2Ny
aWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RT
RVJWQExJU1RTLk9CRVJPTi5DSFxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNj
cmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNU
U0VSVkBMSVNUUy5PQkVST04uQ0h9fQA0LTE0
----boundary-LibPST-iamunique-770640917_-_---
Received on Mon Mar 14 2011 - 19:27:21 UTC

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