summary refs log tree commit diff stats
path: root/results/scraper/fex/1772
blob: dc6699386dcb0040cd85486a2bfcec1c3d394f89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
TCBs: Track metadata fragment metadata internally, not in InternalThreadState::DebugStore
#### Current Situation
Currently, debug metadata is tracked by its guest entrypoint, and it is assumed that there's an 1:1 mapping between fragments and guest entry points.

There are a number of cases where this is not true. The current fragment may be invalidated, but still executing.  eg
- Cross thread SMC invalidation
- Signal or thunk return
- Shared memory mode migration
- Possibly others

There is also a race condition, as debug metadata corresponds to a specific version of a fragment, however a guest entrypoint is inherently not versioned. 

#### Proposal
We can track debug (and other) metadata, as part of the host fragment translation. This way, we will be able to locate the correct version. Metadata clearing will also become a responsibility of the backend, which will reduce the context's responsibilities. To get debug data for a specific translation, a host TCB ptr will be required.