6 Commits

Author SHA1 Message Date
Med Ismail Bennani
564f433083
[lldb/test] Use filecheck_log to read log files from the host platform (#183422)
Some tests were using `self.filecheck` with `platform shell cat {log}`
to validate test behavior through log inspection.

This doesn't work when running the testsuite against a remote platform
since the logs are saved on the host's filesystem.

This patch refactors those call sites to use the new `filecheck_log`
helper, which ensures the log file is always read from the host
platform.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2026-02-25 17:07:58 -08:00
Med Ismail Bennani
2f46255485
Revert "[lldb/test] Fix tests reading log from remote platform instead of host" (#183419)
Reverts llvm/llvm-project#183413 because this is still fragile.
2026-02-25 16:18:18 -08:00
Med Ismail Bennani
b3ec476c70
[lldb/test] Fix tests reading log from remote platform instead of host (#183413)
Some tests are using logs to validate that a test behaves correctly
however they used `platform shell cat {log}` to read the logfile.

This doesn't work when running the testsuite against a remote platform
since the logs are saved on the host's filesystem.

This patch addresses those failures by making sure we read the log file
from the host platform.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2026-02-25 23:46:40 +00:00
Dave Lee
a3aa038331
[lldb] Add missing newline to po warning (#176257)
Follow up fix to #175847
2026-01-15 16:28:34 -08:00
Dave Lee
fb0653c36b
[lldb] Change po fallback messaging (#175847)
When an object description expression fails, instead of emitting an error, mark it as a
warning instead. Additionally, send the more low level details of the failure to the
`expr` log, and show a more user friendly message:

> `po` was unsuccessful, running `p` instead

rdar://165190497
2026-01-13 16:19:54 -08:00
Dave Lee
ae7e1b82fe
[lldb] Print ValueObject when GetObjectDescription fails (#152417)
This fixes a few bugs, effectively through a fallback to `p` when `po` fails.

The motivating bug this fixes is when an error within the compiler causes `po` to fail.
Previously when that happened, only its value (typically an object's address) was
printed – and problematically, no compiler diagnostics were shown. With this change,
compiler diagnostics are shown, _and_ the object is fully printed (ie `p`).

Another bug this fixes is when `po` is used on a type that doesn't provide an object
description (such as a struct). Again, the normal `ValueObject` printing is used.

Additionally, this also improves how lldb handles an object description method that
fails in some way. Now an error will be shown (it wasn't before), and the value will be
printed normally.
2025-08-15 08:37:26 -07:00