Sourcery CodeBench Lite Edition for ARM 2014.05-28


Sourcery G++ Lite有4中版本,其中EABI是针对底层也就是不包含任何系统的开发 Windows版本
资源截图
代码片段和文件信息
# Copyright (C) 2013-2014 Free Software Foundation Inc.

# 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
# (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 .

import gdb

# This small code snippet deals with problem of strings in Python 2.x
# and Python 3.x.  Python 2.x has str and unicode classes which are
# sub-classes of basestring.  In Python 3.x all strings are encoded
# and basestring has been removed.
try:
    basestring
except NameError:
    basestring = str

class frameDecorator(object):
    “““Basic implementation of a frame Decorator“““

    “““ This base frame decorator decorates a frame or another frame
    decorator and provides convenience methods.  If this object is
    wrapping a frame decorator defer to that wrapped object‘s method
    if it has one.  This allows for frame decorators that have
    sub-classed frameDecorator object but also wrap other frame
    decorators on the same frame to correctly execute.

    E.g

    If the result of frame filters running means we have one gdb.frame
    wrapped by multiple frame decorators all sub-classed from
    frameDecorator the resulting hierarchy will be:

    Decorator1
      -- (wraps) Decorator2
        -- (wraps) frameDecorator
          -- (wraps) gdb.frame

    In this case we have two frame decorators both of which are
    sub-classed from frameDecorator.  If Decorator1 just overrides the
    ‘function‘ method then all of the other methods are carried out
    by the super-class frameDecorator.  But Decorator2 may have
    overriden other methods so frameDecorator will look at the
    ‘base‘ parameter and defer to that class‘s methods.  And so on
    down the chain.“““

    # ‘base‘ can refer to a gdb.frame or another frame decorator.  In
    # the latter case the child class will have called the super
    # method and _base will be an object conforming to the frame Filter
    # class.
    def __init__(self base):
        self._base = base

    @staticmethod
    def _is_limited_frame(frame):
        “““Internal utility to determine if the frame is special or
        limited.“““
        sal = frame.find_sal()

        if (not sal.symtab or not sal.symtab.filename
            or frame.type() == gdb.DUMMY_frame
            or frame.type() == gdb.SIGTRAMP_frame):

            return True

        return False

    def elided(self):
        “““Return any elided frames that this class might be
        wrapping or None.“““
        if hasattr(self._

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)