eclipse-cdt-cloud / cdt-gdb-adapter

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

Accumulate gdbserver output before checking for target port #300

Closed jonahgraham closed 9 months ago

jonahgraham commented 10 months ago

Because the needed output from gdbserver may not arrive as a single 'data' event on stdout we need to accumulate the output before passing it to the regex checker.

Fixes #299

jonahgraham commented 9 months ago

This change updates the regex from Listening on port ([0-9]+) to Listening on port ([0-9]+)\r?\n, all the docs for default value of serverPortRegExp say "defaults to matching a string like 'Listening on port 41551'":

https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/blob/3e91a6732cb2f6740edf15889e25dd320602c590/src/GDBTargetDebugSession.ts#L67

which means I don't think it should be a problem to change the default implementation here.