Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2013 22:16
Show Gist options
  • Save anonymous/5474961 to your computer and use it in GitHub Desktop.
Save anonymous/5474961 to your computer and use it in GitHub Desktop.
diff rtems-20100326/chains.py /tmp/rtems-20100326/chains.py
17,19c17
< if not self.node_val:
< return True
< return False
---
> return self.node_val['next'] == 0
23c21
< self.node_val = self.node_val['next']
---
> self.node_val = self.node_val['next'].dereference()
27c25
< self.node_val = self.node_val['previous']
---
> self.node_val = self.node_val['previous'].dereference()
35d32
<
43,44c40
< t = node(self.ctrl['Head']['Node'])
< return t
---
> return node(self.ctrl['first'].dereference())
Binary files rtems-20100326/chains.pyc and /tmp/rtems-20100326/chains.pyc differ
Binary files rtems-20100326/classic.pyc and /tmp/rtems-20100326/classic.pyc differ
Only in rtems-20100326: __init__.pyc
diff rtems-20100326/objects.py /tmp/rtems-20100326/objects.py
65,67d64
< return self.object_return(api, _class, index)
<
< def object_return(self, api, _class, index):
102c99
< 'class': (27, 31) }
---
> 'class': (27, 31) }
153c150
<
---
>
Binary files rtems-20100326/objects.pyc and /tmp/rtems-20100326/objects.pyc differ
diff rtems-20100326/rtems.py /tmp/rtems-20100326/rtems.py
80c80
< super(rtems_object, self).__init__('rtems object',
---
> super(rtems_object, self).__init__('rtems object',
85d84
< print num
102,133c101,102
<
< class rtems_semaphore(gdb.Command):
< "List all the classic semaphores"
<
< api = 'classic'
< _class = 'semaphores'
<
< def __init__(self):
< self.__doc__ = 'Display the RTEMS classic semaphores.'
< super(rtems_semaphore, self).__init__('rtems semaphores',
< gdb.COMMAND_STATUS)
<
< def invoke(self,arg, from_tty):
< max = objects.information.maximum(self.api, self._class)
<
< i = 0
< while i < max:
< pt = objects.information.object_return(self.api,self._class, i)
< if pt != 0:
< # Duplication of work - refactering of flow needed
< val = int(pt['Object']['id'])
< num = gdb.parse_and_eval(str(val))
< id = objects.ident(int(pt['Object']['id']))
< object = classic.semaphore(id)
< try:
< object.show(from_tty)
< except NameError:
< pass
< i = i+1
< objects.information.invalidate()
<
<
---
>
> #
142d110
< rtems_semaphore()
Binary files rtems-20100326/rtems.pyc and /tmp/rtems-20100326/rtems.pyc differ
diff rtems-20100326/threads.py /tmp/rtems-20100326/threads.py
16a17
> print node.addr
64c65
<
---
>
87c88
<
---
>
123c124
<
---
>
128c129
<
---
>
132c133
<
---
>
183c184
<
---
>
190,191c191
< t.extend(task_chain(chains.control( \
< self.que['Queues']['Priority'][ph])))
---
> t.extend(task_chain(chains.control(self.que['Queues']['Fifo'])))
Binary files rtems-20100326/threads.pyc and /tmp/rtems-20100326/threads.pyc differ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment