Hi,
While doing release testing for 0.155 I found two small issues in readelf.c. The first is triggered by the new readelf-self testcase on ARM. register_info is called by print_cfa_program with loc being NULL, but didn't check for that possibility. The second is a compile error on s390 because we were using %z to print the offset in print_debug_macro_section which isn't correct, but only shows on s390 because size_t is unsigned long (not int) there. The attached patches fix these issues.
I'll write a more direct testcase for the first issue after the release because the underlying issue really is an unknown DWARF register number on the architecture.
Cheers,
Mark
On Mon, Aug 27, 2012 at 08:59:35PM +0200, Mark Wielaard wrote:
Hi,
I'll write a more direct testcase for the first issue after the release because the underlying issue really is an unknown DWARF register number on the architecture.
I probably have a patch for adding the register number. But I need time to submit things like that and support for some other architectures.
Kurt
- snprintf (name, REGNAMESZ, "??? 0x%x", regno);
Always use %#x rather than 0x%x. But here you should not be doing this way at all. Just do:
snprintf (name, REGNAMESZ, "reg%u", loc == NULL ? regno : loc->regno);
But, in fact, this looks like there was a latent bug already. It should not be using LOC->regno at all, but just always REGNO here.
Thanks, Roland
elfutils-devel@lists.fedorahosted.org