comp.lang.ada
 help / color / mirror / Atom feed
* Traceback on Gnat/Linux
@ 2002-12-17 16:03 Joachim Schr�er
  2002-12-17 17:15 ` Mark Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Schr�er @ 2002-12-17 16:03 UTC (permalink / raw)


Hello,

we are porting code from Windows to Linux (Suse 7.3),
Gnat 3.14p on both platforms.
We do not get a symbolic traceback on linux.
The windows options are

gnatmake -s -cargs -O3 -bargs -f -E -largs ... ....adb

The options for Linux are

gnatmake -s -cargs -O3 -funwind-tables -bargs -f -E -largs ... ....adb

my exception handler looks like

exception
    when E : others =>
        Put(Ada.Exceptions.Exception_Information(E) &
              Gnat.Traceback.Symbolic.Symbolic_Traceback(E));

On windows I get an output like

Call stack traceback locations:
0x5dbb11 0x5dbe9e 0x5df0a6 0x5de42b 0x40166d 0x401103 0x77f1b9e8
005DBB11 in mst.rap_generator.initialize.read at mst-rap_generator.adb:394
005DBE9E in mst.rap_generator.initialize at mst-rap_generator.adb:411
005DF0A6 in mst.sa.process.initialize at mst-sa-process.adb:153
005DE42B in mst.sa.main at mst-sa-main.adb:22
0040166D in ?? at crt1.c:0
00401103 in ?? at crt1.c:0
77F1B9E8 in ?? at fake:0

but on linux only the adresses are given.
Whats wrong?

 Thanks for any hints.
    J. Schroer





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

* Re: Traceback on Gnat/Linux
  2002-12-17 16:03 Traceback on Gnat/Linux Joachim Schr�er
@ 2002-12-17 17:15 ` Mark Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Johnson @ 2002-12-17 17:15 UTC (permalink / raw)


"Joachim Schr�er" wrote:
> 
> Hello,
> 
> we are porting code from Windows to Linux (Suse 7.3),
> [snip get symbolic traceback on Windows, not on Linux]
> Whats wrong?
> 
Having just read the code on Linux a few minutes ago (to see what it did
for our application) you can see comments that suggest you pass the
address values to addr2line (which should be installed on your system).
I can't be sure, but it appears that since the conversion routine is
readily available - they decided to implement it a more simple way on
Linux (and other Unix systems?) than on Windows.

There is also an example in the gnat user's guide (search for addr2line)
that shows how to do this with and without symbolic traceback (but
requires you to link w/ the addr2line library). There are also
references to the specific files in /usr/gnat/... which have the source
code responsible. Good luck.

  --Mark



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

end of thread, other threads:[~2002-12-17 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-17 16:03 Traceback on Gnat/Linux Joachim Schr�er
2002-12-17 17:15 ` Mark Johnson

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