<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/146559>146559</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [lldb-dap] Hover on objc declarations vs expressions is different
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb-dap
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ashgti
      </td>
    </tr>
</table>

<pre>
    I'm looking into updating lldb-dap's expression request and digging into this I found some inconsistencies with how we're evaluating terms in the hover request.

Specifically, if you have some obj-c code like:

```
  MyType *foo = [[MyType alloc] init];
  [foo doWork];
```

If you hover over the declaration of `foo` VSCode is actually sending a hover request for `*foo`. If you hover over `foo` when its about to invoke a method, it will send a request for `foo`. 

When we call `frame.GetValueForVariablePath` with the first form, its dereferencing the variable. Which is a totally valid expression, but not what I think the user meant when they hover over the variable.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkU8Fu4zYU_Brq8hCDpkzJPujgbOA2hwIFtkjOFPlkck2RLvkk139fUPIm6RYwbJjSzLwZvlE5u3NA7Jh8ZvKlUhPZmDqV7Zlc1Udz716ZaEfwMV5cOIMLFGG6GkXln_emfzLqykSbAf-5JszZxQAJ_54wE6hgwLjz-QNJ1mV4hSFOwUCOI4ILOobsMmHQDjPcHFmw8QY3ZKJNCDgrP61yhGnM4AKQRbBxxvRTacP4kfHj9ytqNzitvL8z8Q3cAPc4gVUzrmqx__GkQUeD4N0FWX1cgazhjw8_Avxx_-t-RWDiOMQIrH6BJZ7nx7nyPmomX8AFR0y-sPp5gTH5XN438T2my8f5V2rGj6-PkZbpl69ixqD2Kikq4cUBWMOHGFnD4e37tzKsy6A0TcUXZAympKH-GwEMMRXgOjVr-Ab-r_VJfLMYwFEG1ceJgCK4MMcLgoIRyUaz5Edwc94vkqB-Vfopsxp7L4Q3hBL-8jSpETe_Ib0pP-EppjeVnOo9_qnILhOUmy7mB5dW0nHVzGAw4YCprES5doswP8AbeLdO2yUQoEhLIrPyznzZv0LTTwQhEtysIngtixcuC9OUMcGIKtCaAVm8_3odH2qMHyvT1eZQH1SF3baV23ovd4e6sp3Uum_1DuWh3TVNc9gLzk2_3WNTt0ZorFwnuJC85dutlPttvRlk0x72u0Fu960RO852HEfl_Mb7edzEdK5czhN2210j5aHyqkefl2oK8Vk1UYqauoJ56qdzZjvuXab8yUKO_FLpD5B8gd9Xi6F0QH9duAzz1_Lmkq1xw5I_VVPynSW65tIVcWLidHZkp36j48jEqWg-fp6uKf5ATUycFhuZidPDydyJfwMAAP__qZp2mQ">