#define FUNC_FOO_NAME_ELF "foo+0x24"
#define BUILD_ID_LEN 20
-char *opt_debug_dir;
+char *opt_debug_info_dir;
static
void test_so_info_build_id(const char *data_dir)
snprintf(path, PATH_MAX, "%s/%s", data_dir, SO_NAME_BUILD_ID);
- so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ);
+ so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ, true);
ok(so != NULL, "so_info_create succesful");
/* Test setting build_id */
snprintf(path, PATH_MAX, "%s/%s", data_dir, SO_NAME_DEBUG_LINK);
- so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ);
+ so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ, true);
ok(so != NULL, "so_info_create succesful");
/* Test setting debug link */
snprintf(path, PATH_MAX, "%s/%s", data_dir, SO_NAME_ELF);
- so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ);
+ so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ, true);
ok(so != NULL, "so_info_create succesful");
/* Test function name lookup (with ELF) */
snprintf(path, PATH_MAX, "%s/%s", data_dir, SO_NAME);
- so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ);
+ so = so_info_create(path, SO_LOW_ADDR, SO_MEMSZ, true);
ok(so != NULL, "so_info_create succesful");
/* Test so_info_has_address */
if (argc != 2) {
return EXIT_FAILURE;
} else {
- opt_debug_dir = argv[1];
+ opt_debug_info_dir = argv[1];
}
ret = so_info_init();
ok(ret == 0, "so_info_init succesful");
- test_so_info(opt_debug_dir);
- test_so_info_elf(opt_debug_dir);
- test_so_info_build_id(opt_debug_dir);
- test_so_info_debug_link(opt_debug_dir);
+ test_so_info(opt_debug_info_dir);
+ test_so_info_elf(opt_debug_info_dir);
+ test_so_info_build_id(opt_debug_info_dir);
+ test_so_info_debug_link(opt_debug_info_dir);
return EXIT_SUCCESS;
}