[gvd-users] Catching exceptions in attached Gvd with Ada CGI program

Craig Carey gvd-users@lists.act-europe.fr
Wed, 06 Nov 2002 09:51:21 +1300





I am using Gvd to debug a GNAT 3.14p program that runs under an Apache
webserver in its its CGI environment.

A problem is that when the GNAT Ada 95 CGI program raises an exception
or an assertion then the program does not find it. Currently I have
output from GNAT.Traceback.Symbolic.Symbolic_Traceback() sent via
TCP to my Ada 95 Ptunnel proxy that sumps the data and prints it.

I suppose it is the lack of debugging symbols in some 3.14p GNAT
library. Ideally, either ACT or the Gvd package, would provide the
missing files or some comments on how to get past the problem.

Can the next release of Gvd have some fix for the default problem of
Gvd not catching exceptions and assertions when it is being 'attach'ed
to the debugged GNAT 3.Xp program ?.

If no files appear, then is a way out, this: compile up a GNU 3.3 GNAT
compiler that has debugging symbols?. It is not ideal to have that
debugger fail when an exception is raised in the user's Ada code.

------

Also, Gvd for Windows scrolls very slowly.

The problem goes away when the "Show Lines with Code" checkbox is
emptied/unset.

Would the results of the computations on where the blue dots should go,
be saved into memory so that scrolling is faster (in a future version
of Gvd) :?

------

Also Gvd still interprets a single click in the main vertical scroll
bars, as two clicks, in my Windows 2000 operating system. Thus it has
some bug that double bounces. Since interesting, here are comments on
how to safely access mouse data underneath Microsoft's higher level
mouse API:

----------------------------------------
At 2002\06\03 22:54 -0700 Monday, Doron Holan wrote:

    Subject: [ntdev] RE: Identifying PS/2 mouse
    From: "Doron Holan" <doronh@windows.microsoft.com>
    Date: Mon, 3 Jun 2002 22:54:41 -0700
    To: "NT Developers Interest List" <ntdev@lists.osr.com>
 >
 >If you are in windows 2000, insert yourself as a device upper filter
 >into the ps/2 keyboard and mouse stacks.  You can get to the data in 2
 >ways:
 >
 >1)       via the service callback routine will give you the data as
 >         i8042prt has interpreted it
 >
 >2)       you can insert an ISR filter and get at the raw data and do
 >         your own processing
 >
 >If you are reading these ports directly w/out the cooperation of
 >i8042prt, you will very likely hang the machine (by freaking out the
 >8042 controller which is very very touchey). [...]
----------------------------------------

The topic of XFree86's inferior mouse decelerating code, appeared at
the XFree86 'xpert' mailing list in the last week (it lacks an
averaging algorithm: x1+x2+..+x[n(...)]). To fix it, a way to proceed
may be to use i8042prt API as described, analyze the averaging
algorithm, and port the algorithm back to XFree86 & Linux.

Is that two mouse clicks for one, a GtkAda bug or a Gvd bug ?.
If it is a GtkAda bug then was it resolved/solved/corrected?

I should try this list first since the problem shows in Gvd and the
GtkAda already received a comment but they did not identify the
code or say if it had been fixed.




Additional A: How I attach Gvd to program:

After the CGI program has started, I (1) attach Gvd to it, then
(2) 'Continue' Gvd, then (3) runs a TCP socket read, then (4) a browser
sends data to the socket, and Gvd continues until it hits a breakpoint,
(5) then I can add more breakpoints and 'Continue' Gvd.
Also, I do all the attaching twice: once to get the symbolic traceback
out via a TCP 'pipe', and again when adding the breakpoint. Sometimes
Gvd can catch exceptions when attached, maybe, and I have not got a
reproducible technique for that.




G. A. Craig Carey
Auckland
New Zealand