Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mxz297 committed Jun 21, 2016
2 parents cbd6e39 + d1b4334 commit bbcacd2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
11 changes: 9 additions & 2 deletions dyninstAPI_RT/src/RTcommon.c
Expand Up @@ -117,10 +117,17 @@ int fakeTickCount;
#ifdef _MSC_VER
#define TLS_VAR __declspec(thread)
#else
#define TLS_VAR __thread
// Note, the initial-exec model gives us static TLS which can be accessed
// directly, unlike dynamic TLS that calls __tls_get_addr(). Such calls risk
// recursing back to us if they're also instrumented, ad infinitum. Static TLS
// must be used very sparingly though, because it is a limited resource.
// *** This case is very special -- do not use IE in general libraries! ***
#define TLS_VAR __thread __attribute__ ((tls_model("initial-exec")))
#endif

TLS_VAR int DYNINST_tls_tramp_guard = 1;
// It's tempting to make this a char, but glibc < 2.17 hits a bug:
// https://sourceware.org/bugzilla/show_bug.cgi?id=14898
static TLS_VAR short DYNINST_tls_tramp_guard = 1;

DLLEXPORT int DYNINST_lock_tramp_guard()
{
Expand Down
2 changes: 1 addition & 1 deletion symtabAPI/src/Object-elf.C
Expand Up @@ -2433,7 +2433,7 @@ bool Object::fix_global_symbol_modules_static_dwarf()
Dwarf_Debug *dbg_ptr = dwarf->type_dbg();
if (!dbg_ptr)
return false;
Dwarf_Debug &dbg = *dbg_ptr;
Dwarf_Debug dbg = *dbg_ptr;
ModuleFixer m(dbg, this);
bool result = m.parse();
freeList.push_back(m.getFreeList());
Expand Down
2 changes: 1 addition & 1 deletion symtabAPI/src/dwarfWalker.C
Expand Up @@ -73,7 +73,7 @@ using namespace std;
}
#define DWARF_CHECK_RET(x) DWARF_CHECK_RET_VAL(x, false)

DwarfWalker::DwarfWalker(Symtab *symtab, Dwarf_Debug &dbg)
DwarfWalker::DwarfWalker(Symtab *symtab, Dwarf_Debug dbg)
:
DwarfParseActions(symtab, dbg),
srcFileList_(NULL),
Expand Down
8 changes: 4 additions & 4 deletions symtabAPI/src/dwarfWalker.h
Expand Up @@ -34,7 +34,7 @@ namespace Dyninst {
class DwarfParseActions {

protected:
Dwarf_Debug &dbg() { return dbg_; }
Dwarf_Debug dbg() { return dbg_; }


Module *& mod() { return mod_; }
Expand All @@ -44,9 +44,9 @@ namespace Dyninst {

private:
Module *mod_;
Dwarf_Debug &dbg_;
Dwarf_Debug dbg_;
public:
DwarfParseActions(Symtab* s, Dwarf_Debug& d) :
DwarfParseActions(Symtab* s, Dwarf_Debug d) :
symtab_(s),
dbg_(d),
mod_(NULL)
Expand Down Expand Up @@ -171,7 +171,7 @@ namespace Dyninst {

} Error;

DwarfWalker(Symtab *symtab, Dwarf_Debug &dbg);
DwarfWalker(Symtab *symtab, Dwarf_Debug dbg);

virtual ~DwarfWalker();
typedef
Expand Down

0 comments on commit bbcacd2

Please sign in to comment.