Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #5390
Closed
Open
Issue created Mar 03, 2022 by Derek Bruening@derekbrueningContributor

drbbdup fails to interoperate with drmgr emulation API

For #3995 I'm integrating drbbdup with drmemtrace, the tracer for drcachesim. But drmemtrace uses the drmgr emulation support:

instr_t *instr_fetch = drmgr_orig_app_instr_for_fetch(drcontext);
instr_t *instr_operands = drmgr_orig_app_instr_for_operands(drcontext);

Those routines are not supported by drbbdup, which splits the where to insert from the app instr being instrumented, to handle the inability to clone a block-final branch or syscall. This causes drmemtrace to instrument the wrong instruction.

Xref past discussions on possibly integrating drbbdup with drmgr. A possible simpler solution is to add a drmgr API to set the current app instruction. Or, could we re-implement the drbbdup where vs instr split to instead use the emulation API itself? That is one of the intended uses of the emulation API, for app instr rewrites that ease instrumentation (such as rep string or scatter-gather expansion): it is not only for pure emulation.

Assignee
Assign to
Time tracking