================
@@ -108,3 +157,35 @@ bool RegisterContextFreeBSDKernel_arm64::WriteRegister(
const RegisterInfo *reg_info, const RegisterValue &value) {
return false;
}
+
+int64_t RegisterContextFreeBSDKernel_arm64::GetOsreldate() {
+ ProcessSP process_sp = m_thread.GetProcess();
+ if (!process_sp)
+ return 0;
+
+ Target &target = process_sp->GetTarget();
+
+ SymbolContextList sc_list;
+ target.GetImages().FindSymbolsWithNameAndType(ConstString("osreldate"),
+ lldb::eSymbolTypeData,
sc_list);
+
+ if (sc_list.GetSize() > 0) {
----------------
DavidSpickett wrote:
Prefer early returns where possible. Here for instance:
```
if (sc_list.GetSize() == 0)
return 0;
```
https://github.com/llvm/llvm-project/pull/180222
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits