Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback() 
Author Message
 Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback()

I'm running GNAT 3.13p on Win98, and I'm having a problem with
gnat.traceback.symbolic.symbolic_traceback. I build my test program
using the command line

gnatmake myprog -cargs -g -funwind-tables -bargs -E

When myprog raises an exception, Ada.Exceptions.Exception_Name(E),
Exception_Message(E), and Exception_Information(E) are correct,
including the hex program counter locations in Exception_Information.
Also, Gnat.Traceback.Call_Chain returns a Traceback_Array whose
addresses translate correctly to source file line numbers when I enter
"addr2line -e myprog.exe addr" from the command line.

However, gnat.traceback.symbolic.Symbolic_Traceback(Traceback_Array))
fails with the console message:

(null): C:\PROG\WORK\MYPROG.EXE.exe: No such file or directory

Comments in function Symbolic_Traceback (g-trasym.adb) say that the
function actually executes the Ada-aware version of addr2line for each
address in the traceback array. The message above implies that an
extra .exe is being  appended to the program name before it is passed
to addr2line.

Any help will be greatly appreciated.

Bob Rogers



Sat, 05 Jul 2003 09:33:52 GMT  
 Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback()

Quote:

> <snip>

> However, gnat.traceback.symbolic.Symbolic_Traceback(Traceback_Array))
> fails with the console message:

> (null): C:\PROG\WORK\MYPROG.EXE.exe: No such file or directory

> Comments in function Symbolic_Traceback (g-trasym.adb) say that the
> function actually executes the Ada-aware version of addr2line for each
> address in the traceback array. The message above implies that an
> extra .exe is being  appended to the program name before it is passed
> to addr2line.

The Win32 version of the gcc tools always append a ".exe" to your
supplied executable name. Also, you seem to be using upper case for
your file names.

I've used Symbolic_Traceback successfully on WinNT and Win95. I don't
specify an executable name to gnatmake (just use the default), and I
always use lower case for all file names.

You might try those two things to see if it helps.

--
-- Stephe



Mon, 07 Jul 2003 03:20:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Bug in GNAT.Traceback.Symbolic?

2. using package GNAT.Traceback

3. problem with Gnat.Traceback.Symbolic on linux with Gnat 3.14p ?

4. Unresolved symbols with dynamic lib using gnat on SGI

5. ----------------------------------------------------*Question*-------------------------------------------------------------------------

6. Traceback on Gnat/Linux

7. How to get a traceback in Gnat 3.14p

8. GNAT.Traceback is back...

9. Tracebacks, GNAT

10. GNAT/Ada Traceback Information?

11. GNAT exception traceback

 

 
Powered by phpBB® Forum Software