1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

Fix typos.

This commit is contained in:
Alain Magloire 2003-05-25 02:29:46 +00:00
parent a694d99ff6
commit 98d3530766

View file

@ -11,34 +11,42 @@ This MI implementation is base on GDB/MI 5.2.1.
* Command/Response channels * Command/Response channels
To create an MISession an InputStream and OutputStream are To create an MISession an InputStream and OutputStream are
needed(assuming this the pipe connected to gdb). needed(assuming it is the pipe connected to gdb).
MISession MIPlugin.createSession(InputStream, OutputStream);
MISession misession = new MISession(InputStream, OutputStream);
During initialisation of the session(MISession) two threads 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 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 transmission the command is then move to the RxQueue waiting for the
result(MIResultRecord). result(MIResultRecord).
Any responses will wake the RxThread, the thread would parse Any responses will wake the RxThread, the thread will parse
the response constructing an MIOutput then search the RxQueue the response constructing an MIOutput, then it searches the RxQueue
for any commands with the same token waking any thread waiting for any commands with the same token waking any thread waiting
for a synchronous response(MIResultRecord). Any out-of-band for a synchronous response(MIResultRecord). Any out-of-band
responses(MIOOBRecord) are dispatch, clients interested in those responses(MIOOBRecord) are dispatch to MISession observers, clients interested
notifications should register to MISession. in notifications should register to the MISession.
* MI Parsing * MI Parsing
There is a generic MI parser (MIParser) constructing an Abstract There is a generic MI parser (MIParser) constructing an syntax tree of the output.
Syntax Tree. For example, a ResultRecord response after a For example, a ResultRecord response after a "-break-insert", the parser will
break-insert, the parser will generate this AST: generate this tree:
-break-insert main 10-break-insert main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y", 10^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x08048468",func="main",file="hello.c",line="4",times="0"} addr="0x08048468",func="main",file="hello.c",line="4",times="0"}
- MIOutput - MIOutput
- MIOOBRecord[0] - MIOOBRecord[0]
- MIResutRecord - MIResutRecord
- token = 0 - token = 10
- ResultClass = "done" - ResultClass = "done"
- MIResult[1] - MIResult[1]
- MIResult[0] - MIResult[0]