Skip to content

--gdbserver does not work for a 'core = tarantool' test #205

Open
@Totktonada

Description

@Totktonada

It did work before tarantool-1.7.2-193-g6950640d2 (exclusive).

The problem is that gdbserver is invoked as:

gdbserver :{gdbserver_port} {binary} {args} -- {gdbserver_opts}

But the sinopsis from man 1 gdbserver states:

SYNOPSIS
       gdbserver comm prog [args...]

       gdbserver --attach comm pid

       gdbserver --multi comm

Even despite that {gdbserver_opts} is always the empty string, the resulting command has -- at the end. The new versions of tarantool verifies arguments more strictly. This results to the following error when a 'core = tarantool' test is tried to run with --gdbserver option:

[001] /home/alex/projects/tarantool-meta/tarantool/extra/dist/tarantoolctl: builtin/internal.argparse.lua:105: bad argument #3: ID not valid

Proposed fix:

diff --git a/lib/server_mixins.py b/lib/server_mixins.py
index 44da01f..603934e 100644
--- a/lib/server_mixins.py
+++ b/lib/server_mixins.py
@@ -223,7 +223,7 @@ class GdbServerMixin(DebugMixin):
         "gdbserver_port": "8888",
         "gdbserver_opts": "",
         "sh_string":
-            """gdbserver :{gdbserver_port} {binary} {args} -- {gdbserver_opts}
+            """gdbserver :{gdbserver_port} {gdbserver_opts} {binary} {args}
             """
     }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions