# Path: voidwalker/framework/interface/command.py
# class StackCommand(Command):
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def execute(self, config, terminal, thread, platform_factory, argument):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/command.py
# def register_command(cls):
#     _command_list.append(cls)
#     return cls
# 
# Path: voidwalker/framework/interface/parameter.py
# class BooleanParameter(Parameter):
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def default_value(self):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/parameter.py
# class PrefixParameter(Parameter):
#     __metaclass__ = abc.ABCMeta
# 
#     @classmethod
#     def get_value(cls):
#         raise TypeError
# 
#     @abc.abstractmethod
#     def default_value(self):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/parameter.py
# def register_parameter(cls):
#     _parameter_list.append(cls)
#     return cls
# 
# Path: voidwalker/application/commands/context.py
# class ContextCommand(StackCommand):
#     '''Show the current context.
# 
# If the current thread of the inferior is valid the context will be recorded and
# dumped. The contents of the context can be controlled using the (void)walker
# parameters'''
# 
#     @staticmethod
#     def name():
#         return '%s %s' % (VoidwalkerCommand.name(), 'context')
# 
#     def __init__(self):
#         super(ContextCommand, self).__init__()
# 
#     def execute(self, config, terminal, thread, platform_factory, argument):
#         if not thread.is_valid():
#             return
# 
#         context = platform_factory.create_context(config, thread)
#         previous_context = context
#         if len(thread.contexts()):
#             previous_context = thread.contexts()[-1]
# 
#         context_widget = ContextWidget(previous_context, context)
#         context_widget.draw(terminal, terminal.width())
# 
# Path: voidwalker/application/commands/voidwalker.py
# class VoidwalkerCommand(PrefixCommand):
#     '''(void)walker is a GDB toolbox for low-level software debugging.
# 
# https://github.com/dholm/voidwalker'''
# 
#     @staticmethod
#     def name():
#         return 'voidwalker'
# 
#     def __init__(self):
#         super(VoidwalkerCommand, self).__init__()
# 
# Path: voidwalker/application/parameters/voidwalker.py
# class VoidwalkerParameter(PrefixParameter):
#     '''(void)walker parameters'''
# 
#     def __init__(self):
#         super(VoidwalkerParameter, self).__init__()
# 
#     def init(self):
#         pass
# 
#     def default_value(self):
#         return None
# 
#     @staticmethod
#     def name():
#         return 'voidwalker'


import gdb
from ...framework.interface.command import StackCommand
from ...framework.interface.command import register_command
from ...framework.interface.parameter import BooleanParameter
from ...framework.interface.parameter import PrefixParameter
from ...framework.interface.parameter import register_parameter
from ...application.commands.context import ContextCommand
from ...application.commands.voidwalker import VoidwalkerCommand
from ...application.parameters.voidwalker import VoidwalkerParameter
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





@register_parameter
class HookParameter(PrefixParameter):
    '''(void)walker hook parameters'''

    def __init__(self):
        super(HookParameter, self).__init__()

    def default_value(self):
        return None

    @staticmethod
    def name():
        return '%s %s' % (VoidwalkerParameter.name(), 'hook')



# Path: voidwalker/framework/interface/command.py
# class StackCommand(Command):
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def execute(self, config, terminal, thread, platform_factory, argument):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/command.py
# def register_command(cls):
#     _command_list.append(cls)
#     return cls
# 
# Path: voidwalker/framework/interface/parameter.py
# class BooleanParameter(Parameter):
#     __metaclass__ = abc.ABCMeta
# 
#     @abc.abstractmethod
#     def default_value(self):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/parameter.py
# class PrefixParameter(Parameter):
#     __metaclass__ = abc.ABCMeta
# 
#     @classmethod
#     def get_value(cls):
#         raise TypeError
# 
#     @abc.abstractmethod
#     def default_value(self):
#         raise NotImplementedError
# 
# Path: voidwalker/framework/interface/parameter.py
# def register_parameter(cls):
#     _parameter_list.append(cls)
#     return cls
# 
# Path: voidwalker/application/commands/context.py
# class ContextCommand(StackCommand):
#     '''Show the current context.
# 
# If the current thread of the inferior is valid the context will be recorded and
# dumped. The contents of the context can be controlled using the (void)walker
# parameters'''
# 
#     @staticmethod
#     def name():
#         return '%s %s' % (VoidwalkerCommand.name(), 'context')
# 
#     def __init__(self):
#         super(ContextCommand, self).__init__()
# 
#     def execute(self, config, terminal, thread, platform_factory, argument):
#         if not thread.is_valid():
#             return
# 
#         context = platform_factory.create_context(config, thread)
#         previous_context = context
#         if len(thread.contexts()):
#             previous_context = thread.contexts()[-1]
# 
#         context_widget = ContextWidget(previous_context, context)
#         context_widget.draw(terminal, terminal.width())
# 
# Path: voidwalker/application/commands/voidwalker.py
# class VoidwalkerCommand(PrefixCommand):
#     '''(void)walker is a GDB toolbox for low-level software debugging.
# 
# https://github.com/dholm/voidwalker'''
# 
#     @staticmethod
#     def name():
#         return 'voidwalker'
# 
#     def __init__(self):
#         super(VoidwalkerCommand, self).__init__()
# 
# Path: voidwalker/application/parameters/voidwalker.py
# class VoidwalkerParameter(PrefixParameter):
#     '''(void)walker parameters'''
# 
#     def __init__(self):
#         super(VoidwalkerParameter, self).__init__()
# 
#     def init(self):
#         pass
# 
#     def default_value(self):
#         return None
# 
#     @staticmethod
#     def name():
#         return 'voidwalker'


# Path: voidwalker/backends/gdb/hooks.py
import gdb
from ...framework.interface.command import StackCommand
from ...framework.interface.command import register_command
from ...framework.interface.parameter import BooleanParameter
from ...framework.interface.parameter import PrefixParameter
from ...framework.interface.parameter import register_parameter
from ...application.commands.context import ContextCommand
from ...application.commands.voidwalker import VoidwalkerCommand
from ...application.parameters.voidwalker import VoidwalkerParameter

# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





@register_parameter
class HookParameter(PrefixParameter):
    '''(void)walker hook parameters'''

    def __init__(self):
        super(HookParameter, self).__init__()

    def default_value(self):
        return None

    @staticmethod
    def name():
        return '%s %s' % (VoidwalkerParameter.name(), 'hook')



@register_parameter