[lldb-dev] Target::ReadMemory query
emaste at freebsd.org
Tue Jun 10 10:39:36 PDT 2014
On 10 June 2014 12:39, Greg Clayton <gclayton at apple.com> wrote:
> But it would be better to also look around in the ELF file and look for .note sections or anything else that can help you determine the correct triple for a given ELF file. If "kalimba" architectures are never native you can put an extra check in here. You might be able to also look at the type of the ELF file in the ELF header (e_type) and see if it is:
> ET_NONE - probably best not to set the os and vendor to host (is this the kind of file you have?)
> ET_EXEC, ET_DYN, ET_CORE - do what is being done above with host architectures and maybe add some .note code to see if you can identify anything more about the binary. I am guessing linux ELF files for executables and shared libraries have something that you will be able to use to properly identify them.
> So some more intelligent code in the ObjectFileELF can help us to classify the binaries more correctly, it should improve things in LLDB.
There are some comments on this in
http://llvm.org/bugs/show_bug.cgi?id=17209 including a partial list of
ELF note types.
More information about the lldb-dev