AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

Multiple Matches for a symbol in GDB #1181

Closed fmadero closed 4 months ago

fmadero commented 4 months ago

I am using the Ada Extension in VSCode and I am remote debugging using cppdbg. I hit a variable in a thread and GDB says it found "Multiple Matches" and a menu of choices is presented in the "DEBUG CONSOLE":

(gdb) print f(1) Multiple matches for f [0] cancel [1] foo.f (integer) return boolean at foo.adb:23 [2] foo.f (foo.new_integer) return boolean at foo.adb:28

However when I try to enter a value in say 0 and press return nothing happens. I have also tried entering -exec 0 and nothing. Has anyone ever encountered this in vscode?

AnthonyLeonardoGracio commented 4 months ago

Hello,

I think you should use the Watch panel to display variables, instead of communicating directly with GDB. Note that we rely completely on the C/C++ extension for VS Code when it comes to debugging, so it's better to ask them directly if you really want to use the console.

Regards,

fmadero commented 4 months ago

I was not communicating with gdb thru the "DEBUG CONSOLE" I was just hovering my cursor over an array variable. And yes I did open an issue up with C/C++ extension for VS Code as well.

AnthonyLeonardoGracio commented 4 months ago

Ah I see, I am curious about their answer, can you attach the link of the issue, so that we can follow it?

fmadero commented 4 months ago

Here is the link: https://github.com/microsoft/vscode-cpptools/issues/11953