Skip to content
Commit 9fe00e52 authored by Enrico Granata's avatar Enrico Granata
Browse files

Bulk of the infrastructure work to allow script commands to be backed by...

Bulk of the infrastructure work to allow script commands to be backed by object instances in addition to free functions
This works by creating a command backed by a class whose interface should - at least - include

def __init__(self, debugger, session_dict)
def __call__(self, args, return_obj, exe_ctx)

What works:
- adding a command via command script add --class
- calling a thusly created command

What is missing:
- support for custom help
- test cases

The missing parts will follow over the next couple of days

This is an improvement over the existing system as:
a) it provides an obvious location for commands to provide help strings (i.e. methods)
b) it allows commands to store state in an obvious fashion
c) it allows us to easily add features to script commands over time (option parsing and subcommands registration, I am looking at you :-)

llvm-svn: 232136
parent 9f611e3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment