GNAT.Traceback is back... 
Author Message
 GNAT.Traceback is back...

Hi all.

Some mysteries around GNAT.Traceback in GNAT 3.12p for Win32 are not
resolved.

 1) Does GNAT.Traceback really work on GNAT 3.12p for Win32 ?
    We know that the .Symbolic child works only for Linux and Solaris,
    as stated in the user's guide. Yes, I've built with the options
    "gnatmake -funwind-tables -g tractest -bargs -E", but all I
    obtain is 0 callback levels (like Christophe Gouiran in his post
    about that) !

 2) Assume I could obtain more than 0 levels, but I don't
    have a working package to transform addresses into names.
    How to do it by calling gdb ? Is there a gdb command for that ?

 3) Will GNAT 3.13p bring symbolic call-backs for Win32 ?

Below is an expanded version of Christophe's example.
Ironically I obtain 2 levels & addresses in GNAT 3.12p for DOS...

______________________________________________________
Gautier  --   http://www.*-*-*.com/
______________________________________________________

with Ada.Text_IO;                       use Ada.Text_IO;

with GNAT.Debug_Utilities;              use GNAT.Debug_Utilities;
with GNAT.Traceback;                    use GNAT.Traceback;

procedure Tractest is
  package IIO is new Integer_IO( integer ); use IIO;

  procedure D(i,j,k:integer; s:string) is... [it raises an exception]
  procedure C(i,j,k:integer) is...
  procedure B(i,j:integer) is...
  procedure A(n:natural) is...

begin
   A(10);

   exception when others =>
      declare
         tarray : Tracebacks_Array(1 .. 100);
         len    : integer;
      begin
         Call_Chain(tarray, len);

         new_line;
         put_line("Unhandled exception in main procedure ""TracTest"" ");
         put_line("Number of callback levels : " & integer'image(len));
         new_line;

         for i in 1..len loop
           Put("Level "); Put( i ); Put_Line("   " & Image(tarray(i)) );
         end loop;

         raise; -- -> output exception name & co
      end;

end Tractest;



Sun, 10 Nov 2002 03:00:00 GMT  
 GNAT.Traceback is back...
... I forgot: TIA for ideas and infos!
G.


Sun, 10 Nov 2002 03:00:00 GMT  
 GNAT.Traceback is back...


Quote:
>Hi all.

>Some mysteries around GNAT.Traceback in GNAT 3.12p for Win32 are not
>resolved.

> 1) Does GNAT.Traceback really work on GNAT 3.12p for Win32 ?

No, it is not implemented under Win32 on GNAT 3.12p.

Quote:
> 3) Will GNAT 3.13p bring symbolic call-backs for Win32 ?

Yes.

Pascal.

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



Sun, 10 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Traceback on Gnat/Linux

2. Bug in GNAT.Traceback.Symbolic?

3. How to get a traceback in Gnat 3.14p

4. Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback()

5. Tracebacks, GNAT

6. using package GNAT.Traceback

7. GNAT/Ada Traceback Information?

8. GNAT exception traceback

9. perl script for GNAT tracebacks

10. GNAT : Exception traceback

11. I am back!

12. Hi everyone I am back.

 

 
Powered by phpBB® Forum Software