[Ltrace-devel] [PATCH] Add support for using elfutils as unwinder.

Andreas Schwab schwab at linux-m68k.org
Tue Aug 12 18:51:12 UTC 2014


Petr Machata <pmachata at redhat.com> writes:

> Andreas Schwab <schwab at linux-m68k.org> writes:
>
>> proc.c: In function 'proc_add_library':
>> proc.c:944:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
>>       (GElf_Addr) lib->base,
>
> Does this patch help?

Only a little bit.

https://build.opensuse.org/project/monitor/home:AndreasSchwab:f

dwarf_prototypes.c: In function 'get_die_numeric':
dwarf_prototypes.c:164:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(die, "Unknown numeric form %d for attr_name: %d",
   ^
dwarf_prototypes.c: In function 'get_base_type':
dwarf_prototypes.c:225:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(die, "Unknown integer base type. "
    ^
dwarf_prototypes.c:265:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
  complain(die, "Unknown base type. Returning 'void'");
  ^
dwarf_prototypes.c: In function 'get_enum':
dwarf_prototypes.c:327:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "alloc error");
   ^
dwarf_prototypes.c:332:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "Couldn't insert into cache dict");
   ^
dwarf_prototypes.c:343:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(parent, "Unknown integer base type. "
    ^
dwarf_prototypes.c:351:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "alloc error");
   ^
dwarf_prototypes.c:366:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(&die, "enum element: 0x%02x/'%s'", dwarf_tag(&die),
   ^
dwarf_prototypes.c:373:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Enums can have ONLY DW_TAG_enumerator "
    ^
dwarf_prototypes.c:379:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Enums MUST have DW_AT_const_value "
    ^
dwarf_prototypes.c:386:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Enums must have a DW_AT_name key");
    ^
dwarf_prototypes.c:391:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't duplicate enum key");
    ^
dwarf_prototypes.c:397:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't alloc enum value");
    ^
dwarf_prototypes.c:405:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't get enum value");
    ^
dwarf_prototypes.c:412:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't add enum element");
    ^
dwarf_prototypes.c: In function 'get_array':
dwarf_prototypes.c:461:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "alloc error");
   ^
dwarf_prototypes.c:467:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "Array has unknown type");
   ^
dwarf_prototypes.c:472:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "Couldn't insert into cache dict");
   ^
dwarf_prototypes.c:478:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "Couldn't figure out array's type");
   ^
dwarf_prototypes.c:484:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent,
   ^
dwarf_prototypes.c:492:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent,
   ^
dwarf_prototypes.c:502:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(parent, "Couldn't read lower bound");
    ^
dwarf_prototypes.c:507:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(parent,
    ^
dwarf_prototypes.c:524:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(parent, "Couldn't read upper bound");
    ^
dwarf_prototypes.c:535:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(&subrange, "Couldn't alloc length expr");
   ^
dwarf_prototypes.c: In function 'get_structure':
dwarf_prototypes.c:579:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "alloc error");
   ^
dwarf_prototypes.c:584:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(parent, "Couldn't insert into cache dict");
   ^
dwarf_prototypes.c:598:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(&die, "member: 0x%02x", dwarf_tag(&die));
   ^
dwarf_prototypes.c:601:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Structure can have ONLY DW_TAG_member");
    ^
dwarf_prototypes.c:607:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't get type of element");
    ^
dwarf_prototypes.c:614:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't parse type from DWARF data");
    ^
dwarf_prototypes.c:619:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&die, "Couldn't add type to struct");
    ^
dwarf_prototypes.c: In function 'get_type':
dwarf_prototypes.c:680:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Read pre-computed type");
   ^
dwarf_prototypes.c:691:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(type_die,
    ^
dwarf_prototypes.c:703:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing base type");
   ^
dwarf_prototypes.c:705:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c:712:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing subroutine type");
   ^
dwarf_prototypes.c:714:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c:721:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(type_die, "Storing void-pointer type");
    [  131.291453] serial8250: too much work for irq4
^
dwarf_prototypes.c:723:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
    ^
dwarf_prototypes.c:727:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing pointer type");
   ^
dwarf_prototypes.c:732:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(type_die, "alloc error");
    ^
dwarf_prototypes.c:735:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c:745:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing struct type");
   ^
dwarf_prototypes.c:759:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(type_die, "Storing const/typedef type");
    ^
dwarf_prototypes.c:769:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(type_die, "Storing void type");
    ^
dwarf_prototypes.c:771:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c:779:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing enum int");
   ^
dwarf_prototypes.c:788:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing array");
   ^
dwarf_prototypes.c:796:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Storing union-as-void type");
   ^
dwarf_prototypes.c:797:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c:801:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(type_die, "Unknown type tag 0x%x. Returning void",
   ^
dwarf_prototypes.c:804:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   DICT_INSERT_AND_CHECK(type_dieoffset_hash, &die_offset, &result);
   ^
dwarf_prototypes.c: In function 'get_prototype':
dwarf_prototypes.c:846:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(subroutine, "Couldn't get return type");
    ^
dwarf_prototypes.c:863:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(&arg_die, "arg: 0x%02x", dwarf_tag(&arg_die));
    ^
dwarf_prototypes.c:870:5: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
     complain(&arg_die, "Couldn't get the argument "
     ^
dwarf_prototypes.c:880:5: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
     complain(&arg_die, "Couldn't parse arg "
     ^
dwarf_prototypes.c:889:5: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
     complain(&arg_die, "couldn't add argument to "
     ^
dwarf_prototypes.c: In function 'import_subprogram_name':
dwarf_prototypes.c:914:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(die, "Prototype not requested by any filter");
   ^
dwarf_prototypes.c:918:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
  complain(die, "subroutine_type: 0x%02x; function '%s'",
  ^
dwarf_prototypes.c:925:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(die, "Prototype already exists. Skipping");
   ^
dwarf_prototypes.c:931:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(die, "couldn't get prototype");
   ^
dwarf_prototypes.c:937:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
   complain(die, "couldn't strdup");
   ^
dwarf_prototypes.c: In function 'process_die_compileunit':
dwarf_prototypes.c:979:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
  complain(parent, "Processing compile unit");
  ^
dwarf_prototypes.c:990:5: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
     complain(&die, "Error importing subprogram. "
     ^
dwarf_prototypes.c: In function 'import':
dwarf_prototypes.c:1018:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'Dwarf_Off' [-Werror=format=]
    complain(die, "A DW_TAG_compile_unit die expected. "
    ^

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Ltrace-devel mailing list