comp.lang.ada
 help / color / mirror / Atom feed
* Irreflective girl, our Ada
@ 2012-03-22 22:48 Marius Amado-Alves
  2012-03-23 21:36 ` Shark8
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Amado-Alves @ 2012-03-22 22:48 UTC (permalink / raw)


I am trying to know a subprogram name from its access value. GNAT has part (all?) of the device in place for this.

   GNAT.Traceback.Symbolic.Symbolic_Traceback
    ((1 => My_Subprogram'Code_Address))

gives the desired name. Note that must be 'Code_Address, not 'Address (this is important). And compile with the -g option, etc.

But what I have is a pointer to a subprogram (if I had the identifier I would not need this), and alas

   GNAT.Traceback.Symbolic.Symbolic_Traceback
    ((1 => My_Subprogram_Ptr.all'Code_Address))

does not compile. Is there a way to convert Access to Code_Address (not Address)? Or any other trick to get the name of a subprogram identified solely by its Access value?

Thanks a lot.



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

end of thread, other threads:[~2012-03-23 23:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 22:48 Irreflective girl, our Ada Marius Amado-Alves
2012-03-23 21:36 ` Shark8
2012-03-23 23:23   ` Marius Amado-Alves

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