sim: Add a copied symbol table for the kernel on physical address
In fs simulation, the kernel is loaded to physical address first and then it would relocate itself to virtual address. The address which using by kernel symbol table is virtual address. To debug the process before kernel relocated to virutal memory, we need another copy of symbol table for physical address. Change-Id: I38107ff94b301df1a5170dd98774df88cfb02298 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43104 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -61,6 +61,13 @@ KernelWorkload::KernelWorkload(const Params &p) : Workload(p),
|
||||
});
|
||||
|
||||
kernelSymtab = kernelObj->symtab();
|
||||
auto initKernelSymtab = kernelSymtab.mask(_loadAddrMask)
|
||||
->offset(_loadAddrOffset)
|
||||
->rename([](std::string &name) {
|
||||
name = "kernel_init." + name;
|
||||
});
|
||||
|
||||
Loader::debugSymbolTable.insert(*initKernelSymtab);
|
||||
Loader::debugSymbolTable.insert(kernelSymtab);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user