migration to gelf

Adam Jocksch ajocksch@redhat.com
Thu Jun 22 15:02:00 GMT 2006


Yao Qi wrote:
> On Wed, Jun 21, 2006 at 01:28:16PM -0400, Adam Jocksch wrote:
>   
> 1) ElfException is not informative enough.
> In lib::elf::Elf::elf_begin, there are three exceptions may be thrown,
> but could we add some information more in these exceptions?  For
> example, I tried to use Class Elf to open /proc/<pid>/exe, and get an
> exception that "Could not open file for reading".  I want to know what
> is the name of this file further.
>
>   
Sounds like an excellent idea. On my first pass I was more concerned 
with producing correct output than very informative error messages, but 
I can easily revisit this and make these changes.
> There are a lot of information in errno about what cause the
> current problem, but we ignore it.  Why don't we translate errno to a
> readable string and put it in ElfException messages?
>
>   
Again a good idea
> 2) Test case testProc(lib.elf.tests.TestElf) hard-wired pid to 1897.
> It should fail if there is no such pid or user has no permission to
> open /proc/1897/exe.  Error could be seen as follows,
> Running testProc(lib.elf.tests.TestElf) ...ERROR
>   lib.elf.ElfException: Could not open file for reading
>
>   
As far as I know there *is* no testProc test case... in my copy of 
frysk-imports/lib/elf/tests/TestElf I only have testCore and 
testObjectFile, and in neither of those two cases is a pid hardwired. 
Are you using a recent checkout of frysk?

>
> 3) Test case is assumed only on X86.
> ELF specification itself is a machine-independent one(correct me if I
> make a mistake), but unit tests to ELF java bindings on different
> architectures are needed, IMO.
> The next question is how to put these test to different architectures
> together, and what is the criteria or policy to select test case for
> current target.
> Frysk should have a capability to know "what kind of machine I am 
> running on", and I think java binding to "uname" is a good choice. :)
>
>   
The issue of frysk knowing the architecture it's running on (or the 
architecture it's debugging, as the two may not be the same) is an issue 
that currently needs addressing in frysk as a whole, not just the elf 
bindings. While the bindings *should* work on other platforms I haven't 
yet written up test cases for them.

Thanks for your input!

Adam



More information about the Frysk mailing list