Skip to content

Commit 44431b3

Browse files
author
Dorothy Chen
committed
display vtable in type information
1 parent 64572a1 commit 44431b3

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

app/die_information.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,14 @@ def isType(die, typeName):
233233
def getVtable(typeDie):
234234
global die_list
235235
vtable = {}
236-
for child in typeDie.iter_children():
237-
# Get the vtable entries from the parents
238-
if child.tag == 'DW_TAG_inheritance':
239-
parentRef = child.attributes.get('DW_AT_type').value
240-
parentDie = die_list[child.cu.cu_offset + parentRef]
241-
parentVtable = getVtable(parentDie)
242-
vtable = dict(vtable.items() + parentVtable.items())
243236
for child in typeDie.iter_children():
244237
if child.tag == 'DW_TAG_subprogram' \
245238
and child.attributes.get('DW_AT_virtuality') \
246239
and child.attributes.get('DW_AT_vtable_elem_location'):
247240
elem_location = child.attributes.get('DW_AT_vtable_elem_location')
248241
if elem_location.form == 'DW_FORM_exprloc':
249242
loc_pieces = describe_DWARF_expr(elem_location.value, child.cu.structs)
250-
# Not 100% sure what loc_pieces represents right now...
243+
print loc_pieces, child.attributes["DW_AT_name"].value
251244
index = loc_pieces[0]
252245
if child.attributes.get('DW_AT_linkage_name'):
253246
name = child.attributes.get('DW_AT_linkage_name').value

app/dwarf_expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _after_visit(self, opcode, opcode_name, args):
7878
def parse_stack(self, parts=None):
7979
if not parts:
8080
parts = self._parts
81-
81+
8282
stack = [] # stack of DwarfOps
8383
for part in parts:
8484
try: # fail with unimplemented dwarf expressions

app/executable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ def get_type_info(self, addr):
578578
if dieInfo:
579579
type_dies[dieInfo['name']] = dieInfo
580580
self.type_dies[CU.cu_offset] = type_dies
581-
print len(type_dies.keys())
582581
return type_dies
583582

584583
def printChildren(die):

app/static/scss/disassemble.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ $source-code-bg1: rgba(100,255,218, 0.9); // highlight relevant line
466466
}
467467
}
468468

469+
.tab-content.tab-type-info {
470+
471+
}
472+
469473
}
470474

471475
#full_desc {
@@ -605,8 +609,15 @@ $type-bg: rgb(178,223,219);
605609
}
606610
}
607611

612+
#selected-type {
613+
overflow-y: scroll;
614+
}
615+
608616
.type-attr, .members {
609617
font-weight: bold;
618+
}
619+
620+
.type-attr {
610621
display: block;
611622
span {
612623
font-weight: normal;

0 commit comments

Comments
 (0)