prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  ```
  
  </issue>
  <code>
  [start of pwndbg/prompt.py]
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 from __future__ import absolute_import
  4 from __future__ import division
  5 from __future__ import print_function
  6 from __future__ import unicode_literals
  7 
  8 import gdb
  9 
  10 import pwndbg.color as C
  11 import pwndbg.events
  12 import pwndbg.gdbutils
  13 import pwndbg.memoize
  14 
  15 funcs_list_str = ', '.join(C.purple('$' + f.name) for f in pwndbg.gdbutils.functions.functions)
  16 
  17 hint_lines = (
  18     'loaded %i commands. Type %s for a list.' % (len(pwndbg.commands.commands), C.purple('pwndbg [filter]')),
  19     'created %s gdb functions (can be used with print/break)' % funcs_list_str
  20 )
  21 
  22 for line in hint_lines:
  23     print(C.light_red(pwndbg.color.bold('pwndbg: ') + line))
  24 
  25 cur = (gdb.selected_inferior(), gdb.selected_thread())
  26 
  27 
  28 def prompt_hook(*a):
  29     global cur
  30     new = (gdb.selected_inferior(), gdb.selected_thread())
  31 
  32     if cur != new:
  33         pwndbg.events.after_reload(start=False)
  34         cur = new
  35 
  36     if pwndbg.proc.alive and pwndbg.proc.thread_is_stopped:
  37         prompt_hook_on_stop(*a)
  38 
  39 
  40 @pwndbg.memoize.reset_on_stop
  41 def prompt_hook_on_stop(*a):
  42     pwndbg.commands.context.context()
  43 
  44 
  45 
  46 gdb.prompt_hook = prompt_hook
  47
  [end of pwndbg/prompt.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/pwndbg/prompt.py b/pwndbg/prompt.py
  --- a/pwndbg/prompt.py
  +++ b/pwndbg/prompt.py
  @@ -43,4 +43,5 @@
   
   
   
  +
   gdb.prompt_hook = prompt_hook
  
verification_info: {"golden_diff": "diff --git a/pwndbg/prompt.py b/pwndbg/prompt.py\n--- a/pwndbg/prompt.py\n+++ b/pwndbg/prompt.py\n@@ -43,4 +43,5 @@\n \n \n \n+\n gdb.prompt_hook = prompt_hook\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 -*-\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.color as C\nimport pwndbg.events\nimport pwndbg.gdbutils\nimport pwndbg.memoize\n\nfuncs_list_str = ', '.join(C.purple('$' + f.name) for f in pwndbg.gdbutils.functions.functions)\n\nhint_lines = (\n    'loaded %i commands. Type %s for a list.' % (len(pwndbg.commands.commands), C.purple('pwndbg [filter]')),\n    'created %s gdb functions (can be used with print/break)' % funcs_list_str\n)\n\nfor line in hint_lines:\n    print(C.light_red(pwndbg.color.bold('pwndbg: ') + line))\n\ncur = (gdb.selected_inferior(), gdb.selected_thread())\n\n\ndef prompt_hook(*a):\n    global cur\n    new = (gdb.selected_inferior(), gdb.selected_thread())\n\n    if cur != new:\n        pwndbg.events.after_reload(start=False)\n        cur = new\n\n    if pwndbg.proc.alive and pwndbg.proc.thread_is_stopped:\n        prompt_hook_on_stop(*a)\n\n\n@pwndbg.memoize.reset_on_stop\ndef prompt_hook_on_stop(*a):\n    pwndbg.commands.context.context()\n\n\n\ngdb.prompt_hook = prompt_hook\n", "path": "pwndbg/prompt.py"}]}