summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Add truth value testing to those lldb Python objects with the IsValid() ↵Johnny Chen2011-05-175-28/+56
| | | | | | | | | | | method definitions. object.__nonzero__(self) is called to implement truth value testing and the built-in operation bool(), via a simple delegation to self.IsValid(). Change tests under python_api/lldbutil to utilize this mechanism. llvm-svn: 131494
* Fixed an assert that could cause a crash when there was anGreg Clayton2011-05-171-1/+8
| | | | | | | unrecognized DW_TAG_base_type. Now it is a error printed to stderr. llvm-svn: 131473
* Fixed an issue where addresses would not get resolved for the last Greg Clayton2011-05-171-10/+27
| | | | | | loaded section in the section load list. llvm-svn: 131472
* Removed some assertions that could crash the controlling programGreg Clayton2011-05-171-5/+11
| | | | | | and turned them into warnings to stderr. llvm-svn: 131470
* Fixed an issue that broke expression parsing related to backing upGreg Clayton2011-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | all register values. There is some junk that was appearing at the end of the result the 'g' packet (read all register values). This function was being called in: bool GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp) Then the packet data for the 'G' packet (write all registers) was being placed into "data_sp" so the: bool GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data_sp) could restore it. In attempting to clean up the extra junk at the end of this packet data, the packet was getting truncated. llvm-svn: 131468
* Forgot to check in this patch for Marco Minutoli.Johnny Chen2011-05-171-1/+1
| | | | | | Update to Python2.7 from Python 2.6. llvm-svn: 131465
* Fixed the "mmap" to work on MacOSX/darwin by supplying the correct arguemnts.Greg Clayton2011-05-174-17/+66
| | | | | | | | | | | Modified ClangUserExpression and ClangUtilityFunction to display the actual error (if one is available) that made the JIT fail instead of a canned response. Fixed the restoring of all register values when the 'G' packet doesn't work to use the correct data. llvm-svn: 131454
* Added an allocated memory cache to avoid having to allocate memory over andGreg Clayton2011-05-178-191/+658
| | | | | | | | over when running JITed expressions. The allocated memory cache will cache allocate memory a page at a time for each permission combination and divvy up the memory and hand it out in 16 byte increments. llvm-svn: 131453
* Set the default "break list" level back to full.Jim Ingham2011-05-171-1/+1
| | | | llvm-svn: 131449
* Fix the error message when an expression evaluation is interrupted by a ↵Jim Ingham2011-05-175-12/+82
| | | | | | | | | crash/breakpoint hit to give the reason for the interrupt. Also make sure it we don't want to unwind from the evaluation we print something if it is interrupted. llvm-svn: 131448
* Fix a bug in the test case file (doesn't affect the tests.)Jim Ingham2011-05-171-2/+5
| | | | llvm-svn: 131445
* Clang makes two breakpoints for some fairly simple lines, not sure why but ↵Jim Ingham2011-05-172-7/+7
| | | | | | | | no need to check for this in the testsuite. llvm-svn: 131443
* Fix bad test case; not all compilers are guaranteed to step into code ↵Johnny Chen2011-05-161-9/+6
| | | | | | | | inlined from the STL header file. rdar://problem/8983790 llvm-svn: 131433
* Add implementation of built-in function len() for those lldb containers withJohnny Chen2011-05-162-12/+38
| | | | | | | | | | | | | | | unambiguous iteration support. So that we could, for example: ... REGs = lldbutil.get_GPRs(frame) print "Number of general purpose registers: %d" % len(REGs) for reg in REGs: print "%s => %s" %(reg.GetName(), reg.GetValue()) ... llvm-svn: 131418
* Fix places that were writing directly to the debugger's outputCaroline Tice2011-05-162-7/+19
| | | | | | handles to go through the appropriate channels instead. llvm-svn: 131415
* Renamed the test cases more properly to test_lldb_iter_module/breakpoint/farme.Johnny Chen2011-05-161-9/+9
| | | | llvm-svn: 131412
* Add support for the 'G' packet not being implemented or returning an error.Greg Clayton2011-05-162-7/+44
| | | | | | | If we are asked to restore all register values, we need to fall back to restoring each register one by one. llvm-svn: 131398
* Fixed an issue where large memory writes might not get chunked up into smallerGreg Clayton2011-05-163-1/+10
| | | | | | | | packets in GDB remote. Also fixed a compiler warning for an unhandled case for a switch. llvm-svn: 131397
* Dump JIT memory requirements when "log enable lldb expr" logging is enabled.Greg Clayton2011-05-152-3/+14
| | | | | | Correctly handle invalid 32-bit mmap fail return value in ProcessGDBRemote. llvm-svn: 131394
* Properly handle when commands are not unsupported in the GDB remote clients.Greg Clayton2011-05-151-55/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix we would often call SendPacketAndWaitForResponse() which returns the number of bytes in the response. The UNSUPPORTED response in the GDB remote protocol is zero bytes and we were checking for it inside an if statement: if (SendPacketAndWaitForResponse(...)) { if (response.IsUnsupportedResponse()) { // UNSUPPORTED... // This will never happen... } } We now handle is properly as: if (SendPacketAndWaitForResponse(...)) { } else { // UNSUPPORTED... } llvm-svn: 131393
* Added the ability to get a 32 or 64 bit simple return value from the Greg Clayton2011-05-152-83/+82
| | | | | | | | | ABIMacOSX_arm plugin. Modified darwin-debug to print out the exectuable, working directory and arguments a bit differently. llvm-svn: 131392
* Updated to use the latest LLVM/Clang, to pick up JITSean Callanan2011-05-154-7/+14
| | | | | | changes. llvm-svn: 131391
* Fixed the default ARM registers to have the generic argumentGreg Clayton2011-05-151-5/+5
| | | | | | definitions and names. llvm-svn: 131387
* Added generic register numbers for simple ABI argument registers and definedGreg Clayton2011-05-1511-32/+108
| | | | | | | | | | | | | | | | | the appropriate registers for arm and x86_64. The register names for the arguments that are the size of a pointer or less are all named "arg1", "arg2", etc. This allows you to read these registers by name: (lldb) register read arg1 arg2 arg3 ... You can also now specify you want to see alternate register names when executing the read register command: (lldb) register read --alternate (lldb) register read -A llvm-svn: 131376
* Modified the lldb.xcodeproj to not have the headers in a copy files phaseGreg Clayton2011-05-151-60/+0
| | | | | | for lldb-core. llvm-svn: 131371
* Added the ability to get the return value from a ThreadPlanCallFunctionGreg Clayton2011-05-1515-83/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread plan. In order to get the return value, you can call: void ThreadPlanCallFunction::RequestReturnValue (lldb::ValueSP &return_value_sp); This registers a shared pointer to a return value that will get filled in if everything goes well. After the thread plan is run the return value will be extracted for you. Added an ifdef to be able to switch between the LLVM MCJIT and the standand JIT. We currently have the standard JIT selected because we have some work to do to get the MCJIT fuctioning properly. Added the ability to call functions with 6 argument in the x86_64 ABI. Added the ability for GDBRemoteCommunicationClient to detect if the allocate and deallocate memory packets are supported and to not call allocate memory ("_M") or deallocate ("_m") if we find they aren't supported. Modified the ProcessGDBRemote::DoAllocateMemory(...) and ProcessGDBRemote::DoDeallocateMemory(...) to be able to deal with the allocate and deallocate memory packets not being supported. If they are not supported, ProcessGDBRemote will switch to calling "mmap" and "munmap" to allocate and deallocate memory instead using our trivial function call support. Modified the "void ProcessGDBRemote::DidLaunchOrAttach()" to correctly ignore the qHostInfo triple information if any was specified in the target. Currently if the target only specifies an architecture when creating the target: (lldb) target create --arch i386 a.out Then the vendor, os and environemnt will be adopted by the target. If the target was created with any triple that specifies more than the arch: (lldb) target create --arch i386-unknown-unknown a.out Then the target will maintain its triple and not adopt any new values. This can be used to help force bare board debugging where the dynamic loader for static files will get used and users can then use "target modules load ..." to set addressses for any files that are desired. Added back some convenience functions to the lldb_private::RegisterContext class for writing registers with unsigned values. Also made all RegisterContext constructors explicit to make sure we know when an integer is being converted to a RegisterValue. llvm-svn: 131370
* Expand the ABI prepare trivial function call to allow 6 simple args.Greg Clayton2011-05-1412-107/+417
| | | | llvm-svn: 131334
* Breakpoint::Description with eDescriptionLevelBrief should just print the ↵Jim Ingham2011-05-141-1/+3
| | | | | | number of locations, printing the list of locations is pointless. llvm-svn: 131333
* For the purposes of setting breakpoints treat methods defined in the class ↵Jim Ingham2011-05-141-0/+18
| | | | | | and methods defined in a category on the class as the same. llvm-svn: 131331
* Clean up the test a little bit; and use lldbutil.get_GPRs(frame) to retrieve ↵Johnny Chen2011-05-131-9/+3
| | | | | | the general purpose register set. llvm-svn: 131324
* Test commit from a git-svn-cloned lldb/trunk repository.Johnny Chen2011-05-131-0/+2
| | | | llvm-svn: 131319
* This patch add a "fake" attach waiting for a real implementation andJohnny Chen2011-05-138-12/+81
| | | | | | | | | | | | | | | | solve the build break due to the lack of this method. It also propose a solution to the API changes in RegisterContext. I upgraded also the the python version in the makefile. My linux installation has python2.7 and AFAIK also the latest ubuntu has this version of python so maybe is worth upgrading. Patch by Marco Minutoli <mminutoli@gmail.com> [Note: I had to hand merge in the diffs since patch thinks it is a corrupt patch.] llvm-svn: 131313
* Headers have been moved to /includes/lldb/Interpreter. This patchJohnny Chen2011-05-138-9/+9
| | | | | | | | reflects this change. Marco Minutoli <mminutoli@gmail.com> llvm-svn: 131306
* PATH_MAX is in limits.h on Linux.Johnny Chen2011-05-131-0/+1
| | | | | | Patch by Marco Minutoli <mminutoli@gmail.com> llvm-svn: 131304
* This method has been removed from the API. This fix the compilationJohnny Chen2011-05-131-15/+0
| | | | | | | | breakage due to its presence. Patch by Marco Minutoli <mminutoli@gmail.com> llvm-svn: 131303
* For cases where a const function is inaccurately reportedSean Callanan2011-05-131-0/+26
| | | | | | | | as non-const in the debug information, added a fallback to GetFunctionAddress, adding the const qualifier after the fact and searching again. llvm-svn: 131299
* When trying to print out the function name corresponding to the frame, if ↵Johnny Chen2011-05-131-1/+7
| | | | | | | | the function obj from the frame is not valid, try look for the symbol in the symbol table. llvm-svn: 131273
* Introduced support for UnknownAnyTy, the Clang typeSean Callanan2011-05-129-32/+131
| | | | | | | | | | | | | | | | | | | representing variables whose type must be inferred from the way they are used. Functions without debug information now return UnknownAnyTy and must be cast. Variables with no debug information are not yet using UnknownAnyTy; instead they are assumed to be void*. Support for variables of unknown type is coming (and, in fact, some relevant support functions are included in this commit) but will take a bit of extra effort. The testsuite has also been updated to reflect the new requirement that the result of printf be cast, i.e. expr (int) printf("Hello world!") llvm-svn: 131263
* Fix the InstructionLLVM::Dump() so that for Triple::arm, PC reads as the addressJohnny Chen2011-05-122-17/+22
| | | | | | | | | of the current instruction plus 8. And for Triple::thumb, it is plus 4. rdar://problem/9170971 lldb disassembly's symbol information not correct (off by 2?) llvm-svn: 131256
* Cleaned up the expected substring for output from the stop-hook mechanism.Johnny Chen2011-05-121-2/+2
| | | | llvm-svn: 131253
* Construction of the RegisterReaderArg instance should happen after we have a ↵Johnny Chen2011-05-121-2/+2
| | | | | | valid base_addr, not before. llvm-svn: 131236
* Cleaned up the ABI::PrepareTrivialCall() function to take three argumentGreg Clayton2011-05-129-485/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointers: virtual bool PrepareTrivialCall (Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, lldb::addr_t *arg1_ptr, lldb::addr_t *arg2_ptr, lldb::addr_t *arg3_ptr) const = 0; Prior to this it was: virtual bool PrepareTrivialCall (Thread &thread, lldb::addr_t sp, lldb::addr_t functionAddress, lldb::addr_t returnAddress, lldb::addr_t arg, lldb::addr_t *this_arg, lldb::addr_t *cmd_arg) const = 0; This was because the function that called this slowly added more features to be able to call a C++ member function that might have a "this" pointer, and then later added "self + cmd" support for objective C. Cleaning this code up and the code that calls it makes it easier to implement the functions for new targets. The MacOSX_arm::PrepareTrivialCall() is now filled in and ready for testing. llvm-svn: 131221
* Target::EvaluateExpression should suppress stop hooks.Jim Ingham2011-05-122-1/+28
| | | | llvm-svn: 131219
* Remove the custom working directory form the xcscheme.Greg Clayton2011-05-121-1/+7
| | | | llvm-svn: 131218
* Make sure you have an executable module before trying to print its name.Jim Ingham2011-05-121-1/+4
| | | | llvm-svn: 131217
* Add two utility functions:Johnny Chen2011-05-1211-4/+284
| | | | | | | | | | | o get_parent_frame(frame) o get_args_as_string(frame) to lldbutil.py and create TestFrameUtils.py to exercise the utils. Plus re-arrange the test/python_api/lldbutil to have three directories for testing iteration, process stack traces, and the just added frame utils. llvm-svn: 131213
* Moved all code from ArchDefaultUnwindPlan and ArchVolatileRegs into theirGreg Clayton2011-05-1141-1435/+2456
| | | | | | | | | | | | | | | respective ABI plugins as they were plug-ins that supplied ABI specfic info. Also hookep up the UnwindAssemblyInstEmulation so that it can generate the unwind plans for ARM. Changed the way ABI plug-ins are handed out when you get an instance from the plug-in manager. They used to return pointers that would be mananged individually by each client that requested them, but now they are handed out as shared pointers since there is no state in the ABI objects, they can be shared. llvm-svn: 131193
* Add ability to recognize/handle quotes around commandsCaroline Tice2011-05-112-15/+64
| | | | | | (e.g. '"target" create' works as well as 'target create'). llvm-svn: 131185
* Add more docstrings for get_GPRs(frame), getFPRs(frame), and get_ESRs(frame).Johnny Chen2011-05-101-3/+21
| | | | llvm-svn: 131168
* More string matching criterion.Johnny Chen2011-05-101-1/+1
| | | | llvm-svn: 131165
OpenPOWER on IntegriCloud