Remove the #include <execinfo.h> on darwin OS

This commit is contained in:
henry 2008-05-21 16:58:38 +01:00
parent 61194c1419
commit 1c4d2a97a5

View File

@ -32,7 +32,9 @@ License
#include "readHexLabel.H"
#include <cxxabi.h>
#ifndef darwin
#include <execinfo.h>
#endif
#include <dlfcn.h>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,7 +67,7 @@ string pOpen(const string &cmd, label line=0)
{
string str(buffer);
return str.substr(0, str.size()-1);
}
}
}
pclose(cmdPipe);
}
@ -93,9 +95,9 @@ void printSourceFileAndLine
void *addr;
sscanf(myAddress.c_str(), "%p",&addr);
Dl_info info;
dladdr(addr, &info);
unsigned long offset = ulong(info.dli_fbase);
@ -216,7 +218,7 @@ void error::printStack(Ostream& os)
{
string::size_type lPos = msg.find('[');
string::size_type rPos = msg.find(']');
if (lPos != string::npos && rPos != string::npos && lPos<rPos)
{
address = msg.substr(lPos+1, rPos-lPos-1);
@ -274,7 +276,7 @@ void error::printStack(Ostream& os)
else
{
string::size_type endBracketPos = msg.find(')', start);
if (endBracketPos != string::size_type(string::npos))
{
string fullName(msg.substr(start, endBracketPos-start));