mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
Debug Kit: Don't rebuild image_info for LoadedImage.
The one that came from the kernel will be more accurate, including having text and data sizes that properly encompass all regions. Change-Id: I63bea39727fad7d87323568f3904a8f7ed992264 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8824 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
d20817c284
commit
c3ff6461e5
@ -195,6 +195,7 @@ RemoteMemoryAccessor::_GetAreaNoThrow(const void *address, int32 size, Area *&_a
|
|||||||
class SymbolLookup::LoadedImage : public Image {
|
class SymbolLookup::LoadedImage : public Image {
|
||||||
public:
|
public:
|
||||||
LoadedImage(SymbolLookup* symbolLookup,
|
LoadedImage(SymbolLookup* symbolLookup,
|
||||||
|
const image_info& info,
|
||||||
const image_t* image, int32 symbolCount);
|
const image_t* image, int32 symbolCount);
|
||||||
virtual ~LoadedImage();
|
virtual ~LoadedImage();
|
||||||
|
|
||||||
@ -550,8 +551,8 @@ SymbolLookup::_LoadImageInfo(const image_info& imageInfo)
|
|||||||
if (loadedImage == NULL)
|
if (loadedImage == NULL)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
image = new(std::nothrow) LoadedImage(this, loadedImage,
|
image = new(std::nothrow) LoadedImage(this, imageInfo,
|
||||||
Read(loadedImage->symhash[1]));
|
loadedImage, Read(loadedImage->symhash[1]));
|
||||||
if (image == NULL)
|
if (image == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
@ -566,27 +567,14 @@ SymbolLookup::_LoadImageInfo(const image_info& imageInfo)
|
|||||||
|
|
||||||
|
|
||||||
SymbolLookup::LoadedImage::LoadedImage(SymbolLookup* symbolLookup,
|
SymbolLookup::LoadedImage::LoadedImage(SymbolLookup* symbolLookup,
|
||||||
const image_t* image, int32 symbolCount)
|
const image_info& info, const image_t* image, int32 symbolCount)
|
||||||
:
|
:
|
||||||
fSymbolLookup(symbolLookup),
|
fSymbolLookup(symbolLookup),
|
||||||
fImage(image),
|
fImage(image),
|
||||||
fSymbolCount(symbolCount),
|
fSymbolCount(symbolCount),
|
||||||
fLoadDelta(image->regions[0].delta)
|
fLoadDelta(image->regions[0].delta)
|
||||||
{
|
{
|
||||||
// init info
|
fInfo = info;
|
||||||
fInfo.id = fImage->id;
|
|
||||||
fInfo.type = fImage->type;
|
|
||||||
fInfo.sequence = 0;
|
|
||||||
fInfo.init_order = 0;
|
|
||||||
fInfo.init_routine = (void (*)())fImage->init_routine;
|
|
||||||
fInfo.term_routine = (void (*)())fImage->term_routine;
|
|
||||||
fInfo.device = -1;
|
|
||||||
fInfo.node = -1;
|
|
||||||
strlcpy(fInfo.name, fImage->path, sizeof(fInfo.name));
|
|
||||||
fInfo.text = (void*)fImage->regions[0].vmstart;
|
|
||||||
fInfo.data = (void*)fImage->regions[1].vmstart;
|
|
||||||
fInfo.text_size = fImage->regions[0].vmsize;
|
|
||||||
fInfo.data_size = fImage->regions[1].vmsize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user