(gdb) target remote ... Invalid Argument

I’m having some trouble connecting gdb to the sys161 debug output of the kernel.

These are the steps I took:

  1. sys161 -w kernel (in root folder)
  2. os161-gdb kernel (in root folder)
  3. target remote unix:.sockets/gdb

Step 3) returns with the error below:
unix:.sockets/gdb: Invalid argument.

Any help would be appreciated. Thanks.

Yu Peng

I’m also using the Windows Subsystem for Linux, if that’s relevant.

For others who face the same problem, there’s a workaround.

  1. start your kernel
    $ sys161 -w -p 8091 kernel (wait for debugger) (use tcp port 8091)

  2. start your debugger
    $os161-gdb kernel

  3. connect debugger to kernel on specified tcp port
    (gdb) target remote :8091