On Tue, Jul 22, 2014 at 05:44:48PM +0300, Crestez Dan Leonard wrote:
It would be convenient if the MIPS port was integrated upstream.
Do you happen to know whether the porters might want to contribute it?
The contribution policy for elfutils is documented at:
The generated dwarf files confuse systemtap is multiple ways.
Do you happen to have one such DWARF file around? I like to better
understand which address size is set where.
Here is a hack I used to get around this:
@@ -47,7 +47,22 @@ dwarf_diecu (die, result, address_sizep, offset_sizep)
*result = CUDIE (die->cu);
if (address_sizep != NULL)
*address_sizep = die->cu->address_size;
+ /* Hack: */
+ if (1)
+ struct Elf *elf = die->cu->dbg->elf;
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr* ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr &&
+ ehdr->e_machine == EM_MIPS &&
+ ehdr->e_ident[EI_CLASS] == ELFCLASS64)
+ *address_sizep = 8;
if (offset_sizep != NULL)
*offset_sizep = die->cu->offset_size;
This is obviously evil.
Yes, it is :)
Assuming that address size used in the CU is correct, it seems the
above check should be in systemtap instead.
Apparently the gcc folks decided that this -msym32 behavior was too
confusing and changed it to generate dwarf with a pointer size of 8:
Hmmm. That helps, but is technically wrong IMHO.
It would be better to fix binutils instead.