* Re: How to debug?
@ 2004-05-06 14:10 Jerry van Dijk
2004-05-06 15:13 ` Marius Amado Alves
[not found] ` <200405061613.44915.maa@liacc.up.pt>
0 siblings, 2 replies; 3+ messages in thread
From: Jerry van Dijk @ 2004-05-06 14:10 UTC (permalink / 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to debug?
2004-05-06 14:10 How to debug? Jerry van Dijk
@ 2004-05-06 15:13 ` Marius Amado Alves
[not found] ` <200405061613.44915.maa@liacc.up.pt>
1 sibling, 0 replies; 3+ messages in thread
From: Marius Amado Alves @ 2004-05-06 15:13 UTC (permalink / raw)
To: comp.lang.ada
> C:\home\work>gnatmake -g stb -bargs -E -largs -lgnat -laddr2line -lintl
Thanks. I can see there are some options there that I was not passing and
surely must. But now I get a host of "undefined reference to
'system__parameters...'" and "...to 'system__underlying__priorities" messages
and then gnatlink says "cannot call C:\GNAT\bin\gcc.exe". "*** Link failed."
My command was
gnatmake <unit> -f -g -IMneson -IMneson/ai302 -IAWS/include -IAWS/lib
-IAWS/components -Io_and_ali_files -i -aOAWS/lib -bargs -E -largs -LAWS/lib
-laws -lgnat -laddr2line -lintl
I've got GNAT installed at C:\GNAT, and the environment variables include
OS=Windows_NT
Path=C:\GNAT\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 11 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0b01
SystemDrive=C:
SystemRoot=C:\WINDOWS
(They do NOT include ADA_OBJECTS_PATH et al.)
Thanks a lot.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to debug? (solved)
[not found] ` <200405061613.44915.maa@liacc.up.pt>
@ 2004-05-06 18:35 ` Marius Amado Alves
0 siblings, 0 replies; 3+ messages in thread
From: Marius Amado Alves @ 2004-05-06 18:35 UTC (permalink / raw)
To: comp.lang.ada
The Symbolic_Traceback does not work, but the non-symbolic does, and an
"addr2line.exe" executable exists and works as expected, so I'm using these
elements to solve the problem. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-06 18:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-06 14:10 How to debug? Jerry van Dijk
2004-05-06 15:13 ` Marius Amado Alves
[not found] ` <200405061613.44915.maa@liacc.up.pt>
2004-05-06 18:35 ` How to debug? (solved) Marius Amado Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox