comp.lang.ada
 help / color / mirror / Atom feed
* Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback()
@ 2001-01-16  1:33 Bob Rogers
  2001-01-17 19:20 ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Rogers @ 2001-01-16  1:33 UTC (permalink / raw)


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
rbrogers@iwvisp.com




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

* Re: Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback()
  2001-01-16  1:33 Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback() Bob Rogers
@ 2001-01-17 19:20 ` Stephen Leake
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 2001-01-17 19:20 UTC (permalink / raw)


rbrogers@iwvisp.com (Bob Rogers) writes:

> <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



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

end of thread, other threads:[~2001-01-17 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-16  1:33 Problem using Gnat.Traceback.Symbolic.Symbolic_Traceback() Bob Rogers
2001-01-17 19:20 ` Stephen Leake

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