Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Differences between "ELF Parser" and "GNU ELF Parser"?
Differences between "ELF Parser" and "GNU ELF Parser"? [message #152561] Mon, 29 August 2005 15:43 Go to next message
Eclipse UserFriend
Originally posted by:


what are the differences between the "Elf Parser" and the "GNU Elf
Parser"? Are they documented somewhere? Should I use both or only one, and
then which?

Regards, Frank (a confused CDT user :-))
Re: Differences between "ELF Parser" and "GNU ELF Parser"? [message #1752739 is a reply to message #152561] Thu, 26 January 2017 18:12 Go to previous message
Alex Freidin is currently offline Alex FreidinFriend
Messages: 29
Registered: July 2009
Junior Member
Unfortunately, the differences between these binary parsers are not described in CDT Help. Googling brought me to this old thread. Many tutorials for configuring Eclipse CDT suggest to switch to "GNU ELF parser" without actually explaining the differences with "ELF Parser". Here is what I found:

- "GNU ELF Parser" sits on top of the basic "ELF Parser" and uses several utilities from binutils package to get additional info from ELF binary: objdump, c++filt and addr2line.

- When "GNU ELF Parser" is enabled, double-clicking on a binary in 'Project Explorer' view under [Project] > Binaries will run 'objdump' and open a read-only editor with objdump output including ELF information and disassembly. Objdump is called with these default switches: -C -x -S.
As of Eclipse Neon, there is no UI to configure objdump path and switches, but the underlying infrastructure provides this capability for tool vendors defining their own binary parser.

- When compiling C++ project with debug info, the basic "ELF Parser" gets demangled function names from the debug info. But, when compiling without debug info, it does not demangle function names. That's where 'c++filt' in "GNU ELF Parser" comes into play.
When expanding the binary compiled in "Release" configuration in 'Project Explorer' view, the function names appear mangled when "ELF Parser" is enabled. But, with "GNU ELF Parser" the names appear demangled as in the source code.

- "GNU ELF Parser" calls 'addr2line' to get line information for functions and variables. This only works if the executable has debug info.
I haven't found any visible difference in the UI representation and whether this info provides an extra functionality beyond the basic "ELF Parser". E.g. "ELF Parser" has no issue showing all function names and clicking a function in the binary opens it in the editor and marks its boundaries. I would be happy to get more info on this.
In addition, I think this utility is also used by Linux Tools project.
  • Attachment: parsers.png
    (Size: 9.10KB, Downloaded 1237 times)
Previous Topic:Trying to run Hello World
Next Topic:How to make and use my own arduino libraries?
Goto Forum:

Current Time: Thu Jan 27 15:23:28 GMT 2022

Powered by FUDForum. Page generated in 0.02241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top