[all-commits] [llvm/llvm-project] 9f8ae7: [lldb-dap] Implement value locations for function ...

Adrian Vogelsgesang via All-commits all-commits at lists.llvm.org
Thu Oct 10 18:31:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f8ae7844dee7bb5527a59249e74885fb3bfb4a9
      https://github.com/llvm/llvm-project/commit/9f8ae7844dee7bb5527a59249e74885fb3bfb4a9
  Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M lldb/test/API/tools/lldb-dap/locations/Makefile
    M lldb/test/API/tools/lldb-dap/locations/TestDAP_locations.py
    R lldb/test/API/tools/lldb-dap/locations/main.c
    A lldb/test/API/tools/lldb-dap/locations/main.cpp
    M lldb/tools/lldb-dap/JSONUtils.cpp
    M lldb/tools/lldb-dap/JSONUtils.h
    M lldb/tools/lldb-dap/lldb-dap.cpp

  Log Message:
  -----------
  [lldb-dap] Implement value locations for function pointers (#104589)

This commit adds `valueLocationReference` to function pointers and
function references. Thereby, users can navigate directly to the
pointed-to function from within the "variables" pane.

In general, it would be useful to also a add similar location references
also to member function pointers, `std::source_location`,
`std::function`, and many more. Doing so would require extending the
formatters to provide such a source code location.

There were two RFCs about this a while ago:

https://discourse.llvm.org/t/rfc-extending-formatters-with-a-source-code-reference/68375
https://discourse.llvm.org/t/rfc-sbvalue-metadata-provider/68377/26

However, both RFCs ended without a conclusion. As such, this commit now
implements the lowest-hanging fruit, i.e. function pointers. If people
find it useful, I will revive the RFC afterwards.



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