microsoft/vscode-cpptools

Disassembly view not working with Ada

AnthonyLeonardoGracio opened this issue · 4 comments

Environment

  • OS and version: Ubuntu 20.04
  • VS Code: 1.74.0
  • C/C++ extension: 1.13.9
  • GDB / LLDB version: 12.1.90

Bug Summary and Steps to Reproduce

Bug Summary:

I tried to use cppdebug to debug Ada code with VS Code. I am able to setup breakpoints, have a working registers view, but the Disassembly view does not work: I get an empty Disassembly view with a Disassembly not available message.

I have attached the full GDB logs and the launch.json configuration I have used: let me know if you need anything more!

Debugger Configurations

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/obj/main",
            "cwd": "${workspaceFolder}"
        }
    ]
}

Debugger Logs

1: (92) LaunchOptions{"name":"Debug","type":"cppdbg","request":"launch","program":"/home/leonardo/Development/tests/completion_improvments/main","cwd":"/home/leonardo/Development/tests/completion_improvments","externalConsole":false,"logging":{"trace":true,"engineLogging":true,"moduleLoad":true,"programOutput":true},"environment":[],"setupCommands":[{"text":"-enable-pretty-printing","ignoreFailures":true}],"__configurationTarget":6,"__sessionId":"2db5b217-7f42-4bc9-8b0c-b6777896db15","MIMode":"gdb"}
1: (145) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-advdkuoy.n0c ; cd "/home/leonardo/Development/tests/completion_improvments" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm "/tmp/Microsoft-MIEngine-In-322vpk0c.f4q" "/tmp/Microsoft-MIEngine-Out-crtzhlk5.iam" "/tmp/Microsoft-MIEngine-Pid-advdkuoy.n0c" "/tmp/Microsoft-MIEngine-Cmd-vobp5ops.xz2"' EXIT ; "/home/leonardo/Development/ancr/wave/x86_64-linux/stable-gnatall/install/bin/gdb" --interpreter=mi --tty=$DbgTerm < "/tmp/Microsoft-MIEngine-In-322vpk0c.f4q" > "/tmp/Microsoft-MIEngine-Out-crtzhlk5.iam" & clear; pid=$! ; echo $pid > "/tmp/Microsoft-MIEngine-Pid-advdkuoy.n0c" ; wait $pid;
1: (158) Wait for connection completion.
1: (1413) ->=thread-group-added,id="i1"
1: (1414) ->~"GNU gdb (GDB) 12.1.90 for GNAT Pro 24.0w [rev=341088572fb52c26b9fc8fce47f45818b011bfc5] (with AdaCore local changes)\n"
1: (1414) ->~"Copyright (C) 2022 Free Software Foundation, Inc.\n"
1: (1414) ->~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nSee your support agreement for details of warranty and support.\nIf you do not have a current support agreement, then there is absolutely\nno warranty for this version of GDB."
1: (1414) ->~"\nType \"show copying\" and \"show warranty\" for details.\n"
1: (1415) ->~"This GDB was configured as \"x86_64-pc-linux-gnu\".\n"
1: (1415) ->~"Type \"show configuration\" for configuration details.\n"
1: (1415) ->~"For help, type \"help\".\n"
1: (1415) ->~"Type \"apropos word\" to search for commands related to \"word\".\n"
1: (1415) ->(gdb)
1: (1421) <-1001-gdb-set mi-async on
1: (1421) ->1001^done
1: (1422) ->(gdb)
1: (1425) 1001: elapsed time 5
1: (1437) <-1002-enable-pretty-printing
1: (1437) ->1002^done
1: (1437) ->(gdb)
1: (1437) 1002: elapsed time 0
1: (1438) <-1003-interpreter-exec console "set pagination off"
1: (1438) ->=cmd-param-changed,param="pagination",value="off"
1: (1438) ->1003^done
1: (1438) ->(gdb)
1: (1438) 1003: elapsed time 0
1: (1438) <-1004-gdb-set auto-solib-add on
1: (1438) ->1004^done
1: (1439) ->(gdb)
1: (1439) 1004: elapsed time 0
1: (1439) <-1005-gdb-set solib-search-path /home/leonardo/Development/tests/completion_improvments:
1: (1439) ->1005^done
1: (1439) ->(gdb)
1: (1439) 1005: elapsed time 0
1: (1439) <-1006-gdb-set stop-on-solib-events 1
1: (1440) ->1006^done
1: (1440) ->(gdb)
1: (1440) 1006: elapsed time 0
1: (1440) <-1007-environment-cd /home/leonardo/Development/tests/completion_improvments
1: (1440) ->1007^done
1: (1440) ->(gdb)
1: (1440) 1007: elapsed time 0
1: (1440) <-1008-file-exec-and-symbols /home/leonardo/Development/tests/completion_improvments/main
1: (1444) ->1008^done
1: (1444) ->(gdb)
1: (1444) 1008: elapsed time 3
1: (1446) <-1009-interpreter-exec console "show architecture"
1: (1446) ->~"The target architecture is set to \"auto\" (currently \"i386:x86-64\").\n"
1: (1446) ->1009^done
1: (1446) ->(gdb)
1: (1447) 1009: elapsed time 0
1: (1448) <-1010-break-insert -f main
1: (1450) ->1010^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",times="0",original-location="main",locations=[{number="1.1",enabled="y",addr="0x0000000000403343",func="main",file="/home/leonardo/Development/tests/completion_improvments/main.adb",fullname="/home/leonardo/Development/tests/completion_improvments/main.adb",line="4",thread-groups=["i1"]},{number="1.2",enabled="y",addr="0x00000000004037fb",func="main",file="b__main.adb",fullname="/home/leonardo/Development/tests/completion_improvments/b__main.adb",line="246",thread-groups=["i1"]}]}
1: (1450) ->(gdb)
1: (1457) 1010: elapsed time 9
1: (1463) Send Event AD7EngineCreateEvent
1: (1465) Send Event AD7ProgramCreateEvent
<--   R (runInTerminal-4) [1329 ms]: {"type":"response","seq":3,"command":"runInTerminal","request_seq":4,"success":true,"body":{"shellProcessId":222423}}
1: (1499) ShellPid=222547
1: (1500) DebuggerPid=222549
<--   C (setBreakpoints-4): {"command":"setBreakpoints","arguments":{"source":{"name":"main.adb","path":"/home/leonardo/Development/tests/completion_improvments/main.adb"},"lines":[8],"breakpoints":[{"line":8}],"sourceModified":false},"type":"request","seq":4}
1: (1560) <-1011-break-insert -f main.adb:8

Other Extensions

Additional Information

empty_disassembly

[gdb_output.txt](https://github.com/microsoft/vscode-cpptools/files/10352786/gdb_output.txt)

Thank you for reporting this issue.

As this is the C/C++ extension and our expertise is with C/C++, we are looking for the community to help with this issue in the Ada language. As both use GDB to debug, it may be something in the response from GDB that difference between the languages that MIEngine is not handling.

Ok, thanks for the feedback ;) Should I try to create an issue on the MIEngine side too?

I think this is a won't-fix, please close.

Yes, no upvotes. We will close it.