Home | History | Annotate | Download | only in info

Lines Matching full:trace

111 * Trace File Format::		GDB trace file format
7303 that `$_sdata' could be empty, if not inspecting a trace buffer, or
8412 Using GDB's `trace' and `collect' commands, you can specify
8426 how to collect trace data. This functionality is implemented in the
8431 It is also possible to get trace data from a file, in a manner
8433 search through the file. *Note Trace Files::, for more details.
8442 * Trace Files::
8450 Before running such a "trace experiment", an arbitrary number of
8459 of data that you want the target to collect in the trace buffer when it
8484 instrumentation point) variables; tracepoint conditions and trace state
8501 * Trace State Variables::
8505 * Starting and Stopping Trace Experiments::
8514 `trace LOCATION'
8515 The `trace' command is very similar to the `break' command. Its
8518 `trace' command defines a tracepoint, which is a point in the
8522 next `tstart' command, and once a trace experiment is running,
8523 further changes will not have any effect until the next trace
8526 Here are some examples of using the `trace' command:
8528 (gdb) trace foo.c:121 // a source file and line number
8530 (gdb) trace +2 // 2 lines forward
8532 (gdb) trace my_function // first source line of function
8534 (gdb) trace *my_function // EXACT start address of function
8536 (gdb) trace *0x2117c4 // an address
8538 You can abbreviate `trace' as `tr'.
8540 `trace LOCATION if COND'
8556 GDB handles arguments to `ftrace' exactly as for `trace'.
8565 GDB handles arguments to `strace' exactly as for `trace', with the
8602 You can inspect this data when analyzing the trace buffer, by
8616 (gdb) delete trace 1 2 3 // remove three tracepoints
8618 (gdb) delete trace // remove all tracepoints
8634 trace experiment, but it is not forgotten. You can re-enable a
8639 tracepoints will become effective the next time a trace experiment
8650 automatically stop a trace experiment. If a tracepoint's
8651 passcount is N, then the trace experiment will be automatically
8655 passcount is given, the trace experiment will run until stopped
8665 (gdb) trace foo
8667 (gdb) trace bar
8669 (gdb) trace baz
8677 File: gdb.info, Node: Tracepoint Conditions, Next: Trace State Variables, Prev: Tracepoint Passcounts, Up: Set Tracepoints
8690 using `if' in the arguments to the `trace' command. *Note Setting
8706 collecting thousands of useless trace frames that you would have to
8709 (gdb) trace normal_operation if errcode > 0
8712 File: gdb.info, Node: Trace State Variables, Next: Tracepoint Actions, Prev: Tracepoint Conditions, Up: Set Tracepoints
8714 13.1.5 Trace State Variables
8717 A "trace state variable" is a special type of variable that is created
8723 Trace
8724 target along with tracepoint information when the trace experiment
8725 starts. There are no intrinsic limits on the number of trace state
8728 Although trace state variables are managed by the target, you can use
8731 trace experiment is running. Trace state variables share the same
8733 trace state variables with names like `$23' or `$pc', nor can you have
8734 a trace state variable and a convenience variable with the same name.
8737 The `tvariable' command creates a new trace state variable named
8748 List all the trace state variables along with their initial values.
8749 Their current values may also be displayed, if the trace
8753 Delete the given trace state variables, or all of them if no
8758 File: gdb.info, Node: Tracepoint Actions, Next: Listing Tracepoints, Prev: Trace State Variables, Up: Set Tracepoints
8796 (gdb) trace foo
8836 $yourname'. When analyzing the trace buffer, you can inspect
8850 trace state variables (*note Trace State Variables::) without
8851 adding those values to the trace buffer, as would be the case if
8902 (gdb) info trace
8916 File: gdb.info, Node: Listing Static Tracepoint Markers, Next: Starting and Stopping Trace Experiments, Prev: Listing Tracepoints, Up: Set Tracepoints
8968 File: gdb.info, Node: Starting and Stopping Trace Experiments, Next: Tracepoint Restrictions, Prev: Listing Static Tracepoint Markers, Up: Set Tracepoints
8970 13.1.9 Starting and Stopping Trace Experiments
8974 This command takes no arguments. It starts the trace experiment,
8976 discarding all the data collected in the trace buffer during the
8977 previous trace experiment.
8980 This command takes no arguments. It ends the trace experiment, and
8983 *Note*: a trace experiment and data collection may stop
8985 Tracepoint Passcounts::), or if the trace buffer becomes full.
8988 This command displays the status of the current trace data
8993 (gdb) trace gdb_c_test
9005 You can choose to continue running the trace experiment even if GDB
9008 with the trace. But for unexpected terminations (GDB crash, network
9009 outage), it would be unfortunate to lose hard-won trace data, so the
9010 variable `disconnected-tracing' lets you decide whether the trace should
9017 ask you directly what to do about a running trace no matter what
9025 When you reconnect to the target, the trace experiment may or may not
9026 still be running; it might have filled the trace buffer in the
9041 If your target agent supports a "circular trace buffer", then you
9042 can run a trace experiment indefinitely without filling the trace
9043 buffer; when space runs out, the agent deletes already-collected trace
9046 hit too often, and your trace gets terminated prematurely because the
9047 buffer is full. To ask for a circular trace buffer, simply set
9048 `circular-trace-buffer' to on. You can set this at any time, including
9052 `set circular-trace-buffer on'
9053 `set circular-trace-buffer off'
9055 for trace data. A linear buffer will not lose any trace data, but
9057 trace data, but it will have always room for the latest tracepoint
9060 `show circular-trace-buffer'
9061 Show the current choice for the trace buffer. Note that this may
9065 a trace file.
9069 File: gdb.info, Node: Tracepoint Restrictions, Prev: Starting and Stopping Trace Experiments, Up: Set Tracepoints
9086 assignment to trace state variables). Some language features may
9120 partial backtrace when using a trace frame. The number of stack
9128 tracepoint and use that when you are looking at a trace frame for
9143 examining the trace data. The basic idea is that each tracepoint
9144 collects a trace "snapshot" every time it is hit and another snapshot
9147 later. The way you examine them is to "focus" on a specific trace
9148 snapshot. When the remote stub is focused on a trace snapshot, it will
9159 * tfind:: How to select a trace snapshot
9169 The basic command for selecting a trace snapshot from the buffer is
9170 `tfind N', which finds trace snapshot number N, counting from zero. If
9180 Stop debugging trace snapshots, resume _live_ debugging.
9186 No argument means find the next trace snapshot.
9189 Find the previous trace snapshot before the current one. This
9194 proceeds forward from the last examined trace snapshot. If no
9201 trace snapshot. If no argument ADDR is given, it means find the
9215 file. Search proceeds forward from the last examined trace
9222 designed to make it easy to scan through the trace buffer. For
9223 instance, `tfind' with no argument selects the next trace snapshot, and
9224 `tfind -' with no argument selects the previous trace snapshot. So, by
9226 you can examine all the trace snapshots in order. Or, by saying `tfind
9232 argument selects the next trace snapshot collected by the same
9235 In addition to letting you scan through the trace buffer manually,
9237 the trace buffer and print out whatever collected data you are
9239 registers from each trace frame in the buffer, we can say this:
9280 the current trace snapshot.
9282 (gdb) trace 444
9296 Data collected at tracepoint 2, trace frame 1:
9335 collected value of `$pc' to distinguish between trace frames that were
9357 File: gdb.info, Node: Tracepoint Variables, Next: Trace Files, Prev: Analyze Collected Data, Up: Tracepoints
9363 The current trace snapshot (a.k.a. "frame") number, or -1 if no
9367 The tracepoint for the current trace snapshot.
9370 The line number for the current trace snapshot.
9373 The source file for the current trace snapshot.
9382 stepping through all the trace snapshots and printing some of their
9383 data. Note that these are not the same as trace state variables, which
9395 File: gdb.info, Node: Trace Files, Prev: Tracepoint Variables, Up: Tracepoints
9397 13.4 Using Trace Files
9400 In some situations, the target running a trace experiment may no longer
9403 trace data into a file, and later use that file as a source of trace
9407 Save the trace data to FILENAME. By default, this command assumes
9409 will copy raw trace data up from the target and then save it. If
9413 if the trace buffer is very large. (Note, however, that `target
9417 Use the file named FILENAME as a source of trace data. Commands
9419 possible to run any new trace experiments. `tstatus' will report
9420 the state of the trace run at the moment the data was saved, as
9421 well as the current trace frame you are examining. FILENAME must
12094 collect during a "trace
14811 `set procfs-trace'
14814 `show procfs-trace'
14818 Tell GDB to write `procfs' API trace to the named FILE. GDB
14819 appends the trace info to the previous contents of the file. The
14820 default is to display the trace on the standard output.
14823 Show the file to which `procfs' API trace is written.
14825 `proc-trace-entry'
14826 `proc-trace-exit'
16001 hardware trace. It is very similar to GDB trace, except it does not
16031 Display information about current HW trace configuration.
16034 Set starting criteria for HW trace.
16037 Set acquisition qualifier for HW trace.
16040 Set HW trace stopping criteria.
16044 trace was triggered.
16048 Enables/disables the HW trace.
16051 Clears currently recorded trace data.
16053 If filename is specified, new trace file is made and any newly
16057 Prints trace buffer, using current record configuration.
16060 Set continuous trace mode.
16063 Set suspend trace mode.
17074 `set trace-commands on'
17077 `set trace-commands off'
17080 `show trace-commands'
17816 By default, GDB will print a stack trace when an error occurs in a
18596 just the result of `to_string' in a stack trace, omitting the
19209 The command has to do with tracepoints. For example, `trace',
24835 The `-trace-find' Command
24841 -trace-find MODE [PARAMETERS...]
24843 Find a trace frame using criteria defined by MODE and PARAMETERS.
24848 No parameters are required. Stops examining trace frames.
24855 An integer is required as parameter. Finds next trace frame that
24859 An address is required as parameter. Finds next trace frame that
24863 Two addresses are required as parameters. Finds next trace frame
24869 Two addresses are required as parameters. Finds next trace frame
24876 Location::. Finds next trace frame that corresponds to a
24896 The information about the frame corresponding to the found trace
24897 frame. This field is present only if a trace frame was found.
24906 -trace-define-variable
24912 -trace-define-variable NAME [ VALUE ]
24914 Create trace variable NAME if it does not exist. If VALUE is
24915 specified, sets the initial value of the specified trace variable to
24923 -trace-list-variables
24929 -trace-list-variables
24931 Return a table of all defined trace variables. Each element of the
24935 The name of the trace variable. This field is always present.
24942 The value the trace variable has at the moment. This is a 64-bit
24944 defined, for example if the trace was never run, or is presently
24957 -trace-list-variables
24958 ^done,trace-variables={nr_rows="1",nr_cols="3",
24966 -trace-save
24972 -trace-save [-r ] FILENAME
24974 Saves the collected trace data to FILENAME. Without the `-r'
24983 -trace-start
24989 -trace-start
24999 -trace-status
25005 -trace-status
25013 `file' when examining trace file. In the latter case, examining
25014 of trace frame is possible but new tracing experiement cannot be
25026 the `-trace-stop' command. The value of `overflow' means the
25040 The `frames' field is a count of the total number of trace frames
25041 in the trace buffer, while `frames-created' is the total created
25043 circular trace buffer filled up. Both fields are optional.
25051 The value of the circular trace buffer flag. `1' means that the
25052 trace buffer is circular and old trace frames will be discarded if
25053 necessary to make room, `0' means that the trace buffer is linear
25059 trace run will stop.
25067 -trace-stop
25073 -trace-stop
25076 fields as `-trace-status', except that the `supported' and `running'
29173 When reading registers from a trace frame (*note Using the
30760 downloaded at the beginning of the trace run. TYPE is the name of
30781 Packets::, it makes both disconnected tracing and trace files much
30783 tracepoints in effect while looking at trace frames are identical
30784 to the ones in effect during the trace run; even a small
30785 discrepancy could cause `tdump' not to work, or a particular trace
30789 Create a new trace state variable, number N, with an initial value
30793 create the trace state variables as they are mentioned in
30807 The selected frame is number N in the trace frame buffer; F
30812 The selected trace
30837 tracepoint hits in the trace frame buffer. This packet supports
30842 End the tracepoint experiment. Stop collecting trace frames.
30845 Clear the table of tracepoints, and empty the trace frame buffer.
30865 Ask the stub if there is a trace experiment running right now.
30870 RUNNING is a single digit `1' if the trace is presently
30876 If the trace is not running, the agent may report any of several
30880 No trace has been run yet.
30883 The trace was stopped by a user-originated stop command.
30886 The trace stopped because the trace buffer filled up.
30889 The trace stopped because GDB disconnected from the target.
30892 The trace stopped because tracepoint TPNUM exceeded its pass
30896 The trace stopped because tracepoint TPNUM had an error. The
30902 The trace stopped for some other reason.
30907 users monitoring the progress of a trace run. If a trace has
30909 state of the just-stopped trace.
30912 The number of trace frames in the buffer.
30915 The total number of trace frames created during the run. This
30916 may be larger than the trace frame count, if the buffer is
30920 The total size of the trace buffer, in bytes.
30926 The value of the circular trace buffer flag. `1' means that
30927 the trace buffer is circular and old trace frames will be
30928 discarded if necessary to make room, `0' means that the trace
30934 the trace run will stop.
30938 Ask the stub for the value of the trace state variable number VAR.
30945 trace frame that the user is looking at. Note that multiple
30951 example, if the user is examining a trace frame in which the
30964 These packets request data about trace state variables that are on
30967 packets follow the syntax of the `QTDV' packets that define trace
31010 This packet directs the target to save trace data to the file name
31016 Return up to LEN bytes of the current contents of trace buffer,
31017 starting at OFFSET. The trace buffer is treated as if it were a
31018 contiguous collection of traceframes, as per the trace file format.
31025 This packet directs the target to use a circular trace buffer if
32608 ranges, registers and trace state variables that have been collected in
32657 Using GDB's `trace' and `collect' commands, the user can specify
32660 examine the values those expressions had when the program hit the trace
32727 on the stack. For tracing applications, `trace' bytecodes in the
33060 Push the value of trace state variable number N, without sign
33072 Set trace state variable number N to the value found on the top of
33077 `trace' (0x0c): ADDR SIZE =>
33078 Record the contents of the SIZE bytes at ADDR in a trace buffer,
33082 Record the contents of the SIZE bytes at ADDR in a trace buffer,
33084 integer following the `trace' opcode.
33087 trace', but we provide it anyway to save space in bytecode strings.
33095 Record the value of trace state variable number N in the trace
33124 `trace' bytecodes to save the pieces of memory that were used.
33126 * The user selects trace points in the program's code at which GDB
33129 * The user specifies expressions to evaluate at each trace point.
33137 * The agent arranges to be notified when a trace point is hit.
33139 * When execution on the target reaches a trace point, the agent
33140 evaluates the expressions associated with that trace point, and
33143 * Later, when the user selects a given trace event and inspects the
33304 Why do we need `trace' and `trace_quick'?
33310 Don't the `trace' bytecodes make the interpreter less general?
33313 purpose. If an expression doesn't use the `trace' bytecodes, they
33321 trace' before every memory reference. Therefore, it's okay for it
33330 const16 SIZE trace' in those cases.
33899 File: gdb.info, Node: Operating System Information, Next: Trace File Format, Prev: Target Descriptions, Up: Top
33952 File: gdb.info, Node: Trace File Format, Next: Copying, Prev: Operating System Information, Up: Top
33954 Appendix I Trace File Format
33957 The trace file comes in three parts: a header, a textual description
33958 section, and a trace frame section with binary data.
33971 The trace frame section consists of a number of consecutive frames.
33975 indicating its type (at least register, memory, and trace state
33991 Trace state variable block. This records the 8-byte signed value
33992 VALUE of trace state variable numbered NUMBER.
33995 Future enhancements of the trace file format may include additional
33999 File: gdb.info, Node: Copying, Next: GNU Free Documentation License, Prev: Trace File Format, Up: Top
35439 * -trace-define-variable: GDB/MI Tracepoint Commands.
35441 * -trace-find: GDB/MI Tracepoint Commands.
35443 * -trace-list-variables: GDB/MI Tracepoint Commands.
35445 * -trace-save: GDB/MI Tracepoint Commands.
35447 * -trace-start: GDB/MI Tracepoint Commands.
35449 * -trace-status: GDB/MI Tracepoint Commands.
35451 * -trace-stop: GDB/MI Tracepoint Commands.
35804 * circular trace buffer: Starting and Stopping Trace Experiments.
35819 * collected data discarded: Starting and Stopping Trace Experiments.
35911 * convenience variables, and trace state variables: Trace State Variables.
35989 * define trace state variable, remote request: Tracepoint Packets.
36003 * delete tvariable: Trace State Variables.
36047 * disconnected tracing: Starting and Stopping Trace Experiments.
36239 * find trace snapshot: tfind. (line 6)
36679 * info tvariables: Trace State Variables.
37302 * proc-trace-entry: SVR4 Process Information.
37304 * proc-trace-exit: SVR4 Process Information.
37622 * select trace snapshot: tfind. (line 6)
37667 * set circular-trace-buffer: Starting and Stopping Trace Experiments.
37706 * set disconnected-tracing: Starting and Stopping Trace Experiments.
37769 * set procfs-trace: SVR4 Process Information.
37829 * set trace-commands: Messages/Warnings. (line 67)
37881 * show circular-trace-buffer: Starting and Stopping Trace Experiments.
37916 * show disconnected-tracing: Starting and Stopping Trace Experiments.
37968 * show procfs-trace
38090 * start a new trace experiment: Starting and Stopping Trace Experiments.
38105 * status of trace data collection: Starting and Stopping Trace Experiments.
38124 * stop a running trace experiment: Starting and Stopping Trace Experiments.
38256 * target tfile: Trace Files. (line 22)
38277 * tfile: Trace Files. (line 22)
38324 * trace: Create and Delete Tracepoints.
38326 * trace experiment, status of: Starting and Stopping Trace Experiments.
38328 * trace file format: Trace File Format. (line 6)
38329 * trace files: Trace Files. (line 6)
38330 * trace state variable value, remote request: Tracepoint Packets.
38332 * trace state variables: Trace State Variables.
38358 * tsave: Trace Files. (line 12)
38359 * tstart: Starting and Stopping Trace Experiments.
38361 * tstatus: Starting and Stopping Trace Experiments.
38363 * tstop: Starting and Stopping Trace Experiments.
38372 * tvariable: Trace State Variables.
38693 Node: Trace State Variables359851
38697 Node: Starting and Stopping Trace Experiments370348
38704 Node: Trace Files388381
39092 Node: Trace File Format1294827