Skip to content

bruiser CLI Options and Extensions

bloodstalker edited this page Jun 22, 2018 · 3 revisions

bruiser's language is Lua 5.3.1. You do get full Lua functionality plus history, tab-completion and suggestions.

CLI Options

--lua run a lua script in non-interactive mode
--keepalive drop to cli after the script running in non-interactive mode finishes execution
--luadefault where to look for the default script to run before running user scripts
--src whether bruiser should expect to get a source file as input
--verbose verbose
--historyfile path to bruiser's history file

Extensions

Here's a list of bruiser's extensions:

  • help
    proto: help()
    description: display general help
    prototype: none
    return value: none

  • quit
    proto: quit()
    description: quit bruiser
    prototype: none
    return value: none

  • exit
    proto: exit()
    description: quit bruiser
    prototype: none
    return value: none

  • m0
    proto: m0()
    description: bruiser reads the report generated by mutator-lvl0
    prototype: None
    return value: None

  • readxmlfile
    proto: readxmlfile("myxml.xml")
    description: bruiser reads the specified xml file, if no argument is provided bruiser tries to read the m0 report at the default location
    prototype:
    return value: tinyxml2::XMLError

  • hijackmain
    proto: hijackmain()
    description: runs a specific matcher that replaces the main with a new main
    prototype: none
    return value: returns the rewritten source code as a string

  • clear
    proto: clear()
    description: clears the terminal
    prototype:
    return value: none

  • history
    proto: history()
    description: prints bruiser's history
    prototype:
    return value: none

  • Vars
    proto: Vars()
    description: lists all available variable declarations
    prototype: none
    return value: returns a string array of the variable declarations

  • Funcs
    proto: Funcs()
    description: lists all available function declarations
    prototype: none
    return value: returns a string array of the function declarations

  • Classess
    proto: Classes()
    description: lists all available class declarations
    prototype: none
    return value: returns a string array of the class declarations

  • Structs
    proto: Structs()
    description: lists all available struct declarations
    prototype: none
    return value: returns a string array of the structure declarations

  • Arrays
    proto: Arrays()
    description: lists all available array declarations
    prototype: none
    return value: returns a string array of the array declarations

  • Unions
    proto: Unoins()
    description: lists all available union declarations
    prototype: none
    return value: returns a string array of the union declarations

  • make
    proto: make("all")
    description: runs your make command
    prototype:
    return value:

  • historysize
    proto: historysize(200)
    description: sets the history size
    prototype: [uint history_size]
    return value: none

  • showsource
    proto: showsource(1,5,"test.cpp")
    description: shows the source code for the given range and filename
    prototype: [uint beginline, uint endline, string filename]
    return value: returns a string array of the returned source file

  • extractmutagen
    proto: extractmutagen("test.cpp")
    description: runs m0 on the source(s)
    prototype: [string]
    return value: pid

  • strainrecognition
    proto:
    description:
    prototype:
    return value:

  • setmakepath
    proto: setmakepath("../../myproject")
    description: tells bruiser where to execute the make command run from make()
    prototype: string
    return value: none

  • run
    proto: run("myexecutable")
    description: runs the mutant
    prototype: string
    return value: return value

  • setbinpath
    proto: setbinpath("bin_path")
    description: sets the binary path for mutant executable
    prototype: string
    return value: none

  • getbinpath
    proto: getbinpath()
    description: gets the binary path for mutant executable
    prototype: none
    return value: string

  • getmakepath
    proto: getmakepath()
    description: gets the make path for mutant executable
    prototype: none
    return value: string

  • getpaths
    proto: getpaths()
    description: gets the currently loaded paths that bruiser looks through
    prototype: none
    return value: array of strings

  • getsourcefiles
    proto: getsourcefiles()
    description: gets the currently loaded source files that bruiser will look through
    prototype: none
    return value: array of strings

  • changedirectory
    proto: changedirectory()
    description: changes bruiser's working directory. only use it when you know what you are doing.
    prototype: destination directory, [string]
    return value: return value

  • pwd
    proto: pwd()
    description: pwd
    prototype:
    return value:

  • objload
    proto: objload("main", "../bfd/test/test.so")
    description: load the compiled functions into bruiser
    prototype: string
    return value: success or failure

Clone this wiki locally