A Simple API for GNU debugger's Machine Interface (GDB/MI).
JavaScript
A Simple API for GNU debugger's Machine Interface (GNU/MI).
⚠️ DEPRECIATED IN FAVOR OF ANOTHER LIGHTWEIGHT IMPLEMENTATION ,TALK-TO-GDB
What does this library enable?
built in parsing
pattern based message filter
Usage
/*** Get a GDB/MI instance ***/const{init}=require('./')constdebuggee='./a.out'//optinally,pass a debuggeeconstgdb=awaitinit(debuggee)/*** Listen for any message with a pattern ***/varpattern={token:(token)=>token===undefined||token<30,'class':'done'}varoutstream=gdb.onmessage(pattern)//stream will get all `done` messages with a token. less then 30 or undefined/*** Listen to All messages ***///outstream is a nodejs streamvaroutstream=gdb.onmessage(/**/)/*** Listen to console output **/varoutstream=gdb.onmessage({'stream-type':'console-stream-output'})/*** Listen to log output **/varoutstream=gdb.onmessage({'stream-type':'log-stream-output'})/*** Listen to all of async type **/varoutstream=gdb.onmessage({'async-type':(a)=>a!==undefined})...
DEBUG
DEBUG=msgstream:* all logs at important points in stream pipelining