OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [help/] [debug.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<HTML>
2
<HEAD>
3
<TITLE>Debugging Help</TITLE>
4
</HEAD>
5
<BODY>
6
<H2>GDBTK Debugging Functions</H2>
7
<H4>Overview</H4>
8
<P> This describes the basic internal functions for debugging GDBTK.</P>
9
 
10
<H4>Environment Variables</H4>
11
<P><BOLD>GDBTK_DEBUG</BOLD> - Setting this variable controls the Debug
12
window.</P>
13
<P><BOLD>GDBTK_DEBUG</BOLD> may have the following values:</P>
14
<DL>
15
<DT>0 or unset</DT>
16
<DD>The Debug window is not opened and not listed on the menu. (You
17
may still open it by typing Ctrl-U in the source window.)</DD>
18
<DT>1</DT>
19
<DD>The Debug window is listed on the menu, but not opened.</DD>
20
<DT>2</DT>
21
<DD>The Debug window is opened at startup.</DD>
22
</DL>
23
 
24
<HR>
25
<P><BOLD>GDBTK_TRACE</BOLD> - This variable determines if tracing is enbabled.
26
Tracing may only be enabled at GDBTK startup.  Changing <BOLD>GDBTK_TRACE</BOLD>
27
while GDBTK is running has no effect.</P>
28
<P><BOLD>GDBTK_TRACE</BOLD> may have the following values:</P>
29
<DL>
30
<DT>0 or unset</DT>
31
<DD>Tracing is not enabled.</DD>
32
<DT>1</DT>
33
<DD>Tracing is enabled, but not started.  To start tracing, you need to do
34
so in the Debug Window or from the console. (The command to do this is "tk
35
::debug::trace_start).</DD>
36
<DT>2</DT>
37
<DD>Tracing is enabled and started immediately.</DT>
38
</DL>
39
 
40
<P><BOLD>GDBTK_DEBUGFILE</BOLD> - This variable contains an optional filename
41
where GDBTK will write all debugging information. This information will include
42
the output of all "debug" and "dbug" commands, as well as tracing, if it is
43
enabled. The value of
44
<BOLD>GDBTK_DEBUGFILE</BOLD> will not change what is displayed in the Debug
45
Window, with one exception; when the Debug Window is opened, it will read
46
the contents of <BOLD>GDBTK_DEBUGFILE</BOLD> (if it is set and not "stdout").
47
<P><BOLD>GDBTK_DEBUGFILE</BOLD> may have the following values:</P>
48
<DL>
49
<DT>unset</DT>
50
<DD>No information will be logged.</DD>
51
<DT><italic>filename</italic></DT>
52
<DD>Debugging information will be logged to <italic>filename</italic>.
53
<DT>"stdout"</DT>
54
<DD>Debugging information will be written to stdout</DD>
55
</DL>
56
<HR>
57
<H4>Tcl Debugging Functions</H4>
58
<P> All debugging functions have been moved into debug.tcl in the ::debug
59
namespace. "debug" and "dbug" are imported into the global namespace.</P>
60
<P> The following are the standard debug message functions.</P>
61
<code>
62
# -----------------------------------------------------------------------------
63
# NAME:         debug::debug
64
#
65
# SYNOPSIS:     debug { {msg ""} }
66
#
67
# DESC:         Writes a message to the proper output. The priority of the
68
#               message is assumed to be "I" (informational). This function
69
#               is provided for compatibility with the previous debug function.
70
#               For higher priority messages, use dbug.
71
#
72
# ARGS:         msg - Message to be displayed.
73
# -----------------------------------------------------------------------------
74
 
75
# -----------------------------------------------------------------------------
76
# NAME:         debug::dbug
77
#
78
# SYNOPSIS:     dbug { level msg }
79
#
80
# DESC:         Writes a message to the proper output. Unlike debug, this
81
#               function take a priority level.
82
#
83
# ARGS:         msg   - Message to be displayed.
84
#               level - One of the following:
85
#                               "I" - Informational only
86
#                               "W" - Warning
87
#                               "E" - Error
88
#                               "X" - Fatal Error
89
# ----------------------------------------------------------------------------
90
</code>
91
<P> These next functions are used to trace variables, which should not be
92
confused with the functions tracing.<P>
93
<code>
94
# ----------------------------------------------------------------------------
95
# NAME:         debug::trace_var
96
# SYNOPSIS:     debug::trace_var {varName mode}
97
# DESC:         Sets up variable trace.  When the trace is activated,
98
#               debugging messages will be displayed.
99
# ARGS:         varName - the variable name
100
#               mode - one of more of the following letters
101
#                       r - read
102
#                       w - write
103
#                       u - unset
104
# ----------------------------------------------------------------------------
105
# ----------------------------------------------------------------------------
106
# NAME:         debug::remove_trace
107
# SYNOPSIS:     debug::remove_trace {var mode}
108
# DESC:         Removes a trace set up with "trace_var".
109
# ----------------------------------------------------------------------------
110
# ----------------------------------------------------------------------------
111
# NAME:         debug::remove_all_traces
112
# SYNOPSIS:     debug::remove_all_traces
113
# DESC:         Removes all traces set up with "trace_var".
114
# ----------------------------------------------------------------------------
115
</code>
116
<P> The following two functions may be used to start and stop tracing
117
programmatically.</P>
118
<code>
119
# -----------------------------------------------------------------------------
120
# NAME:         ::debug::trace_start
121
# SYNOPSIS:     ::debug::trace_start
122
# DESC:         Starts logging of function trace information.
123
# -----------------------------------------------------------------------------
124
# -----------------------------------------------------------------------------
125
# NAME:         ::debug::trace_stop
126
# SYNOPSIS:     ::debug::trace_stop
127
# DESC:         Stops logging of function trace information.
128
# -----------------------------------------------------------------------------
129
</code>
130
</BODY>
131
</HTML>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.