.. | .. |
---|
308 | 308 | { |
---|
309 | 309 | Dwarf_Attribute attr; |
---|
310 | 310 | |
---|
311 | | - if (dwarf_attr(tp_die, attr_name, &attr) == NULL || |
---|
| 311 | + if (dwarf_attr_integrate(tp_die, attr_name, &attr) == NULL || |
---|
312 | 312 | dwarf_formudata(&attr, result) != 0) |
---|
313 | | - return -ENOENT; |
---|
314 | | - |
---|
315 | | - return 0; |
---|
316 | | -} |
---|
317 | | - |
---|
318 | | -/* Get attribute and translate it as a sdata */ |
---|
319 | | -static int die_get_attr_sdata(Dwarf_Die *tp_die, unsigned int attr_name, |
---|
320 | | - Dwarf_Sword *result) |
---|
321 | | -{ |
---|
322 | | - Dwarf_Attribute attr; |
---|
323 | | - |
---|
324 | | - if (dwarf_attr(tp_die, attr_name, &attr) == NULL || |
---|
325 | | - dwarf_formsdata(&attr, result) != 0) |
---|
326 | 313 | return -ENOENT; |
---|
327 | 314 | |
---|
328 | 315 | return 0; |
---|
.. | .. |
---|
467 | 454 | /* Get the call file index number in CU DIE */ |
---|
468 | 455 | static int die_get_call_fileno(Dwarf_Die *in_die) |
---|
469 | 456 | { |
---|
470 | | - Dwarf_Sword idx; |
---|
| 457 | + Dwarf_Word idx; |
---|
471 | 458 | |
---|
472 | | - if (die_get_attr_sdata(in_die, DW_AT_call_file, &idx) == 0) |
---|
| 459 | + if (die_get_attr_udata(in_die, DW_AT_call_file, &idx) == 0) |
---|
473 | 460 | return (int)idx; |
---|
474 | 461 | else |
---|
475 | 462 | return -ENOENT; |
---|
.. | .. |
---|
478 | 465 | /* Get the declared file index number in CU DIE */ |
---|
479 | 466 | static int die_get_decl_fileno(Dwarf_Die *pdie) |
---|
480 | 467 | { |
---|
481 | | - Dwarf_Sword idx; |
---|
| 468 | + Dwarf_Word idx; |
---|
482 | 469 | |
---|
483 | | - if (die_get_attr_sdata(pdie, DW_AT_decl_file, &idx) == 0) |
---|
| 470 | + if (die_get_attr_udata(pdie, DW_AT_decl_file, &idx) == 0) |
---|
484 | 471 | return (int)idx; |
---|
485 | 472 | else |
---|
486 | 473 | return -ENOENT; |
---|
.. | .. |
---|
1094 | 1081 | ret = die_get_typename(vr_die, buf); |
---|
1095 | 1082 | if (ret < 0) { |
---|
1096 | 1083 | pr_debug("Failed to get type, make it unknown.\n"); |
---|
1097 | | - ret = strbuf_add(buf, " (unknown_type)", 14); |
---|
| 1084 | + ret = strbuf_add(buf, "(unknown_type)", 14); |
---|
1098 | 1085 | } |
---|
1099 | 1086 | |
---|
1100 | 1087 | return ret < 0 ? ret : strbuf_addf(buf, "\t%s", dwarf_diename(vr_die)); |
---|