diff options
| author | 2014-12-05 23:53:49 -0200 | |
|---|---|---|
| committer | 2014-12-13 02:08:02 -0200 | |
| commit | 0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch) | |
| tree | 40fee084c551bfb497e68181447298f862ea68ca /src/core/loader/elf.cpp | |
| parent | Implement text path trimming for shorter paths. (diff) | |
| download | yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip | |
Convert old logging calls to new logging macros
Diffstat (limited to 'src/core/loader/elf.cpp')
| -rw-r--r-- | src/core/loader/elf.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 63d2496ed..c95882f4a 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -254,18 +254,18 @@ const char *ElfReader::GetSectionName(int section) const { | |||
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | bool ElfReader::LoadInto(u32 vaddr) { | 256 | bool ElfReader::LoadInto(u32 vaddr) { |
| 257 | DEBUG_LOG(MASTER_LOG, "String section: %i", header->e_shstrndx); | 257 | LOG_DEBUG(Loader, "String section: %i", header->e_shstrndx); |
| 258 | 258 | ||
| 259 | // Should we relocate? | 259 | // Should we relocate? |
| 260 | relocate = (header->e_type != ET_EXEC); | 260 | relocate = (header->e_type != ET_EXEC); |
| 261 | 261 | ||
| 262 | if (relocate) { | 262 | if (relocate) { |
| 263 | DEBUG_LOG(MASTER_LOG, "Relocatable module"); | 263 | LOG_DEBUG(Loader, "Relocatable module"); |
| 264 | entryPoint += vaddr; | 264 | entryPoint += vaddr; |
| 265 | } else { | 265 | } else { |
| 266 | DEBUG_LOG(MASTER_LOG, "Prerelocated executable"); | 266 | LOG_DEBUG(Loader, "Prerelocated executable"); |
| 267 | } | 267 | } |
| 268 | INFO_LOG(MASTER_LOG, "%i segments:", header->e_phnum); | 268 | LOG_DEBUG(Loader, "%i segments:", header->e_phnum); |
| 269 | 269 | ||
| 270 | // First pass : Get the bits into RAM | 270 | // First pass : Get the bits into RAM |
| 271 | u32 segment_addr[32]; | 271 | u32 segment_addr[32]; |
| @@ -273,17 +273,17 @@ bool ElfReader::LoadInto(u32 vaddr) { | |||
| 273 | 273 | ||
| 274 | for (int i = 0; i < header->e_phnum; i++) { | 274 | for (int i = 0; i < header->e_phnum; i++) { |
| 275 | Elf32_Phdr *p = segments + i; | 275 | Elf32_Phdr *p = segments + i; |
| 276 | INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, | 276 | LOG_DEBUG(Loader, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, |
| 277 | p->p_filesz, p->p_memsz); | 277 | p->p_filesz, p->p_memsz); |
| 278 | 278 | ||
| 279 | if (p->p_type == PT_LOAD) { | 279 | if (p->p_type == PT_LOAD) { |
| 280 | segment_addr[i] = base_addr + p->p_vaddr; | 280 | segment_addr[i] = base_addr + p->p_vaddr; |
| 281 | memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); | 281 | memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); |
| 282 | INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], | 282 | LOG_DEBUG(Loader, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], |
| 283 | p->p_memsz); | 283 | p->p_memsz); |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | INFO_LOG(MASTER_LOG, "Done loading."); | 286 | LOG_DEBUG(Loader, "Done loading."); |
| 287 | return true; | 287 | return true; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| @@ -346,7 +346,7 @@ AppLoader_ELF::~AppLoader_ELF() { | |||
| 346 | * @return True on success, otherwise false | 346 | * @return True on success, otherwise false |
| 347 | */ | 347 | */ |
| 348 | ResultStatus AppLoader_ELF::Load() { | 348 | ResultStatus AppLoader_ELF::Load() { |
| 349 | INFO_LOG(LOADER, "Loading ELF file %s...", filename.c_str()); | 349 | LOG_INFO(Loader, "Loading ELF file %s...", filename.c_str()); |
| 350 | 350 | ||
| 351 | if (is_loaded) | 351 | if (is_loaded) |
| 352 | return ResultStatus::ErrorAlreadyLoaded; | 352 | return ResultStatus::ErrorAlreadyLoaded; |