eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
28 stars 40 forks source link

Fix attach to process (non-remote case) #249

Closed jonahgraham closed 1 year ago

jonahgraham commented 1 year ago

The bug was that when doing an attach, an -exec-run would be done regardless. This meant that the already attached to process would be terminated and a new inferior would be created.

This was a regression introduced in 1893eb89150d34977ad9eaf0e806b22f3d66f0cd

To verify that the correct inferior is being communicated with I pass a command line argument to the process to be attached. After attaching I then verify the argv of the process has that command line argument.

Includes improvements to the debugClient test code to allow attachRequest to be sent as part of a connection sequence. Includes a new evaluate method to make it a one liner to check the value of an expression from a test.

Fixes #244

jonahgraham commented 1 year ago

See #245 for proper version