Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: If177e044acc85672b18fb88d06af3296516057e4
bin->file_build_id_matches = is_build_id_matching(bin);
if (!bin->file_build_id_matches) {
BT_COMP_LOGI_STR("Supplied Build ID does not match Build ID of the "
bin->file_build_id_matches = is_build_id_matching(bin);
if (!bin->file_build_id_matches) {
BT_COMP_LOGI_STR("Supplied Build ID does not match Build ID of the "
- "binary or library found on the file system.");
+ "binary or library found on the file system.");
while (scn && !sym) {
ret = bin_info_get_nearest_symbol_from_section(
while (scn && !sym) {
ret = bin_info_get_nearest_symbol_from_section(
- scn, addr, &sym, &shdr);
+ scn, addr, &sym, &shdr);
if (sym) {
sym_name = elf_strptr(bin->elf_file, shdr->sh_link,
if (sym) {
sym_name = elf_strptr(bin->elf_file, shdr->sh_link,
if (!sym_name) {
goto error;
}
ret = bin_info_append_offset_str(sym_name, sym->st_value, addr,
if (!sym_name) {
goto error;
}
ret = bin_info_append_offset_str(sym_name, sym->st_value, addr,
}
ret = bin_info_append_offset_str(die_name, low_addr, addr,
}
ret = bin_info_append_offset_str(die_name, low_addr, addr,
free(die_name);
if (ret) {
goto error;
free(die_name);
if (ret) {
goto error;
ret = bin_info_set_dwarf_info(bin);
if (ret) {
BT_COMP_LOGI_STR("Failed to set bin dwarf info, falling "
ret = bin_info_set_dwarf_info(bin);
if (ret) {
BT_COMP_LOGI_STR("Failed to set bin dwarf info, falling "
- "back to ELF lookup.");
+ "back to ELF lookup.");
/* Failed to set DWARF info, fallback to ELF. */
bin->is_elf_only = true;
}
/* Failed to set DWARF info, fallback to ELF. */
bin->is_elf_only = true;
}
if (bin->is_elf_only) {
ret = bin_info_lookup_elf_function_name(bin, addr,
if (bin->is_elf_only) {
ret = bin_info_lookup_elf_function_name(bin, addr,
if (ret) {
BT_COMP_LOGI("Failed to lookup function name (ELF): "
"ret=%d", ret);
}
} else {
ret = bin_info_lookup_dwarf_function_name(bin, addr,
if (ret) {
BT_COMP_LOGI("Failed to lookup function name (ELF): "
"ret=%d", ret);
}
} else {
ret = bin_info_lookup_dwarf_function_name(bin, addr,
if (ret) {
BT_COMP_LOGI("Failed to lookup function name (DWARF): "
"ret=%d", ret);
if (ret) {
BT_COMP_LOGI("Failed to lookup function name (DWARF): "
"ret=%d", ret);
}
ret = dwarf_nextcu(cu->dwarf_info, cu->next_offset, &next_offset,
}
ret = dwarf_nextcu(cu->dwarf_info, cu->next_offset, &next_offset,
- &cu_header_size, NULL, NULL, NULL);
+ &cu_header_size, NULL, NULL, NULL);
if (ret) {
/* ret is -1 on error, 1 if no next CU. */
goto end;
if (ret) {
/* ret is -1 on error, 1 if no next CU. */
goto end;
}
dwarf_die = dwarf_offdie(cu->dwarf_info, cu->offset + cu->header_size,
}
dwarf_die = dwarf_offdie(cu->dwarf_info, cu->offset + cu->header_size,
if (!dwarf_die) {
goto error;
}
if (!dwarf_die) {
goto error;
}
* context. Do not try to add it.
*/
member = bt_field_class_structure_borrow_member_by_name_const(
* context. Do not try to add it.
*/
member = bt_field_class_structure_borrow_member_by_name_const(
- in_field_class, debug_info_field_class_name);
+ in_field_class, debug_info_field_class_name);
if (member) {
goto end;
}
if (member) {
goto end;
}
* class.
*/
member = bt_field_class_structure_borrow_member_by_name_const(
* class.
*/
member = bt_field_class_structure_borrow_member_by_name_const(
- in_field_class, IP_FIELD_NAME);
+ in_field_class, IP_FIELD_NAME);
if (!member) {
goto end;
}
if (!member) {
goto end;
}
}
member = bt_field_class_structure_borrow_member_by_name_const(
}
member = bt_field_class_structure_borrow_member_by_name_const(
- in_field_class, VPID_FIELD_NAME);
+ in_field_class, VPID_FIELD_NAME);
if (!member) {
goto end;
}
if (!member) {
goto end;
}