GDB/MI Async Records (Debugging with GDB)
Next: GDB/MI Breakpoint Information, Previous: GDB/MI Stream Records, Up: GDB/MI Output Records [Contents][Index]
27.5.3 GDB/MI Async Records
Async records are used to notify the GDB/MI client of additional changes that have occurred. Those changes can either be a consequence of GDB/MI commands (e.g., a breakpoint modified) or a result of target activity (e.g., target stopped).
The following is the list of possible async records:
*running,thread-id="thread"The target is now running. The
threadfield can be the global thread ID of the thread that is now running, and it can be ‘all’ if all threads are running. The frontend should assume that no interaction with a running thread is possible after this notification is produced. The frontend should not assume that this notification is output only once for any command. GDB may emit this notification several times, either for different threads, because it cannot resume all threads together, or even for a single thread, if the thread must be stepped though some code before letting it run freely.*stopped,reason="reason",thread-id="id",stopped-threads="stopped",core="core"The target has stopped. The
reasonfield can have one of the following values:breakpoint-hitA breakpoint was reached.
watchpoint-triggerA watchpoint was triggered.
read-watchpoint-triggerA read watchpoint was triggered.
access-watchpoint-triggerAn access watchpoint was triggered.
function-finishedAn -exec-finish or similar CLI command was accomplished.
location-reachedAn -exec-until or similar CLI command was accomplished.
watchpoint-scopeA watchpoint has gone out of scope.
end-stepping-rangeAn -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or similar CLI command was accomplished.
exited-signalledThe inferior exited because of a signal.
exitedThe inferior exited.
exited-normallyThe inferior exited normally.
signal-receivedA signal was received by the inferior.
solib-eventThe inferior has stopped due to a library being loaded or unloaded. This can happen when
stop-on-solib-events(see Files) is set or when acatch loadorcatch unloadcatchpoint is in use (see Set Catchpoints).forkThe inferior has forked. This is reported when
catch fork(see Set Catchpoints) has been used.vforkThe inferior has vforked. This is reported in when
catch vfork(see Set Catchpoints) has been used.syscall-entryThe inferior entered a system call. This is reported when
catch syscall(see Set Catchpoints) has been used.syscall-returnThe inferior returned from a system call. This is reported when
catch syscall(see Set Catchpoints) has been used.execThe inferior called
exec. This is reported whencatch exec(see Set Catchpoints) has been used.
The
idfield identifies the global thread ID of the thread that directly caused the stop – for example by hitting a breakpoint. Depending on whether all-stop mode is in effect (see All-Stop Mode), GDB may either stop all threads, or only the thread that directly triggered the stop. If all threads are stopped, thestoppedfield will have the value of"all". Otherwise, the value of thestoppedfield will be a list of thread identifiers. Presently, this list will always include a single thread, but frontend should be prepared to see several threads in the list. Thecorefield reports the processor core on which the stop event has happened. This field may be absent if such information is not available.=thread-group-added,id="id"
=thread-group-removed,id="id"A thread group was either added or removed. The
idfield contains the GDB identifier of the thread group. When a thread group is added, it generally might not be associated with a running process. When a thread group is removed, its id becomes invalid and cannot be used in any way.=thread-group-started,id="id",pid="pid"A thread group became associated with a running program, either because the program was just started or the thread group was attached to a program. The
idfield contains the GDB identifier of the thread group. Thepidfield contains process identifier, specific to the operating system.=thread-group-exited,id="id"[,exit-code="code"]A thread group is no longer associated with a running program, either because the program has exited, or because it was detached from. The
idfield contains the GDB identifier of the thread group. Thecodefield is the exit code of the inferior; it exists only when the inferior exited with some code.=thread-created,id="id",group-id="gid"
=thread-exited,id="id",group-id="gid"A thread either was created, or has exited. The
idfield contains the global GDB identifier of the thread. Thegidfield identifies the thread group this thread belongs to.=thread-selected,id="id"[,frame="frame"]Informs that the selected thread or frame were changed. This notification is not emitted as result of the
-thread-selector-stack-select-framecommands, but is emitted whenever an MI command that is not documented to change the selected thread and frame actually changes them. In particular, invoking, directly or indirectly (via user-defined command), the CLIthreadorframecommands, will generate this notification. Changing the thread or frame from another user interface (see Interpreters) will also generate this notification.The
framefield is only present if the newly selected thread is stopped. See GDB/MI Frame Information for the format of its value.We suggest that in response to this notification, front ends highlight the selected thread and cause subsequent commands to apply to that thread.
=library-loaded,...Reports that a new library file was loaded by the program. This notification has 5 fields—
id,target-name,host-name,symbols-loadedandranges. Theidfield is an opaque identifier of the library. For remote debugging case,target-nameandhost-namefields give the name of the library file on the target, and on the host respectively. For native debugging, both those fields have the same value. Thesymbols-loadedfield is emitted only for backward compatibility and should not be relied on to convey any useful information. Thethread-groupfield, if present, specifies the id of the thread group in whose context the library was loaded. If the field is absent, it means the library was loaded in the context of all present thread groups. Therangesfield specifies the ranges of addresses belonging to this library.=library-unloaded,...Reports that a library was unloaded by the program. This notification has 3 fields—
id,target-nameandhost-namewith the same meaning as for the=library-loadednotification. Thethread-groupfield, if present, specifies the id of the thread group in whose context the library was unloaded. If the field is absent, it means the library was unloaded in the context of all present thread groups.=traceframe-changed,num=tfnum,tracepoint=tpnum
=traceframe-changed,endReports that the trace frame was changed and its new number is
tfnum. The number of the tracepoint associated with this trace frame istpnum.=tsv-created,name=name,initial=initialReports that the new trace state variable
nameis created with initial valueinitial.=tsv-deleted,name=name
=tsv-deletedReports that the trace state variable
nameis deleted or all trace state variables are deleted.=tsv-modified,name=name,initial=initial[,current=current]Reports that the trace state variable
nameis modified with the initial valueinitial. The current valuecurrentof trace state variable is optional and is reported if the current value of trace state variable is known.=breakpoint-created,bkpt={...}
=breakpoint-modified,bkpt={...}
=breakpoint-deleted,id=numberReports that a breakpoint was created, modified, or deleted, respectively. Only user-visible breakpoints are reported to the MI user.
The
bkptargument is of the same form as returned by the various breakpoint commands; See GDB/MI Breakpoint Commands. Thenumberis the ordinal number of the breakpoint.Note that if a breakpoint is emitted in the result record of a command, then it will not also be emitted in an async record.
=record-started,thread-group="id",method="method"[,format="format"]
=record-stopped,thread-group="id"Execution log recording was either started or stopped on an inferior. The
idis the GDB identifier of the thread group corresponding to the affected inferior.The
methodfield indicates the method used to record execution. If the method in use supports multiple recording formats,formatwill be present and contain the currently used format. See Process Record and Replay, for existing method and format values.=cmd-param-changed,param=param,value=valueReports that a parameter of the command
set paramis changed tovalue. In the multi-wordsetcommand, theparamis the whole parameter list tosetcommand. For example, In commandset check type on,paramischeck typeandvalueison.=memory-changed,thread-group=id,addr=addr,len=len[,type="code"]Reports that bytes from
addrtodata+lenwere written in an inferior. Theidis the identifier of the thread group corresponding to the affected inferior. The optionaltype="code"part is reported if the memory written to holds executable code.
Next: GDB/MI Breakpoint Information, Previous: GDB/MI Stream Records, Up: GDB/MI Output Records [Contents][Index]