runtime loader: 64-bit ktrace output fixes

This commit is contained in:
Ingo Weinhold
2013-10-03 21:52:25 +02:00
parent f73f5d4c42
commit ded25be197
2 changed files with 17 additions and 17 deletions
+15 -15
View File
@@ -97,14 +97,14 @@ load_immediate_dependencies(image_t *image)
if (image->num_needed == 0) if (image->num_needed == 0)
return B_OK; return B_OK;
KTRACE("rld: load_dependencies(\"%s\", id: %ld)", image->name, KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32 ")", image->name,
image->id); image->id);
image->needed = (image_t**)malloc(image->num_needed * sizeof(image_t *)); image->needed = (image_t**)malloc(image->num_needed * sizeof(image_t *));
if (image->needed == NULL) { if (image->needed == NULL) {
FATAL("%s: Failed to allocate needed struct\n", image->path); FATAL("%s: Failed to allocate needed struct\n", image->path);
KTRACE("rld: load_dependencies(\"%s\", id: %ld) failed: no memory", KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32
image->name, image->id); ") failed: no memory", image->name, image->id);
return B_NO_MEMORY; return B_NO_MEMORY;
} }
@@ -132,8 +132,8 @@ load_immediate_dependencies(image_t *image)
// Collect all missing libraries in case we report back // Collect all missing libraries in case we report back
if (!reportErrors) { if (!reportErrors) {
KTRACE("rld: load_dependencies(\"%s\", id: %ld) " KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32
"failed: %s", image->name, image->id, ") failed: %s", image->name, image->id,
strerror(status)); strerror(status));
return status; return status;
} }
@@ -150,7 +150,7 @@ load_immediate_dependencies(image_t *image)
} }
if (status < B_OK) { if (status < B_OK) {
KTRACE("rld: load_dependencies(\"%s\", id: %ld) " KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32 ") "
"failed: %s", image->name, image->id, "failed: %s", image->name, image->id,
strerror(status)); strerror(status));
return status; return status;
@@ -158,13 +158,13 @@ load_immediate_dependencies(image_t *image)
if (j != image->num_needed) { if (j != image->num_needed) {
FATAL("Internal error at load_dependencies()"); FATAL("Internal error at load_dependencies()");
KTRACE("rld: load_dependencies(\"%s\", id: %ld) " KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32 ") "
"failed: internal error", image->name, image->id); "failed: internal error", image->name, image->id);
return B_ERROR; return B_ERROR;
} }
KTRACE("rld: load_dependencies(\"%s\", id: %ld) done", image->name, KTRACE("rld: load_dependencies(\"%s\", id: %" B_PRId32 ") done",
image->id); image->name, image->id);
return B_OK; return B_OK;
} }
@@ -345,7 +345,7 @@ preload_image(char const* path)
add_add_on(image, addOnStruct); add_add_on(image, addOnStruct);
} }
KTRACE("rld: preload_image(\"%s\") done: id: %ld", path, image->id); KTRACE("rld: preload_image(\"%s\") done: id: %" B_PRId32, path, image->id);
return image->id; return image->id;
@@ -451,7 +451,7 @@ load_program(char const *path, void **_entry)
gProgramLoaded = true; gProgramLoaded = true;
KTRACE("rld: load_program(\"%s\") done: entry: %p, id: %ld", path, KTRACE("rld: load_program(\"%s\") done: entry: %p, id: %" B_PRId32 , path,
*_entry, gProgramImage->id); *_entry, gProgramImage->id);
return gProgramImage->id; return gProgramImage->id;
@@ -487,7 +487,7 @@ load_library(char const *path, uint32 flags, bool addOn, void** _handle)
if (path == NULL && addOn) if (path == NULL && addOn)
return B_BAD_VALUE; return B_BAD_VALUE;
KTRACE("rld: load_library(\"%s\", 0x%lx, %d)", path, flags, addOn); KTRACE("rld: load_library(\"%s\", %#" B_PRIx32 ", %d)", path, flags, addOn);
rld_lock(); rld_lock();
// for now, just do stupid simple global locking // for now, just do stupid simple global locking
@@ -509,8 +509,8 @@ load_library(char const *path, uint32 flags, bool addOn, void** _handle)
if (image) { if (image) {
atomic_add(&image->ref_count, 1); atomic_add(&image->ref_count, 1);
rld_unlock(); rld_unlock();
KTRACE("rld: load_library(\"%s\"): already loaded: %ld", path, KTRACE("rld: load_library(\"%s\"): already loaded: %" B_PRId32,
image->id); path, image->id);
*_handle = image; *_handle = image;
return image->id; return image->id;
} }
@@ -556,7 +556,7 @@ load_library(char const *path, uint32 flags, bool addOn, void** _handle)
rld_unlock(); rld_unlock();
KTRACE("rld: load_library(\"%s\") done: id: %ld", path, image->id); KTRACE("rld: load_library(\"%s\") done: id: %" B_PRId32, path, image->id);
*_handle = image; *_handle = image;
return image->id; return image->id;
+2 -2
View File
@@ -556,8 +556,8 @@ load_image(char const* name, image_type type, const char* rpath,
*_image = image; *_image = image;
KTRACE("rld: load_container(\"%s\"): done: id: %ld (ABI: %#lx)", name, KTRACE("rld: load_container(\"%s\"): done: id: %" B_PRId32 " (ABI: %#"
image->id, image->abi); B_PRIx32 ")", name, image->id, image->abi);
return B_OK; return B_OK;