Commit 1c4d2a97 authored by henry's avatar henry
Browse files

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

parent 61194c14
......@@ -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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment