mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
printStack, ptscotchDecomp: Correct integer type used to hold memory addresses
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,17 +91,17 @@ void printSourceFileAndLine
|
|||||||
// Convert offset into .so into offset into executable.
|
// Convert offset into .so into offset into executable.
|
||||||
|
|
||||||
void *addr;
|
void *addr;
|
||||||
sscanf(myAddress.c_str(), "%p",&addr);
|
sscanf(myAddress.c_str(), "%p", &addr);
|
||||||
|
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
|
|
||||||
dladdr(addr, &info);
|
dladdr(addr, &info);
|
||||||
|
|
||||||
unsigned long offset = ulong(info.dli_fbase);
|
uintptr_t offset = uintptr_t(info.dli_fbase);
|
||||||
|
|
||||||
IStringStream addressStr(address.substr(2));
|
IStringStream addressStr(address.substr(2));
|
||||||
long addressValue = ReadHex<long>(addressStr);
|
uintptr_t addressValue = ReadHex<uintptr_t>(addressStr);
|
||||||
long relativeAddress = addressValue-offset;
|
intptr_t relativeAddress = addressValue - offset;
|
||||||
|
|
||||||
// Reconstruct hex word from address
|
// Reconstruct hex word from address
|
||||||
OStringStream nStream;
|
OStringStream nStream;
|
||||||
|
|||||||
@ -566,10 +566,10 @@ Foam::label Foam::ptscotchDecomp::decompose
|
|||||||
{
|
{
|
||||||
Pout<< "SCOTCH_dgraphBuild with:" << nl
|
Pout<< "SCOTCH_dgraphBuild with:" << nl
|
||||||
<< "xadjSize-1 : " << xadjSize-1 << nl
|
<< "xadjSize-1 : " << xadjSize-1 << nl
|
||||||
<< "xadj : " << long(xadj) << nl
|
<< "xadj : " << uintptr_t(xadj) << nl
|
||||||
<< "velotab : " << long(velotab.begin()) << nl
|
<< "velotab : " << uintptr_t(velotab.begin()) << nl
|
||||||
<< "adjncySize : " << adjncySize << nl
|
<< "adjncySize : " << adjncySize << nl
|
||||||
<< "adjncy : " << long(adjncy) << nl
|
<< "adjncy : " << uintptr_t(adjncy) << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user