- Mar 08, 2011
-
-
Jim Ingham authored
Add a method "GetEntryPoint" to the ObjectFile class, and implement it on MachO & ELF - though the ELF implementation is probably a little weak. Then use this method in place of directly looking for "start" in the ThreadPlanCallFunction constructor to find the stopping point for our function evaluation. llvm-svn: 127194
-
Caroline Tice authored
Add thread state initialization to the thread where the interactive interpreter is run (which is separate from the thread where Py_Initialize is called, where this normally gets set up). llvm-svn: 127191
-
- Mar 07, 2011
-
-
Johnny Chen authored
We should still see the entire stdout redirected once the process is finished. llvm-svn: 127184
-
Johnny Chen authored
llvm-svn: 127179
-
Johnny Chen authored
Currently it has only test cases for SBThread.GetStopDescription() API. Also modified lldb.swig to add typemap for (char *dst, size_t dst_len) which occurs for SBThread::GetStopDescription() C++ API. For Python scripting: # Due to the typemap magic (see lldb.swig), we pass in an (int)length to GetStopDescription # and expect to get a Python string as the result object! # The 100 is just an arbitrary number specifying the buffer size. stop_description = thread.GetStopDescription(100) llvm-svn: 127173
-
Greg Clayton authored
then we end up using older .o files with out of date section remappings if we debug, compile + fix, and debug again. llvm-svn: 127166
-
- Mar 05, 2011
-
-
Johnny Chen authored
API with a process not in eStateConnected, and checks that the remote launch failed. Modify SBProcess::RemoteLaunch()/RemoteAttachToProcessWithID()'s log statements to fix a crasher when logging is turned on. llvm-svn: 127055
-
Greg Clayton authored
It will just load all files exactly where the files state they are (file addresses == load addresses). This is used when the llvm::Triple::OSType is set to llvm::Triple::UnknownOS or llvm::Triple::NoOS. llvm-svn: 127053
-
Johnny Chen authored
We start a fake debugserver listening on localhost:12345 and issue the command 'process connect connect://localhost:12345' to connect to it. llvm-svn: 127048
-
- Mar 04, 2011
-
-
Greg Clayton authored
chosing which FP back-chain methods to use since we can rely upon generic register numbers after that. llvm-svn: 127044
-
Johnny Chen authored
llvm-svn: 127025
-
Johnny Chen authored
This allows us to override CFLAGS on the command line: $ CFLAGS='-arch $(ARCH) -gdwarf-2 -O0' ./dotest.py -C clang -A i386 -v objc-optimized Session logs for test failures/errors will go into directory '2011-03-04-10_33_57' Command invoked: python ./dotest.py -C clang -A i386 -v objc-optimized ---------------------------------------------------------------------- Collected 2 tests 1: test_break_with_dsym (TestObjcOptimized.ObjcOptimizedTestCase) Test 'expr member' continues to work for optimized build. ... ok 2: test_break_with_dwarf (TestObjcOptimized.ObjcOptimizedTestCase) Test 'expr member' continues to work for optimized build. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.902s OK $ llvm-svn: 127011
-
Johnny Chen authored
test that objective-c expression parser continues to work for optimized build. Radar filed: # rdar://problem/9087739 # test failure: objc_optimized does not work for "-C clang -A i386" llvm-svn: 127009
-
Johnny Chen authored
llvm-svn: 126980
-
Johnny Chen authored
on the command line. For example, use '-A x86_64^i386' to launch the inferior use both x86_64 and i386. This is an example of building the debuggee using both clang and gcc compiers: [17:30:46] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -C clang^gcc -v -f SourceManagerTestCase.test_modify_source_file_while_debugging Session logs for test failures/errors will go into directory '2011-03-03-17_31_39' Command invoked: python ./dotest.py -C clang^gcc -v -f SourceManagerTestCase.test_modify_source_file_while_debugging Configuration: compiler=clang ---------------------------------------------------------------------- Collected 1 test 1: test_modify_source_file_while_debugging (TestSourceManager.SourceManagerTestCase) Modify a source file while debugging the executable. ... Command 'run' failed! original content: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello world.\n"); // Set break point at this line. return 0; } new content: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello lldb.\n"); // Set break point at this line. return 0; } os.path.getmtime() after writing new content: 1299202305.0 content restored to: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello world.\n"); // Set break point at this line. return 0; } os.path.getmtime() after restore: 1299202307.0 ok ---------------------------------------------------------------------- Ran 1 test in 8.259s OK Configuration: compiler=gcc ---------------------------------------------------------------------- Collected 1 test 1: test_modify_source_file_while_debugging (TestSourceManager.SourceManagerTestCase) Modify a source file while debugging the executable. ... original content: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello world.\n"); // Set break point at this line. return 0; } new content: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello lldb.\n"); // Set break point at this line. return 0; } os.path.getmtime() after writing new content: 1299202307.0 content restored to: #include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello world.\n"); // Set break point at this line. return 0; } os.path.getmtime() after restore: 1299202309.0 ok ---------------------------------------------------------------------- Ran 1 test in 2.301s OK [17:31:49] johnny:/Volumes/data/lldb/svn/trunk/test $ llvm-svn: 126979
-
James McIlree authored
Patch verified by Greg Clayton prior to checkin. llvm-svn: 126974
-
Sean Callanan authored
or 'self' variable was not properly read if the compiler optimized it into a register. llvm-svn: 126973
-
- Mar 03, 2011
-
-
Caroline Tice authored
Add code to emulate RFE Arm instruction. Add new instruction context for RFE instruction. Add several new helper functions to help emulate RFE instruction (including CurrentModeIsPrivileged, BadMode, and CPSRWriteByInstr). llvm-svn: 126965
-
Johnny Chen authored
among other things: // When stopped on breakppint 1, we can get the line entry using SBFrame API // SBFrame.GetLineEntry(). We'll get the start address for the the line entry // with the SBAddress type, resolve the symbol context using the SBTarget API // SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol. // // We then stop at breakpoint 2, get the SBFrame, and the the SBFunction object. // // The address from calling GetStartAddress() on the symbol and the function // should point to the same address, and we also verify that. And add one utility function disassemble(target, function_or_symbol) to lldbutil.py: """Disassemble the function or symbol given a target. It returns the disassembly content in a string object. """ TestDisasm.py uses the disassemble() function to do disassembly on the SBSymbol, and then the SBFunction object. llvm-svn: 126955
-
Caroline Tice authored
Add code to emulate UXTH Arm instruction. llvm-svn: 126954
-
Caroline Tice authored
Add code to emulate UXTB Arm instruction. llvm-svn: 126953
-
Caroline Tice authored
Add code to emulate SXTH Arm instruction. llvm-svn: 126951
-
Caroline Tice authored
Add code to emulate SXTB Arm instruction. llvm-svn: 126949
-
Johnny Chen authored
// When stopped on breakppint 1, and then 2, we can get the line entries using // SBFrame API SBFrame.GetLineEntry(). We'll get the start addresses for the // two line entries; with the start address (of SBAddress type), we can then // resolve the symbol context using the SBTarget API // SBTarget.ResolveSymbolContextForAddress(). // // The two symbol context should point to the same symbol, i.e., 'a' function. Add two utility functions to lldbutil.py: o get_stopped_threads(process, reason): return the list of threads with the specified stop reason or an empty list if not found o get_stopped_thread(process, reason): return the first thread with the given stop reason or None if not found llvm-svn: 126916
-
Caroline Tice authored
Fix bug where bitwise-AND was being used and it should have been bitwise-OR. llvm-svn: 126904
-
Caroline Tice authored
Add code to emulate ADD (immediate, Thumb) Arm instruction. Add addition context to EmulateInstruction contexts. llvm-svn: 126903
-
Greg Clayton authored
and symbols, and also allow clients to get the prologue size in bytes: SBAddress SBFunction::GetStartAddress (); SBAddress SBFunction::GetEndAddress (); uint32_t SBFunction::GetPrologueByteSize (); SBAddress SBSymbol::GetStartAddress (); SBAddress SBSymbol::GetEndAddress (); uint32_t SBSymbol::GetPrologueByteSize (); llvm-svn: 126892
-
- Mar 02, 2011
-
-
Caroline Tice authored
Add code to emulate MUL Arm instruction. Add new context type & info structure for mul instruction. llvm-svn: 126891
-
Greg Clayton authored
anything in a SBSymbolContext filled in given an SBAddress: SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolve_scope); Also did a little cleanup on the ProcessGDBRemote stdio file handle code. llvm-svn: 126885
-
Caroline Tice authored
Add code to emulate LDRSH (register) Arm instruction. llvm-svn: 126881
-
Johnny Chen authored
llvm-svn: 126877
-
Jim Ingham authored
llvm-svn: 126868
-
Johnny Chen authored
llvm-svn: 126867
-
Caroline Tice authored
Add code to emulate LDRSH (literal) Arm instruction. llvm-svn: 126866
-
Johnny Chen authored
o int_to_bytearray() o bytearray_to_int() They return/interpret the bytearray in the little endian format. For big endian, simply perform ba.reverse() on the bytearray object. And modify TestProcessAPI.py to take advantage of the functions. llvm-svn: 126813
-
Caroline Tice authored
Add code to emulate LDRSH (immediate) Arm instruction. llvm-svn: 126807
-
Caroline Tice authored
Add code to emulate LDRSB (register) Arm instruction. llvm-svn: 126802
-
- Mar 01, 2011
-
-
Johnny Chen authored
among other SBProcess APIs, to write (int)256 into a memory location of a global variable (int)my_int and reads/checks the variable afterwards. llvm-svn: 126792
-
Caroline Tice authored
Add code to emulate LDRSB (literal) Arm instruction. llvm-svn: 126789
-
Caroline Tice authored
Add code to emulate LDRSB (immediate) Arm instruction. llvm-svn: 126783
-