bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,400
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,401
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,402
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,403
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,404
def expect(self, cmd, msg=None, startstr=None, substrs=None, trace=False): """ Similar to runCmd; with additional expect style output matching ability.
def expect(self, cmd, msg=None, startstr=None, substrs=None, trace=False): """ Similar to runCmd; with additional expect style output matching ability.
453,405
def __init__(self, test_sub_dir, test_suffix): self.test_sub_dir = str(test_sub_dir).split(';') self.test_suffix = str(test_suffix)
def __init__(self, test_sub_dir, test_suffix): self.test_sub_dir = os.path.normcase(str(test_sub_dir)).split(';') self.test_suffix = str(test_suffix)
453,406
def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSourcePath(path_in_suite) for filename in os.listdir(source_path): # Check for the one subdirectory (build directory) tests will be in. if not filename in self.test_sub_dir: continue
def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSourcePath(path_in_suite) for filename in os.listdir(source_path): # Check for the one subdirectory (build directory) tests will be in. if not os.path.normcase(filename) in self.test_sub_dir: continue
453,407
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,408
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,409
def print_binary_data(size): value = "" while size > 0: if size >= 16: data = Input.read(16) size -= 16 else: data = Input.read(size) size = 0 value += data bytes = "" text = "" for index in xrange(16): if index < len(data): if index == 8: bytes += "- " ch = ord(data[index]) bytes += "%02X " % ch if ch >= 0x20 and ch <...
def print_binary_data(size): value = "" while size > 0: if size >= 16: data = Input.read(16) size -= 16 else: data = Input.read(size) size = 0 value += data bytes = "" text = "" for index in xrange(16): if index < len(data): if index == 8: bytes += "- " ch = ord(data[index]) bytes += "%02X " % ch if ch >= 0x20 and ch <...
453,410
def eval():
def eval():
453,411
def handle_struct(entry): global Fields members = entry[1] newFields = {} write("{\n"); indent() for member in members: name = member[0] type = member[1] write("%s = "%name.ljust(24)) value = handle_element(type) write("\n") Fields[name] = value newFields[name] = value dedent() write("}") return newFields
def handle_struct(entry): global Fields members = entry[1] newFields = {} write("{\n"); indent() for member in members: name = member[0] type = member[1] if name[0] != "_": write("%s = " % name.ljust(24)) value = handle_element(type) write("\n") Fields[name] = value newFields[name] = value dedent() write("}") ...
453,412
def handle_struct(entry): global Fields members = entry[1] newFields = {} write("{\n"); indent() for member in members: name = member[0] type = member[1] write("%s = "%name.ljust(24)) value = handle_element(type) write("\n") Fields[name] = value newFields[name] = value dedent() write("}") return newFields
def handle_struct(entry): global Fields members = entry[1] newFields = {} write("{\n"); indent() for member in members: name = member[0] type = member[1] write("%s = "%name.ljust(24)) value = handle_element(type) if name[0] != "_": write("\n") Fields[name] = value newFields[name] = value dedent() write("}") re...
453,413
def test_with_dsym_and_run_command(self): """Test 'frame variable var_name' on some variables with array types.""" self.buildDsym() self.objc_stepping()
def test_with_dsym_and_python_api(self): """Test stepping through ObjC method dispatch in various forms.""" self.buildDsym() self.objc_stepping()
453,414
def test_with_dsym_and_run_command(self): """Test 'frame variable var_name' on some variables with array types.""" self.buildDsym() self.objc_stepping()
def test_with_dsym_and_run_command(self): """Test 'frame variable var_name' on some variables with array types.""" self.buildDsym() self.objc_stepping()
453,415
def pass_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def pass_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,416
def pass_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def pass_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,417
def test_set_output_path(self): """Test that setting process.output-path for the launched process works.""" self.buildDefault()
def test_set_output_path(self): """Test that setting target.process.output-path for the launched process works.""" self.buildDefault()
453,418
def test_set_output_path(self): """Test that setting process.output-path for the launched process works.""" self.buildDefault()
def test_set_output_path(self): """Test that setting process.output-path for the launched process works.""" self.buildDefault()
453,419
def symname(value): parts = struct.unpack("<2L", value) if parts [0] == 0: return string_table_entry (parts [1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts [0] == 0: return string_table_entry (parts [1]) else: return '%s'
453,420
def test_step_into_stl(self): """Test that we can successfully step into an STL function.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") # The following two lines, if uncommented, will enable loggings. #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res) #self.assertTrue(res.Succeeded()) ...
def test_step_into_stl(self): """Test that we can successfully step into an STL function.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") # The following two lines, if uncommented, will enable loggings. #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res) #self.assertTrue(res.Succeeded()) ...
453,421
def test_step_into_stl(self): """Test that we can successfully step into an STL function.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") # The following two lines, if uncommented, will enable loggings. #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res) #self.assertTrue(res.Succeeded()) ...
def test_step_into_stl(self): """Test that we can successfully step into an STL function.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") # The following two lines, if uncommented, will enable loggings. #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res) #self.assertTrue(res.Succeeded()) ...
453,422
def parseOptionsAndInitTestdirs(): """Initialize the list of directories containing our unittest scripts. '-h/--help as the first option prints out usage info and exit the program. """ global configFile global delay global filterspec global fs4all global ignore global skipLongRunningTest global regexp global verbose ...
def parseOptionsAndInitTestdirs(): """Initialize the list of directories containing our unittest scripts. '-h/--help as the first option prints out usage info and exit the program. """ global configFile global delay global filterspec global fs4all global ignore global skipLongRunningTest global regexp global verbose ...
453,423
def test_load_unload(self): """Test breakpoint by name works correctly with dlopen'ing."""
def test_load_unload(self): """Test breakpoint by name works correctly with dlopen'ing."""
453,424
def test_load_unload(self): """Test breakpoint by name works correctly with dlopen'ing."""
def test_load_unload(self): """Test breakpoint by name works correctly with dlopen'ing."""
453,425
def process_input (self, in_str): # Canonicalize the format of the input string temp_str = in_str temp_str.strip(' \t') words = temp_str.split() temp_str = ('').join(words)
def process_input (self, in_str): # Canonicalize the format of the input string temp_str = in_str temp_str.strip(' \t') words = temp_str.split() temp_str = ('').join(words)
453,426
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,427
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,428
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,429
def test_set_prompt(self): """Test that 'set prompt' actually changes the prompt."""
def test_set_prompt(self): """Test that 'set prompt' actually changes the prompt."""
453,430
def test_evaluate_expression_python(self): """These SBFrame.EvaluateExpression() API.""" self.buildDefault()
def test_evaluate_expression_python(self): """Test SBFrame.EvaluateExpression() API for evaluating an expression.""" self.buildDefault()
453,431
def do_events(self): """Get the listener associated with the debugger and exercise some event APIs.""" exe = os.path.join(os.getcwd(), "a.out")
def do_events(self): """Get the listener associated with the debugger and exercise some event APIs.""" exe = os.path.join(os.getcwd(), "a.out")
453,432
def lldbLoggings(): """Check and do lldb loggings if necessary.""" # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is # defined. Use ${LLDB_LOG} to specify the log file. ci = lldb.DBG.GetCommandInterpreter() res = lldb.SBCommandReturnObject() if ("LLDB_LOG" in os.environ): if ("LLDB_LOG_O...
def lldbLoggings(): """Check and do lldb loggings if necessary.""" # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is # defined. Use ${LLDB_LOG} to specify the log file. ci = lldb.DBG.GetCommandInterpreter() res = lldb.SBCommandReturnObject() if ("LLDB_LOG" in os.environ): if ("LLDB_LOG_O...
453,433
def break_and_print_stacktraces(self): """Break at main.cpp:68 and do a threads dump""" exe = os.path.join(os.getcwd(), "a.out")
def break_and_print_stacktraces(self): """Break at main.cpp:68 and do a threads dump""" exe = os.path.join(os.getcwd(), "a.out")
453,434
def __init__(self, command, message): self.command = command self.message = message
def __init__(self, command, message): self.command = command self.message = message
453,435
def __init__(self, command, message): self.command = command self.message = message
def __init__(self, command, message): self.command = command self.message = message
453,436
def parseIntegratedTestScript(test): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable substitution performed. """ # Get the temporary location, this is always relative to the...
def parseIntegratedTestScript(test, normalize_slashes): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable substitution performed. """ # Get the temporary location, this is alw...
453,437
def parseIntegratedTestScript(test): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable substitution performed. """ # Get the temporary location, this is always relative to the...
def parseIntegratedTestScript(test): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable substitution performed. """ # Get the temporary location, this is always relative to the...
453,438
def executeTclTest(test, litConfig): if test.config.unsupported: return (Test.UNSUPPORTED, 'Test is unsupported') res = parseIntegratedTestScript(test) if len(res) == 2: return res script, isXFail, tmpBase, execdir = res if litConfig.noExecute: return (Test.PASS, '') # Create the output directory if it does not alr...
def executeTclTest(test, litConfig): if test.config.unsupported: return (Test.UNSUPPORTED, 'Test is unsupported') res = parseIntegratedTestScript(test, normalize_slashes=kIsWindows) if len(res) == 2: return res script, isXFail, tmpBase, execdir = res if litConfig.noExecute: return (Test.PASS, '') # Create the out...
453,439
def test_with_dsym(self): """Test 'image lookup -t days' and check for correct display.""" self.buildDsym() self.break_on_objc_methods()
def test_with_dsym(self): """Test setting objc breakpoints using regexp-break.""" self.buildDsym() self.break_on_objc_methods()
453,440
def test_with_dwarf(self): """Test 'image lookup -t days' and check for correct display.""" self.buildDwarf() self.break_on_objc_methods()
def test_with_dwarf(self): """Test setting objc breakpoints using regexp-break.""" self.buildDwarf() self.break_on_objc_methods()
453,441
def test_hellp_world_python(self): """Create target, breakpoint, launch a process, and then kill it."""
def test_hello_world_python(self): """Create target, breakpoint, launch a process, and then kill it."""
453,442
def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.')
def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.')
453,443
def parseIntegratedTestScript(test, normalize_slashes=False): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable substitution performed. """ # Get the temporary location, this ...
def parseIntegratedTestScript(test, normalize_slashes=False): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET' information. The RUN lines also will have variable ...
453,444
def processLine(ln): # Apply substitutions for a,b in substitutions: ln = ln.replace(a,b)
def processLine(ln): # Apply substitutions for a,b in substitutions: ln = ln.replace(a,b)
453,445
def run(self): print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): print "Got a valid event:", event print "Event type:", event.GetType() print "Event broadcaster:", event.GetBroadcaster().GetName() r...
def self.dbg.SetAsync(True) run(self): self.dbg.SetAsync(True) print self.dbg.SetAsync(True) "Running self.dbg.SetAsync(True) MyListeningThread:", self.dbg.SetAsync(True) self self.dbg.SetAsync(True) count self.dbg.SetAsync(True) = self.dbg.SetAsync(True) 0 self.dbg.SetAsync(True) # self.dbg...
453,446
def run(self): print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): print "Got a valid event:", event print "Event type:", event.GetType() print "Event broadcaster:", event.GetBroadcaster().GetName() r...
def run(self): print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): print "Got a valid event:", event print "Event type:", event.GetType() print "Event broadcaster:", event.GetBroadcaster().GetName() r...
453,447
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
453,448
def main(): # Bump the GIL check interval, its more important to get any one thread to a # blocking operation (hopefully exec) than to try and unblock other threads. # # FIXME: This is a hack. import sys sys.setcheckinterval(1000) global options from optparse import OptionParser, OptionGroup parser = OptionParser("usa...
def main(): # Bump the GIL check interval, its more important to get any one thread to a # blocking operation (hopefully exec) than to try and unblock other threads. # # FIXME: This is a hack. import sys sys.setcheckinterval(1000) global options from optparse import OptionParser, OptionGroup parser = OptionParser("usa...
453,449
def test_with_dwarf_and_python_api(self): """Use Python APIs to create a breakpoint by (filespec, line).""" self.buildDwarf() self.breakpoint_creation_by_filespec_python()
def test_with_dwarf_and_python_api(self): """Use Python APIs to create a breakpoint by (filespec, line).""" self.buildDwarf() self.breakpoint_creation_by_filespec_python()
453,450
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser()
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser()
453,451
def class_types(self): """Test 'frame variable this' when stopped on a class constructor.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def class_types(self): """Test 'frame variable this' when stopped on a class constructor.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,452
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,453
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,454
def handle_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) for index in xrange(value): write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) dedent() write("]") return newItems
def handle_array(entry): start_index = entry[1] length = entry[2] element = entry[3] newItems = [] write("[\n") indent() value = read_value(length) for index in xrange(value): write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) dedent() write("]") return newItems
453,455
def handle_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) for index in xrange(value): write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) dedent() write("]") return newItems
def handle_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) for index in xrange(value): write("%d = " % (index + start_index)) value = handle_element(element) write("\n") newItems.append(value) dedent() write("]") return newItems
453,456
def test_break_with_dwarf(self): """Test setting objc breakpoints using 'regexp-break' and 'breakpoint set'.""" self.buildDwarf() self.break_on_objc_methods()
def test_break_with_dwarf(self): """Test setting objc breakpoints using 'regexp-break' and 'breakpoint set'.""" self.buildDwarf() self.break_on_objc_methods()
453,457
def test_data_type_and_expr_with_dsym(self): """Lookup objective-c data types and evaluate expressions.""" self.buildDsym() self.data_type_and_expr_objc()
def test_data_type_and_expr_with_dsym(self): """Lookup objective-c data types and evaluate expressions.""" self.buildDsym() self.data_type_and_expr_objc()
453,458
def setupSysPath(): """Add LLDB.framework/Resources/Python to the search paths for modules.""" # Get the directory containing the current script. scriptPath = sys.path[0] if not scriptPath.endswith('test'): print "This script expects to reside in lldb's test directory." sys.exit(-1) os.environ["LLDB_TEST"] = scriptPa...
def setupSysPath(): """Add LLDB.framework/Resources/Python to the search paths for modules.""" # Get the directory containing the current script. scriptPath = sys.path[0] if not scriptPath.endswith('test'): print "This script expects to reside in lldb's test directory." sys.exit(-1) os.environ["LLDB_TEST"] = scriptPa...
453,459
def test_with_dsym_python(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDsym() self.breakpoint_conditions()
def test_with_dsym_and_run_command(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDsym() self.breakpoint_conditions()
453,460
def test_with_dwarf_python(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDwarf() self.breakpoint_conditions()
def test_with_dwarf_and_run_command(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDwarf() self.breakpoint_conditions()
453,461
def print_var_value (v, file, frame): if v.GetNumChildren() > 0: for c in range(v.GetNumChildren()): if v.GetChildAtIndex(c) is None: file.write("None") else: if (v.GetChildAtIndex(c).GetName()) is None: file.write("None") else: file.write(v.GetChildAtIndex(c).GetName()) file.write('=') print_var_value(v.GetChildAtInde...
class BreakPoint: def __init__(self, bp_name): self.name = bp_name self.values = {}
453,462
def print_vars (vars, fname, line, file, frame, target, thread): # disable this thread. count = thread.GetStopReasonDataCount() bid = 0 tid = 0 for i in range(count): id = thread.GetStopReasonDataAtIndex(i) bp = target.FindBreakpointByID(id) if bp.IsValid(): if bp.IsEnabled() == True: bid = bp.GetID() tid = bp.GetThrea...
def print_vars (vars, fname, line, file, frame, target, thread): # disable this thread. count = thread.GetStopReasonDataCount() bid = 0 tid = 0 for i in range(count): id = thread.GetStopReasonDataAtIndex(i) bp = target.FindBreakpointByID(id) if bp.IsValid(): if bp.IsEnabled() == True: bid = bp.GetID() tid = bp.GetThrea...
453,463
def print_vars (vars, fname, line, file, frame, target, thread): # disable this thread. count = thread.GetStopReasonDataCount() bid = 0 tid = 0 for i in range(count): id = thread.GetStopReasonDataAtIndex(i) bp = target.FindBreakpointByID(id) if bp.IsValid(): if bp.IsEnabled() == True: bid = bp.GetID() tid = bp.GetThrea...
def print_vars (vars, fname, line, file, frame, target, thread): # disable this thread. count = thread.GetStopReasonDataCount() bid = 0 tid = 0 for i in range(count): id = thread.GetStopReasonDataAtIndex(i) bp = target.FindBreakpointByID(id) if bp.IsValid(): if bp.IsEnabled() == True: bid = bp.GetID() tid = bp.GetThrea...
453,464
def set_breakpoints (target, breakpoint_filename): f = open(breakpoint_filename, "r") lines = f.readlines() for l in range(len(lines)): c = lines[l].split() # print "setting break point - ", c bp = target.BreakpointCreateByLocation (str(c[0]), int(c[1])) f.close()
def set_breakpoints (target, breakpoint_filename): f = open(breakpoint_filename, "r") lines = f.readlines() for l in range(len(lines)): c = lines[l].split() # print "setting break point - ", cif c[0] == " bp = dict.get(c[2]) if bp is None: bp = BreakPoint(c[1]) dict[c[2]] = bp bp.recordArgument(c[3], c[4]) f.close()
453,465
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: ...
f1_breakpoints = {} read_input(sys.argv[1], f1_breakpoints) f1_items = f1_breakpoints.items() f2_breakpoints = {} read_input(sys.argv[2], f2_breakpoints) f2_items = f2_breakpoints.items() mismatch = 0 for f2bp in range(len(f2_items)): id = f2_items[f2bp][0] bp = f2_items[f2bp][1] bp1 = f1_breakpoints.get(id) if bp1 i...
453,466
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: ...
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: if bp1 != bp: mismatch = mismatch + 1 thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: if bp1 != bp: mismat...
453,467
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: ...
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: ...
453,468
def test_with_dsym_and_run_command(self): """Display *bar_ptr when stopped on a function with forward declaration of struct bar.""" self.buildDsym() self.forward_declaration()
def test_with_dsym_and_run_command(self): """Display *bar_ptr when stopped on a function with forward declaration of struct bar.""" self.buildDsym() self.forward_declaration()
453,469
def test_with_dwarf_and_python_api(self): """Use Python APIs to create a breakpoint by (filespec, line).""" self.buildDwarf() self.breakpoint_creation_by_filespec_python()
def test_with_dwarf_and_python_api(self): """Use Python APIs to create a breakpoint by (filespec, line).""" self.buildDwarf() self.breakpoint_creation_by_filespec_python()
453,470
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser()
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser()
453,471
def test_with_dsym(self): """Test that we can successfully step into an STL function.""" self.buildDsym() self.step_into_stl()
def test_with_dsym(self): """Test that we can successfully step into an STL function.""" self.buildDsym() self.step_into_stl()
453,472
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,473
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
def symname(value): parts = struct.unpack("<2L", value) if parts[0] == 0: return string_table_entry(parts[1]) else: return '%s'
453,474
def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) index += 1 deden...
def handle_byte_array(entry): ent_size = entry[1] length = entry[2] element = entry[3] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(valu...
453,475
def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) index += 1 deden...
def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = " % index) value = handle_element(element) write("\n") newItems.append(value) index += 1 ded...
453,476
def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) index += 1 deden...
def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) index += (Input.t...
453,477
def eval():
def eval():
453,478
def eval():
def eval():
453,479
def disassemble_instructions (insts): for i in range(insts.GetSize()): print insts.GetInstructionAtIndex(i)
def disassemble_instructions (insts): for i in range(insts.GetSize()): print insts.GetInstructionAtIndex(i)
453,480
def test_with_dsym_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.buildDsym() self.bitfields_variable_python()
def test_with_dsym_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.buildDsym() self.bitfields_variable_python()
453,481
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
453,482
def execute(self, test, litConfig): if test.config.unsupported: return (Test.UNSUPPORTED, 'Test is unsupported')
def execute(self, test, litConfig): if test.config.unsupported: return (Test.UNSUPPORTED, 'Test is unsupported')
453,483
def generic_type_expr_tester(self, atoms, quotedDisplay=False): """Test that variable expressions with basic types are evaluated correctly."""
def try: dt = re.match("^\$[0-9]+ = \((.*)\)", output).group(1) except: self.fail("Data type from expression parser is parsed correctly") generic_type_expr_tester(self, try: dt = re.match("^\$[0-9]+ = \((.*)\)", output).group(1) except: self.fail("Data type from expression parser is parsed correctly") atoms, ...
453,484
def generic_type_expr_tester(self, atoms, quotedDisplay=False): """Test that variable expressions with basic types are evaluated correctly."""
def generic_type_expr_tester(self, atoms, quotedDisplay=False): """Test that variable expressions with basic types are evaluated correctly."""
453,485
def generic_type_expr_tester(self, atoms, quotedDisplay=False): """Test that variable expressions with basic types are evaluated correctly."""
def generic_type_expr_tester(self, atoms, quotedDisplay=False): """Test that variable expressions with basic types are evaluated correctly."""
453,486
def test_broadcast_event_with_dsym(self): """Exercise SBBroadcaster.BroadcastEvent() API.""" self.buildDsym() self.do_broadcast_event()
def test_add_listener_to_broadcaster_dsym(self): """Exercise some SBBroadcaster APIs.""" self.buildDsym() self.do_broadcast_event()
453,487
def test_broadcast_event_with_dsym(self): """Exercise SBBroadcaster.BroadcastEvent() API.""" self.buildDsym() self.do_broadcast_event()
def test_broadcast_event_with_dsym(self): """Exercise SBBroadcaster.BroadcastEvent() API.""" self.buildDsym() self.do_broadcast_event()
453,488
def test_broadcast_event_with_dwarf(self): """Exercise SBBroadcaster.BroadcastEvent() API.""" self.buildDwarf() self.do_broadcast_event()
def test_broadcast_event_with_dwarf(self): """Exercise SBBroadcaster.BroadcastEvent() API.""" self.buildDwarf() self.do_broadcast_event()
453,489
def run(self): #print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): #print "Got a valid event:", event #print "Event type:", event.GetType() #print "Event broadcaster:", event.GetBroadcaster().GetName...
defrun(self):#print"RunningMyListeningThread:",selfcount=0#Let'sonlytryatmost3timestoretrieveanykindofevent.whilenotcount>3:iflistener.WaitForEvent(5,event):#print"Gotavalidevent:",event#print"Eventtype:",event.GetType()#print"Eventbroadcaster:",event.GetBroadcaster().GetName()returncount=count+1print"Timeout:listener....
453,490
def run(self): #print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): #print "Got a valid event:", event #print "Event type:", event.GetType() #print "Event broadcaster:", event.GetBroadcaster().GetName...
def run(self): #print "Running MyListeningThread:", self count = 0 # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): #print "Got a valid event:", event #print "Event type:", event.GetType() #print "Event broadcaster:", event.GetBroadcaster().GetName...
453,491
def do_broadcast_event(self): """Get the broadcaster associated with the process and exercise BroadcastEvent API.""" exe = os.path.join(os.getcwd(), "a.out")
def do_add_listener_to_broadcaster(self): """Get the broadcaster associated with the process and wait for broadcaster events.""" exe = os.path.join(os.getcwd(), "a.out")
453,492
def run(self): #print "Running MyListeningThread:", self
def run(self): #print "Running MyListeningThread:", self
453,493
def run(self): #print "Running MyListeningThread:", self
defrun(self):#print"RunningMyListeningThread:",self
453,494
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
453,495
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
453,496
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. if not s...
453,497
def handle_enum(entry): iformat = entry [1] oformat = entry [2] definitions = entry [3] value = read_value (iformat) if type (definitions) is types.TupleType: selector = read_value (definitions [0]) definitions = definitions [1] [selector] description = definitions[value] if value in definitions else "unknown" writ...
def handle_enum(entry): iformat = entry [1] oformat = entry [2] definitions = entry [3] value = read_value (iformat) if type (definitions) is types.TupleType: selector = read_value (definitions [0]) definitions = definitions [1] [selector] if value in definitions: description = definitions[value] else: description =...
453,498
def setUp(self): lldb.SBDebugger.SetAsync(True) self.m_commandInterpreter = lldb.SBDebugger.GetCommandInterpreter() if not self.m_commandInterpreter: print "Couldn't get the command interpreter" sys.exit(-1)
def setUp(self): debugger = lldb.SBDebugger.Create() debugger.SetAsync(True) self.m_commandInterpreter = debugger.GetCommandInterpreter() if not self.m_commandInterpreter: print "Couldn't get the command interpreter" sys.exit(-1)
453,499