[all-commits] [llvm/llvm-project] dfbe3a: [lldb] Check that qLaunchGDBServer packet does not...

David Spickett via All-commits all-commits at lists.llvm.org
Fri Jun 30 02:12:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dfbe3a79e20f1bc51a59ee858fabce792d59c9ae
      https://github.com/llvm/llvm-project/commit/dfbe3a79e20f1bc51a59ee858fabce792d59c9ae
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    A lldb/test/API/commands/platform/launchgdbserver/Makefile
    A lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py
    A lldb/test/API/commands/platform/launchgdbserver/main.c

  Log Message:
  -----------
  [lldb] Check that qLaunchGDBServer packet does not return an error

While looking at https://github.com/llvm/llvm-project/issues/61955
I noticed that when we send qLaunchGDBServer we check that we got a response
but not what kind of response it was.

I think this was why the bug reporter saw:
(lldb) run
error: invalid host:port specification: '[192.168.64.2]'

The missing port is because we went down a path we only should have
chosen if the operation succeeded. Since we didn't check, we went ahead
with an empty port number.

To test this I've done the following:
* Make a temporary copy of lldb-server.
* Run that as a platform.
* Remove the copy.
* Attempt to create and run a target.

This fails because the running lldb-server will try to invoke itself
and it no longer exists.

Reviewed By: jasonmolenda

Differential Revision: https://reviews.llvm.org/D153513




More information about the All-commits mailing list