diff --git a/gdb-port/parser.py b/gdb-port/parser.py index 1976a405aa169bcbc80991252df8d7dbaa789a7a..d0f210356945275f7cce33007244fa5bbc32982a 100644 --- a/gdb-port/parser.py +++ b/gdb-port/parser.py @@ -335,7 +335,7 @@ class ParserStack: def commit_at_pop(self): current_event = self.stack_events[-1] - ev_start = self.committed if self.committed > 0 else 0 + ev_start = self.committed + 1 ev_list = self.stack_events[ev_start:] # NOTE: Assumes that ParserStack.pop() pops p_stack after this function runs current_parser = self.p_stack[-1] @@ -355,9 +355,9 @@ class ParserStack: assert ev_list[-1] == current_event # DEBUG # Compare bytes allocated in arena to last known value, which will be the additional bytes allocated since reentering the stack frame #alloc_size = self.stack_events[ev_start][1] - current_event[1] - current_event[0][2].add_mem_use(int(self.arena), current_frame_alloc) + current_event[2].add_mem_use(int(self.arena), current_frame_alloc) self.committed = len(self.stack_events)-1 - return { current_event[0][2].address: current_frame_alloc } + return { current_event[2].address: current_frame_alloc } print("commit_at_pop: current_frame_alloc", current_frame_alloc) # DEBUG # TODO: if len(ev_list) > 1