Sorry Jeff, you guess right, I meant "catch exception" :/

I used:

cmd$ gdb bin/forms 
GNU gdb (GDB) 7.8.90 for GNAT GPL 2015 [rev=gdb-head-ref-102395-gccbe2a7]
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
See your support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty for this version of GDB.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin13.4.0".
Type "show configuration" for configuration details.For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/forms...done.
(gdb) catch exception 
Catchpoint 1: all Ada exceptions
...

The following may not work as well:

(gdb) break exception
Catchpoint 3: all Ada exceptions

Well, in the past I used a breakpoint directly in GNAT runtime:

(gdb) br a-except.adb:975
Breakpoint 4 at 0x10021b626: file a-except.adb, line 975.
(gdb) run
The program being debugged has been started already.
...
Application root :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/
Executable at    :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/bin/
HTML root        :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/html/
Upload directory :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/upload/
Templates root   
:/Users/blady/Documents/Programmation/GNOGA/gnoga-code/templates/
/js  at          :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/js/
/css at          :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/css/
/img at          :/Users/blady/Documents/Programmation/GNOGA/gnoga-code/img/
Boot file        :debug.html
HTTP listen on   ::8080
Press Ctrl-C to close server.
2016-05-01 19:26:27.11 : HTTP Server Started
2016-05-01 19:26:34.11 : New connection - ID 1
2016-05-01 19:26:34.25 : New connection - ID 2
2016-05-01 19:26:36.04 : On submit.
2016-05-01 19:26:37.39 : fspec = 
2016-05-01 19:26:37.39 : Some_Text = 
[New Thread 0x1107 of process 92480]
[New Thread 0x1217 of process 92480]
[New Thread 0x1317 of process 92480]
[New Thread 0x1417 of process 92480]
[New Thread 0x1807 of process 92480]
[New Thread 0x1903 of process 92480]
[Switching to Thread 0x1417 of process 92480]

Breakpoint 4, <__gnat_raise_exception> (e=0x1003a4ae0, message=...)
    at a-except.adb:975
975     in a-except.adb
(gdb) bt
#0  <__gnat_raise_exception> (e=0x1003a4ae0, message=...) at a-except.adb:975
#1  0x000000010002bf91 in gnat.sockets.server.read (client=..., factory=...)
    at 
/Users/blady/Documents/Programmation/GNOGA/gnoga-code/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:990
#2  0x00000001000366e2 in gnat.sockets.server.worker (<_task>=0x101000040)
    at 
/Users/blady/Documents/Programmation/GNOGA/gnoga-code/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:2493
#3  0x000000010020c518 in ?? ()
#4  0x00007fff8c40799d in _pthread_body ()
   from /usr/lib/system/libsystem_pthread.dylib
#5  0x00007fff8c40791a in _pthread_start ()
   from /usr/lib/system/libsystem_pthread.dylib
#6  0x00007fff8c405351 in thread_start ()
   from /usr/lib/system/libsystem_pthread.dylib
#7  0x0000000000000000 in ?? ()
(gdb) p message
$1 = "gnat-sockets-server.adb:990"

You haven't the exception name but you can backtrace from there.

HTH, Pascal.
http://blady.pagesperso-orange.fr


> Le 1 mai 2016 à 18:41, Jeffrey R. Carter <jrcar...@acm.org> a écrit :
> 
> On 05/01/2016 02:14 AM, Pascal wrote:
>> Then I use "gdb bin/forms" with "catch expression" and "run" then click on 
>> button "send to demo via post":
>> 
> (gdb) catch expression
> Undefined catch command: "expression".  Try "help catch".
> 
> "help catch" includes "catch exception", which I presume you meant.
> (gdb) catch exception
> Unable to insert catchpoint. Try to start the program first.
> 
> Latest gnoga version from git. Linux Mint Debian Edition (LMDE 2). GNAT 4.9.
> I'm not familiar enough with gdb to get past this. If I type "run", the 
> program runs and I get no opportunity to tell gdb to catch exceptions (or 
> expressions).
> -- 
> Jeff Carter
> "Strange women lying in ponds distributing swords
> is no basis for a system of government."
> Monty Python & the Holy Grail
> 66
> 
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to