Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can be used with cppdbg? #148

Open
mvimercati opened this issue Oct 24, 2024 · 6 comments
Open

Can be used with cppdbg? #148

mvimercati opened this issue Oct 24, 2024 · 6 comments

Comments

@mvimercati
Copy link

Hi,
is it possible to use this extension with cppdbg?
I tried to follow the install/setup procedure but actually I'm not able to activate it.
Any suggestion?

@thegecko
Copy link
Contributor

You should be able to open the settings and add your debug type to the supported ones. cppdbg isn't included by default:

https://github.com/eclipse-cdt-cloud/vscode-memory-inspector/blob/main/package.json#L270

@colin-grant-work
Copy link
Contributor

@thegecko, sounds like maybe we should have an even more basic level of support where we assume only that we can make the readMemory call, perhaps?

@mvimercati
Copy link
Author

You should be able to open the settings and add your debug type to the supported ones. cppdbg isn't included by default:

https://github.com/eclipse-cdt-cloud/vscode-memory-inspector/blob/main/package.json#L270

yes, I added 'cppdbg' to the memory-inspector.debugType settings, in both local and container configuration, but without luck.
This is my launcher configuration for gdb. I actually do not understand if it have the 'readMemory' support....

 "configurations": [        
        {
            "name": "Attach to GDB (CPPDBG)",
            "type": "cppdbg",
            "request": "launch",
            "program": "sw-debug/executable",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "environment": [],
            "externalConsole": false,
            "useExtendedRemote": true,
            "MIMode": "gdb",
            "miDebuggerServerAddress": "172.16.213.217:13001",
            "miDebuggerPath": "/opt/rtems-6-sparc-gr712rc-uni/bin/sparc-rtems6-gdb",
            "launchCompleteCommand": "None",
            "stopAtConnect": true,
            "postRemoteConnectCommands": [
                {
                    "description": "Load SW",
                    "text": "load",
                    "ignoreFailures": false
            }
            ],
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
            ],
            "symbolLoadInfo": {
                "loadAll": true,
                "exceptionList": ""
            },
            "logging": {
                "moduleLoad": true
            }
        }
    ]

@mvimercati
Copy link
Author

Well, checking again it seems that the extension is not installed in the container and seems I cannot do it.
Any ideas?

@thegecko
Copy link
Contributor

thegecko commented Nov 6, 2024

You should be able to open the settings and add your debug type to the supported ones

I've confirmed the memory inspector is activated when cppdbg is added to the list of debuggers as expected, however it fails to read memory. This needs further investigation to add support

Well, checking again it seems that the extension is not installed in the container and seems I cannot do it.
Any ideas?

Container support is a separate issue, please see #150

sounds like maybe we should have an even more basic level of support where we assume only that we can make the readMemory call, perhaps?

Yes, this was the intent initially. I'm keen we support as many debuggers "out of the box" as possible without having to register specific adapters.

@colin-grant-work do you have an idea of how much effort this would take?

@mvimercati
Copy link
Author

Container support is a separate issue, please see #150

Ok, so this is my issue. Good to know.
Actually I'm running VScode on Windows, connected to WSL and attacched to a container (docker running in WSL).
Thank you. Open to testing eventual patches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants