We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
xuntil doesn't work with PIE binaries before being run
`xuntil` was added in #604 and works except that it doesn't work with PIE binaries before being run.
This is because it expects an int argument. I'll look into using sloppy parsing.

--- 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/peda.py`
Content:
```
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 argparse
9 import sys
10 
11 import gdb
12 
13 import pwndbg.auxv
14 import pwndbg.color.message as message
15 import pwndbg.commands
16 import pwndbg.commands.context
17 import pwndbg.commands.telescope
18 import pwndbg.proc
19 
20 
21 @pwndbg.commands.ArgparsedCommand("Gets the current file.")
22 @pwndbg.commands.OnlyWhenRunning
23 def getfile():
24     print(repr(pwndbg.auxv.get().AT_EXECFN))
25 
26 @pwndbg.commands.ArgparsedCommand("Get the pid.")
27 @pwndbg.commands.OnlyWhenRunning
28 def getpid():
29     print(pwndbg.proc.pid)
30 
31 
32 parser = argparse.ArgumentParser(description='Continue execution until an address or function.')
33 parser.add_argument('target', help='Address or function to stop execution at')
34 
35 
36 @pwndbg.commands.ArgparsedCommand(parser)
37 def xuntil(target):
38     addr = int(target)
39 
40     if not pwndbg.memory.peek(addr):
41         print(message.error('Invalid address %#x' % addr))
42         return
43 
44     spec = "*%#x" % (addr)
45     b = gdb.Breakpoint(spec, temporary=True)
46     if pwndbg.proc.alive:
47         gdb.execute("continue", from_tty=False)
48     else:
49         gdb.execute("run", from_tty=False)
50 
51 xinfo = pwndbg.commands.context.context
52 xprint = pwndbg.commands.telescope.telescope
53
```
--- 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()

```

diff --git a/pwndbg/commands/peda.py b/pwndbg/commands/peda.py
--- a/pwndbg/commands/peda.py
+++ b/pwndbg/commands/peda.py
@@ -30,18 +30,27 @@
 
 
 parser = argparse.ArgumentParser(description='Continue execution until an address or function.')
-parser.add_argument('target', help='Address or function to stop execution at')
-
+parser.add_argument('target', type=str, help='Address or function to stop execution at')
 
 @pwndbg.commands.ArgparsedCommand(parser)
 def xuntil(target):
-    addr = int(target)
-
-    if not pwndbg.memory.peek(addr):
-        print(message.error('Invalid address %#x' % addr))
-        return
+    try:
+        addr = int(target,0)
+        
+        if not pwndbg.memory.peek(addr):
+            print(message.error('Invalid address %#x' % addr))
+            return
+
+        spec = "*%#x" % (addr)
+    except (TypeError, ValueError):
+        #The following gdb command will throw an error if the symbol is not defined.
+        try:
+            result = gdb.execute('info address %s' % target, to_string=True, from_tty=False)
+        except gdb.error:
+            print(message.error("Unable to resolve %s" % target))
+            return    
+        spec = target
 
-    spec = "*%#x" % (addr)
     b = gdb.Breakpoint(spec, temporary=True)
     if pwndbg.proc.alive:
         gdb.execute("continue", from_tty=False)

{"golden_diff": "diff --git a/pwndbg/commands/peda.py b/pwndbg/commands/peda.py\n--- a/pwndbg/commands/peda.py\n+++ b/pwndbg/commands/peda.py\n@@ -30,18 +30,27 @@\n \n \n parser = argparse.ArgumentParser(description='Continue execution until an address or function.')\n-parser.add_argument('target', help='Address or function to stop execution at')\n-\n+parser.add_argument('target', type=str, help='Address or function to stop execution at')\n \n @pwndbg.commands.ArgparsedCommand(parser)\n def xuntil(target):\n-    addr = int(target)\n-\n-    if not pwndbg.memory.peek(addr):\n-        print(message.error('Invalid address %#x' % addr))\n-        return\n+    try:\n+        addr = int(target,0)\n+        \n+        if not pwndbg.memory.peek(addr):\n+            print(message.error('Invalid address %#x' % addr))\n+            return\n+\n+        spec = \"*%#x\" % (addr)\n+    except (TypeError, ValueError):\n+        #The following gdb command will throw an error if the symbol is not defined.\n+        try:\n+            result = gdb.execute('info address %s' % target, to_string=True, from_tty=False)\n+        except gdb.error:\n+            print(message.error(\"Unable to resolve %s\" % target))\n+            return    \n+        spec = target\n \n-    spec = \"*%#x\" % (addr)\n     b = gdb.Breakpoint(spec, temporary=True)\n     if pwndbg.proc.alive:\n         gdb.execute(\"continue\", from_tty=False)\n", "issue": "xuntil doesn't work with PIE binaries before being run\n`xuntil` was added in #604 and works except that it doesn't work with PIE binaries before being run.\r\nThis is because it expects an int argument. I'll look into using sloppy parsing.\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 argparse\nimport sys\n\nimport gdb\n\nimport pwndbg.auxv\nimport pwndbg.color.message as message\nimport pwndbg.commands\nimport pwndbg.commands.context\nimport pwndbg.commands.telescope\nimport pwndbg.proc\n\n\n@pwndbg.commands.ArgparsedCommand(\"Gets the current file.\")\n@pwndbg.commands.OnlyWhenRunning\ndef getfile():\n    print(repr(pwndbg.auxv.get().AT_EXECFN))\n\n@pwndbg.commands.ArgparsedCommand(\"Get the pid.\")\n@pwndbg.commands.OnlyWhenRunning\ndef getpid():\n    print(pwndbg.proc.pid)\n\n\nparser = argparse.ArgumentParser(description='Continue execution until an address or function.')\nparser.add_argument('target', help='Address or function to stop execution at')\n\n\n@pwndbg.commands.ArgparsedCommand(parser)\ndef xuntil(target):\n    addr = int(target)\n\n    if not pwndbg.memory.peek(addr):\n        print(message.error('Invalid address %#x' % addr))\n        return\n\n    spec = \"*%#x\" % (addr)\n    b = gdb.Breakpoint(spec, temporary=True)\n    if pwndbg.proc.alive:\n        gdb.execute(\"continue\", from_tty=False)\n    else:\n        gdb.execute(\"run\", from_tty=False)\n\nxinfo = pwndbg.commands.context.context\nxprint = pwndbg.commands.telescope.telescope\n", "path": "pwndbg/commands/peda.py"}], "after_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 argparse\nimport sys\n\nimport gdb\n\nimport pwndbg.auxv\nimport pwndbg.color.message as message\nimport pwndbg.commands\nimport pwndbg.commands.context\nimport pwndbg.commands.telescope\nimport pwndbg.proc\n\n\n@pwndbg.commands.ArgparsedCommand(\"Gets the current file.\")\n@pwndbg.commands.OnlyWhenRunning\ndef getfile():\n    print(repr(pwndbg.auxv.get().AT_EXECFN))\n\n@pwndbg.commands.ArgparsedCommand(\"Get the pid.\")\n@pwndbg.commands.OnlyWhenRunning\ndef getpid():\n    print(pwndbg.proc.pid)\n\n\nparser = argparse.ArgumentParser(description='Continue execution until an address or function.')\nparser.add_argument('target', type=str, help='Address or function to stop execution at')\n\n@pwndbg.commands.ArgparsedCommand(parser)\ndef xuntil(target):\n    try:\n        addr = int(target,0)\n        \n        if not pwndbg.memory.peek(addr):\n            print(message.error('Invalid address %#x' % addr))\n            return\n\n        spec = \"*%#x\" % (addr)\n    except (TypeError, ValueError):\n        #The following gdb command will throw an error if the symbol is not defined.\n        try:\n            result = gdb.execute('info address %s' % target, to_string=True, from_tty=False)\n        except gdb.error:\n            print(message.error(\"Unable to resolve %s\" % target))\n            return    \n        spec = target\n\n    b = gdb.Breakpoint(spec, temporary=True)\n    if pwndbg.proc.alive:\n        gdb.execute(\"continue\", from_tty=False)\n    else:\n        gdb.execute(\"run\", from_tty=False)\n\nxinfo = pwndbg.commands.context.context\nxprint = pwndbg.commands.telescope.telescope\n", "path": "pwndbg/commands/peda.py"}]}