[all-commits] [llvm/llvm-project] 2c76e8: Add register lookup as another fallback computatio...
jimingham via All-commits
all-commits at lists.llvm.org
Mon Mar 25 15:17:46 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2c76e88e9eb284d17cf409851fb01f1d583bb22a
https://github.com/llvm/llvm-project/commit/2c76e88e9eb284d17cf409851fb01f1d583bb22a
Author: jimingham <jingham at apple.com>
Date: 2024-03-25 (Mon, 25 Mar 2024)
Changed paths:
M lldb/source/Interpreter/OptionArgParser.cpp
A lldb/test/API/commands/target/modules/lookup/Makefile
A lldb/test/API/commands/target/modules/lookup/TestImageLookupPCExpression.py
A lldb/test/API/commands/target/modules/lookup/main.c
Log Message:
-----------
Add register lookup as another fallback computation for address-expressions (#85492)
The idea behind the address-expression is that it handles all the common
expressions that produce addresses. It handles actual valid expressions
that return a scalar, and it handles useful cases that the various
source languages don't support. At present, the fallback handles:
<symbol_name>{+-}<offset>
which isn't valid C but is very handy.
This patch adds handling of:
$<reg_name>
and
$<reg_name>{+-}<offset>
That's kind of pointless in C because the C expression parser handles
that expression already. But some languages don't have a straightforward
way to represent register values like this (swift) so having this
fallback is quite a quality of life improvement.
I added a test which tests that I didn't mess up either of these
fallbacks, though it doesn't test the actually handling of registers
that I added, since the expression parser for C succeeds in that case
and returns before this code gets run.
I will add a test on the swift fork for that checks that this works the
same way for a swift frame after this check.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list