Changeset 9286475 in mainline
- Timestamp:
- 2018-10-11T13:52:08Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8fefd8b
- Parents:
- 63a045c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/abi/sysinfo.h
r63a045c r9286475 46 46 47 47 /** Maximum name sizes */ 48 #define TASK_NAME_BUFLEN 2048 #define TASK_NAME_BUFLEN 64 49 49 #define EXC_NAME_BUFLEN 20 50 50 -
uspace/app/taskdump/taskdump.c
r63a045c r9286475 405 405 static void autoload_syms(void) 406 406 { 407 char *file_name;408 errno_t rc;409 int ret;410 411 407 assert(app_name != NULL); 412 408 assert(app_symtab == NULL); 413 409 414 ret = asprintf(&file_name, "/app/%s", app_name); 415 if (ret < 0) { 416 printf("Memory allocation failure.\n"); 417 exit(1); 418 } 419 420 rc = symtab_load(file_name, &app_symtab); 421 if (rc == EOK) { 422 printf("Loaded symbol table from %s\n", file_name); 423 free(file_name); 410 if (app_name[0] != '/') { 411 printf("Task name is not path. Can't autoload symbol table.\n"); 424 412 return; 425 413 } 426 414 427 free(file_name); 428 429 ret = asprintf(&file_name, "/srv/%s", app_name); 430 if (ret < 0) { 431 printf("Memory allocation failure.\n"); 432 exit(1); 433 } 434 435 rc = symtab_load(file_name, &app_symtab); 436 if (rc == EOK) { 437 printf("Loaded symbol table from %s\n", file_name); 438 free(file_name); 415 errno_t rc = symtab_load(app_name, &app_symtab); 416 if (rc != EOK) { 417 printf("Failed autoloading symbol table: %s\n", 418 str_error_name(rc)); 439 419 return; 440 420 } 441 421 442 ret = asprintf(&file_name, "/drv/%s/%s", app_name, app_name); 443 if (ret < 0) { 444 printf("Memory allocation failure.\n"); 445 exit(1); 446 } 447 448 rc = symtab_load(file_name, &app_symtab); 449 if (rc == EOK) { 450 printf("Loaded symbol table from %s\n", file_name); 451 free(file_name); 452 return; 453 } 454 455 free(file_name); 456 printf("Failed autoloading symbol table.\n"); 422 printf("Loaded symbol table from %s\n", app_name); 457 423 } 458 424 -
uspace/lib/c/generic/loader.c
r63a045c r9286475 189 189 errno_t loader_set_program_path(loader_t *ldr, const char *path) 190 190 { 191 const char *name = str_rchr(path, '/'); 192 if (name == NULL) { 193 name = path; 194 } else { 195 name++; 196 } 191 size_t abslen; 192 char *abspath = vfs_absolutize(path, &abslen); 193 if (!abspath) 194 return ENOMEM; 197 195 198 196 int fd; … … 202 200 } 203 201 204 rc = loader_set_program(ldr, name, fd);202 rc = loader_set_program(ldr, path, fd); 205 203 vfs_put(fd); 206 204 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.