[DynInst_API:] [dyninst/dyninst] b8596a: proccontrol: make computeAddrWidth independent of ...


Date: Tue, 09 Aug 2016 17:53:19 -0700
From: Josh Stone <cuviper@xxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] b8596a: proccontrol: make computeAddrWidth independent of ...
  Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: b8596ad4023ec40ac07e669ff8ea3ec06e262703
      https://github.com/dyninst/dyninst/commit/b8596ad4023ec40ac07e669ff8ea3ec06e262703
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    M proccontrol/src/linux.C

  Log Message:
  -----------
  proccontrol: make computeAddrWidth independent of endianness

In linux_process::computeAddrWidth(), it's trying to guess the address
size without disk access, but commit c8d7481 started opening the exe to
figure out its endianness.  This is especially a problem if a process
was attached without specifying its executable.

We can modify the auxv scan to look at *both* little-endian and big-
endian words.  If either are all zero, we know this is a 64-bit process.
We could even report which endian it is from this, although we still
wouldn't know that for 32-bit processes.


  Commit: 7a1ddac0fe5597ee8f84adef99e41c2eb1ceb0bd
      https://github.com/dyninst/dyninst/commit/7a1ddac0fe5597ee8f84adef99e41c2eb1ceb0bd
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    M proccontrol/src/loadLibrary/codegen.C

  Log Message:
  -----------
  proccontrol: improve Codegen's exe lookup

Commit c8d7481 made `Codegen::generate` start opening the executable to
determine the ABI version of the process.  However, the llproc exe isn't
always set, if the process was attached without specifying it.  We can
instead get the right path from `proc_->libraries().getExecutable()`.


  Commit: 0d1e168a5d30fed2c00d1dfbe7c82fa111cd9480
      https://github.com/dyninst/dyninst/commit/0d1e168a5d30fed2c00d1dfbe7c82fa111cd9480
  Author: Josh Stone <cuviper@xxxxxxxxx>
  Date:   2016-08-09 (Tue, 09 Aug 2016)

  Changed paths:
    M proccontrol/src/linux.C
    M proccontrol/src/loadLibrary/codegen.C

  Log Message:
  -----------
  Merge pull request #148 from cuviper/attach-no-exe-master

proccontrol: fix process attachment without an exe


Compare: https://github.com/dyninst/dyninst/compare/4131cc518568...0d1e168a5d30
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] b8596a: proccontrol: make computeAddrWidth independent of ..., Josh Stone <=