Changeset 04d95ec in rtems-tools for tools/gdb


Ignore:
Timestamp:
Aug 25, 2013, 1:00:48 PM (6 years ago)
Author:
Dhananjay Balan <mb.dhananjay@…>
Branches:
4.10, 4.11, master
Children:
a7176a8
Parents:
788a715
git-author:
Dhananjay Balan <mb.dhananjay@…> (08/25/13 13:00:48)
git-committer:
Chris Johns <chrisj@…> (08/24/14 23:52:41)
Message:

Added register class

  • sparc.register, basic represenation of sparc's registers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gdb/python/sparc.py

    r788a715 r04d95ec  
    6969        return val
    7070
     71class register:
     72    '''SPARC Registers'''
     73
     74    def __init__(self,reg):
     75        self.reg = reg
     76
     77    def global_regs(self):
     78        val = [self.reg['g0_g1']]
     79
     80        for i in range(2,7):
     81            val.append(int(self.reg['g'+str(i)]))
     82        return val
     83
     84    def local_regs(self):
     85        val = []
     86
     87        for i in range(0,8):
     88            val.append(self.reg['l'+str(i)])
     89        return val
     90
     91    def in_regs(self):
     92        val = []
     93
     94        for i in range(0,8):
     95            if i==6:
     96                val.append(self.reg['i6_fp'])
     97            else:
     98                val.append(self.reg['i'+str(i)])
     99        return val
     100
     101    def out_regs(self):
     102        val = []
     103
     104        for i in range(0,8):
     105            if i==6:
     106                val.append(self.reg['o6_sp'])
     107            else:
     108                val.append(self.reg['o'+str(i)])
     109        return val
    71110
    72111
Note: See TracChangeset for help on using the changeset viewer.