We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`telescope -r` should always display the input address
`telescope -r addr` will skip displaying `addr` if the value at that address is equal to the previous few values:
```
pwndbg> p &target_address
$1 = (unsigned long *) 0x5555555582a0 <target_address>
pwndbg> telescope -r &target_address
00:0000│     0x555555558208 (buf+360) ◂— 0x0
... ↓        4 skipped
05:0028│ rax 0x555555558230 (buf+400) ◂— 0x80
06:0030│     0x555555558238 (buf+408) ◂— 0x0
... ↓        13 skipped
```
We should make this command always display the address that the user asked for:
```
pwndbg> telescope -r &target_address
00:0000│     0x555555558208 (buf+360) ◂— 0x0
... ↓        4 skipped
05:0028│ rax 0x555555558230 (buf+400) ◂— 0x80
06:0030│     0x555555558238 (buf+408) ◂— 0x0
... ↓        12 skipped
13:0098│     0x5555555582a0 (target_address) ◂— 0x0
```

--- 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 """
2 Prints out pointer chains starting at some address in memory.
3 
4 Generally used to print out the stack or register values.
5 """
6 
7 import argparse
8 import collections
9 import math
10 from typing import List
11 
12 import pwndbg.chain
13 import pwndbg.color.telescope as T
14 import pwndbg.commands
15 import pwndbg.gdblib.arch
16 import pwndbg.gdblib.config
17 import pwndbg.gdblib.memory
18 import pwndbg.gdblib.regs
19 import pwndbg.gdblib.typeinfo
20 from pwndbg.color import theme
21 from pwndbg.commands import CommandCategory
22 
23 telescope_lines = pwndbg.gdblib.config.add_param(
24     "telescope-lines", 8, "number of lines to printed by the telescope command"
25 )
26 skip_repeating_values = pwndbg.gdblib.config.add_param(
27     "telescope-skip-repeating-val",
28     True,
29     "whether to skip repeating values of the telescope command",
30 )
31 skip_repeating_values_minimum = pwndbg.gdblib.config.add_param(
32     "telescope-skip-repeating-val-minimum",
33     3,
34     "minimum amount of repeated values before skipping lines",
35 )
36 
37 offset_separator = theme.add_param(
38     "telescope-offset-separator", "│", "offset separator of the telescope command"
39 )
40 offset_delimiter = theme.add_param(
41     "telescope-offset-delimiter", ":", "offset delimiter of the telescope command"
42 )
43 repeating_marker = theme.add_param(
44     "telescope-repeating-marker", "... ↓", "repeating values marker of the telescope command"
45 )
46 
47 
48 parser = argparse.ArgumentParser(
49     description="Recursively dereferences pointers starting at the specified address."
50 )
51 parser.add_argument(
52     "-r",
53     "--reverse",
54     dest="reverse",
55     action="store_true",
56     default=False,
57     help="Show <count> previous addresses instead of next ones",
58 )
59 
60 parser.add_argument(
61     "address", nargs="?", default="$sp", type=int, help="The address to telescope at."
62 )
63 
64 parser.add_argument(
65     "count", nargs="?", default=telescope_lines, type=int, help="The number of lines to show."
66 )
67 
68 
69 @pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.MEMORY)
70 @pwndbg.commands.OnlyWhenRunning
71 def telescope(address=None, count=telescope_lines, to_string=False, reverse=False):
72     """
73     Recursively dereferences pointers starting at the specified address
74     ($sp by default)
75     """
76     ptrsize = pwndbg.gdblib.typeinfo.ptrsize
77     if telescope.repeat:
78         address = telescope.last_address + ptrsize
79         telescope.offset += 1
80     else:
81         telescope.offset = 0
82 
83     address = int(address if address else pwndbg.gdblib.regs.sp) & pwndbg.gdblib.arch.ptrmask
84     count = max(int(count), 1) & pwndbg.gdblib.arch.ptrmask
85     delimiter = T.delimiter(offset_delimiter)
86     separator = T.separator(offset_separator)
87 
88     # Allow invocation of "telescope 20" to dump 20 bytes at the stack pointer
89     if address < pwndbg.gdblib.memory.MMAP_MIN_ADDR and not pwndbg.gdblib.memory.peek(address):
90         count = address
91         address = pwndbg.gdblib.regs.sp
92 
93     # Allow invocation of telescope -r to dump previous addresses
94     if reverse:
95         address -= (count - 1) * ptrsize
96 
97     # Allow invocation of "telescope a b" to dump all bytes from A to B
98     if int(address) <= int(count):
99         # adjust count if it is an address. use ceil division as count is number of
100         # ptrsize values and we don't want to strip out a value if dest is unaligned
101         count -= address
102         count = max(math.ceil(count / ptrsize), 1)
103 
104     reg_values = collections.defaultdict(lambda: [])
105     for reg in pwndbg.gdblib.regs.common:
106         reg_values[pwndbg.gdblib.regs[reg]].append(reg)
107 
108     start = address
109     stop = address + (count * ptrsize)
110     step = ptrsize
111 
112     # Find all registers which show up in the trace
113     regs = {}
114     for i in range(start, stop, step):
115         values = list(reg_values[i])
116 
117         for width in range(1, pwndbg.gdblib.arch.ptrsize):
118             values.extend("%s-%i" % (r, width) for r in reg_values[i + width])
119 
120         regs[i] = " ".join(values)
121 
122     # Find the longest set of register information
123     if regs:
124         longest_regs = max(map(len, regs.values()))
125     else:
126         longest_regs = 0
127 
128     # Print everything out
129     result = []
130     last = None
131     collapse_buffer: List[str] = []
132     skipped_padding = (
133         2
134         + len(offset_delimiter)
135         + 4
136         + len(offset_separator)
137         + 1
138         + longest_regs
139         + 1
140         - len(repeating_marker)
141     )
142 
143     # Collapse repeating values exceeding minimum delta.
144     def collapse_repeating_values() -> None:
145         # The first line was already printed, hence increment by 1
146         if collapse_buffer and len(collapse_buffer) + 1 >= skip_repeating_values_minimum:
147             result.append(
148                 T.repeating_marker(
149                     "%s%s%i skipped"
150                     % (repeating_marker, " " * skipped_padding, len(collapse_buffer))
151                 )
152             )
153         else:
154             result.extend(collapse_buffer)
155         collapse_buffer.clear()
156 
157     for i, addr in enumerate(range(start, stop, step)):
158         if not pwndbg.gdblib.memory.peek(addr):
159             collapse_repeating_values()
160             result.append("<Could not read memory at %#x>" % addr)
161             break
162 
163         line = " ".join(
164             (
165                 T.offset(
166                     "%02x%s%04x%s"
167                     % (
168                         i + telescope.offset,
169                         delimiter,
170                         addr - start + (telescope.offset * ptrsize),
171                         separator,
172                     )
173                 ),
174                 T.register(regs[addr].ljust(longest_regs)),
175                 pwndbg.chain.format(addr),
176             )
177         )
178 
179         # Buffer repeating values.
180         if skip_repeating_values:
181             value = pwndbg.gdblib.memory.pvoid(addr)
182             if last == value:
183                 collapse_buffer.append(line)
184                 continue
185             collapse_repeating_values()
186             last = value
187 
188         result.append(line)
189 
190     collapse_repeating_values()
191     telescope.offset += i
192     telescope.last_address = addr
193 
194     if not to_string:
195         print("\n".join(result))
196 
197     return result
198 
199 
200 parser = argparse.ArgumentParser(
201     description="Dereferences on stack data with specified count and offset."
202 )
203 parser.add_argument("count", nargs="?", default=8, type=int, help="number of element to dump")
204 parser.add_argument(
205     "offset",
206     nargs="?",
207     default=0,
208     type=int,
209     help="Element offset from $sp (support negative offset)",
210 )
211 
212 
213 @pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.STACK)
214 @pwndbg.commands.OnlyWhenRunning
215 def stack(count, offset) -> None:
216     ptrsize = pwndbg.gdblib.typeinfo.ptrsize
217     telescope.repeat = stack.repeat
218     telescope(address=pwndbg.gdblib.regs.sp + offset * ptrsize, count=count)
219 
220 
221 telescope.last_address = 0
222 telescope.offset = 0
223
```
--- 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
@@ -81,6 +81,7 @@
         telescope.offset = 0
 
     address = int(address if address else pwndbg.gdblib.regs.sp) & pwndbg.gdblib.arch.ptrmask
+    input_address = address
     count = max(int(count), 1) & pwndbg.gdblib.arch.ptrmask
     delimiter = T.delimiter(offset_delimiter)
     separator = T.separator(offset_separator)
@@ -179,7 +180,7 @@
         # Buffer repeating values.
         if skip_repeating_values:
             value = pwndbg.gdblib.memory.pvoid(addr)
-            if last == value:
+            if last == value and addr != input_address:
                 collapse_buffer.append(line)
                 continue
             collapse_repeating_values()

{"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@@ -81,6 +81,7 @@\n         telescope.offset = 0\n \n     address = int(address if address else pwndbg.gdblib.regs.sp) & pwndbg.gdblib.arch.ptrmask\n+    input_address = address\n     count = max(int(count), 1) & pwndbg.gdblib.arch.ptrmask\n     delimiter = T.delimiter(offset_delimiter)\n     separator = T.separator(offset_separator)\n@@ -179,7 +180,7 @@\n         # Buffer repeating values.\n         if skip_repeating_values:\n             value = pwndbg.gdblib.memory.pvoid(addr)\n-            if last == value:\n+            if last == value and addr != input_address:\n                 collapse_buffer.append(line)\n                 continue\n             collapse_repeating_values()\n", "issue": "`telescope -r` should always display the input address\n`telescope -r addr` will skip displaying `addr` if the value at that address is equal to the previous few values:\r\n```\r\npwndbg> p &target_address\r\n$1 = (unsigned long *) 0x5555555582a0 <target_address>\r\npwndbg> telescope -r &target_address\r\n00:0000\u2502     0x555555558208 (buf+360) \u25c2\u2014 0x0\r\n... \u2193        4 skipped\r\n05:0028\u2502 rax 0x555555558230 (buf+400) \u25c2\u2014 0x80\r\n06:0030\u2502     0x555555558238 (buf+408) \u25c2\u2014 0x0\r\n... \u2193        13 skipped\r\n```\r\nWe should make this command always display the address that the user asked for:\r\n```\r\npwndbg> telescope -r &target_address\r\n00:0000\u2502     0x555555558208 (buf+360) \u25c2\u2014 0x0\r\n... \u2193        4 skipped\r\n05:0028\u2502 rax 0x555555558230 (buf+400) \u25c2\u2014 0x80\r\n06:0030\u2502     0x555555558238 (buf+408) \u25c2\u2014 0x0\r\n... \u2193        12 skipped\r\n13:0098\u2502     0x5555555582a0 (target_address) \u25c2\u2014 0x0\r\n```\n", "before_files": [{"content": "\"\"\"\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\nfrom typing import List\n\nimport pwndbg.chain\nimport pwndbg.color.telescope as T\nimport pwndbg.commands\nimport pwndbg.gdblib.arch\nimport pwndbg.gdblib.config\nimport pwndbg.gdblib.memory\nimport pwndbg.gdblib.regs\nimport pwndbg.gdblib.typeinfo\nfrom pwndbg.color import theme\nfrom pwndbg.commands import CommandCategory\n\ntelescope_lines = pwndbg.gdblib.config.add_param(\n    \"telescope-lines\", 8, \"number of lines to printed by the telescope command\"\n)\nskip_repeating_values = pwndbg.gdblib.config.add_param(\n    \"telescope-skip-repeating-val\",\n    True,\n    \"whether to skip repeating values of the telescope command\",\n)\nskip_repeating_values_minimum = pwndbg.gdblib.config.add_param(\n    \"telescope-skip-repeating-val-minimum\",\n    3,\n    \"minimum amount of repeated values before skipping lines\",\n)\n\noffset_separator = theme.add_param(\n    \"telescope-offset-separator\", \"\u2502\", \"offset separator of the telescope command\"\n)\noffset_delimiter = theme.add_param(\n    \"telescope-offset-delimiter\", \":\", \"offset delimiter of the telescope command\"\n)\nrepeating_marker = theme.add_param(\n    \"telescope-repeating-marker\", \"... \u2193\", \"repeating values marker of the telescope command\"\n)\n\n\nparser = argparse.ArgumentParser(\n    description=\"Recursively dereferences pointers starting at the specified address.\"\n)\nparser.add_argument(\n    \"-r\",\n    \"--reverse\",\n    dest=\"reverse\",\n    action=\"store_true\",\n    default=False,\n    help=\"Show <count> previous addresses instead of next ones\",\n)\n\nparser.add_argument(\n    \"address\", nargs=\"?\", default=\"$sp\", type=int, help=\"The address to telescope at.\"\n)\n\nparser.add_argument(\n    \"count\", nargs=\"?\", default=telescope_lines, type=int, help=\"The number of lines to show.\"\n)\n\n\n@pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.MEMORY)\n@pwndbg.commands.OnlyWhenRunning\ndef telescope(address=None, count=telescope_lines, to_string=False, reverse=False):\n    \"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\"\n    ptrsize = pwndbg.gdblib.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.gdblib.regs.sp) & pwndbg.gdblib.arch.ptrmask\n    count = max(int(count), 1) & pwndbg.gdblib.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.gdblib.memory.MMAP_MIN_ADDR and not pwndbg.gdblib.memory.peek(address):\n        count = address\n        address = pwndbg.gdblib.regs.sp\n\n    # Allow invocation of telescope -r to dump previous addresses\n    if reverse:\n        address -= (count - 1) * ptrsize\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.gdblib.regs.common:\n        reg_values[pwndbg.gdblib.regs[reg]].append(reg)\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.gdblib.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: List[str] = []\n    skipped_padding = (\n        2\n        + len(offset_delimiter)\n        + 4\n        + len(offset_separator)\n        + 1\n        + longest_regs\n        + 1\n        - len(repeating_marker)\n    )\n\n    # Collapse repeating values exceeding minimum delta.\n    def collapse_repeating_values() -> None:\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(\n                T.repeating_marker(\n                    \"%s%s%i skipped\"\n                    % (repeating_marker, \" \" * skipped_padding, len(collapse_buffer))\n                )\n            )\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.gdblib.memory.peek(addr):\n            collapse_repeating_values()\n            result.append(\"<Could not read memory at %#x>\" % addr)\n            break\n\n        line = \" \".join(\n            (\n                T.offset(\n                    \"%02x%s%04x%s\"\n                    % (\n                        i + telescope.offset,\n                        delimiter,\n                        addr - start + (telescope.offset * ptrsize),\n                        separator,\n                    )\n                ),\n                T.register(regs[addr].ljust(longest_regs)),\n                pwndbg.chain.format(addr),\n            )\n        )\n\n        # Buffer repeating values.\n        if skip_repeating_values:\n            value = pwndbg.gdblib.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    collapse_repeating_values()\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(\n    description=\"Dereferences on stack data with specified count and offset.\"\n)\nparser.add_argument(\"count\", nargs=\"?\", default=8, type=int, help=\"number of element to dump\")\nparser.add_argument(\n    \"offset\",\n    nargs=\"?\",\n    default=0,\n    type=int,\n    help=\"Element offset from $sp (support negative offset)\",\n)\n\n\n@pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.STACK)\n@pwndbg.commands.OnlyWhenRunning\ndef stack(count, offset) -> None:\n    ptrsize = pwndbg.gdblib.typeinfo.ptrsize\n    telescope.repeat = stack.repeat\n    telescope(address=pwndbg.gdblib.regs.sp + offset * ptrsize, count=count)\n\n\ntelescope.last_address = 0\ntelescope.offset = 0\n", "path": "pwndbg/commands/telescope.py"}], "after_files": [{"content": "\"\"\"\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\nfrom typing import List\n\nimport pwndbg.chain\nimport pwndbg.color.telescope as T\nimport pwndbg.commands\nimport pwndbg.gdblib.arch\nimport pwndbg.gdblib.config\nimport pwndbg.gdblib.memory\nimport pwndbg.gdblib.regs\nimport pwndbg.gdblib.typeinfo\nfrom pwndbg.color import theme\nfrom pwndbg.commands import CommandCategory\n\ntelescope_lines = pwndbg.gdblib.config.add_param(\n    \"telescope-lines\", 8, \"number of lines to printed by the telescope command\"\n)\nskip_repeating_values = pwndbg.gdblib.config.add_param(\n    \"telescope-skip-repeating-val\",\n    True,\n    \"whether to skip repeating values of the telescope command\",\n)\nskip_repeating_values_minimum = pwndbg.gdblib.config.add_param(\n    \"telescope-skip-repeating-val-minimum\",\n    3,\n    \"minimum amount of repeated values before skipping lines\",\n)\n\noffset_separator = theme.add_param(\n    \"telescope-offset-separator\", \"\u2502\", \"offset separator of the telescope command\"\n)\noffset_delimiter = theme.add_param(\n    \"telescope-offset-delimiter\", \":\", \"offset delimiter of the telescope command\"\n)\nrepeating_marker = theme.add_param(\n    \"telescope-repeating-marker\", \"... \u2193\", \"repeating values marker of the telescope command\"\n)\n\n\nparser = argparse.ArgumentParser(\n    description=\"Recursively dereferences pointers starting at the specified address.\"\n)\nparser.add_argument(\n    \"-r\",\n    \"--reverse\",\n    dest=\"reverse\",\n    action=\"store_true\",\n    default=False,\n    help=\"Show <count> previous addresses instead of next ones\",\n)\n\nparser.add_argument(\n    \"address\", nargs=\"?\", default=\"$sp\", type=int, help=\"The address to telescope at.\"\n)\n\nparser.add_argument(\n    \"count\", nargs=\"?\", default=telescope_lines, type=int, help=\"The number of lines to show.\"\n)\n\n\n@pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.MEMORY)\n@pwndbg.commands.OnlyWhenRunning\ndef telescope(address=None, count=telescope_lines, to_string=False, reverse=False):\n    \"\"\"\n    Recursively dereferences pointers starting at the specified address\n    ($sp by default)\n    \"\"\"\n    ptrsize = pwndbg.gdblib.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.gdblib.regs.sp) & pwndbg.gdblib.arch.ptrmask\n    input_address = address\n    count = max(int(count), 1) & pwndbg.gdblib.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.gdblib.memory.MMAP_MIN_ADDR and not pwndbg.gdblib.memory.peek(address):\n        count = address\n        address = pwndbg.gdblib.regs.sp\n\n    # Allow invocation of telescope -r to dump previous addresses\n    if reverse:\n        address -= (count - 1) * ptrsize\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.gdblib.regs.common:\n        reg_values[pwndbg.gdblib.regs[reg]].append(reg)\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.gdblib.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: List[str] = []\n    skipped_padding = (\n        2\n        + len(offset_delimiter)\n        + 4\n        + len(offset_separator)\n        + 1\n        + longest_regs\n        + 1\n        - len(repeating_marker)\n    )\n\n    # Collapse repeating values exceeding minimum delta.\n    def collapse_repeating_values() -> None:\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(\n                T.repeating_marker(\n                    \"%s%s%i skipped\"\n                    % (repeating_marker, \" \" * skipped_padding, len(collapse_buffer))\n                )\n            )\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.gdblib.memory.peek(addr):\n            collapse_repeating_values()\n            result.append(\"<Could not read memory at %#x>\" % addr)\n            break\n\n        line = \" \".join(\n            (\n                T.offset(\n                    \"%02x%s%04x%s\"\n                    % (\n                        i + telescope.offset,\n                        delimiter,\n                        addr - start + (telescope.offset * ptrsize),\n                        separator,\n                    )\n                ),\n                T.register(regs[addr].ljust(longest_regs)),\n                pwndbg.chain.format(addr),\n            )\n        )\n\n        # Buffer repeating values.\n        if skip_repeating_values:\n            value = pwndbg.gdblib.memory.pvoid(addr)\n            if last == value and addr != input_address:\n                collapse_buffer.append(line)\n                continue\n            collapse_repeating_values()\n            last = value\n\n        result.append(line)\n\n    collapse_repeating_values()\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(\n    description=\"Dereferences on stack data with specified count and offset.\"\n)\nparser.add_argument(\"count\", nargs=\"?\", default=8, type=int, help=\"number of element to dump\")\nparser.add_argument(\n    \"offset\",\n    nargs=\"?\",\n    default=0,\n    type=int,\n    help=\"Element offset from $sp (support negative offset)\",\n)\n\n\n@pwndbg.commands.ArgparsedCommand(parser, category=CommandCategory.STACK)\n@pwndbg.commands.OnlyWhenRunning\ndef stack(count, offset) -> None:\n    ptrsize = pwndbg.gdblib.typeinfo.ptrsize\n    telescope.repeat = stack.repeat\n    telescope(address=pwndbg.gdblib.regs.sp + offset * ptrsize, count=count)\n\n\ntelescope.last_address = 0\ntelescope.offset = 0\n", "path": "pwndbg/commands/telescope.py"}]}