This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] Removing external addr2line depedency


The addr2line lib is currently needed by gnatlib and gnattools. This is bad
due to tree reasons:
  - addr2line is not freely available
  - convert_address API is errorprone (causes buffer overflows)
  - bfd requires addr2line to manage dynamic memory

So I decided to rewrite the whole functionality in Ada itself. The result:
  - a Task_Lock object may be seperated to ease programming.
  - a Symbol_at_Address function returning the result on the stack.

gnatmem still requires addr2line, but seems unrepairable. My suggestion is
to rewrite this tool completely in perl. The current implementation is ugly
and errorprone due to a hard coded parser of gdb output. It might be
possible to reimplement it using the spitbol package, but I find this a
really bad idea.

I'll send the diff when the cvs server reduced the load.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]