summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ABI
Commit message (Collapse)AuthorAgeFilesLines
...
* Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a ↵Ewan Crawford2015-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | function call on target via register manipulation For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls. In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values. Reviewers: jingham, spyffe Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427 Differential Revision: http://reviews.llvm.org/D9404 llvm-svn: 242137
* Use both OS and Architecture to choose correct ABIAbhishek Aggarwal2015-07-061-1/+2
| | | | | | | | | | | | | | | | | | | | Summary: - In ABIMacOSX_i386.cpp: -- Earlier, only Triple:Arch was used to choose ABI -- Now, Triple:OS is also used along with Triple:Arch - Resolves PR-23718 Change-Id: Id8b1d86dda763241f9e594a1c71252555939af1e Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10308 llvm-svn: 241441
* Fix some compiler warnings about not using override consistently.Greg Clayton2015-06-271-4/+4
| | | | llvm-svn: 240864
* Submitting patch from Abhishek for:Greg Clayton2015-06-255-0/+973
| | | | | | http://reviews.llvm.org/D10309 llvm-svn: 240663
* [LLDB][MIPS] ABI Plugin for MIPS64Bhushan D. Attarde2015-06-195-0/+723
| | | | | | | | | | | SUMMARY: This patch implements ABI plugin for MIPS64. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, emaste, nitesh.jain, lldb-commits Differential Revision: http://reviews.llvm.org/D10534 llvm-svn: 240123
* [LLDB][MIPS] ABI Plugin for MIPS32Bhushan D. Attarde2015-06-185-0/+733
| | | | | | | | | | | SUMMARY: This patch implements ABI plugin for MIPS32. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D10240 llvm-svn: 239997
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-082-2/+5
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-082-5/+2
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Handle aggregate return types in SysV-arm ABITamas Berghammer2015-05-211-5/+28
| | | | | | Differential revision: http://reviews.llvm.org/D9910 llvm-svn: 237901
* Add float/double return value handling to SysV-arm ABITamas Berghammer2015-05-211-0/+37
| | | | | | | | | | This is neccessary for evaluating expressions with float/double return value and for displaying float/double return values in case of a thread step out. Differential revision: http://reviews.llvm.org/D9907 llvm-svn: 237900
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-2/+1
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* This patch adds support aarch64-linux-gnu (SysV) abi in lldb.Omair Javaid2015-04-296-4/+1237
| | | | | | | | | This code is also an import from MacOSx implementation as SysV abi is similar to what has been implemented for MacOS but may require a few tweaks. http://reviews.llvm.org/D8538 llvm-svn: 236098
* This patch adds required piece of code for SysV Abi for arm. Omair Javaid2015-04-296-5/+1008
| | | | | | | | | | Its mostly imported from MacOSx ABI for arm which is similar. Further tweaking a updates may be required at a later stage. http://reviews.llvm.org/D8539 llvm-svn: 236097
* Fix an issue where LLDB could crash when trying to figure out the return ↵Enrico Granata2015-04-061-0/+4
| | | | | | value layout for an invalid type llvm-svn: 234239
* Fix warnings generated by clang-cl.Zachary Turner2015-04-021-2/+2
| | | | | | | | | | | | | | There were a couple of real bugs here regarding error checking and signed/unsigned comparisons, but mostly these were just noise. There was one class of bugs fixed here which is particularly annoying, dealing with MSVC's non-standard behavior regarding the underlying type of enums. See the comment in lldb-enumerations.h for details. In short, from now on please use FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which contain values larger than can fit into a signed integer. llvm-svn: 233943
* Work around lack of %zd printf format specifier in MSVC libs.Adrian McCarthy2015-03-303-6/+6
| | | | llvm-svn: 233569
* Revert "Fix warnings found with clang-cl."Zachary Turner2015-02-251-2/+2
| | | | | | | SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
* Fix warnings found with clang-cl.Zachary Turner2015-02-251-2/+2
| | | | | | | | | | | Earlier this week I was able to get clang-cl on Windows to be able to self host. This opened the door to being able to get a whole new slew of warnings for the Windows build. This patch fixes all of the warnings, many of which were real bugs. llvm-svn: 230522
* UnwindPlan::Row refactor -- add support for CFA set by a DWARF expressionPavel Labath2015-02-237-24/+14
| | | | | | | | | | | | | | | | | | | Summary: This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new class CFAValue and moving all CFA setting/getting code there. Note that code using the new CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore, this patch should not change the functionality in any way. Test Plan: Ran tests on Mac and Linux. No regressions detected. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7755 llvm-svn: 230210
* Make a more complete fix for always supplying an execution context when ↵Greg Clayton2015-02-126-25/+25
| | | | | | | | | | getting byte sizes from types. There was a test in the test suite that was triggering the backtrace logging output that requested that the client pass an execution context. Sometimes we need the process for Objective C types because our static notion of the type might not align with the reality when being run in a live runtime. Switched from an "ExecutionContext *" to an "ExecutionContextScope *" for greater ease of use. llvm-svn: 228892
* Implement initial Altivec supportJustin Hibbits2015-02-052-6/+2
| | | | | | | | | | | | | | | | | Summary: This adds the register plumbing, as well as register reading in FreeBSD core dumps. Further work on the POSIX/FreeBSD ProcessMonitor is required in order to support ptrace access to these registers. Reviewers: tfiala, emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7039 llvm-svn: 228278
* Preparatory infrastructural work to support dynamically determining sizes of ↵Enrico Granata2015-01-286-35/+35
| | | | | | | | | | | | ObjC types via the runtime This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for) The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee) This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet llvm-svn: 227274
* Add link to github x86-psABI repo where the ABI doc is being Jason Molenda2015-01-261-0/+1
| | | | | | revised. llvm-svn: 227083
* Add comments explaining the unwind setup inJason Molenda2015-01-162-0/+20
| | | | | | | | | ABIMacOSX_i386::CreateFunctionEntryUnwindPlan, ABIMacOSX_i386::CreateDefaultUnwindPlan, ABISysV_x86_64::CreateFunctionEntryUnwindPlan, ABISysV_x86_64::CreateDefaultUnwindPlan llvm-svn: 226347
* Add comment regarding which i386 registers are non-volatile instead ofJason Molenda2015-01-161-0/+5
| | | | | | just pointing to the standard document regarding this. llvm-svn: 226231
* Mark the armv7 q0-q3 and q8-q15 registers as volatile (not calleeJason Molenda2014-12-021-0/+30
| | | | | | | | | | | | preserved) in the ABI. Realistically lldb isn't able to track register saves of any of the neon regs right now so we should probably mark all of the regs as unavailable when you're not on stack frame 0... <rdar://problem/19115127> llvm-svn: 223174
* Improve PowerPC unwind supportJustin Hibbits2014-11-122-12/+10
| | | | | | | | | | | | | | | | | Summary: Taking advantage of the new 'CFAIsRegisterDereferenced' CFA register type, add full stack unwind support to the PowerPC/PowerPC64 ABI. Also, add a new register set for powerpc32-on-64, so the register sizes are correct. This also requires modifying the ProcessMonitor to add support for non-uintptr_t-sized register values. Reviewers: jasonmolenda, emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D6183 llvm-svn: 221789
* Fix some bugs from D5988Justin Hibbits2014-10-313-1/+49
| | | | | | | | | | | | | | | | | | Summary: Ed Maste found some problems with the commit in D5988. Address most of these. While here, also add floating point return handling. This doesn't handle 128-bit long double yet. Since I don't have any system that uses it, I don't currently have plans to implement it. Reviewers: emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D6049 llvm-svn: 220963
* First cut of PowerPC(64) support in LLDB.Justin Hibbits2014-10-319-0/+2524
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds preliminary support for PowerPC/PowerPC64, for FreeBSD. There are some issues still: * Breakpoints don't work well on powerpc64. * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host. * Backtraces don't work. This is due to PowerPC ABI using a backchain pointer in memory, instead of a dedicated frame pointer register for the backchain. * Breakpoints on functions without debug info may not work correctly for 32-bit powerpc. Reviewers: emaste, tfiala, jingham, clayborg Reviewed By: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D5988 llvm-svn: 220944
* Expose the type-info flags at the public API layer. These flags provide much ↵Enrico Granata2014-10-212-24/+24
| | | | | | more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593 llvm-svn: 220322
* RegisterContextLLDB::InitializeNonZerothFrame had a bit of code toJason Molenda2014-09-025-67/+5
| | | | | | | | | | | | | | | | | | | | detct unwind loops but there was a code path through there (using architecture default unwind plans) that didn't do the check, and could end up with an infinite loop unwind. Move that code into a separate method and call it from both places where it is needed. Also remove the use of ABI::FunctionCallsChangeCFA in that check. I thought about it a lot and none of the architecutres that we're supporting today can have a looping CFA. Since the unwinder isn't using ABI::FunctionCallsChangeCFA() and ABI::StackUsesFrames(), and the unwinder was the only reason those methods exists, I removed them from the ABI and all its plugins. <rdar://problem/17364005> llvm-svn: 216992
* Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.Todd Fiala2014-07-231-1/+1
| | | | | | | | | | | See the following llvm change for details: r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines AArch64: remove arm64 triple enumerator. This change fixes build breaks on Linux and MacOSX lldb. llvm-svn: 213755
* Fix the warnings introducedDeepak Panickal2014-07-221-19/+5
| | | | llvm-svn: 213643
* ABI for the Hexagon DSPDeepak Panickal2014-07-215-0/+736
| | | | llvm-svn: 213566
* Fix typos.Bruce Mitchener2014-07-011-2/+2
| | | | llvm-svn: 212132
* lldb: remove adhoc implementation of array_sizeofSaleem Abdulrasool2014-06-274-6/+8
| | | | | | | | Replace adhoc inline implementation of llvm::array_lengthof in favour of the implementation in LLVM. This is simply a cleanup change, no functional change intended. llvm-svn: 211868
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-041-2/+3
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* sanitise sign comparisonsSaleem Abdulrasool2014-04-022-15/+15
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* lldb arm64 import.Jason Molenda2014-03-295-0/+1267
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* Better error reporting when a variable can't beSean Callanan2014-02-283-5/+29
| | | | | | | | | | | read during materialization. First of all, report if we can't read the data for some reason. Second, consult the ValueObject's error and report that if there's some problem. <rdar://problem/16074201> llvm-svn: 202552
* Re-apply r201292. We're not going to enforce proper stack frame alignment ↵Jason Molenda2014-02-193-39/+36
| | | | | | | | | on i386/x86_64 because there are too many trap handlers that will have an improperly aligned caller sp and this will cause the unwinder to stop too early. llvm-svn: 201637
* Revert r201292 which relaxed the stack frame alignment requirements.Jason Molenda2014-02-133-36/+39
| | | | | | | | | This was primarily working around problems where we weren't able to identify trap handlers for different environments -- but instead, I'm working to make it easier to specify those trap handler function names. llvm-svn: 201366
* Change the ABI CallFrameAddressIsValid methods for i386 and x86_64.Jason Molenda2014-02-133-39/+36
| | | | | | | | | | | | | | | | | | They were enforcing 16-byte alignment on stack frames for Darwin x86 programs. But we've found that trap handlers typically don't have the stack pointer aligned correctly when a trap happens and lldb wasn't backtracing all the way through. This method is only used as a safety guard to prevent lldb's unwinder from using a bogus address as a stack frame - we'll still enforce word-size alignment on stack frames so that should be fine. Also rolled back akaylor's changes from August 2013 in r188952 which changed the i386 ABI plugin to relax the CallFrameAddressIsValid offsets for non-Darwin targets where only 4-byte alignment is enforced. Now Darwin is the same as those environments. <rdar://problem/15982682> llvm-svn: 201292
* Changed the ABIs and ClangFunction to take aSean Callanan2013-11-086-245/+58
| | | | | | | | | | | | | llvm::ArrayRef of arguments rather than taking a fixed number of possibly-NULL pointers to arguments. Also changed ClangFunction::GetThreadPlanToCallFunction to take the address of the argument struct by value instead of by reference, since it doesn't actually modify the value passed into it. llvm-svn: 194232
* Update ABISysV_x86_64.cpp to use more efficient register finding calls. Greg Clayton2013-11-051-21/+64
| | | | | | | | Instead of looking up registers by name, we use the generic ID when we can. Also added code that creates an extra frame when running expressions by pushing the current PC and FP and then hooking up the FP backchain. This code is "#if 0" out for now until we can pair it with unwinder fixes. llvm-svn: 194035
* Fix the architectural default unwind plan's settings for restoringJason Molenda2013-11-052-2/+2
| | | | | | the stack pointer. llvm-svn: 194029
* Fix a bug in the x86_64 architectural default unwindplanJason Molenda2013-11-041-1/+1
| | | | | | | where it was using the wrong register numbering scheme to express where the rbp could be retrieved from. llvm-svn: 194023
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-046-7/+7
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-026-7/+7
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-254-18/+18
| | | | llvm-svn: 191367
OpenPOWER on IntegriCloud