GDB integration for Node.js
This module provides an interface for controlling GDB from Node.js applications. It began as part of the atom-gdb-debugger project, but has been split off into its own package with no atom dependencies.
This is still very experimental and under construction. If you try it, please stop by the Gitter channel and let us know what you think.
[draft, subject to change]
class GDB
constructor()- create a new GDB instanceonConsoleOutput(cb)- invoke the callback on GDB console outputonConnect(cb)- invoke the callback when GDB is runningonDisconnect(cb)- invoke the callback when GDB exitsconnect(command)- start a new GDB child process, returns aPromisedisconnect()- exit the currently connected GDB child, returns aPromisesend_cli(cmd)- send a CLI command to GDB, returns aPromisedestroy()- destory GDB class and free associated resourcessetFile(file)- set target executable and symbol file, returns aPromisesetCwd(path)- set working directory for target, returns aPromiseexec- anExecStateinstancebreaks- aBreakpointManagerinstancevars- aVariableManagerinstance
class ExecState
start()continue()next()step()finish()interrupt()getThreads()getFrames([thread])getLocals([frame, [thread]])selectFrame(frame, [thread])
class BreakpointManager
observe(cb)- invoke the callback with each existing and futureBreakpointinsert(location)- returns aPromiseof the newBreakpoint
class Breakpoint
onChanged(cb)onDeleted(cb)remove()
class VariableManager
observe(cb)add(expr)evalExpression(expr, [frame, [thread]])
class Variable
onChanged(cb)onDeleted(cb)addChildren()assign(value)remove()