File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1409,6 +1409,22 @@ class Process : public std::enable_shared_from_this<Process>,
1409
1409
m_highmem_data_address_mask = data_address_mask;
1410
1410
}
1411
1411
1412
+ // / Some targets might use bits in a code address to indicate a mode switch,
1413
+ // / ARM uses bit zero to signify a code address is thumb, so any ARM ABI
1414
+ // / plug-ins would strip those bits.
1415
+ // / Or use the high bits to authenticate a pointer value.
1416
+ lldb::addr_t FixCodeAddress (lldb::addr_t pc);
1417
+ lldb::addr_t FixDataAddress (lldb::addr_t pc);
1418
+
1419
+ // / Use this method when you do not know, or do not care what kind of address
1420
+ // / you are fixing. On platforms where there would be a difference between the
1421
+ // / two types, it will pick the safest option.
1422
+ // /
1423
+ // / Its purpose is to signal that no specific choice was made and provide an
1424
+ // / alternative to randomly picking FixCode/FixData address. Which could break
1425
+ // / platforms where there is a difference (only Arm Thumb at this time).
1426
+ lldb::addr_t FixAnyAddress (lldb::addr_t pc);
1427
+
1412
1428
// / Get the Modification ID of the process.
1413
1429
// /
1414
1430
// / \return
Original file line number Diff line number Diff line change @@ -5854,6 +5854,24 @@ lldb::addr_t Process::GetHighmemDataAddressMask() {
5854
5854
return GetDataAddressMask ();
5855
5855
}
5856
5856
5857
+ addr_t Process::FixCodeAddress (addr_t addr) {
5858
+ if (ABISP abi_sp = GetABI ())
5859
+ addr = abi_sp->FixCodeAddress (addr);
5860
+ return addr;
5861
+ }
5862
+
5863
+ addr_t Process::FixDataAddress (addr_t addr) {
5864
+ if (ABISP abi_sp = GetABI ())
5865
+ addr = abi_sp->FixDataAddress (addr);
5866
+ return addr;
5867
+ }
5868
+
5869
+ addr_t Process::FixAnyAddress (addr_t addr) {
5870
+ if (ABISP abi_sp = GetABI ())
5871
+ addr = abi_sp->FixAnyAddress (addr);
5872
+ return addr;
5873
+ }
5874
+
5857
5875
void Process::DidExec () {
5858
5876
Log *log = GetLog (LLDBLog::Process);
5859
5877
LLDB_LOGF (log, " Process::%s()" , __FUNCTION__);
You can’t perform that action at this time.
0 commit comments