-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
116 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (C) 2013, 2015-2018, 2020-2021 Rocky Bernstein <[email protected]> | ||
# Copyright (C) 2013, 2015-2018, 2020-2021, 2023 Rocky Bernstein | ||
# <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -21,6 +22,7 @@ | |
# less elegant than having it here with reduced code, albeit there | ||
# still is some room for improvement. | ||
|
||
import os.path as osp | ||
import sys | ||
|
||
decompiler = "uncompyle6 >= 3.8.0" | ||
|
@@ -42,7 +44,7 @@ | |
# 3.4 | pip | 19.1.1 | | ||
|
||
# Things that change more often go here. | ||
copyright = """Copyright (C) 2013, 2015-2021 Rocky Bernstein <[email protected]>.""" | ||
copyright = """Copyright (C) 2013, 2015-2021, 2023 Rocky Bernstein <[email protected]>.""" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
|
@@ -93,8 +95,6 @@ | |
py_modules = [] | ||
short_desc = "GDB-like Python Debugger in the Trepan family" | ||
|
||
import os.path as osp | ||
|
||
|
||
def get_srcdir(): | ||
filename = osp.normcase(osp.dirname(osp.abspath(__file__))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Copyright (C) 2008, 2009, 2013 Rocky Bernstein <[email protected]> | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
|
@@ -10,12 +11,11 @@ | |
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# """ Copyright (C) 2008, 2009, 2013 Rocky Bernstein <[email protected]> """ | ||
__import__("pkg_resources").declare_namespace(__name__) | ||
|
||
import glob | ||
import os | ||
|
||
__import__("pkg_resources").declare_namespace(__name__) | ||
|
||
# FIXME: Is it really helpful to "privatize" variable names below? | ||
# The below names are not part of the standard pre-defined names like | ||
# __name__ or __file__ are. | ||
|
@@ -27,7 +27,7 @@ | |
__py_files__ = glob.glob(os.path.join(__command_dir__, "[a-z]*.py")) | ||
|
||
# Take the basename of the filename and drop off '.py'. That minus the | ||
# files in exclude_files and tha becomes the list of modules that | ||
# files in exclude_files and that becomes the list of modules that | ||
# commands.py will use to import | ||
exclude_files = ["mock.py"] | ||
__modules__ = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2015 Rocky Bernstein <[email protected]> | ||
# Copyright (C) 2015, 2023 Rocky Bernstein <[email protected]> | ||
""" Common I/O routines""" | ||
|
||
|
||
# Note for errmsg, msg, and msg_nocr we don't want to simply make | ||
# an assignment of method names like self.msg = self.debugger.intf.msg, | ||
# because we want to allow the interface (intf) to change | ||
# dynamically. That is, the value of self.debugger may change | ||
# in the course of the program and if we made such an method assignemnt | ||
# in the course of the program and if we made such an method assignment | ||
# we wouldn't pick up that change in our self.msg | ||
def errmsg(proc_obj, message, opts={}): | ||
response = proc_obj.response | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2009, 2014-2015, 2020 Rocky Bernstein <[email protected]> | ||
# | ||
# Copyright (C) 2009, 2014-2015, 2020, 2023 Rocky Bernstein | ||
# <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -14,14 +16,14 @@ | |
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
"""classes to support communication to and from the debugger. This | ||
communcation might be to/from another process or another computer. | ||
communication might be to/from another process or another computer. | ||
And reading may be from a debugger command script. | ||
For example, we'd like to support Sockets, and serial lines and file | ||
reading, as well a readline-type input. Encryption and Authentication | ||
methods might decorate some of the communication channels. | ||
Some ideas originiated as part of Matt Fleming's 2006 Google Summer of | ||
Some ideas originated as part of Matt Fleming's 2006 Google Summer of | ||
Code project. | ||
""" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2009, 2013-2014 Rocky Bernstein <[email protected]> | ||
# | ||
# Copyright (C) 2009, 2013-2014, 2023 Rocky Bernstein | ||
# <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -22,7 +24,7 @@ | |
|
||
class StringArrayInput(Mbase.DebuggerInputBase): | ||
"""Simulate I/O using an array of strings. Sort of like StringIO, but | ||
even simplier.""" | ||
even simpler.""" | ||
|
||
def __init__(self, inp=[], opts=None): | ||
self.input = inp | ||
|
@@ -60,7 +62,7 @@ def readline(self, use_raw=None, prompt=""): | |
|
||
class StringArrayOutput(Mbase.DebuggerInOutBase): | ||
"""Simulate I/O using an array of strings. Sort of like StringIO, but | ||
even simplier.""" | ||
even simpler.""" | ||
|
||
def __init__(self, out=[], opts=None): | ||
self.flush_after_write = False # For compatibility | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2010, 2013, 2015, 2018 Rocky Bernstein <[email protected]> | ||
# | ||
# Copyright (C) 2010, 2013, 2015, 2018, 2023 Rocky Bernstein | ||
# <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -17,7 +19,7 @@ | |
|
||
import sys | ||
|
||
NotImplementedMessage = "This method must be overriden in a subclass" | ||
NotImplementedMessage = "This method must be overridden in a subclass" | ||
|
||
__all__ = ["TrepanInterface"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2009, 2013-2014, 2017 Rocky Bernstein <[email protected]> | ||
# | ||
# Copyright (C) 2009, 2013-2014, 2017, 2023 Rocky Bernstein | ||
# <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -14,12 +16,12 @@ | |
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
"""Module for client (i.e. user to communication-device) interaction. | ||
The debugged program is at the other end of the communcation.""" | ||
The debugged program is at the other end of the communication.""" | ||
|
||
from trepan.inout import fifoclient as Mfifoclient, tcpclient as Mtcpclient | ||
|
||
# Our local modules | ||
from trepan.interfaces import user as Muser | ||
from trepan.inout import tcpclient as Mtcpclient, fifoclient as Mfifoclient | ||
|
||
|
||
DEFAULT_INIT_CONNECTION_OPTS = {"IO": "TCP"} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.