Issue 168602
Summary LLDB should have an API that returns if LLDB_REGNUM_GENERIC_ARGX registers can be used to get function call arguments
Labels lldb
Assignees
Reporter delcypher
    In https://github.com/swiftlang/llvm-project/pull/11835 an instrumentation plugin is being added that inspects the `LLDB_REGNUM_GENERIC_ARG` register when stopped at a breakpoint set on a function call. The instrumentation plugin reads from the register to find the value of the argument passed to the function call. It can do this because the plugin knows the signature of the function ahead of time.

However, it is a little bit hacky because not all target+calling convention combination will pass the first argument in a function call via `LLDB_REGNUM_GENERIC_ARG`. For example for x86 (32-bit) some calling conventions do not use the `eax` register.

Ideally LLDB would have an API that would that would state if `LLDB_REGNUM_GENERIC_ARGN` can be used to get the Nth argument. I'm not sure how feasible this is in all situations because I don't know how LLDB would know which calling convention is being used.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to