[Lldb-commits] [lldb] [lldb] Implement ${target.file} format variable (PR #123431)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Sun Jan 19 23:59:43 PST 2025


================
@@ -1469,6 +1472,19 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
     }
     return false;
 
+  case Entry::Type::TargetFile:
+    if (exe_ctx) {
+      Target *target = exe_ctx->GetTargetPtr();
+      if (target) {
+        Module *exe_module = target->GetExecutableModulePointer();
+        if (exe_module) {
----------------
labath wrote:

```suggestion
      if (Target *target = exe_ctx->GetTargetPtr()) {
        if (Module *exe_module = target->GetExecutableModulePointer()) {
```

https://github.com/llvm/llvm-project/pull/123431


More information about the lldb-commits mailing list