From: Jerry van Dijk <somename@nospam.demon.nl>
Subject: Re: How to debug?
Date: 06 May 2004 16:10:50 +0200
Date: 2004-05-06T16:10:50+02:00 [thread overview]
Message-ID: <m27jvpabo5.fsf@jvdsys.demon.nl> (raw)
> How do I inspect the call stack (preferably symbolic information i.e. source
> code unit name + line number + subprogram names), upon an unhandled
> exception occurrence?
Maybe you have an installation problem ?
If I follow the instructions in chapter 23.13.2.1 (Tracebacks From Exception
Occurrences) in the GNAT 3.15p user manual it works:
-------------------------------------------------------------------------------
C:\home\work>cat stb.adb
with Ada.Text_IO;
with GNAT.Traceback.Symbolic;
procedure STB is
procedure P1 is
begin
raise Constraint_Error;
end P1;
procedure P2 is
begin
P1;
end P2;
procedure P3 is
begin
P2;
end P3;
begin
P3;
exception
when E : others =>
Ada.Text_IO.Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback (E));
end STB;
C:\home\work>gnatmake -g stb -bargs -E -largs -lgnat -laddr2line -lintl
gcc -c -g stb.adb
gnatbind -aO./ -E -I- -x stb.ali
gnatlink -g -lgnat -laddr2line -lintl stb.ali
C:\home\work>stb
00404F61 in ada.exceptions.process_raise_exception at a-except.adb:1320
004020D7 in <__gnat_rcheck_04> at a-except.adb:592
004015A7 in stb.p1 at stb.adb:8
004015BF in stb.p2 at stb.adb:13
004015D7 in stb.p3 at stb.adb:18
004017F1 in stb at stb.adb:22
004013CF in main at b~stb.adb:168
00401103 in ?? at fake:0
-------------------------------------------------------------------------------
--
-- Jerry van Dijk
-- Leiden, Holland
next reply other threads:[~2004-05-06 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-06 14:10 Jerry van Dijk [this message]
2004-05-06 15:13 ` How to debug? Marius Amado Alves
[not found] ` <200405061613.44915.maa@liacc.up.pt>
2004-05-06 18:35 ` How to debug? (solved) Marius Amado Alves
[not found] <200405051830.03021.maa@liacc.up.pt>
2004-05-05 18:27 ` How to debug? David C. Hoos
2004-05-05 20:17 ` Simon Wright
[not found] ` <05ff01c432ce$9617a400$b101a8c0@sy.com>
2004-05-05 19:35 ` Marius Amado Alves
2004-05-05 19:20 ` Ludovic Brenta
2004-05-06 10:11 ` Marius Amado Alves
[not found] ` <200405061111.02046.maa@liacc.up.pt>
2004-05-07 2:20 ` Stephen Leake
-- strict thread matches above, loose matches on Subject: below --
2004-05-05 17:30 Marius Amado Alves
2004-05-05 20:12 ` Simon Wright
2004-05-06 12:41 ` Matthew Heaney
2004-05-06 18:22 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox