We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
telescope should not fold single values, should probably be configurable
In this screenshot, we should simply display the 0x28 and 0x90 and 0x108 offset in the stack trace.  The ellipsis isn't particularly useful here, and actually adds to cognitive load due to having to check how many values are skipped.

This should probably be behind a config, e.g. `telescope-fold-minimum` which is expressed in pointer widths.  This will allow people to control the setting to their choosing (or disable folding it with a value of 0 or -1 or something).

![](https://user-images.githubusercontent.com/10009354/85929449-471e9780-b8b5-11ea-86c6-d4191845f781.png)


--- 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/telescope.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 Prints out pointer chains starting at some address in memory.
5 
6 Generally used to print out the stack or register values.
7 """
8 
9 import argparse
10 import collections
11 import math
12 
13 import pwndbg.arch
14 import pwndbg.chain
15 import pwndbg.color.telescope as T
16 import pwndbg.color.theme as theme
17 import pwndbg.commands
18 import pwndbg.config
19 import pwndbg.memory
20 import pwndbg.regs
21 import pwndbg.typeinfo
22 
23 telescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')
24 skip_repeating_values = pwndbg.config.Parameter('telescope-skip-repeating-val', True,
25                                                 'whether to skip repeating values of the telescope command')
26 
27 offset_separator = theme.Parameter('telescope-offset-separator', '│', 'offset separator of the telescope command')
28 offset_delimiter = theme.Parameter('telescope-offset-delimiter', ':', 'offset delimiter of the telescope command')
29 repeating_marker = theme.Parameter('telescope-repeating-marker', '... ↓',
30                                    'repeating values marker of the telescope command')
31 
32 
33 parser = argparse.ArgumentParser(description="""
34     Recursively dereferences pointers starting at the specified address
35     ($sp by default)
36     """)
37 parser.add_argument("address", nargs="?", default=None, type=int, help="The address to telescope at.")
38 parser.add_argument("count", nargs="?", default=telescope_lines, type=int, help="The number of lines to show.")
39 @pwndbg.commands.ArgparsedCommand(parser)
40 @pwndbg.commands.OnlyWhenRunning
41 def telescope(address=None, count=telescope_lines, to_string=False):
42     """
43     Recursively dereferences pointers starting at the specified address
44     ($sp by default)
45     """
46     ptrsize   = pwndbg.typeinfo.ptrsize
47     if telescope.repeat:
48         address = telescope.last_address + ptrsize
49         telescope.offset += 1
50     else:
51         telescope.offset = 0
52 
53     address = int(address if address else pwndbg.regs.sp) & pwndbg.arch.ptrmask
54     count   = max(int(count), 1) & pwndbg.arch.ptrmask
55     delimiter = T.delimiter(offset_delimiter)
56     separator = T.separator(offset_separator)
57 
58     # Allow invocation of "telescope 20" to dump 20 bytes at the stack pointer
59     if address < pwndbg.memory.MMAP_MIN_ADDR and not pwndbg.memory.peek(address):
60         count   = address
61         address = pwndbg.regs.sp
62 
63     # Allow invocation of "telescope a b" to dump all bytes from A to B
64     if int(address) <= int(count):
65         # adjust count if it is an address. use ceil division as count is number of
66         # ptrsize values and we don't want to strip out a value if dest is unaligned
67         count -= address
68         count = max(math.ceil(count / ptrsize), 1)
69 
70     reg_values = collections.defaultdict(lambda: [])
71     for reg in pwndbg.regs.common:
72         reg_values[pwndbg.regs[reg]].append(reg)
73     # address    = pwndbg.memory.poi(pwndbg.typeinfo.ppvoid, address)
74 
75     start = address
76     stop  = address + (count*ptrsize)
77     step  = ptrsize
78 
79     # Find all registers which show up in the trace
80     regs = {}
81     for i in range(start, stop, step):
82         values = list(reg_values[i])
83 
84         for width in range(1, pwndbg.arch.ptrsize):
85             values.extend('%s-%i' % (r,width) for r in reg_values[i+width])
86 
87         regs[i] = ' '.join(values)
88 
89     # Find the longest set of register information
90     if regs:
91         longest_regs = max(map(len, regs.values())) + 1
92     else:
93         longest_regs = 0
94 
95     # Print everything out
96     result = []
97     last   = None
98     skip   = False
99     for i,addr in enumerate(range(start, stop, step)):
100         if not pwndbg.memory.peek(addr):
101             result.append("<Could not read memory at %#x>" % addr)
102             break
103 
104         # Collapse repeating values.
105         value = pwndbg.memory.pvoid(addr)
106         if skip_repeating_values and last == value:
107             if not skip:
108                 result.append(T.repeating_marker('%s' % repeating_marker))
109                 skip = True
110             continue
111         last = value
112         skip = False
113 
114         line = ' '.join((T.offset("%02x%s%04x%s" % (i + telescope.offset, delimiter,
115                                                     addr - start + (telescope.offset * ptrsize), separator)),
116                          T.register(regs[addr].ljust(longest_regs)),
117                          pwndbg.chain.format(addr)))
118         result.append(line)
119     telescope.offset += i
120     telescope.last_address = addr
121 
122     if not to_string:
123         print('\n'.join(result))
124 
125     return result
126 
127 
128 parser = argparse.ArgumentParser(description='dereferences on stack data with specified count and offset.')
129 parser.add_argument('count', nargs='?', default=8, type=int,
130                     help='number of element to dump')
131 parser.add_argument('offset', nargs='?', default=0, type=int,
132                     help='Element offset from $sp (support negative offset)')
133 
134 
135 @pwndbg.commands.ArgparsedCommand(parser)
136 @pwndbg.commands.OnlyWhenRunning
137 def stack(count, offset):
138     ptrsize = pwndbg.typeinfo.ptrsize
139     telescope.repeat = stack.repeat
140     telescope(address=pwndbg.regs.sp + offset * ptrsize, count=count)
141 
142 
143 telescope.last_address = 0
144 telescope.offset = 0
145
```
--- 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/telescope.py b/pwndbg/commands/telescope.py
--- a/pwndbg/commands/telescope.py
+++ b/pwndbg/commands/telescope.py
@@ -23,6 +23,8 @@
 telescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')
 skip_repeating_values = pwndbg.config.Parameter('telescope-skip-repeating-val', True,
                                                 'whether to skip repeating values of the telescope command')
+skip_repeating_values_minimum = pwndbg.config.Parameter('telescope-skip-repeating-val-minimum', 3,
+                                                        'minimum amount of repeated values before skipping lines')
 
 offset_separator = theme.Parameter('telescope-offset-separator', '│', 'offset separator of the telescope command')
 offset_delimiter = theme.Parameter('telescope-offset-delimiter', ':', 'offset delimiter of the telescope command')
@@ -88,34 +90,47 @@
 
     # Find the longest set of register information
     if regs:
-        longest_regs = max(map(len, regs.values())) + 1
+        longest_regs = max(map(len, regs.values()))
     else:
         longest_regs = 0
 
     # Print everything out
     result = []
-    last   = None
-    skip   = False
-    for i,addr in enumerate(range(start, stop, step)):
+    last = None
+    collapse_buffer = []
+    skipped_padding = 2 + len(offset_delimiter) + 4 + len(offset_separator) + 1 + longest_regs + 1 - len(repeating_marker)
+
+    # Collapse repeating values exceeding minimum delta.
+    def collapse_repeating_values():
+        # The first line was already printed, hence increment by 1
+        if collapse_buffer and len(collapse_buffer) + 1 >= skip_repeating_values_minimum:
+            result.append(T.repeating_marker('%s%s%i skipped' % (repeating_marker, ' ' * skipped_padding, len(collapse_buffer))))
+        else:
+            result.extend(collapse_buffer)
+        collapse_buffer.clear()
+
+    for i, addr in enumerate(range(start, stop, step)):
         if not pwndbg.memory.peek(addr):
+            collapse_repeating_values()
             result.append("<Could not read memory at %#x>" % addr)
             break
 
-        # Collapse repeating values.
-        value = pwndbg.memory.pvoid(addr)
-        if skip_repeating_values and last == value:
-            if not skip:
-                result.append(T.repeating_marker('%s' % repeating_marker))
-                skip = True
-            continue
-        last = value
-        skip = False
-
         line = ' '.join((T.offset("%02x%s%04x%s" % (i + telescope.offset, delimiter,
                                                     addr - start + (telescope.offset * ptrsize), separator)),
                          T.register(regs[addr].ljust(longest_regs)),
                          pwndbg.chain.format(addr)))
+
+        # Buffer repeating values.
+        if skip_repeating_values:
+            value = pwndbg.memory.pvoid(addr)
+            if last == value:
+                collapse_buffer.append(line)
+                continue
+            collapse_repeating_values()
+            last = value
+
         result.append(line)
+
     telescope.offset += i
     telescope.last_address = addr

{"golden_diff": "diff --git a/pwndbg/commands/telescope.py b/pwndbg/commands/telescope.py\n--- a/pwndbg/commands/telescope.py\n+++ b/pwndbg/commands/telescope.py\n@@ -23,6 +23,8 @@\n telescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')\n skip_repeating_values = pwndbg.config.Parameter('telescope-skip-repeating-val', True,\n                                                 'whether to skip repeating values of the telescope command')\n+skip_repeating_values_minimum = pwndbg.config.Parameter('telescope-skip-repeating-val-minimum', 3,\n+                                                        'minimum amount of repeated values before skipping lines')\n \n offset_separator = theme.Parameter('telescope-offset-separator', '\u2502', 'offset separator of the telescope command')\n offset_delimiter = theme.Parameter('telescope-offset-delimiter', ':', 'offset delimiter of the telescope command')\n@@ -88,34 +90,47 @@\n \n     # Find the longest set of register information\n     if regs:\n-        longest_regs = max(map(len, regs.values())) + 1\n+        longest_regs = max(map(len, regs.values()))\n     else:\n         longest_regs = 0\n \n     # Print everything out\n     result = []\n-    last   = None\n-    skip   = False\n-    for i,addr in enumerate(range(start, stop, step)):\n+    last = None\n+    collapse_buffer = []\n+    skipped_padding = 2 + len(offset_delimiter) + 4 + len(offset_separator) + 1 + longest_regs + 1 - len(repeating_marker)\n+\n+    # Collapse repeating values exceeding minimum delta.\n+    def collapse_repeating_values():\n+        # The first line was already printed, hence increment by 1\n+        if collapse_buffer and len(collapse_buffer) + 1 >= skip_repeating_values_minimum:\n+            result.append(T.repeating_marker('%s%s%i skipped' % (repeating_marker, ' ' * skipped_padding, len(collapse_buffer))))\n+        else:\n+            result.extend(collapse_buffer)\n+        collapse_buffer.clear()\n+\n+    for i, addr in enumerate(range(start, stop, step)):\n         if not pwndbg.memory.peek(addr):\n+            collapse_repeating_values()\n             result.append(\"<Could not read memory at %#x>\" % addr)\n             break\n \n-        # Collapse repeating values.\n-        value = pwndbg.memory.pvoid(addr)\n-        if skip_repeating_values and last == value:\n-            if not skip:\n-                result.append(T.repeating_marker('%s' % repeating_marker))\n-                skip = True\n-            continue\n-        last = value\n-        skip = False\n-\n         line = ' '.join((T.offset(\"%02x%s%04x%s\" % (i + telescope.offset, delimiter,\n                                                     addr - start + (telescope.offset * ptrsize), separator)),\n                          T.register(regs[addr].ljust(longest_regs)),\n                          pwndbg.chain.format(addr)))\n+\n+        # Buffer repeating values.\n+        if skip_repeating_values:\n+            value = pwndbg.memory.pvoid(addr)\n+            if last == value:\n+                collapse_buffer.append(line)\n+                continue\n+            collapse_repeating_values()\n+            last = value\n+\n         result.append(line)\n+\n     telescope.offset += i\n     telescope.last_address = addr\n", "issue": "telescope should not fold single values, should probably be configurable\nIn this screenshot, we should simply display the 0x28 and 0x90 and 0x108 offset in the stack trace.  The ellipsis isn't particularly useful here, and actually adds to cognitive load due to having to check how many values are skipped.\r\n\r\nThis should probably be behind a config, e.g. `telescope-fold-minimum` which is expressed in pointer widths.  This will allow people to control the setting to their choosing (or disable folding it with a value of 0 or -1 or something).\r\n\r\n![](https://user-images.githubusercontent.com/10009354/85929449-471e9780-b8b5-11ea-86c6-d4191845f781.png)\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nPrints out pointer chains starting at some address in memory.\n\nGenerally used to print out the stack or register values.\n\"\"\"\n\nimport argparse\nimport collections\nimport math\n\nimport pwndbg.arch\nimport pwndbg.chain\nimport pwndbg.color.telescope as T\nimport pwndbg.color.theme as theme\nimport pwndbg.commands\nimport pwndbg.config\nimport pwndbg.memory\nimport pwndbg.regs\nimport pwndbg.typeinfo\n\ntelescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')\nskip_repeating_values = pwndbg.config.Parameter('telescope-skip-repeating-val', True,\n                                                'whether to skip repeating values of the telescope command')\n\noffset_separator = theme.Parameter('telescope-offset-separator', '\u2502', 'offset separator of the telescope command')\noffset_delimiter = theme.Parameter('telescope-offset-delimiter', ':', 'offset delimiter of the telescope command')\nrepeating_marker = theme.Parameter('telescope-repeating-marker', '... \u2193',\n                                   'repeating values marker of the telescope command')\n\n\nparser = argparse.ArgumentParser(description=\"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\")\nparser.add_argument(\"address\", nargs=\"?\", default=None, type=int, help=\"The address to telescope at.\")\nparser.add_argument(\"count\", nargs=\"?\", default=telescope_lines, type=int, help=\"The number of lines to show.\")\n@pwndbg.commands.ArgparsedCommand(parser)\n@pwndbg.commands.OnlyWhenRunning\ndef telescope(address=None, count=telescope_lines, to_string=False):\n    \"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\"\n    ptrsize   = pwndbg.typeinfo.ptrsize\n    if telescope.repeat:\n        address = telescope.last_address + ptrsize\n        telescope.offset += 1\n    else:\n        telescope.offset = 0\n\n    address = int(address if address else pwndbg.regs.sp) & pwndbg.arch.ptrmask\n    count   = max(int(count), 1) & pwndbg.arch.ptrmask\n    delimiter = T.delimiter(offset_delimiter)\n    separator = T.separator(offset_separator)\n\n    # Allow invocation of \"telescope 20\" to dump 20 bytes at the stack pointer\n    if address < pwndbg.memory.MMAP_MIN_ADDR and not pwndbg.memory.peek(address):\n        count   = address\n        address = pwndbg.regs.sp\n\n    # Allow invocation of \"telescope a b\" to dump all bytes from A to B\n    if int(address) <= int(count):\n        # adjust count if it is an address. use ceil division as count is number of\n        # ptrsize values and we don't want to strip out a value if dest is unaligned\n        count -= address\n        count = max(math.ceil(count / ptrsize), 1)\n\n    reg_values = collections.defaultdict(lambda: [])\n    for reg in pwndbg.regs.common:\n        reg_values[pwndbg.regs[reg]].append(reg)\n    # address    = pwndbg.memory.poi(pwndbg.typeinfo.ppvoid, address)\n\n    start = address\n    stop  = address + (count*ptrsize)\n    step  = ptrsize\n\n    # Find all registers which show up in the trace\n    regs = {}\n    for i in range(start, stop, step):\n        values = list(reg_values[i])\n\n        for width in range(1, pwndbg.arch.ptrsize):\n            values.extend('%s-%i' % (r,width) for r in reg_values[i+width])\n\n        regs[i] = ' '.join(values)\n\n    # Find the longest set of register information\n    if regs:\n        longest_regs = max(map(len, regs.values())) + 1\n    else:\n        longest_regs = 0\n\n    # Print everything out\n    result = []\n    last   = None\n    skip   = False\n    for i,addr in enumerate(range(start, stop, step)):\n        if not pwndbg.memory.peek(addr):\n            result.append(\"<Could not read memory at %#x>\" % addr)\n            break\n\n        # Collapse repeating values.\n        value = pwndbg.memory.pvoid(addr)\n        if skip_repeating_values and last == value:\n            if not skip:\n                result.append(T.repeating_marker('%s' % repeating_marker))\n                skip = True\n            continue\n        last = value\n        skip = False\n\n        line = ' '.join((T.offset(\"%02x%s%04x%s\" % (i + telescope.offset, delimiter,\n                                                    addr - start + (telescope.offset * ptrsize), separator)),\n                         T.register(regs[addr].ljust(longest_regs)),\n                         pwndbg.chain.format(addr)))\n        result.append(line)\n    telescope.offset += i\n    telescope.last_address = addr\n\n    if not to_string:\n        print('\\n'.join(result))\n\n    return result\n\n\nparser = argparse.ArgumentParser(description='dereferences on stack data with specified count and offset.')\nparser.add_argument('count', nargs='?', default=8, type=int,\n                    help='number of element to dump')\nparser.add_argument('offset', nargs='?', default=0, type=int,\n                    help='Element offset from $sp (support negative offset)')\n\n\n@pwndbg.commands.ArgparsedCommand(parser)\n@pwndbg.commands.OnlyWhenRunning\ndef stack(count, offset):\n    ptrsize = pwndbg.typeinfo.ptrsize\n    telescope.repeat = stack.repeat\n    telescope(address=pwndbg.regs.sp + offset * ptrsize, count=count)\n\n\ntelescope.last_address = 0\ntelescope.offset = 0\n", "path": "pwndbg/commands/telescope.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nPrints out pointer chains starting at some address in memory.\n\nGenerally used to print out the stack or register values.\n\"\"\"\n\nimport argparse\nimport collections\nimport math\n\nimport pwndbg.arch\nimport pwndbg.chain\nimport pwndbg.color.telescope as T\nimport pwndbg.color.theme as theme\nimport pwndbg.commands\nimport pwndbg.config\nimport pwndbg.memory\nimport pwndbg.regs\nimport pwndbg.typeinfo\n\ntelescope_lines = pwndbg.config.Parameter('telescope-lines', 8, 'number of lines to printed by the telescope command')\nskip_repeating_values = pwndbg.config.Parameter('telescope-skip-repeating-val', True,\n                                                'whether to skip repeating values of the telescope command')\nskip_repeating_values_minimum = pwndbg.config.Parameter('telescope-skip-repeating-val-minimum', 3,\n                                                        'minimum amount of repeated values before skipping lines')\n\noffset_separator = theme.Parameter('telescope-offset-separator', '\u2502', 'offset separator of the telescope command')\noffset_delimiter = theme.Parameter('telescope-offset-delimiter', ':', 'offset delimiter of the telescope command')\nrepeating_marker = theme.Parameter('telescope-repeating-marker', '... \u2193',\n                                   'repeating values marker of the telescope command')\n\n\nparser = argparse.ArgumentParser(description=\"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\")\nparser.add_argument(\"address\", nargs=\"?\", default=None, type=int, help=\"The address to telescope at.\")\nparser.add_argument(\"count\", nargs=\"?\", default=telescope_lines, type=int, help=\"The number of lines to show.\")\n@pwndbg.commands.ArgparsedCommand(parser)\n@pwndbg.commands.OnlyWhenRunning\ndef telescope(address=None, count=telescope_lines, to_string=False):\n    \"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\"\n    ptrsize   = pwndbg.typeinfo.ptrsize\n    if telescope.repeat:\n        address = telescope.last_address + ptrsize\n        telescope.offset += 1\n    else:\n        telescope.offset = 0\n\n    address = int(address if address else pwndbg.regs.sp) & pwndbg.arch.ptrmask\n    count   = max(int(count), 1) & pwndbg.arch.ptrmask\n    delimiter = T.delimiter(offset_delimiter)\n    separator = T.separator(offset_separator)\n\n    # Allow invocation of \"telescope 20\" to dump 20 bytes at the stack pointer\n    if address < pwndbg.memory.MMAP_MIN_ADDR and not pwndbg.memory.peek(address):\n        count   = address\n        address = pwndbg.regs.sp\n\n    # Allow invocation of \"telescope a b\" to dump all bytes from A to B\n    if int(address) <= int(count):\n        # adjust count if it is an address. use ceil division as count is number of\n        # ptrsize values and we don't want to strip out a value if dest is unaligned\n        count -= address\n        count = max(math.ceil(count / ptrsize), 1)\n\n    reg_values = collections.defaultdict(lambda: [])\n    for reg in pwndbg.regs.common:\n        reg_values[pwndbg.regs[reg]].append(reg)\n    # address    = pwndbg.memory.poi(pwndbg.typeinfo.ppvoid, address)\n\n    start = address\n    stop  = address + (count*ptrsize)\n    step  = ptrsize\n\n    # Find all registers which show up in the trace\n    regs = {}\n    for i in range(start, stop, step):\n        values = list(reg_values[i])\n\n        for width in range(1, pwndbg.arch.ptrsize):\n            values.extend('%s-%i' % (r,width) for r in reg_values[i+width])\n\n        regs[i] = ' '.join(values)\n\n    # Find the longest set of register information\n    if regs:\n        longest_regs = max(map(len, regs.values()))\n    else:\n        longest_regs = 0\n\n    # Print everything out\n    result = []\n    last = None\n    collapse_buffer = []\n    skipped_padding = 2 + len(offset_delimiter) + 4 + len(offset_separator) + 1 + longest_regs + 1 - len(repeating_marker)\n\n    # Collapse repeating values exceeding minimum delta.\n    def collapse_repeating_values():\n        # The first line was already printed, hence increment by 1\n        if collapse_buffer and len(collapse_buffer) + 1 >= skip_repeating_values_minimum:\n            result.append(T.repeating_marker('%s%s%i skipped' % (repeating_marker, ' ' * skipped_padding, len(collapse_buffer))))\n        else:\n            result.extend(collapse_buffer)\n        collapse_buffer.clear()\n\n    for i, addr in enumerate(range(start, stop, step)):\n        if not pwndbg.memory.peek(addr):\n            collapse_repeating_values()\n            result.append(\"<Could not read memory at %#x>\" % addr)\n            break\n\n        line = ' '.join((T.offset(\"%02x%s%04x%s\" % (i + telescope.offset, delimiter,\n                                                    addr - start + (telescope.offset * ptrsize), separator)),\n                         T.register(regs[addr].ljust(longest_regs)),\n                         pwndbg.chain.format(addr)))\n\n        # Buffer repeating values.\n        if skip_repeating_values:\n            value = pwndbg.memory.pvoid(addr)\n            if last == value:\n                collapse_buffer.append(line)\n                continue\n            collapse_repeating_values()\n            last = value\n\n        result.append(line)\n\n    telescope.offset += i\n    telescope.last_address = addr\n\n    if not to_string:\n        print('\\n'.join(result))\n\n    return result\n\n\nparser = argparse.ArgumentParser(description='dereferences on stack data with specified count and offset.')\nparser.add_argument('count', nargs='?', default=8, type=int,\n                    help='number of element to dump')\nparser.add_argument('offset', nargs='?', default=0, type=int,\n                    help='Element offset from $sp (support negative offset)')\n\n\n@pwndbg.commands.ArgparsedCommand(parser)\n@pwndbg.commands.OnlyWhenRunning\ndef stack(count, offset):\n    ptrsize = pwndbg.typeinfo.ptrsize\n    telescope.repeat = stack.repeat\n    telescope(address=pwndbg.regs.sp + offset * ptrsize, count=count)\n\n\ntelescope.last_address = 0\ntelescope.offset = 0\n", "path": "pwndbg/commands/telescope.py"}]}