Changeset 46d0378 in rtems-libbsd
- Timestamp:
- 01/17/17 11:00:55 (7 years ago)
- Branches:
- 5, 5-freebsd-12, 6-freebsd-12, master
- Children:
- c6b85e8
- Parents:
- 120caa6
- git-author:
- Christian Mauderer <Christian.Mauderer@…> (01/17/17 11:00:55)
- git-committer:
- Christian Mauderer <Christian.Mauderer@…> (01/17/17 11:51:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
userspace-header-gen.py
r120caa6 r46d0378 112 112 return (die.tag == "DW_TAG_subprogram") 113 113 114 def _get_type(self, die ):114 def _get_type(self, die, first_array = True): 115 115 """Get the type of a variable DIE. 116 116 Returns two strings: one prefix and one postfix for the variable name""" … … 140 140 for child in typedie.iter_children(): 141 141 if child.tag == "DW_TAG_subrange_type": 142 try: 143 upper_bound = child.attributes["DW_AT_upper_bound"].value 144 arraysize = "%d" % (upper_bound + 1) 145 except KeyError: 142 if first_array == True: 146 143 arraysize = "" 144 first_array = False 145 else: 146 try: 147 upper_bound = child.attributes["DW_AT_upper_bound"].value 148 arraysize = "%d" % (upper_bound + 1) 149 except KeyError: 150 arraysize = "" 147 151 typepost += "[%s]" % arraysize 148 152 … … 201 205 202 206 if last == False: 203 addpre, addpost = self._get_type(typedie )207 addpre, addpost = self._get_type(typedie, first_array) 204 208 typepre = addpre + typepre 205 209 typepost = typepost + addpost
Note: See TracChangeset
for help on using the changeset viewer.