comp.lang.ada
 help / color / mirror / Atom feed
* GNAT.Traceback is back...
@ 2000-05-24  0:00 Gautier
  2000-05-24  0:00 ` Gautier
  2000-05-24  0:00 ` Pascal Obry
  0 siblings, 2 replies; 3+ messages in thread
From: Gautier @ 2000-05-24  0:00 UTC (permalink / raw)


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://members.xoom.com/gdemont/gsoft.htm
______________________________________________________

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;




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-24  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-24  0:00 GNAT.Traceback is back Gautier
2000-05-24  0:00 ` Gautier
2000-05-24  0:00 ` Pascal Obry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox