prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Broken `entry` command
  ### Description
  
  The `entry` command pass arguments differently then the `run` command.
  
  ### Steps to reproduce
  
  ```
  [dc@dc:pwndbg|dev *$%]$ gdb python
  Loaded 113 commands. Type pwndbg [filter] for a list.
  Reading symbols from python...(no debugging symbols found)...done.
  pwndbg> set exception-verbose on
  Set whether to print a full stacktracefor exceptions raised in Pwndbg commands to True
  pwndbg> run -c "print(1); print(2)"
  Starting program: /usr/bin/python -c "print(1); print(2)"
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/usr/lib/libthread_db.so.1".
  1
  2
  [Inferior 1 (process 20590) exited normally]
  pwndbg> entry -c "print(1); print(2)"
  ('-c', 'print(1); print(2)')
  Running '%s' run -c print(1); print(2)
  /bin/bash: -c: line 0: syntax error near unexpected token `('
  /bin/bash: -c: line 0: `exec /usr/bin/python -c print(1); print(2)'
  Traceback (most recent call last):
    File "/home/dc/installed/pwndbg/pwndbg/commands/__init__.py", line 100, in __call__
      return self.function(*args, **kwargs)
    File "/home/dc/installed/pwndbg/pwndbg/commands/__init__.py", line 181, in _OnlyWithFile
      return function(*a, **kw)
    File "/home/dc/installed/pwndbg/pwndbg/commands/start.py", line 72, in entry
      gdb.execute(run, from_tty=False)
  gdb.error: During startup program exited with code 1.
  
  If that is an issue, you can report it on https://github.com/pwndbg/pwndbg/issues
  (Please don't forget to search if it hasn't been reported before)
  PS: Pull requests are welcome
  ```
  
  ### My version
  
  ```
  pwndbg> version
  Gdb: GNU gdb (GDB) 8.0.1
  Python: 3.6.3 (default, Oct 24 2017, 14:48:20)  [GCC 7.2.0]
  Pwndbg: 1.0.0 build: 5811010
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pwndbg/commands/start.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Launches the target process after setting a breakpoint at a convenient
  5 entry point.
  6 """
  7 from __future__ import absolute_import
  8 from __future__ import division
  9 from __future__ import print_function
  10 from __future__ import unicode_literals
  11 
  12 import gdb
  13 
  14 import pwndbg.commands
  15 import pwndbg.elf
  16 import pwndbg.events
  17 import pwndbg.symbol
  18 
  19 break_on_first_instruction = False
  20 
  21 
  22 @pwndbg.events.start
  23 def on_start():
  24     global break_on_first_instruction
  25     if break_on_first_instruction:
  26         spec = "*%#x" % (int(pwndbg.elf.entry()))
  27         gdb.Breakpoint(spec, temporary=True)
  28         break_on_first_instruction = False
  29 
  30 
  31 @pwndbg.commands.Command
  32 def start(*a):
  33     """
  34     Set a breakpoint at a convenient location in the binary,
  35     generally 'main', 'init', or the entry point.
  36     """
  37     run = 'run ' + ' '.join(a)
  38 
  39     symbols = ["main",
  40                 "_main",
  41                 "start",
  42                 "_start",
  43                 "init",
  44                 "_init"]
  45 
  46     for symbol in symbols:
  47         address = pwndbg.symbol.address(symbol)
  48 
  49         if not address:
  50             continue
  51 
  52         b = gdb.Breakpoint(symbol, temporary=True)
  53         gdb.execute(run, from_tty=False, to_string=True)
  54         return
  55 
  56     # Try a breakpoint at the binary entry
  57     entry(*a)
  58 
  59 
  60 @pwndbg.commands.Command
  61 @pwndbg.commands.OnlyWithFile
  62 def entry(*a):
  63     """
  64     Set a breakpoint at the first instruction executed in
  65     the target binary.
  66     """
  67     global break_on_first_instruction
  68     break_on_first_instruction = True
  69     run = 'run ' + ' '.join(a)
  70     gdb.execute(run, from_tty=False)
  71
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/pwndbg/commands/start.py b/pwndbg/commands/start.py
  --- a/pwndbg/commands/start.py
  +++ b/pwndbg/commands/start.py
  @@ -9,6 +9,8 @@
   from __future__ import print_function
   from __future__ import unicode_literals
   
  +import shlex
  +
   import gdb
   
   import pwndbg.commands
  @@ -66,5 +68,5 @@
       """
       global break_on_first_instruction
       break_on_first_instruction = True
  -    run = 'run ' + ' '.join(a)
  +    run = 'run ' + ' '.join(map(shlex.quote, a))
       gdb.execute(run, from_tty=False)
  
verification_info: {"golden_diff": "diff --git a/pwndbg/commands/start.py b/pwndbg/commands/start.py\n--- a/pwndbg/commands/start.py\n+++ b/pwndbg/commands/start.py\n@@ -9,6 +9,8 @@\n from __future__ import print_function\n from __future__ import unicode_literals\n \n+import shlex\n+\n import gdb\n \n import pwndbg.commands\n@@ -66,5 +68,5 @@\n     \"\"\"\n     global break_on_first_instruction\n     break_on_first_instruction = True\n-    run = 'run ' + ' '.join(a)\n+    run = 'run ' + ' '.join(map(shlex.quote, a))\n     gdb.execute(run, from_tty=False)\n", "issue": "Broken `entry` command\n### Description\r\n\r\nThe `entry` command pass arguments differently then the `run` command.\r\n\r\n### Steps to reproduce\r\n\r\n```\r\n[dc@dc:pwndbg|dev *$%]$ gdb python\r\nLoaded 113 commands. Type pwndbg [filter] for a list.\r\nReading symbols from python...(no debugging symbols found)...done.\r\npwndbg> set exception-verbose on\r\nSet whether to print a full stacktracefor exceptions raised in Pwndbg commands to True\r\npwndbg> run -c \"print(1); print(2)\"\r\nStarting program: /usr/bin/python -c \"print(1); print(2)\"\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/usr/lib/libthread_db.so.1\".\r\n1\r\n2\r\n[Inferior 1 (process 20590) exited normally]\r\npwndbg> entry -c \"print(1); print(2)\"\r\n('-c', 'print(1); print(2)')\r\nRunning '%s' run -c print(1); print(2)\r\n/bin/bash: -c: line 0: syntax error near unexpected token `('\r\n/bin/bash: -c: line 0: `exec /usr/bin/python -c print(1); print(2)'\r\nTraceback (most recent call last):\r\n  File \"/home/dc/installed/pwndbg/pwndbg/commands/__init__.py\", line 100, in __call__\r\n    return self.function(*args, **kwargs)\r\n  File \"/home/dc/installed/pwndbg/pwndbg/commands/__init__.py\", line 181, in _OnlyWithFile\r\n    return function(*a, **kw)\r\n  File \"/home/dc/installed/pwndbg/pwndbg/commands/start.py\", line 72, in entry\r\n    gdb.execute(run, from_tty=False)\r\ngdb.error: During startup program exited with code 1.\r\n\r\nIf that is an issue, you can report it on https://github.com/pwndbg/pwndbg/issues\r\n(Please don't forget to search if it hasn't been reported before)\r\nPS: Pull requests are welcome\r\n```\r\n\r\n### My version\r\n\r\n```\r\npwndbg> version\r\nGdb: GNU gdb (GDB) 8.0.1\r\nPython: 3.6.3 (default, Oct 24 2017, 14:48:20)  [GCC 7.2.0]\r\nPwndbg: 1.0.0 build: 5811010\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nLaunches the target process after setting a breakpoint at a convenient\nentry point.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport gdb\n\nimport pwndbg.commands\nimport pwndbg.elf\nimport pwndbg.events\nimport pwndbg.symbol\n\nbreak_on_first_instruction = False\n\n\n@pwndbg.events.start\ndef on_start():\n    global break_on_first_instruction\n    if break_on_first_instruction:\n        spec = \"*%#x\" % (int(pwndbg.elf.entry()))\n        gdb.Breakpoint(spec, temporary=True)\n        break_on_first_instruction = False\n\n\n@pwndbg.commands.Command\ndef start(*a):\n    \"\"\"\n    Set a breakpoint at a convenient location in the binary,\n    generally 'main', 'init', or the entry point.\n    \"\"\"\n    run = 'run ' + ' '.join(a)\n\n    symbols = [\"main\",\n                \"_main\",\n                \"start\",\n                \"_start\",\n                \"init\",\n                \"_init\"]\n\n    for symbol in symbols:\n        address = pwndbg.symbol.address(symbol)\n\n        if not address:\n            continue\n\n        b = gdb.Breakpoint(symbol, temporary=True)\n        gdb.execute(run, from_tty=False, to_string=True)\n        return\n\n    # Try a breakpoint at the binary entry\n    entry(*a)\n\n\n@pwndbg.commands.Command\n@pwndbg.commands.OnlyWithFile\ndef entry(*a):\n    \"\"\"\n    Set a breakpoint at the first instruction executed in\n    the target binary.\n    \"\"\"\n    global break_on_first_instruction\n    break_on_first_instruction = True\n    run = 'run ' + ' '.join(a)\n    gdb.execute(run, from_tty=False)\n", "path": "pwndbg/commands/start.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nLaunches the target process after setting a breakpoint at a convenient\nentry point.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport shlex\n\nimport gdb\n\nimport pwndbg.commands\nimport pwndbg.elf\nimport pwndbg.events\nimport pwndbg.symbol\n\nbreak_on_first_instruction = False\n\n\n@pwndbg.events.start\ndef on_start():\n    global break_on_first_instruction\n    if break_on_first_instruction:\n        spec = \"*%#x\" % (int(pwndbg.elf.entry()))\n        gdb.Breakpoint(spec, temporary=True)\n        break_on_first_instruction = False\n\n\n@pwndbg.commands.Command\ndef start(*a):\n    \"\"\"\n    Set a breakpoint at a convenient location in the binary,\n    generally 'main', 'init', or the entry point.\n    \"\"\"\n    run = 'run ' + ' '.join(a)\n\n    symbols = [\"main\",\n                \"_main\",\n                \"start\",\n                \"_start\",\n                \"init\",\n                \"_init\"]\n\n    for symbol in symbols:\n        address = pwndbg.symbol.address(symbol)\n\n        if not address:\n            continue\n\n        b = gdb.Breakpoint(symbol, temporary=True)\n        gdb.execute(run, from_tty=False, to_string=True)\n        return\n\n    # Try a breakpoint at the binary entry\n    entry(*a)\n\n\n@pwndbg.commands.Command\n@pwndbg.commands.OnlyWithFile\ndef entry(*a):\n    \"\"\"\n    Set a breakpoint at the first instruction executed in\n    the target binary.\n    \"\"\"\n    global break_on_first_instruction\n    break_on_first_instruction = True\n    run = 'run ' + ' '.join(map(shlex.quote, a))\n    gdb.execute(run, from_tty=False)\n", "path": "pwndbg/commands/start.py"}]}