Commit Graph

7450 Commits

Author SHA1 Message Date
Daniel Malea 37002ad30e Tentatively re-enabling TestBreakAfterJoin on Linux
- Unable to reproduce llvm.org/pr16170 locally

llvm-svn: 186129
2013-07-11 22:40:52 +00:00
Greg Clayton 04bd684074 Added a memory.py module that contains a 'memfind' command which allows you to search memory for a byte pattern.
llvm-svn: 186127
2013-07-11 22:38:00 +00:00
Daniel Malea 10691b1d36 Enable Mac OS X tests disabled due to llvm.org/pr16567
- thread count remains correct now that we use pthread_kill() instead of kill() to deliver signals

llvm-svn: 186126
2013-07-11 22:28:17 +00:00
Daniel Malea 7df860a629 Improve TestConcurrentEvents.py
- code cleanup, improved reporting when failures take place
- ensure known thread is interrupted by using pthread_kill() instead of kill() in the signal worker thread
- above should avoid llvm.org/pr16567 on Mac OS X (though kill() could still cause threads to pop out of existance temporarily)
- added an additional check that all threads have exited after worker threads are all join()ed
- logged llvm.org/pr16603 for the new Linux bug discovered

llvm-svn: 186124
2013-07-11 22:14:47 +00:00
Enrico Granata da504ff00a Tweaks to the Python reference and example command to use the preferred print style and the (finally available :-) SetError API
llvm-svn: 186122
2013-07-11 21:49:38 +00:00
Ashok Thirumurthi 4822d9263a Adds methods to ObjectFileELF to access data in ELF segments
in preparation to add support for ELF core files.

Patch by Samuel Jacob!

llvm-svn: 186114
2013-07-11 20:39:00 +00:00
Matt Kopec 4a32bf58d1 Fix unhandled SIGTRAP signal on Linux causing assertion.
llvm-svn: 186112
2013-07-11 20:01:22 +00:00
Michael Sartain cc791bbfab Fix "source list -n printf" on Linux (printf is symbol alias for __printf)
Differential Revision: http://llvm-reviews.chandlerc.com/D1109

llvm-svn: 186104
2013-07-11 16:40:56 +00:00
Ed Maste 889865fb69 Add stub GetThreadName for FreeBSD, missed in r186033.
On FreeBSD inferior thread names are available through ptrace, so we won't
use Host::GetThreadName anyway.

llvm-svn: 186086
2013-07-11 14:12:16 +00:00
Jim Ingham bf22b96dd1 Add a -remote-file option to “target create” to specify the location of the executable on a remote system (if debugging remotely using debugserver on the target system.) This gets us closer to being able to set up a remote debugging session from the lldb command line.
llvm-svn: 186050
2013-07-11 01:47:46 +00:00
Andrew Kaylor bc68b431ba Stop process monitor from ProcessPOSIX::Finalize
llvm-svn: 186039
2013-07-10 21:57:27 +00:00
Matt Kopec fb6ab54000 Add support for listing inferior thread names on Linux.
llvm-svn: 186033
2013-07-10 20:53:11 +00:00
Enrico Granata e602fe1e7f Adding a summary for ObjC blocks
llvm-svn: 186023
2013-07-10 18:25:45 +00:00
Greg Clayton a063c810a0 Fixed an issue introduced with my last fix where the command and sequence ID extraction were moved causing them to be reversed.
llvm-svn: 186020
2013-07-10 17:58:19 +00:00
Jim Ingham 9f35cfaf08 Call xmlFree on the node contents returned by xmlNodeGetContent, as the docs say to do.
<rdar://problem/14391836>

llvm-svn: 185996
2013-07-10 02:21:57 +00:00
Greg Clayton 3046e66830 Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.

Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)

llvm-svn: 185990
2013-07-10 01:23:25 +00:00
Greg Clayton 7ad05d136a Fixed the CommunicationKDP::SendRequestAndGetReply() to correctly be able to deal with getting a reply from a previous packet without resending the packet again.
llvm-svn: 185988
2013-07-10 01:05:05 +00:00
Michael Sartain 6098617412 Add silent option to command source.
Patch from Matthew Sorrels

llvm-svn: 185983
2013-07-09 23:22:53 +00:00
Andrew Kaylor 6578cb6478 Reverting ProcessMonitor shared pointer changes
llvm-svn: 185981
2013-07-09 22:36:48 +00:00
Enrico Granata eff81a471a Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!

llvm-svn: 185965
2013-07-09 20:14:26 +00:00
Daniel Malea 6c4a0f0816 Cleanup in TestConcurrentEvents.py
- re-enable tests fixed by Matt's commit this morning (addressed llvm.org/pr16567)
- disabled tests affected by new bug llvm.org/pr16575
- removed some commented out code in inferior

llvm-svn: 185951
2013-07-09 17:36:18 +00:00
Andrew Kaylor 5743f1aafc Change TestRegisters.py attach case to attach to a.out and enable that test case
llvm-svn: 185947
2013-07-09 16:48:30 +00:00
Andrew Kaylor 214f3a8a78 Use shared pointers to hold the process in ProcessMonitor
llvm-svn: 185946
2013-07-09 16:44:27 +00:00
Matt Kopec b29104467f Fix signal handling for POSIX (only tested on Linux) processes in multi-threaded programs.
Also fix a related issue where if a thread exits after a thread continue, lldb would hang.

llvm-svn: 185944
2013-07-09 15:09:45 +00:00
Jason Molenda c95407b0d5 Add the frame content dumper function call to one more place.
llvm-svn: 185906
2013-07-09 05:36:41 +00:00
Jason Molenda 5bd4a4613c Add new information gathering to the lldb & simple backtrace methods:
print five words of memory at the beginning of the stack frame so it's
easier to track where an incorrect saved-fp or saved-pc may have come from.

llvm-svn: 185903
2013-07-09 05:08:14 +00:00
Ed Maste a7f13f0510 Update exception to match decorator name
llvm-svn: 185891
2013-07-09 00:24:52 +00:00
Daniel Malea b3d41a278b Add TestConcurrentEvents test for LLDB's handling of inferior threads
- Test verifies LLDB's handling of inferiors with threads that: hit breakpoints,
  modfiy variables that have watchpoints set, generate user signals, and crash.
- Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py
  flag.
- Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited.
- Add sort_stopped_threads helper to lldbutil to separate thread lists based
  on stop reason.

Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed.

llvm-svn: 185889
2013-07-09 00:08:01 +00:00
Greg Clayton 4670d47fd0 Added missing SBModuleSpec.cpp file to the CMakeLists.txt
llvm-svn: 185878
2013-07-08 22:37:11 +00:00
Greg Clayton 226cce2511 Added a way to extract the module specifications from a file. A module specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files).
There are two new classes:

lldb::SBModuleSpec
lldb::SBModuleSpecList

The SBModuleSpec wraps up a lldb_private::ModuleSpec, and SBModuleSpecList wraps up a lldb_private::ModuleSpecList.

llvm-svn: 185877
2013-07-08 22:22:41 +00:00
Michael Sartain 4b2967ff9f Use target DisplaySource if available so we can get mixed source and assembly.
This fixes "disassemble -m -n __printf".

llvm-svn: 185845
2013-07-08 17:56:02 +00:00
Ed Maste 6f066412ac Pass tid through to ptrace operations
This change is equivalent to the Linux threading support.

llvm-svn: 185671
2013-07-04 21:47:32 +00:00
Ed Maste be0b55d121 Avoid crash if we fail to resolve process in attach
llvm-svn: 185661
2013-07-04 18:25:34 +00:00
Daniel Malea fb7ace71cf Remove @expectedFailureGcc from TestInlineStepping as function prologue bug is not reproducible anymore.
llvm-svn: 185579
2013-07-03 20:51:44 +00:00
Daniel Malea cb3ded043c Skip Test-rdar-9974002 with Clang 3.4 (due to llvm.org/pr16214)
- should resolve remaining failures on clang buildbot

llvm-svn: 185576
2013-07-03 20:44:40 +00:00
Daniel Malea 804bdb3ead Add missing -std=c99 flag to appease GCC 4.6
- this issue was detected on recent GCC buildbot runs

llvm-svn: 185571
2013-07-03 19:34:25 +00:00
Daniel Malea e7322b3a6f Re-apply TestHelp.py fix
llvm-svn: 185570
2013-07-03 19:29:46 +00:00
Daniel Malea 7a433802cf Fix python 2.6 compatibility issue introduced by r184615
- argparse_compat library does not support reading environment variables
- should unblock Linux GCC buildbot from running tests again

llvm-svn: 185567
2013-07-03 18:50:03 +00:00
Daniel Malea 9a71a7d81b Revert commits that cause broken builds on GCC buildbots
- build fails due to PyCallable template definition inside an extern "C" scope

This commit reverts 185240, 184893 and 184608.

llvm-svn: 185560
2013-07-03 17:58:31 +00:00
Ed Maste 4331ac7bd3 Remove empty files left behind from move to POSIX/
llvm-svn: 185559
2013-07-03 17:41:40 +00:00
Michael Sartain bf43d1ad26 Symbol prologue code checks if funciton lines up with symbol and uses function prologue code with line info if so.
Differential Revision: http://llvm-reviews.chandlerc.com/D1082

llvm-svn: 185553
2013-07-03 16:35:41 +00:00
Ed Maste 1875776e68 Update error message; detach-keeps-stopped is also not on FreeBSD
llvm-svn: 185549
2013-07-03 16:26:34 +00:00
Jason Molenda 45f6b1f935 Remove lldb's custom copy of the C++ demangler, used only on Mac
OS X.  Testsuite shows no change in results using the system runtime's
demangler.
<rdar://problem/12029914> 

llvm-svn: 185510
2013-07-03 04:52:51 +00:00
Michael Sartain 9f4517a7b0 Fix ObjectFileELF crc32 code used when no build id is present.
Differential Revision: http://llvm-reviews.chandlerc.com/D1081

llvm-svn: 185494
2013-07-03 01:52:14 +00:00
Jim Ingham a1e159a281 Workaround for infinite recursion in InitOSO->GetByteSize->GetSymbolVendor.
llvm-svn: 185491
2013-07-03 01:21:46 +00:00
Greg Clayton ddf976aa8b Import the builtin type prefix before we import the user expression prefix so that the user expression prefix can use the uint, int, size_t, and other types without having to define them.
llvm-svn: 185488
2013-07-03 00:07:54 +00:00
Jim Ingham 363ddd7df2 Mark the "step over single instruction" plan private in the StopInfoWatchpoint::PerformAction to
ensure that the watchpoint not the step is reported as the stop reason.  Also, stash away & restore
the current stop reason just so it can't go away on us.

llvm-svn: 185474
2013-07-02 21:12:44 +00:00
Ed Maste a85d364bad Fix build with LLVM_DISABLE_PYTHON
llvm-svn: 185466
2013-07-02 19:30:52 +00:00
Michael Sartain 802b055e78 Add split symbol support to test makefile & add linux split symbol test case.
llvm-svn: 185455
2013-07-02 18:13:13 +00:00
Daniel Malea 6d858b220b Add SymbolVenderELF to autotools build (for Linux + FreeBSD)
- should resolve the build failures on the linux clang buildbot

llvm-svn: 185448
2013-07-02 17:36:01 +00:00