summaryrefslogtreecommitdiffstatshomepage
path: root/docs/source/debugger/annotation.rst
blob: 4e766257099913de9f646e0bd11d0559a2ef4a5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.. _debugger-annotation-list:

Code Annotation Debugger Commands
=================================

:ref:`debugger-command-comadd`
    adds a comment to the disassembled code at given address
:ref:`debugger-command-comdelete`
    removes a comment from the given address
:ref:`debugger-command-comsave`
    save the current comments to file
:ref:`debugger-command-comlist`
    list comments stored in the comment file for the system
:ref:`debugger-command-commit`
    combined ``comadd`` and ``comsave`` command


.. _debugger-command-comadd:

comadd
------

**comadd <address>,<comment>**

Sets the specified comment for the specified address in the disassembled
code for the visible CPU.  This command may be abbreviated to ``//``.

Examples:

``comadd 0,hello world.``
    Adds the comment “hello world.” to the code at address 0.
``// 10,undocumented opcode!``
    Adds the comment “undocumented opcode!” to the code at address 10.


.. _debugger-command-comdelete:

comdelete
---------

**comdelete**

Deletes the comment at the specified address for the visible CPU.

Examples:

``comdelete 10``
    Deletes the comment at code address 10 for the visible CPU.


.. _debugger-command-comsave:

comsave
-------

**comsave**

Saves the current comments to the XML comment file for the emulated
system.  This file will be loaded by the debugger the next time the
system is run with debugging enabled.  The directory for saving these
files is set using the
:ref:`comment_directory <mame-commandline-commentdirectory>` option.

Examples:

``comsave``
    Saves the current comments to the comment file for the system.


.. _debugger-command-comlist:

comlist
-------

**comlist**

Reads the comments stored in the XML comment file for the emulated
system and prints them to the debugger console.  This command does not
affect the comments for the current session, it reads the file directly.
The directory for these files is set using the
:ref:`comment_directory <mame-commandline-commentdirectory>` option.

Examples:

comlist
    Shows comments stored in the comment file for the system.


.. _debugger-command-commit:

commit
------

**commit <address>,<comment>**

Sets the specified comment for the specified address in the disassembled
code for the visible CPU, and saves comments to the file for the current
emulated system (equivalent to :ref:`debugger-command-comadd` followed
by :ref:`debugger-command-comsave`).  This command may be abbreviated to
``/*``.

Examples:

``commit 0,hello world.``
    Adds the comment “hello world.” to the code at address 0 for the
    visible CPU and saves comments.
``/* 10,undocumented opcode!``
    Adds the comment “undocumented opcode!” to the code at address 10
    for the visible CPU and saves comments.