eclipse-cdt-cloud / cdt-gdb-vscode

CDT GDB Visual Studio Code Extension
Eclipse Public License 2.0
21 stars 24 forks source link

(Configuration) problem with remote debugging from x86_64 to aarch64 #72

Closed janboelke closed 1 year ago

janboelke commented 2 years ago

Hello,

I am trying out the cdt-gdb-vscode extension in eclipse Theia on Windows. I want to attach to a gdbserver that is already running on localhost.

I tried it with the native-debug extension and it works out of the box (https://open-vsx.org/extension/webfreak/debug).

However using the cdt-gdb-vscode extension I cannot pause the execution of the target and I get no thread name. My launch configuration looks like the following

{ "name": "Attach to VDK (CDT)", "type": "gdbtarget", "request": "attach", "program": "\<path to executable>", "gdb": "\<path to aarch64-linux-gnu-gdb>", "verbose": "false", "openGdbConsole": "true", "target": { "host": "\<host>", "port": "\<port>" }

The way the debug UI looks like image

In the Debug console I can also see messages that indicate success of pausing the main thread: From client: pause({"threadId":1}) To client: {"seq":0,"type":"response","request_seq":9,"command":"pause","success":true}

However the executable is not suspended, and the UI also does not indicate the target as suspended.

Are there still known limitations or do you have any idea what might be wrongly configured?

Thanks and best regards, Jan

jonahgraham commented 2 years ago

Sorry for the delay in responding - still catching up after being away for the summer. I know there were some issues with pausing on Windows host that I recently solved (by moving to using mi-async by default) by fixing https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/issues/28 - I wonder if Theia is still pulling in an older version. I'll check on that and get back to you.

jonahgraham commented 2 years ago

To be explicit, AFAIK on Windows hosts, prior to the fix for https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/issues/28, pause simply didn't work.

James18999 commented 2 years ago

To be explicit, AFAIK on Windows hosts, prior to the fix for eclipse-cdt-cloud/cdt-gdb-adapter#28, pause simply didn't work.

i want to customize using different gdb and gcc for debugging,how to config the launch.json file?Is there any relevant document to introduce it

https://github.com/eclipse-theia/theia-cpp-extensions/blob/master/examples/cpp-debug-workspace/.theia/launch.json

i think the lauch.json in the website above is incomplete

jonahgraham commented 2 years ago

They are documented using the self documentation of the package.json combined with the auto complete + hover in VSCode (I assume Theia does the same autocomplete/hovering?) starting here:

https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode/blob/43e8a8c68dd2dc966ea8779f33c8bcc101395b4d/package.json#L52-L59

James18999 commented 2 years ago

They are documented using the self documentation of the package.json combined with the auto complete + hover in VSCode (I assume Theia does the same autocomplete/hovering?) starting here:

https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode/blob/43e8a8c68dd2dc966ea8779f33c8bcc101395b4d/package.json#L52-L59

”To be explicit, AFAIK on Windows hosts, prior to the fix for https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/issues/28, pause simply didn't work.“

Now debug can pause successfully?if don't,when will it work?

Now I use the version of cdt-gdb-vscode is 0.0.92,debug can't pause

jonahgraham commented 2 years ago

0.0.93 is the current version with pause fixed.

James18999 commented 2 years ago

0.0.93 is the current version with pause fixed.

thank you,it's working

jonahgraham commented 1 year ago

Issue was resolved, just forgot to close it at the time.