mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-19 14:15:50 +02:00
Fix typos.
This commit is contained in:
parent
a694d99ff6
commit
98d3530766
1 changed files with 22 additions and 14 deletions
|
@ -11,34 +11,42 @@ This MI implementation is base on GDB/MI 5.2.1.
|
|||
|
||||
* Command/Response channels
|
||||
To create an MISession an InputStream and OutputStream are
|
||||
needed(assuming this the pipe connected to gdb).
|
||||
MISession MIPlugin.createSession(InputStream, OutputStream);
|
||||
needed(assuming it is the pipe connected to gdb).
|
||||
|
||||
MISession misession = new MISession(InputStream, OutputStream);
|
||||
|
||||
During initialisation of the session(MISession) two threads
|
||||
are created(TxThread, RxThread). MI Commands created via the CommandFactory
|
||||
are created TxThread, RxThread and associative list queues
|
||||
TxQueue and RxQueue:
|
||||
- The RxThread thread is block on readig the output of the pipe(gdb) for
|
||||
any responses.
|
||||
- The TxThread thread is block waiting for command.
|
||||
|
||||
MI Commands are created via the CommandFactory and
|
||||
are added to the TxQueue, the TxThread will then wake up
|
||||
generate a token(ID) for the command and send it the pipe(gdb), after
|
||||
generate a token(ID) for the command and send it to the pipe(gdb), after
|
||||
transmission the command is then move to the RxQueue waiting for the
|
||||
result(MIResultRecord).
|
||||
|
||||
Any responses will wake the RxThread, the thread would parse
|
||||
the response constructing an MIOutput then search the RxQueue
|
||||
Any responses will wake the RxThread, the thread will parse
|
||||
the response constructing an MIOutput, then it searches the RxQueue
|
||||
for any commands with the same token waking any thread waiting
|
||||
for a synchronous response(MIResultRecord). Any out-of-band
|
||||
responses(MIOOBRecord) are dispatch, clients interested in those
|
||||
notifications should register to MISession.
|
||||
responses(MIOOBRecord) are dispatch to MISession observers, clients interested
|
||||
in notifications should register to the MISession.
|
||||
|
||||
* MI Parsing
|
||||
There is a generic MI parser (MIParser) constructing an Abstract
|
||||
Syntax Tree. For example, a ResultRecord response after a
|
||||
break-insert, the parser will generate this AST:
|
||||
-break-insert main
|
||||
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
|
||||
There is a generic MI parser (MIParser) constructing an syntax tree of the output.
|
||||
For example, a ResultRecord response after a "-break-insert", the parser will
|
||||
generate this tree:
|
||||
10-break-insert main
|
||||
10^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
|
||||
addr="0x08048468",func="main",file="hello.c",line="4",times="0"}
|
||||
|
||||
- MIOutput
|
||||
- MIOOBRecord[0]
|
||||
- MIResutRecord
|
||||
- token = 0
|
||||
- token = 10
|
||||
- ResultClass = "done"
|
||||
- MIResult[1]
|
||||
- MIResult[0]
|
||||
|
|
Loading…
Add table
Reference in a new issue