DynamoRIO / DynamoRIO/dynamorio

Distinguishing between basic blocks and traces in delete callback

Open
#1,048 0 comments 0 reactions 0 assignees View on GitHub
Migrated Priority-Medium Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

_From [meph...@gmail.com](https://code.google.com/u/102287220754221353246/) on January 07, 2013 17:03:03_

I need to record basic block deletion events, and act on them later during post-processing step.
Thus, I don't need a tag hashtable in my client.
When my deletion handler gets control, it needs to ignore trace deletion events.
Normally I would distinguish basic block tags from trace tags using dr_bb_exists_at(drcontext, tag), but in deletion handler I may not have drcontext:

> Note: drcontext may be NULL when thread-shared fragments
> are being deleted during process exit

As an experiment, I added the new "delete_ex" event that provides is_trace flag, and it seemed to work.
Is it possible to add something along these lines to DR?

**Attachment:** [patch](http://code.google.com/p/dynamorio/issues/detail?id=1048)

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1048_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.