mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 06:16:11 +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
|
||||
struct image *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
|
||||
// information
|
||||
addr_t commPageAddress = (addr_t)fTeam->commpage_address;
|
||||
if (address >= commPageAddress
|
||||
&& address < commPageAddress + COMMPAGE_SIZE) {
|
||||
if (*_imageName)
|
||||
*_imageName = "commpage";
|
||||
address -= (addr_t)commPageAddress;
|
||||
error = elf_debug_lookup_symbol_address(address, _baseAddress,
|
||||
_symbolName, NULL, _exactMatch);
|
||||
if (_baseAddress)
|
||||
*_baseAddress += (addr_t)fTeam->commpage_address;
|
||||
}
|
||||
if (*_imageName != NULL)
|
||||
*_imageName = "commpage";
|
||||
address -= (addr_t)fTeam->commpage_address;
|
||||
error = elf_debug_lookup_symbol_address(address, _baseAddress,
|
||||
_symbolName, NULL, _exactMatch);
|
||||
if (_baseAddress != NULL)
|
||||
*_baseAddress += (addr_t)fTeam->commpage_address;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user