summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a hang on OSX while executing -exec-run.Hafiz Abid Qadeer2014-12-035-23/+55
| | | | | | | | | | Now we wait for input to become available before blocking in fgets. More details on problem can be found in http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20141201/014290.html Patch from dawn@burble.org. llvm-svn: 223222
* Update setMCJITMemoryManager call to keep in line with llvm r223183.Jason Molenda2014-12-031-1/+1
| | | | | | Patch from Ryan Goodfellow. llvm-svn: 223196
* 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
* Fix broken test suite on Windows after r223091.Zachary Turner2014-12-021-3/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D6484 Reviewed by: Oleksiy Vyalov llvm-svn: 223155
* Fix the behavior of ${current-pc-arrow} in the default disassemblyJason Molenda2014-12-022-7/+15
| | | | | | | | | | | | format for the not-current-stack-frame. This was causing test/functionalities/inferior-assert to fail. Also document the new additions to the format specifications used in the disassembly-format changes to formats.html. <rdar://problem/19102757> llvm-svn: 223096
* Fix several test failures on Linux/FreeBSD caused by compiler configuration ↵Oleksiy Vyalov2014-12-013-55/+55
| | | | | | | | and invalid environment - make lldbtest.registerSharedLibrariesWithTarget to support multiple platforms. http://reviews.llvm.org/D6392 llvm-svn: 223091
* Enable enabling and disabling breakpoints on Windows.Zachary Turner2014-12-012-0/+15
| | | | llvm-svn: 223089
* Link test executables with LLD on Windows.Zachary Turner2014-12-011-1/+9
| | | | | | | | | | Clang generates DWARF debug info with section names longer than 8 characters. This is only supported by an extension to PE/COFF which the MSVC linker doesn't implement. So trying to link DWARF-enabled object files with MSVC will lead to corrupt debug information in the executable. llvm-svn: 223088
* Only normalize FileSpec paths *after* resolving them.Zachary Turner2014-12-011-2/+6
| | | | | | | Normalizing paths before resolving them can cause the path to become denormalized after resolution. llvm-svn: 223087
* The register keyword is deprecated in C++11, so clang complains strongly ↵Enrico Granata2014-12-011-1/+1
| | | | | | about swig generating register declarations. Abuse the preprocessor to define the keyword away llvm-svn: 223084
* lldb can deadlock when launched with an non-existing executable:Greg Clayton2014-12-012-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | % lldb /bin/nonono (lldb) target create "/bin/nonono" error: unable to find executable for '/usr/bin/nonono' <deadlock> The problem was the initial commands 'target create "/bin/nonono"' were put into a pipe and the command interpreter was being run with: void CommandInterpreter::RunCommandInterpreter(bool auto_handle_events, bool spawn_thread, CommandInterpreterRunOptions &options) { // Always re-create the command intepreter when we run it in case // any file handles have changed. bool force_create = true; m_debugger.PushIOHandler(GetIOHandler(force_create, &options)); m_stopped_for_crash = false; if (auto_handle_events) m_debugger.StartEventHandlerThread(); if (spawn_thread) { m_debugger.StartIOHandlerThread(); } else { m_debugger.ExecuteIOHanders(); if (auto_handle_events) m_debugger.StopEventHandlerThread(); } } If "auto_handle_events" was set to true and "spawn_thread" was false, we would execute: m_debugger.StartEventHandlerThread(); m_debugger.ExecuteIOHanders(); m_debugger.StopEventHandlerThread(); The problem was there was no synchonization in Debugger::StartEventHandlerThread() to ensure the event handler was listening to events and the the call to "m_debugger.StopEventHandlerThread()" would do: void Debugger::StopEventHandlerThread() { if (m_event_handler_thread.IsJoinable()) { GetCommandInterpreter().BroadcastEvent(CommandInterpreter::eBroadcastBitQuitCommandReceived); m_event_handler_thread.Join(nullptr); } } The problem was that the event thread might not be listening for the CommandInterpreter::eBroadcastBitQuitCommandReceived event yet. The solution is to make sure the Debugger::DefaultEventHandler() is listening to events before we return from Debugger::StartEventHandlerThread(). Once we have this synchonization we remove the race condition. This fixes radar: <rdar://problem/19041192> llvm-svn: 223083
* Added a new regular expression to the "_regexp-break" command ("b" by default):Greg Clayton2014-12-011-0/+1
| | | | | | | | | | (lldb) b /break here/ This will set a source level regular expression breakpoint on any text between the first '/' and the last '/'. The equivalent command will be: (lldb) breakpoint set --source-pattern-regexp 'break here' llvm-svn: 223082
* Added StringExtractor::DecodeHexU8 && GetHexBytesAvailVince Harron2014-12-013-69/+222
| | | | | | | | | DecodeHexU8 returns a decoded hex character pair, returns -1 if a valid hex pair is not available. GetHexBytesAvail decodes all available hex pairs. llvm-svn: 223081
* StringExtractor unit testsVince Harron2014-12-013-0/+296
| | | | | | | Unit tests to cover StringExtractor in advance of minor new functionality & minor refactor llvm-svn: 223080
* Add support for 32-bit i386 binaries.Jason Molenda2014-11-291-9/+231
| | | | llvm-svn: 222952
* The finishing touches on getting the compact unwind dumping completedJason Molenda2014-11-291-90/+356
| | | | | | | | | | | | for x86_64. i386, arm, arm64 aren't handled yet but those are minor variations on this format. This commit also adds code to read the symbol table out of the binary and read the LC_FUNCTION_STARTS to augment the symbol table with the start addresses of all the functions - and print the function names when showing the unwind info. llvm-svn: 222951
* Add support for UNWIND_X86_64_MODE_STACK_IND entries.Jason Molenda2014-11-281-37/+58
| | | | | | | Correct the function offset computations in UNWIND_SECOND_LEVEL_REGULAR tables. A few other small fixes. llvm-svn: 222910
* Make LLGS to open a named pipe and write a listening port to it only when a ↵Oleksiy Vyalov2014-11-271-14/+31
| | | | | | proper port value is received. llvm-svn: 222902
* A little more work on the compact unwind dumper.Jason Molenda2014-11-271-25/+55
| | | | | | | | | | | | | UNWIND_X86_64_MODE_STACK_IND mode is almost correct; extra stack space allocated before the reg saves isn't handled right. Still a little wobbily on the file addresses of functions. Finally understand how the 6 registers that may be saved are ordered in just 10 its of space -- the Lehmer code for the registers is derived and then the sequence is encoded in a variable base number. Added some comments with references to what the code is doing so it'll be easier for others to track down. llvm-svn: 222884
* Add test for MI tokens.Hafiz Abid Qadeer2014-11-271-0/+85
| | | | | | | | | This file tests the sequence of digits that can come before an MI command. Patch from dawn@burble.org. llvm-svn: 222873
* Refactor SocketAddress::getaddrinfo - avoid calling IsValid if ::getaddrinfo ↵Oleksiy Vyalov2014-11-271-3/+7
| | | | | | | | has failed. Otherwise, IsValid crashes on assertation in GetFamilyLength. llvm-svn: 222862
* Fix several test failures on Linux/FreeBSD caused by compiler configuration ↵Oleksiy Vyalov2014-11-263-17/+21
| | | | | | | | and invalid environment. http://reviews.llvm.org/D6392 llvm-svn: 222845
* Improve lldb-mi tests. Hafiz Abid Qadeer2014-11-266-178/+98
| | | | | | | | | | | | summary of changes: Cleanup: Use "line_number" API instead of hardcoded source lines Combine child.sendline with previous child.send command. test_lldbmi_tokens: Add test for MI tokens. test_lldbmi_badpathexe: Remove check for prompt so test for bad path can be enabled. Patch from dawn@burble.org. llvm-svn: 222838
* Re-order the base classes to prevent a crash in Linux.Hafiz Abid Qadeer2014-11-261-2/+4
| | | | | | | | | | | | In the initialization list of IOHandlerConfirm, *this is basically casting IOHandlerConfirm to its base IOHandlerDelegate and passing it to constructor of IOHandlerEditline which uses it and crashes as constructor of IOHandlerDelegate is still not called. Re-ordering the base classes makes sure that constructor of IOHandlerDelegate runs first. It would be good to have a test case for this case too. llvm-svn: 222816
* When a process stops, set the StopInfo object on Windows.Zachary Turner2014-11-253-0/+40
| | | | llvm-svn: 222776
* Disable GetSTDOUT, GetSTDERR, and PutSTDIN on Windows.Zachary Turner2014-11-254-45/+63
| | | | | | | | | | These methods are difficult / impossible to implement in a way that is semantically equivalent to the expectations set by LLDB for using them. In the future, we should find an alternative strategy (for example, i/o redirection) for achieving similar functionality, and hopefully deprecate these APIs someday. llvm-svn: 222775
* Add some more comments explaining the purpose of some Register classes.Zachary Turner2014-11-251-4/+16
| | | | llvm-svn: 222774
* Add initial lldb-mi tests.Hafiz Abid Qadeer2014-11-2512-1/+985
| | | | | | | | Test 'test_lldbmi_interrupt' is only enabled for Darwin as it seems to cause a timeout error on Linux. Patch from dawn@burble.org. llvm-svn: 222750
* Fix lldb(1) man page formattingEd Maste2014-11-241-16/+16
| | | | | | | | | | - Use canonical date order (per groff & mandoc) - Fix capitalization on one .Nm - Remove EOL whitespace Patch by Baptiste Daroussin in FreeBSD svn r274927. llvm-svn: 222655
* Mark 9 lldb unit tests for ubuntu as XFAIL.Siva Chandra2014-11-229-2/+26
| | | | | | | | | | | | | | | | | | | | The following lldb unit tests fail check-lldb on ubuntu: TestDataFormatterStdMap.py TestDataFormatterStdVBool.py TestDataFormatterStdVector.py TestDataFormatterSynthVal.py TestEvents.py TestInitializerList.py TestMemoryHistory.py TestReportData.py TestValueVarUpdate.py These unit test failures are for non-core functionality. The intent is to reduce the check-lldb FAILS to core functionality FAILS and then circle back later and fix these FAILS at a later date. llvm-svn: 222608
* Fixed an issue where a DW_FORM_ref{2,4,8} might be extracted incorrectly ↵Greg Clayton2014-11-226-116/+103
| | | | | | | | | | because the wrong compile unit was being used to calculate the compile unit relative offset. This was fixed by making the DWARFFormValue contain the compile unit that it needs so it can decode its form value correctly. Any form value that requires a compile unit will now assert. If any of the assertions that were added are triggered, then code that led to the extraction of the form value without properly setting the compile unit must be fixed immediately. <rdar://problem/19035440> llvm-svn: 222602
* When a RegisterContext produces an invalid CFA address, changeJason Molenda2014-11-222-15/+42
| | | | | | | | | | | | | | | | | UnwindLLDB::AddOneMoreFrame to try the fallback unwind plan on that same stack frame before it tries the fallback unwind plan on the "next" or callee frame. In RegisterContextLLDB::TryFallbackUnwindPlan, when we're trying the fallback unwind plan to see if it is valid, make sure we change all of the object ivars that might be used in the process of fetching the CFA & caller's saved pc value and restore those if we decide not to use the fallback unwindplan. <rdar://problem/19035079> llvm-svn: 222601
* This is the first step of making lldb able to create target-specific thingsJim Ingham2014-11-2214-62/+200
| | | | | | | | | | | | | (e.g. breakpoints, stop-hooks) before we have any targets - for instance in your ~/.lldbinit file. These will then get copied over to any new targets that get created. So far, you can only make stop-hooks. Breakpoints will have to learn to move themselves from target to target for us to get them from no-target to new-target. We should also make a command & SB API way to prime this ur-target. llvm-svn: 222600
* Make the sourcing of the local .lldbinit file quiet.Jim Ingham2014-11-222-22/+38
| | | | | | <rdar://problem/19065278> llvm-svn: 222599
* [ProcessWindows] Clean up the register definitions array.Zachary Turner2014-11-222-82/+122
| | | | llvm-svn: 222597
* Just a few words to introduce the extra optional argument to Python summariesEnrico Granata2014-11-221-0/+4
| | | | llvm-svn: 222594
* Enable Python summaries to use custom SBTypeSummaryOptions if the user is so ↵Enrico Granata2014-11-229-3/+29
| | | | | | inclined. Updates to the webdoc will follow llvm-svn: 222593
* Fix mispelled 'ling' Python property to be 'line' inJason Molenda2014-11-222-2/+2
| | | | | | | SBLineEntry and SBDeclaration. Patch from Chris Willmore. <rdar://problem/19054323> llvm-svn: 222592
* Remove print statement that was accidentally left in.Greg Clayton2014-11-211-1/+0
| | | | llvm-svn: 222589
* Per off-list feedback, this API returns the *first* value with a given name, ↵Enrico Granata2014-11-213-5/+5
| | | | | | not the *only* one. Rename it to reflect that llvm-svn: 222582
* Add an API on SBValueList to find the first value with a given name stored ↵Enrico Granata2014-11-213-0/+31
| | | | | | in the list llvm-svn: 222576
* Do some cleanup of DumpValueObjectOptions. The whole concept of raw printing ↵Enrico Granata2014-11-213-81/+62
| | | | | | was split between feature-specific flags, and an m_be_raw flag, which then drove some other changes in printing behavior. Clean that up, so that each functionality has its own flag .. oh, and make the bools all go in a bitfield since I may want to add more of those over time llvm-svn: 222548
* Extend PipePosix with child_processes_inherit support - to control whether ↵Oleksiy Vyalov2014-11-213-3/+40
| | | | | | | | pipe handles should be inherited by a child process. http://reviews.llvm.org/D6348 llvm-svn: 222541
* fix Bug21211 : reworked ↵Shawn Best2014-11-212-17/+49
| | | | | | | | | | | | | | | | | | | | | test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD Issue D5632 fixed an issue where linux would dump spurious output to tty on startup (due to a broadcast stop event). After the checkin, it was noticed on FreeBSD a unit test was now failing. On closer investigation I found the test was using the C++ API to launch an inferior while using an SBListener to monitor the public state changes. As on OSx, it was expecting to see: eStateRunning eStateStopped On Linux/FreeBSD, there is an extra state change eStateLaunching eStateRunning eStateStopped I reworked the test to work for both cases and re-enabled the test of FreeBSD. Differential Revision: http://reviews.llvm.org/D5837 llvm-svn: 222511
* Rework parallel test process count logicEd Maste2014-11-211-7/+8
| | | | | | | | | | | | | | | | The default value for opt.thread_count was multiprocessing.cpu_count(), which meant the LLDB_TEST_THREADS environment variable was never used. It's not easy to pass the -t option to the test run when invoking it from e.g. 'ninja check-lldb', so having the environment variable as an option is useful. Change the logic so that the thread count is set by the first one of: 1. The -t option to test/dosep.py 2. The LLDB_TEST_THREADS environment variable 3. The machine's CPU count from multiprocessing.cpu_count() llvm-svn: 222501
* Change CommandObjectTargetModulesLoad so that the filename argumentJason Molenda2014-11-211-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is treated as a string instead of a FileSpec. OptionValueFileSpec::SetValueFromCString() passes the c string to FileSpec::SetFile(str, true /* resolve */) - and with Zachary's changes to FileSpec we're using llvm::sys::fs::make_absolute() to do that "resolve" action now, where we used to use realpath(). One important difference between llvm::sys::fs::make_absolute and realpath is that when they're handed a filename (no directory), realpath prepends the current working directory *and if the file exists*, returns that full path. If that file doesn't exist, the caller uses the basename only. llvm::sys::fs::make_absolute prepends the current working directory regardless of whether it exists or not. I considered having FileSpec::SetFile save the initial pathname, call FileSpec::Resolve, and then check to see if the Resolve return path exists - and if not, go back to the original one. But instead I just went with changing 'target modules load' to treat its filename argument as a string instead of a FileSpec. This brings it in line with how 'target modules list' works. <rdar://problem/18955416> llvm-svn: 222498
* Rename lldb registers to contain lldb_ prefix.Zachary Turner2014-11-216-795/+796
| | | | | | | | | | | | | | | | | | | | LLDB supports many different register numbering schemes, and these are typically prefixed with an indicator that lets the user know what numbering scheme is used. The gcc numbering scheme is prefixed with gcc, and there are similar ones for dwarf, gdb, and gcc_dwarf. LLDB also contains its own internal numbering scheme, but the enum for LLDB's numbering scheme was prefixed differently. This patch changes the names of these enums to use the same naming scheme for the enum values as the rest of the register kinds by removing gpr_ and fpu_ prefixes, and instead using lldb_ prefixes for all enum values. Differential Revision: http://reviews.llvm.org/D6351 Reviewed by: Greg Clayton llvm-svn: 222495
* Add a test for the driver's "-k" option.Jim Ingham2014-11-211-1/+3
| | | | llvm-svn: 222484
* Make the option parsing of -k & -K match the help strings.Jim Ingham2014-11-201-2/+2
| | | | llvm-svn: 222479
* Remove duplicated enum, use the authoritative one.Zachary Turner2014-11-201-275/+2
| | | | | | | | | Running a diff against lldb-x86-register-enums.h and the file modified in this patch, the two enums were completely identical. Deleting one of them to reduce code noise. llvm-svn: 222478
OpenPOWER on IntegriCloud