mirror of
https://review.haiku-os.org/haiku
synced 2025-02-12 00:28:19 +01:00
kernel/elf: Fix handling of the commpage in UserSymbolLookup.
We now will find its image struct using the standard iteration, so just check for its address specifically. Fixes commpage symbols printing in KDL after the recent refactor.
This commit is contained in:
parent
71c04db60a
commit
ab25a42387
@ -1376,20 +1376,19 @@ public:
|
|||||||
// get the image for the address
|
// get the image for the address
|
||||||
struct image *image;
|
struct image *image;
|
||||||
status_t error = _FindImageAtAddress(address, image);
|
status_t error = _FindImageAtAddress(address, image);
|
||||||
if (error != B_OK) {
|
if (error != B_OK)
|
||||||
|
return error;
|
||||||
|
|
||||||
|
if (image->info.basic_info.text == fTeam->commpage_address) {
|
||||||
// commpage requires special treatment since kernel stores symbol
|
// commpage requires special treatment since kernel stores symbol
|
||||||
// information
|
// information
|
||||||
addr_t commPageAddress = (addr_t)fTeam->commpage_address;
|
if (*_imageName != NULL)
|
||||||
if (address >= commPageAddress
|
*_imageName = "commpage";
|
||||||
&& address < commPageAddress + COMMPAGE_SIZE) {
|
address -= (addr_t)fTeam->commpage_address;
|
||||||
if (*_imageName)
|
error = elf_debug_lookup_symbol_address(address, _baseAddress,
|
||||||
*_imageName = "commpage";
|
_symbolName, NULL, _exactMatch);
|
||||||
address -= (addr_t)commPageAddress;
|
if (_baseAddress != NULL)
|
||||||
error = elf_debug_lookup_symbol_address(address, _baseAddress,
|
*_baseAddress += (addr_t)fTeam->commpage_address;
|
||||||
_symbolName, NULL, _exactMatch);
|
|
||||||
if (_baseAddress)
|
|
||||||
*_baseAddress += (addr_t)fTeam->commpage_address;
|
|
||||||
}
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user