Commit Graph

7189 Commits

Author SHA1 Message Date
Daniel Malea c91e4ab26e Use C-style include to match style in file (instead of C++ style)
- as per review comment from Dimitry Andric!

llvm-svn: 183039
2013-05-31 20:21:38 +00:00
Daniel Malea 132c4a266c CMake FreeBSD fix: add missing Process plugin directory
Patch by Ed Maste!

llvm-svn: 183038
2013-05-31 20:16:40 +00:00
Han Ming Ong 79371ceedf <rdar://problem/13752848>
Add 'JoinExistingSession' to XPC for root debugging.

llvm-svn: 183037
2013-05-31 20:15:19 +00:00
Daniel Malea e376a65182 FreeBSD cmake build fixes.
- missing #include <cstdlib> in Mangled.cpp
- missing include dirs in FreeBSD CMakeLists.txt

Patch by Ed Maste!

llvm-svn: 183032
2013-05-31 19:24:53 +00:00
Enrico Granata b294fd2037 <rdar://problem/14035604>
Fixing an issue where formats would not propagate from parents to children in all cases
Details follow:
an SBValue has children and those are fetched along with their values
Now, one calls SBValue::SetFormat() on the parent
Technically, the format choices should propagate onto the children (see ValueObject::GetFormat())
But if the children values are already fetched, they won't notice the format change and won't update themselves
This commit fixes that by making ValueObject::GetValueAsCString() check if any format change intervened from the previous call to the current one
A test case is also added

llvm-svn: 183030
2013-05-31 19:18:19 +00:00
Enrico Granata 39d5141085 Small code cleanups
llvm-svn: 183024
2013-05-31 17:43:40 +00:00
Sean Callanan 7d01ddd6f8 Fixed value evaluation to handle null constants.
<rdar://problem/14005311>

llvm-svn: 183022
2013-05-31 17:29:03 +00:00
Enrico Granata 1c333d071f An NSData with 0 bytes in it would report a summary of “0 byte”
Making sure that I get my English right by saying “0 bytes” instead

llvm-svn: 182978
2013-05-31 01:14:22 +00:00
Enrico Granata e0c70f1b2c <rdar://problem/11109316>
command script import now does reloads - for real
If you invoke command script import foo and it detects that foo has already been imported, it will
 - invoke reload(foo) to reload the module in Python
 - re-invoke foo.__lldb_init_module
 This second step is necessary to ensure that LLDB does not keep cached copies of any formatter, command, ... that the module is providing

Usual caveats with Python imports persist. Among these:
 - if you have objects lurking around, reloading the module won't magically update them to reflect changes
 - if module A imports module B, reloading A won't reload B
These are Python-specific issues independent of LLDB that would require more extensive design work

The --allow-reload (-r) option is maintained for compatibility with existing scripts, but is clearly documented as redundant - reloading is always enabled whether you use it or not

llvm-svn: 182977
2013-05-31 01:03:09 +00:00
Enrico Granata a5c0308bde Adding a diagnose-nsstring command
This should help us figure out issues with the NSString data formatter

llvm-svn: 182972
2013-05-30 23:36:47 +00:00
Daniel Malea 960d738510 Find 'ps' command using which() rather than invoking directly
- should address Debian test errors due to not being able to 'ps' directly

llvm-svn: 182965
2013-05-30 21:48:58 +00:00
Daniel Malea 4a01e59354 Improve TestExitDuringStep to verify thread behaviour during step-over, step-in in addition to step-inst
Patch by Brian Minard!

llvm-svn: 182961
2013-05-30 21:14:31 +00:00
Enrico Granata 0f6a057147 This checkin enables Python summaries to return any string-convertible object
Upon encountering an object not of type string, LLDB will get the string representation of it (akin to calling str(X) in Python code) and use that as the summary to display

Feedback is welcome as to whether repr() should be used instead (but the argument for repr() better be highly persuasive :-)

llvm-svn: 182953
2013-05-30 18:56:47 +00:00
Matt Kopec ef7ea33178 Disabling another watchpoint test with intermittent failure.
llvm-svn: 182952
2013-05-30 18:54:48 +00:00
Matt Kopec 03da5167cd Remove extraneous files from test directory.
llvm-svn: 182943
2013-05-30 17:59:36 +00:00
Greg Clayton 83793fc188 <rdar://problem/13956179>
Cleaned up the thread updating code in the OperatingSystemPython class. It doesn't need to clear the "new_thread_list" anymore as it is always empty. 

It also now assigns the "core_thread_list" to "new_thread_list" if no threads are detected through python.

llvm-svn: 182893
2013-05-29 23:31:14 +00:00
Greg Clayton 086e085efa Remove unused variable.
llvm-svn: 182892
2013-05-29 23:22:22 +00:00
Andrew Kaylor baa14e852b Fixing problems with thread create during step test.
llvm-svn: 182888
2013-05-29 22:40:17 +00:00
Andrew Kaylor bc46d567b7 Disabling watchpoint test with intermittent failure.
llvm-svn: 182887
2013-05-29 22:12:53 +00:00
Sean Callanan 467441d511 Error out if the expression for a breakpoint
condition doesn't return a result, instead
of blindly trying to use that result.

<rdar://problem/14009519>

llvm-svn: 182875
2013-05-29 20:22:18 +00:00
Jim Ingham cbf7e26b3b For "expr", say what the timeout units are in the help string.
llvm-svn: 182873
2013-05-29 19:40:14 +00:00
Ashok Thirumurthi 6eb0cadda7 Refactors to provide two variants for evaluation of text_list:
- The original test now passes on Linux with clang because a breakpoint is hit prior to evaluation of text_list, which improves text coverage.
- The new test fails because 4 steps are requested, and only two occur prior to evaluation of text_list.
--- Note that the loss of every second "next" command can be reproduced using lldb manually with this script.

llvm-svn: 182860
2013-05-29 14:58:27 +00:00
Andrew Kaylor 288ae669b4 Removing expected fail from another test that is now passing.
llvm-svn: 182815
2013-05-29 01:15:49 +00:00
Andrew Kaylor 0e46dbd119 Removing expected failures for watchpoint tests which are now passing.
llvm-svn: 182813
2013-05-29 00:26:53 +00:00
Andrew Kaylor 93132f504f Adding support for stopping all threads of multithreaded inferiors on Linux. Also adding multithreaded test cases.
llvm-svn: 182809
2013-05-28 23:04:25 +00:00
Daniel Malea bb43721a35 Fixed continue issues with process attach/detach
- added code for tracking transition from eStateAttaching to eStateStopped in event listener and handling process continuation there.

Patch by Arthur Evstifeev!

llvm-svn: 182806
2013-05-28 21:27:03 +00:00
Daniel Malea d72b3ceb6b Add instructions for running LLDB tests with non-default compiler/architectures
- documented the cmake variable LLDB_TEST_ARGS

llvm-svn: 182797
2013-05-28 19:14:44 +00:00
Enrico Granata 2db281e910 <rdar://problem/13863031>
Giving a timeout for the call to NSPrintForDebugger() that happens when you “po” objects

This is a temporary workaround until a more detailed solution to the general problem of canceling actions is found

llvm-svn: 182782
2013-05-28 18:02:49 +00:00
Daniel Malea f92c4a814a Add CMake targets to build LLDB reference docs
- [ninja|make] lldb-cpp-doc builds the C++ API reference docs
- [ninja|make] lldb-python-doc builds the python API reference docs
- updated build page on website to include instructions to build docs

Tested on Linux/Mac OS X

llvm-svn: 182752
2013-05-28 03:47:34 +00:00
Daniel Malea d77e9d4565 Mac OS X CMake fix: generate LLDB version from xcodeproj
- This resolves the remaining issues related to building lldb utility/dylib
- TODO: fix up debugserver build

Patch by Ahmed Bougacha!

llvm-svn: 182751
2013-05-28 03:44:37 +00:00
Filipe Cabecinhas 251f496578 lldbPluginOSDarwinKernel doesn't exist.
llvm-svn: 182687
2013-05-24 22:46:06 +00:00
Filipe Cabecinhas f104a830d4 Update countTrailingZeros function usage to match llvm's r182667.
llvm-svn: 182683
2013-05-24 22:24:17 +00:00
Sean Callanan 0b342b6ddf Fixed signed operations in the IR interpreter.
Scalar now can make itself signed if needed.

<rdar://problem/13977632>

llvm-svn: 182668
2013-05-24 20:36:56 +00:00
Ashok Thirumurthi 2a27227da0 Updated the status page to reflect the current Linux status.
- Fix for attach by name
- Details for register support
- Punted on i386 details as its status has drifted since this page was originally posted
- Multi-threaded target support is soon to be released on Linux
- Partial back-trace is called out since its a high-profile issue

llvm-svn: 182664
2013-05-24 19:25:33 +00:00
Ashok Thirumurthi 780593580f Added a parameter for relocation info to keep lldb in step with llvm due to r182625,
which takes a first step towards symbolization of disassembled instructions.

llvm-svn: 182650
2013-05-24 15:55:54 +00:00
Greg Clayton 7bcb93d5a5 <rdar://problem/13643315>
Fixed performance issues that arose after changing SBTarget, SBProcess, SBThread and SBFrame over to using a std::shared_ptr to a ExecutionContextRef. The ExecutionContextRef doesn't store a std::weak_ptr to a stack frame because stack frames often get replaced with new version, so it held onto a StackID object that would allow us to ask the thread each time for the frame for the StackID. The linear function was too slow for large recursive stacks. We also fixed an issue where anytime the std::shared_ptr<ExecutionContextRef> in any SBTarget, SBProcess, SBThread objects was turned into an ExecutionContext object, it would try to resolve all items in the ExecutionContext which are shared pointers. Even if the StackID in the ExecutionContextRef was invalid, it was looking through all frames in every thread. This causes a lot of unnecessary frame accesses.

llvm-svn: 182627
2013-05-24 00:58:29 +00:00
Filipe Cabecinhas 477d86d84d Adds PT_TLS and PT_GNU_EH_FRAME names to DumpELFProgramHeaders
llvm-svn: 182619
2013-05-23 23:01:14 +00:00
Daniel Malea 96a6f90d84 Improve vim-lldb expression commands for objective-c and implement evaluate-under-cursor:
1. Added new :Lpo command
2. :Lpo and :Lprint can be invoked without parameters. In that case
cursor word will be used
3. Added :LpO command in that case instead of <cword> will be used
stripped <cWORD>. This command is useful for printing objective-c
properties (for ex.: self.tableView). 

Patch by Arthur Evstifeev!!

llvm-svn: 182613
2013-05-23 21:34:26 +00:00
Michael Sartain c836ae7d36 ObjectFileELF::GetModuleSpecifications on Linux should work now.
Which means "platform process list" should work and list the architecture.
We are now parsing the elf build-id if it exists, which should allow us to load stripped symbols (looking at that next).

llvm-svn: 182610
2013-05-23 20:57:03 +00:00
Michael Sartain c3ce7f2740 Add ${ansi.XX} parsing to lldb prompt, use-color setting, and -no-use-colors command line options.
settings set use-color [false|true]
settings set prompt "${ansi.bold}${ansi.fg.green}(lldb)${ansi.normal} "
also "--no-use-colors" on the command prompt

llvm-svn: 182609
2013-05-23 20:47:45 +00:00
Greg Clayton cc24775b42 <rdar://problem/13966084>
Make sure to not call "regexec" from <regex.h> with a NULL C string, otherwise we can crash.

llvm-svn: 182607
2013-05-23 20:27:15 +00:00
Daniel Malea f18cff4767 Adding .arcconfig file to LLDB to allow using Phabricator for reviews
llvm-svn: 182606
2013-05-23 20:21:28 +00:00
Sean Callanan ed3fceaaa1 GCC gets confused by enums in bitfields, so I
removed the bitfields.  This should be conforming
C++11, though, cf. C++03 9.6(3):
"
A bit-field shall have integral or enumeration
type (3.9.1).
"

llvm-svn: 182545
2013-05-23 01:53:54 +00:00
Greg Clayton d389cc3a2e Don't compare 4 characters on a 2 character string.
llvm-svn: 182540
2013-05-22 23:36:10 +00:00
Michael Sartain 816cf1d88a Fix shutdown to correctly close stdout and stop showing garbage characters on exit.
Patch by Matthew Sorrels

llvm-svn: 182539
2013-05-22 23:31:28 +00:00
Greg Clayton 43d8279ffd Cleaned up the File API a bit.
llvm-svn: 182538
2013-05-22 23:30:09 +00:00
Greg Clayton fdbdc9c0ff Fixed a file leak introduced with my last checkin. Also be sure to include <stdio.h> just in case.
llvm-svn: 182537
2013-05-22 23:29:16 +00:00
Greg Clayton 62f80036be Added a new "lldb" log channel named "os" for the OperatingSystem plug-ins to use.
Added logging for the OS plug-in python objects in OperatingSystemPython so we can see the python dictionary returned from the plug-in when logging is enabled.

llvm-svn: 182530
2013-05-22 23:04:27 +00:00
Han Ming Ong e86321865a <rdar://problem/13963648>
Changes after feedback:
Directly use function pointer, just to be safer on 10.8.

llvm-svn: 182529
2013-05-22 23:00:47 +00:00
Sean Callanan fbf5c682cb Fixed a bug where persistent variables did not
live as long as they needed to.  This led to
equality tests involving persistent variables
often failing or succeeding when they had no
business doing so.

To do this, I introduced the ability for a
memory allocation to "leak" - that is, to
persist in the process beyond the lifetime of
the expression.  Hand-declared persistent
variables do this now.

<rdar://problem/13956311>

llvm-svn: 182528
2013-05-22 22:49:06 +00:00