Lines Matching defs:path
65 kld_ok (char *path)
69 if (stat(path, &sb) == 0 && S_ISREG(sb.st_mode))
87 check_kld_path (char *path, size_t path_size)
92 ep = path + strlen(path);
95 if (strlcat(path, *suffix, path_size) < path_size) {
96 if (kld_ok(path))
100 /* Restore original path to remove suffix. */
108 * Try to find the path for a kld by looking in the kernel's directory and
109 * in the various paths in the module path.
112 find_kld_path (char *filename, char *path, size_t path_size)
121 snprintf(path, path_size, "%s/%s", kernel_dir,
123 if (check_kld_path(path, path_size))
134 snprintf(path, path_size, "%s/%s", module_dir,
136 if (check_kld_path(path, path_size))
221 load_kld (char *path, CORE_ADDR base_addr, int from_tty)
231 bfd = bfd_openr(path, gnutarget);
233 error("\"%s\": can't open: %s", path,
238 error("\%s\": not an object file", path);
242 error("\"%s\": can't find text section", path);
246 error("\"%s\": can't find file sections", path);
258 printf_unfiltered("add symbol table from file \"%s\" at\n", path);
266 symbol_file_add(path, from_tty, sap, 0, OBJF_USERLOADED);
274 char path[PATH_MAX];
280 /* Try to open the raw path to handle absolute paths first. */
281 snprintf(path, sizeof(path), "%s", arg);
282 if (!check_kld_path(path, sizeof(path))) {
288 if (!find_kld_path(arg, path, sizeof(path))) {
299 load_kld(path, base_addr, from_tty);
342 char *path;
371 &path, sizeof(new->so_original_name), &error);
378 strlcpy(new->so_original_name, path,
380 xfree(path);
391 &path, sizeof(new->so_name), &error);
400 strlcpy(new->so_name, path,
402 xfree(path);
443 char path[PATH_MAX];
447 if (!find_kld_path(solib, path, sizeof(path))) {
451 fd = open(path, o_flags, 0);
453 *temp_pathname = xstrdup(path);