1
0
mirror of https://github.com/mnaberez/py65.git synced 2025-04-07 11:38:20 +00:00

Rename list_breakpoints to show_breakpoints for parity with show_labels

This commit is contained in:
Mike Naberezny 2014-12-20 15:59:36 -08:00
parent 603fd31a74
commit a167471b46
3 changed files with 17 additions and 17 deletions

View File

@ -121,7 +121,7 @@ given address or label. Breakpoints are added using the
Breakpoint 0 reached.
PC AC XR YR SP NV-BDIZC
6502: ff84 00 ff 00 ff 10110000
Note that a number is assigned to each breakpoint, similar to how
VICE operates. Deleting a breakpoint can be done via the
``delete_breakpoint`` command using the breakpoint identifier given
@ -140,7 +140,7 @@ Breakpoint can be listed using the ``list_breakpoint`` command::
Breakpoint 1 added at $5678
.add_breakpoint $9ABC
Breakpoint 2 added at $9ABC
.list_breakpoints
.show_breakpoints
Breakpoint 0 : $1234
Breakpoint 1 : $5678
Breakpoint 2 : $9ABC
@ -165,7 +165,7 @@ Command Reference
Breakpoints get a numeric identifier to be used with
``delete_breakpoint``, the list of identifiers can be retrieved
with ``list_breakpoints``.
with ``show_breakpoints``.
.. describe:: add_label <address> <label>
@ -229,7 +229,7 @@ Command Reference
Breakpoint 0 removed
The list of identifiers added with ``add_breakpoint`` can be
retrieved with ``list_breakpoints``.
retrieved with ``show_breakpoints``.
.. describe:: delete_label <label>
@ -289,7 +289,7 @@ Command Reference
disassemble <address_range>
Disassemble instructions in the address range.
.. describe:: list_breakpoints
.. describe:: show_breakpoints
Lists all the breakpoints that have been set so far::
@ -299,7 +299,7 @@ Command Reference
Breakpoint 1 added at $5678
.add_breakpoint $9ABC
Breakpoint 2 added at $9ABC
.list_breakpoints
.show_breakpoints
Breakpoint 0 : $1234
Breakpoint 1 : $5678
Breakpoint 2 : $9ABC

View File

@ -148,13 +148,13 @@ class Monitor(cmd.Cmd):
'h': 'help',
'?': 'help',
'l': 'load',
'lb': 'list_breakpoints',
'm': 'mem',
'q': 'quit',
'r': 'registers',
'ret': 'return',
'rad': 'radix',
's': 'save',
'shb': 'show_breakpoints',
'shl': 'show_labels',
'x': 'quit',
'z': 'step'}
@ -814,7 +814,7 @@ class Monitor(cmd.Cmd):
self._output("delete_breakpoint <number>")
self._output("Delete the breakpoint on execution marked by the given number")
def do_list_breakpoints(self, args):
def do_show_breakpoints(self, args):
for i, address in enumerate(self._breakpoints):
if address is not None:
bpinfo = "Breakpoint %d: $%04X" % (i, address)
@ -823,8 +823,8 @@ class Monitor(cmd.Cmd):
bpinfo += " " + label
self._output(bpinfo)
def help_list_breakpoints(self):
self._output("list_breakpoints")
def help_show_breakpoints(self):
self._output("show_breakpoints")
self._output("Lists the currently assigned breakpoints")
def main(args=None):

View File

@ -523,27 +523,27 @@ class MonitorTests(unittest.TestCase):
out = stdout.getvalue()
self.assertTrue(out.startswith("*** No help on foo"))
def test_shortcut_for_list_breakpoints(self):
def test_shortcut_for_show_breakpoints(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon.do_help('lb')
mon.do_help('shb')
out = stdout.getvalue()
self.assertTrue(out.startswith('list_breakpoints'))
self.assertTrue(out.startswith('show_breakpoints'))
def test_list_breakpoints_shows_breakpoints(self):
def test_show_breakpoints_shows_breakpoints(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon._breakpoints = [0xffd2]
mon._address_parser.labels = {'chrout': 0xffd2}
mon.do_list_breakpoints('')
mon.do_show_breakpoints('')
out = stdout.getvalue()
self.assertTrue(out.startswith("Breakpoint 0: $FFD2 chrout"))
def test_list_breakpoints_ignores_deleted_breakpoints(self):
def test_show_breakpoints_ignores_deleted_breakpoints(self):
stdout = StringIO()
mon = Monitor(stdout=stdout)
mon._breakpoints = [None, 0xffd2]
mon.do_list_breakpoints('')
mon.do_show_breakpoints('')
out = stdout.getvalue()
self.assertTrue(out.startswith("Breakpoint 1: $FFD2"))