aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-29Fix TestConcurrentEvents to behave nicely with GCC 4.8Daniel Malea
- newer gcc generates additional debuginfo for function exit (stack object desctruction) which was causing tests to fail - work-around consists of not declaring any stack objects in main() git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187389 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29Use flag instead of rwlock state to track process running stateEd Maste
LLDB requires that the inferior process be stopped before, and remain stopped during, certain accesses to process state. Previously this was achieved with a POSIX rwlock which had a write lock taken for the duration that the process was running, and released when the process was stopped. Any access to process state was performed with a read lock held. However, POSIX requires that pthread_rwlock_unlock() be called from the same thread as pthread_rwlock_wrlock(), and lldb needs to stop and start the process from different threads. Violating this constraint is technically undefined behaviour, although as it happens Linux and Darwin result in the unlock proceeding in this case. FreeBSD follows POSIX more strictly, and the unlock would fail, resulting in a hang later upon the next attempt to take the lock. All read lock consumers use ReadTryLock() and handle failure to obtain the lock (typically by logging an error "process is running"). Thus, instead of using the lock state itself to track the running state, this change adds an explicit m_running flag. ReadTryLock tests the flag, and if the process is not running it returns with the read lock held. WriteLock and WriteTryLock are renamed to SetRunning and TrySetRunning, and (if successful) they set m_running with the lock held. This way, read consumers can determine if the process is running and act appropriately, and write consumers are still held off from starting the process if read consumers are active. Note that with this change there are still some curious access patterns, such as calling WriteUnlock / SetStopped twice in a row, and there's no protection from multiple threads trying to simultaneously start the process. In practice this does not seem to be a problem, and was exposing other undefined POSIX behaviour prior to this change. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29Adds a DW_OP_call_frame_cfa handler when evaluating DWARF 3/4 expressionsAshok Thirumurthi
in LLDB that load the canonical frame address rather than a location list. - Handles the simple case where a CFA can be pulled from the current stack frame. - Fixes more than one hundred failing tests with gcc 4.8! TODO: Use UnwindPlan::GetRowForFunctionOffset if the DWARFExpression needs to be evaluated in a context analogous to a virtual unwind (perhaps using RegisterContextLLDB). - Also adds some comments to DWARFCallFrameInfo whenever I got confused. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187361 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26Document "show args" -> "settings show target.run-args"Jim Ingham
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26Fix the logging messages for SBFrame::FindRegister().Jason Molenda
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187264 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26Add an SBFrame::FindRegister() method to make it a littleJason Molenda
easier to retrieve a register value. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187184 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26Refine the fix in r187094 to only distrust the StackID comparision when we ↵Jim Ingham
are starting from an address with no symbols. If we don't do that "nexti" will stop too soon when stepping past a tail call jump. rdar://problem/14516227 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187173 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Fixed several problems with watchpoint expressions.Sean Callanan
- First, the watchpoint size was being cast to the wrong type. This is primarily cosmetic, but annoying. - Second, the options for the watchpoint command were not being initialized correctly, which led to the watchpoint size sometimes having absurdly large values. This caused watchpoints to fail to be set in some cases. <rdar://problem/12658775> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187169 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25tests: Build test code on FreeBSD the same way as on LinuxEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187155 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Fix the lldb build after the removal of mblaze.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Set thread names on FreeBSDEd Maste
Also move the logic to shorten thread names from linux/Host.cpp to a new SetShortThreadName as both FreeBSD and Linux need the functionality. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187149 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Correct typo in commentsEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187148 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Remove unused codeEd Maste
- ReadLocker constructors that take a lock - Unconditional Lock::ReadLock and ReadLocker::Lock (all consumers use TryLock) - Make Unlock protected, as it has no external consumers git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187147 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25tests: Mark expected FreeBSD failures due to pr16699Ed Maste
FreeBSD's Host class doesn't yet return a list of running processes, so 'platform process list' fails and attach by process name does not work. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187142 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Add explicit braces to quiet the "avoid dangling else" warning from clang.Greg Clayton
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187137 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25tests: Mark expected FreeBSD failures due to pr16706Ed Maste
Watchpoints are not yet working on FreeBSD git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187134 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25tests: Mark expected FreeBSD failures due to pr16696Ed Maste
Live debugging for threaded inferiors is not yet implemented on FreeBSD git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187131 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Skip dead-strip test also on FreeBSDEd Maste
-dead_strip isn't supported by FreeBSD's ld. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187129 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Annote expected failures on FreeBSD due to pr14540Ed Maste
PR title updated to indicate that FreeBSD is also affected: Backtrace command does not display c++ member function names on Linux or FreeBSD git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Fixes LLDB address ranges with gcc 4.8Ashok Thirumurthi
- Modifies the DWARF parser for DWARF 4 specification of hi_pc as an offset-from-low-pc. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187125 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Fix test execution on FreeBSD versions other than 9.xEd Maste
The tests use a plugin based on the name from sys.platform. Unfortunately that string includes the major version number in Python 2.7, so the tests would look for builder_freebsd9.py, builder_freebsd10.py, etc. The issue doesn't affect Linux as Python returns 'linux2' also on Linux 3.x -- see http://bugs.python.org/issue12326 for details. It seems later versions of Python will drop the major version number, so adopt this convention now for FreeBSD. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Handle the case where we are stepping through code with no symbols, so we ↵Jim Ingham
can't really find the function start PC and so the StackID changes with every step. Do so by checking the parent frame ID, and if it hasn't changed, then we haven't stepped in. rdar://problem/14516227 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187094 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Update link for the SysV x86_64 ABI standard doc; x86-64.org hasJason Molenda
been down for months and is likely no longer supported. This was the most stable-looking link I could find for the current (0.99.6) version of the ABI doc. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187087 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Modify ProcessPOSIX to use the thread list mutex as neededDaniel Malea
- should resolve (at least some) of the spurious crashes we are seeing in multithreaded tests on Linux (and likely FreeBSD) git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Fix test suite make so that -std=c++11 gets set properly for supported ↵Matt Kopec
compilers and -std=c++0x gets set only for gcc 4.6 versions. Previously, -std=c++0x was being set for all compilers. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24tests: Mark expected FreeBSD failures due to pr16696Ed Maste
Live debugging of threaded inferiors is currently unimplemented for FreeBSD. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24tests: Mark expected FreeBSD failures due to pr16697Ed Maste
These fail due to: error: Expression can't be run, because there is no JIT compiled function git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24test_iter_registers is expected to fail on FreeBSDEd Maste
Added comment to llvm.org/pr14600 that it fails on FreeBSD in the same way as Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187070 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Add expectedFailureFreeBSD test wrapperEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187069 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24<rdar://problem/14521548>Greg Clayton
Fixed a crasher where if you accidentally specify a size that is too large when reading memory, LLDB would crash. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Don't rely on C99 for loop initializers in test caseStefanus Du Toit
This allows compilation of the test case with GCC 4.8. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187057 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Update www build instructions for FreeBSDEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187045 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Add FreeBSD buildbots to build pageEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24elf-core: Document offset constants in FreeBSD prstatus parserEd Maste
Also accomodate struct padding based on arch, for later i386 work. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187040 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Update current state of FreeBSD portEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187037 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Updated the LLDB status page to reflect recent work on Linux.Ashok Thirumurthi
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24Updating tests that fail with ICC 13.1 because of the different mapping of ↵Ashok Thirumurthi
assembly to DWARF. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187035 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Fix rvalue test makefile.Matt Kopec
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Remove builtin attribute from calls whose targets we replaceStefanus Du Toit
If we are replacing a function with the nobuiltin attribute, it may be called with the builtin attribute on call sites. Remove any such attributes since it's illegal to have a builtin call to something other than a nobuiltin function. This fixes the current buildbot breakage (where LLDB crashes on "expression new foo(42)"). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186990 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Skip test reported to hang the FreeBSD buildbotEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23elf-core: Remove now-unused compile-time FreeBSD supportEd Maste
This change removes the final instances of compile-time #ifdef magic from the elf core plugin. Also rename the classes to ELFLinux... as they're specific to Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23elf-core: Add helper function for parsing FreeBSD NT_PRSTATUSEd Maste
This avoids the use of the ELFPrStatus class, which returns to being used only for Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23elf-core: Improve FreeBSD support and move data extraction to parse timeEd Maste
Extracting thread data at parse time simplifies multi-platform support. This change adds FreeBSD thread names and auxv info. Thanks to Samuel Jacob for review, testing, and improvements. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186975 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23elf-core: Parse vendor-specific notesEd Maste
ELF notes contain a 'name' field, which specifies a vendor who defines the format of the note. Examples are 'FreeBSD' or 'GNU', or it may be empty for generic notes. Add a case for FreeBSD-specific notes, leaving Linux and GNU notes, other vendor-specific notes, and generic notes to be handled by the existing code for now. Thanks to Samuel Jacob for reviewing and suggesting improvements. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Remove spurious "-C" flag from CMake command lines in build.html.Stefanus Du Toit
-C usually specifies a script to prepopulate the CMake cache. In this case no script is specified, so CMake appears to just ignore it. So don't mention it in the first place - it's not desired anyways. Reviewed by: Daniel Malea git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186964 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Adds a test for "disassemble -a" after an assert, which can fail with ELFAshok Thirumurthi
because a synthetic symbol hasn't been provided for stripped function symbols. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186959 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Add instructions to www/source.html for using the Git mirror for those so ↵Stefanus Du Toit
inclined. Reviewed by: Daniel Malea git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186958 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23Fixed a potential crash in the GetOSVersion codeSean Callanan
caused by a CFStringRef going out of scope. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22When a Cortex-M3 target is selected (armv7m), force disassembly to be inJason Molenda
thumb mode. <rdar://problem/14107444>, <rdar://problem/14107405> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186881 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22Fix i386 FreeBSD buildEd Maste
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186871 91177308-0d34-0410-b5e6-96231b3b80d8