gdb: GDB/MI Async Records

 
 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 THREAD field can be the global
      thread ID of the 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 REASON field can have one of the
      following values:
 
      'breakpoint-hit'
           A breakpoint was reached.
      'watchpoint-trigger'
           A watchpoint was triggered.
      'read-watchpoint-trigger'
           A read watchpoint was triggered.
      'access-watchpoint-trigger'
           An access watchpoint was triggered.
      'function-finished'
           An -exec-finish or similar CLI command was accomplished.
      'location-reached'
           An -exec-until or similar CLI command was accomplished.
      'watchpoint-scope'
           A watchpoint has gone out of scope.
      'end-stepping-range'
           An -exec-next, -exec-next-instruction, -exec-step,
           -exec-step-instruction or similar CLI command was
           accomplished.
      'exited-signalled'
           The inferior exited because of a signal.
      'exited'
           The inferior exited.
      'exited-normally'
           The inferior exited normally.
      'signal-received'
           A signal was received by the inferior.
      'solib-event'
           The inferior has stopped due to a library being loaded or
           Files::) is set or when a 'catch load' or 'catch unload'
           catchpoint is in use (SeeSet Catchpoints).
      'fork'
           The inferior has forked.  This is reported when 'catch fork'
           (SeeSet Catchpoints) has been used.
      'vfork'
           The inferior has vforked.  This is reported in when 'catch
           vfork' (SeeSet Catchpoints) has been used.
      'syscall-entry'
           The inferior entered a system call.  This is reported when
           'catch syscall' (SeeSet Catchpoints) has been used.
      'syscall-return'
           The inferior returned from a system call.  This is reported
           when 'catch syscall' (SeeSet Catchpoints) has been used.
      'exec'
           The inferior called 'exec'.  This is reported when 'catch
           exec' (SeeSet Catchpoints) has been used.
 
      The ID field 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 (SeeAll-Stop
      Mode), GDB may either stop all threads, or only the thread that
      directly triggered the stop.  If all threads are stopped, the
      STOPPED field will have the value of '"all"'.  Otherwise, the value
      of the STOPPED field 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.
      The CORE field 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 ID field 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 ID field contains the GDB identifier of
      the thread group.  The PID field 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 ID field contains the GDB identifier of the thread
      group.  The CODE field 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 ID field contains
      the global GDB identifier of the thread.  The GID field 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-select' or
      '-stack-select-frame' commands, 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 CLI 'thread' or 'frame'
      commands, will generate this notification.  Changing the thread or
      frame from another user interface (see SeeInterpreters) will
      also generate this notification.
 
      The FRAME field is only present if the newly selected thread is
      stopped.  See SeeGDB/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-LOADED and RANGES.  The ID field is an opaque identifier of
      the library.  For remote debugging case, TARGET-NAME and HOST-NAME
      fields 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.  The SYMBOLS-LOADED field is emitted only for
      backward compatibility and should not be relied on to convey any
      useful information.  The THREAD-GROUP field, 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.  The RANGES field 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-NAME and HOST-NAME with the
      same meaning as for the '=library-loaded' notification.  The
      THREAD-GROUP field, 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,end'
      Reports that the trace frame was changed and its new number is
      TFNUM.  The number of the tracepoint associated with this trace
      frame is TPNUM.
 
 '=tsv-created,name=NAME,initial=INITIAL'
      Reports that the new trace state variable NAME is created with
      initial value INITIAL.
 
 '=tsv-deleted,name=NAME'
 '=tsv-deleted'
      Reports that the trace state variable NAME is deleted or all trace
      state variables are deleted.
 
 '=tsv-modified,name=NAME,initial=INITIAL[,current=CURRENT]'
      Reports that the trace state variable NAME is modified with the
      initial value INITIAL.  The current value CURRENT of 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=NUMBER'
      Reports that a breakpoint was created, modified, or deleted,
      respectively.  Only user-visible breakpoints are reported to the MI
      user.
 
      The BKPT argument is of the same form as returned by the various
      breakpoint commands; SeeGDB/MI Breakpoint Commands.  The
      NUMBER is 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 ID is the GDB identifier of the thread group
      corresponding to the affected inferior.
 
      The METHOD field indicates the method used to record execution.  If
      the method in use supports multiple recording formats, FORMAT will
      be present and contain the currently used format.  SeeProcess
      Record and Replay, for existing method and format values.
 
 '=cmd-param-changed,param=PARAM,value=VALUE'
      Reports that a parameter of the command 'set PARAM' is changed to
      VALUE.  In the multi-word 'set' command, the PARAM is the whole
      parameter list to 'set' command.  For example, In command 'set
      check type on', PARAM is 'check type' and VALUE is 'on'.
 
 '=memory-changed,thread-group=ID,addr=ADDR,len=LEN[,type="code"]'
      Reports that bytes from ADDR to DATA + LEN were written in an
      inferior.  The ID is the identifier of the thread group
      corresponding to the affected inferior.  The optional 'type="code"'
      part is reported if the memory written to holds executable code.