debug.py (11802:be62996c95d1) | debug.py (12008:af9e577f8eac) |
---|---|
1# Copyright (c) 2008 The Hewlett-Packard Development Company 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 51 unchanged lines hidden (view full) --- 60 self._dict = {} 61 62 def _update(self): 63 current_version = _m5.debug.getAllFlagsVersion() 64 if self._version == current_version: 65 return 66 67 self._dict.clear() | 1# Copyright (c) 2008 The Hewlett-Packard Development Company 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 51 unchanged lines hidden (view full) --- 60 self._dict = {} 61 62 def _update(self): 63 current_version = _m5.debug.getAllFlagsVersion() 64 if self._version == current_version: 65 return 66 67 self._dict.clear() |
68 for flag in _m5.debug.getAllFlags(): 69 self._dict[flag.name()] = flag | 68 for name, flag in _m5.debug.allFlags().items(): 69 self._dict[name] = flag |
70 self._version = current_version 71 72 def __contains__(self, item): 73 self._update() 74 return item in self._dict 75 76 def __getitem__(self, item): 77 self._update() --- 27 unchanged lines hidden --- | 70 self._version = current_version 71 72 def __contains__(self, item): 73 self._update() 74 return item in self._dict 75 76 def __getitem__(self, item): 77 self._update() --- 27 unchanged lines hidden --- |