================
@@ -108,3 +161,39 @@ bool RegisterContextFreeBSDKernel_arm64::WriteRegister(
const RegisterInfo *reg_info, const RegisterValue &value) {
return false;
}
+
+int 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) {
+ LLDB_LOGF(GetLog(LLDBLog::Object),
+ "Cannot find osreldate. Defaulting to %d.", FBSD14);
+ return FBSD14;
+ }
+
+ SymbolContext sc;
+ sc_list.GetContextAtIndex(0, sc);
+
+ if (sc.symbol) {
----------------
DavidSpickett wrote:
Also you can drop braces from many more things this way.
https://github.com/llvm/llvm-project/pull/180222
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits