Commit Graph

6782 Commits

Author SHA1 Message Date
Greg Clayton 365fe21947 Add a way to dump a ClangASTType to stdout for debugging purposes.
llvm-svn: 178071
2013-03-26 21:01:37 +00:00
Greg Clayton ba752b9bfd Trim the output build folder a bit to it isn't so large.
llvm-svn: 178070
2013-03-26 21:00:56 +00:00
Greg Clayton 2d95f35748 A few more tweaks to the python perf tests. Now there is a MemoryMeasurement.
llvm-svn: 178069
2013-03-26 21:00:29 +00:00
Greg Clayton 00ec049050 Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.
llvm-svn: 178068
2013-03-26 20:53:56 +00:00
Enrico Granata 7c0788b2d9 Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map

llvm-svn: 178057
2013-03-26 18:55:08 +00:00
Greg Clayton bb1beaa220 Don't crash when we have an element size of zero.
llvm-svn: 178056
2013-03-26 18:42:13 +00:00
Jim Ingham a89be91f2e That wasn't a typo, if the short letter option is from a non-obvious source, I capitolize it in the help as an aid to memory.
llvm-svn: 178052
2013-03-26 18:29:03 +00:00
Enrico Granata 9fb5ab558b Our commands that end up displaying a ValueObject as part of their workflow use OptionGroupValueObjectDisplay as their currency for deciding the final representation
ValueObjects themselves use DumpValueObjectOptions as the currency for the same purpose

The code to convert between these two units was replicated (to varying degrees of correctness) in several spots in the code
This checkin provides one and only one (and hopefully correct :-) entry point for this conversion

llvm-svn: 178044
2013-03-26 18:04:53 +00:00
Jim Ingham cfed3cf33c Change the stepping test to output "total time" for the step as well.
llvm-svn: 178043
2013-03-26 18:04:40 +00:00
Sean Callanan bce7c77d85 Fixed a typo.
llvm-svn: 178039
2013-03-26 17:45:02 +00:00
Greg Clayton 6c75d19ba0 Remove FunctionProfiler and ProfileObjectiveC action classes as they are not used.
llvm-svn: 178035
2013-03-26 16:47:22 +00:00
Greg Clayton a9a7d9d5da <rdar://problem/13502196>
We have the tag when figuring out the fully qualified name, append a suitable name for other types of tags when no name is available.

llvm-svn: 177966
2013-03-26 01:51:59 +00:00
Greg Clayton 855958caef <rdar://problem/13502196>
Functions in "(anonymous namespace)" was causing LLDB to crash when trying to complete a type and it would also cause functions arguments to appear in wrong place in frame display when showing function arguments.

llvm-svn: 177965
2013-03-26 01:45:43 +00:00
Jim Ingham 08f5fa7a6e Make the stepping perf test case actually work.
llvm-svn: 177964
2013-03-26 01:43:36 +00:00
Enrico Granata 2f59302ce8 <rdar://problem/13221060>
Make register read and write accept $<regname> as valid.
This allows:
(lldb) reg read rbx
     rbx = 0x0000000000000000
(lldb) reg read $rbx
     rbx = 0x0000000000000000
(lldb) reg write $rbx 1
(lldb) reg read $rbx
     rbx = 0x0000000000000001

to function correctly

It is not done at the RegisterContext level because we should keep the internal API clean of this user-friendly behavior and name registers appropriately.
If this ends up being needed in more places we can reconsider.

llvm-svn: 177961
2013-03-26 01:27:04 +00:00
Enrico Granata c540f57ffc Checking that the wrong syntax does not give a correct summary after clearing the error messages here
llvm-svn: 177949
2013-03-26 00:24:27 +00:00
Greg Clayton 4d8ad55c78 Modified patch from Prabhat Verma to enable loading core files through the SBTarget API.
llvm-svn: 177932
2013-03-25 22:40:51 +00:00
Greg Clayton fe736e889e Fix the buildbot so a LLDB test doesn't fail looking for "<invalid usage of pointer value as object>".
llvm-svn: 177926
2013-03-25 22:04:11 +00:00
Greg Clayton 5088c48686 <rdar://problem/13498879>
C String summary is emitting "<invalid usage of pointer value as object>" for bad pointers. Now it doesn't emit anything.

llvm-svn: 177913
2013-03-25 21:06:13 +00:00
Han Ming Ong 6f7237d1f1 <rdar://problem/13498504>
Don't hard code vm page size in profiling code

llvm-svn: 177907
2013-03-25 20:44:40 +00:00
Han Ming Ong fbd8de83db <rdar://problem/13404009>
Only get the attach_info's user ID if the supplied user info is invalid.

llvm-svn: 177900
2013-03-25 20:11:18 +00:00
Enrico Granata c2a58d73ce <rdar://problem/13365424>
Ensure that option -Y also works for expression as it does for frame variable
Also, if the user passes an explicit format specifier when printing a variable, override the summary's decision to hide the value.

This is required for scenarios like this to work:
(lldb) p/x c
(Class) $0 = 0x0000000100adb7f8 NSObject

Previously this would say:
(lldb) p/x c
(Class) $0 = NSObject

ignoring the explicit format specifier

llvm-svn: 177893
2013-03-25 19:46:48 +00:00
Enrico Granata ac9df2d1a6 <rdar://problem/13434476>
Making value objects properly iterable in constructs of the form
[ x for x in value_with_children ]

This would previously cause an endless loop because lacking a proper iterator object, Python will keep calling __getitem__() with increasing values of the index until it gets an IndexError
since SBValue::GetValueForExpressionPath() supports synthetic array members, no array index will ever really cause an IndexError to be raised, hence the endless iteration

class value_iter is an implementation of __iter__() that provides a terminating iterator over a value

llvm-svn: 177885
2013-03-25 18:53:07 +00:00
Sean Callanan eb7b27dab5 Fixed a potential crash if layout for a structure
went wrong and we tried to get layout information
that wasn't there.

<rdar://problem/13490170>

llvm-svn: 177880
2013-03-25 18:27:07 +00:00
Enrico Granata 005013c115 These test cases fail on the buildbot - skip on Linux for now, will figure out why
llvm-svn: 177879
2013-03-25 17:51:58 +00:00
Enrico Granata ceba071330 - Masking out SBCommandReturnObject::Printf() from the Python layer because SWIG and varargs do not get along well.
It is replaced by a Print("str") call which is equivalent to Printf("%s","str")
- Providing file-like behavior for SBStream with appropriate extension write() and flush() calls, plus documenting that these are only meant and only exist for Python
Documenting the file-like behavior on our website

llvm-svn: 177877
2013-03-25 17:37:39 +00:00
Jason Molenda 6566d43207 Add two additional DNBLog's in places where we're about to kill
off the inferior process so we stand a better chance of understanding
what caused us to send a PT_KILL.
<rdar://problem/12720340> 

llvm-svn: 177817
2013-03-23 05:35:57 +00:00
Jason Molenda fc306d3987 Set the correct byte size for complex integer (-fI) memory reads.
<rdar://problem/12281172> 

llvm-svn: 177814
2013-03-23 05:16:54 +00:00
Enrico Granata 9d71afe8cf And then again only compute the more expensive piece of data if need be :-)
llvm-svn: 177812
2013-03-23 01:44:59 +00:00
Greg Clayton 52e6378f0f Added a python version of the performance tests. It will be good to see if the overhead of python interferes at all with our performance readings. We can try things out with this script and see how things go.
llvm-svn: 177811
2013-03-23 01:44:48 +00:00
Enrico Granata 123c39c02b Invert two condition checks to evaluate them in cheapest-to-more-expensive order
llvm-svn: 177810
2013-03-23 01:44:23 +00:00
Greg Clayton 4a10357fb3 Added better measurements to test:
- memory delta and time for: target create
- memory delta and time for: setting breakpoint at main by name
- time to launch and hit bp at main
- overall memory of target create + bp main + run to main
- ovarall time of target create + bp main + run to main

llvm-svn: 177808
2013-03-23 01:35:50 +00:00
Enrico Granata 7d1f93942f <rdar://problem/13312903>
Exports write() and flush() from SBCommandReturnObject to enable file-like output from Python commands.
e.g.:
def ls(debugger, command, result, internal_dict):
    print >>result,”just “some output”

will produce
(lldb) ls
just “some output
(lldb) 

llvm-svn: 177807
2013-03-23 01:35:44 +00:00
Enrico Granata 852cce7c1f <rdar://problem/13315663>
commands of the form 
frame variable -f c-string foo
where foo is an arbitrary pointer (e.g. void*) now do the right thing, i.e. they deref the pointer and try to get a c-string at the pointed address instead of dumping the pointer bytes as a string. the old behavior is used as a fallback if things don’t go well

llvm-svn: 177799
2013-03-23 01:12:38 +00:00
Sean Callanan 719a4d5d83 If there are multiple uses of an Objective-C
class symbol in the same expression, handle all
of them instead of just the first one.

<rdar://problem/13440133>

llvm-svn: 177794
2013-03-23 01:01:16 +00:00
Greg Clayton b9d8890bd9 Only get the script interpreter if we find scripting resources in the symbol file. This helps us avoid initializing python when it isn't needed.
llvm-svn: 177793
2013-03-23 00:50:58 +00:00
Greg Clayton 96b68669eb Don't need to resolve the .o file path.
llvm-svn: 177792
2013-03-23 00:50:06 +00:00
Greg Clayton 5c78d99921 Make sure the "Release" builds link against the "Release" LLDB.framework and also output the results to /dev/stdout when no outfile is supplied.
llvm-svn: 177791
2013-03-23 00:49:30 +00:00
Jason Molenda 45461571e7 Change debugserver to open the socket it listens
to in INADDR_LOOPBACK mode by default ("localhost only")
instead of INADDR_ANY ("accept connections from any system").

Add a new command line argument to debugserver, --open-connection
or -H which will enable the previous behavior.  It would be used
if you were doing two-system debugging, with lldb running on one
system and debugserver running on the other.  But it is a less
common workflow and should not be the default.

<rdar://problem/12583284> 

llvm-svn: 177790
2013-03-23 00:44:22 +00:00
Jason Molenda 1de00ef60a Fix a little fallout from the changes in r174757 where we would
skip every other float/double/long double as we extracted data
from a buffer.
<rdar://problem/13485062>

llvm-svn: 177779
2013-03-23 00:04:02 +00:00
Jason Molenda c1946cd8e1 Don't bother calling Reserve on the vector unless we have entries to be added.
llvm-svn: 177776
2013-03-22 23:42:09 +00:00
Jason Molenda ee7593fbff Add a Reserve method to RangeVector and RangeDataVector. Have the
DWARFCallFrameInfo method which returns a RangeVector pre-size the
vector based on the number of entries it will be adding insted of
growing the vector as items are added.

llvm-svn: 177773
2013-03-22 22:43:14 +00:00
Greg Clayton ad900f9c85 Added option parsing to the lldb_perf_clang performance test.
llvm-svn: 177759
2013-03-22 21:12:50 +00:00
Greg Clayton 824e5a2caa More cleanup to remove the CoreFoundation classes out of mainstream code (CFCMutableDictionary, CFCMutableArray, CFCString, etc). Now it is only used in the Results.cpp file for Apple builds only.
llvm-svn: 177697
2013-03-22 02:38:49 +00:00
Greg Clayton 880afc5728 Much more cleanup on the performance testing infrastructure:
- Added new abtract Results class to keep CoreFoundation out of the tests. There are many subclasses for different settings:
    Results::Result::Dictionary
    Results::Result::Array
    Results::Result::Unsigned
    Results::Result::Double
    Results::Result::String
- Gauge<T> can now write themselves out via a templatized write to results function:
    template <class T>
    Results::ResultSP GetResult (const char *description, T value);
  
- There are four specializations of this so far:
    template <>
    Results::ResultSP GetResult (const char *description, double value);

    template <>
    Results::ResultSP GetResult (const char *description, uint64_t value);

    template <>
    Results::ResultSP GetResult (const char *description, std::string value);

    template <>
    Results::ResultSP GetResult (const char *description, MemoryStats value);
- Don't emit the virtual memory reading from the task info call as it really doesn't mean much as it includes way too much (shared cache + other stuff we don't have control over)
- Fixed other test cases to build correctly and use the new classes

llvm-svn: 177696
2013-03-22 02:31:35 +00:00
Jim Ingham ce9a1341f2 Change the AppleObjCTrampolineHandler to always run all threads when resolving the target of an ObjC method call.
Add a StopOthers method to AppleThreadPlanStepThroughObjCTrampoline, don't rely on the setting in the ThreadPlanToCallFunction, since that
gets pushed too late to determine which threads will continue.

<rdar://problem/13447638>

llvm-svn: 177691
2013-03-22 01:28:17 +00:00
Jason Molenda 584ce2f349 Don't try to read the eh_frame section out of a dSYM.
It won't have one and it isn't needed.

llvm-svn: 177688
2013-03-22 00:38:45 +00:00
Sean Callanan 6b200d0b3e Modified the way we report fields of records.
Clang requires them to have complete types, but
we were previously only completing them if they
were of tag or Objective-C object types.

I have implemented a method on the ASTImporter
whose job is to complete a type.  It handles not
only the cases mentioned above, but also array
and atomic types.

<rdar://problem/13446777>

llvm-svn: 177672
2013-03-21 22:15:41 +00:00
Jim Ingham a00790447e If we stopped but no threads had a reason for stopping, we should tell the user about it rather than continuing.
<rdar://problem/13273125> Astris thread status replies for single-core device confuse lldb; lldb resumes execution on attaching

llvm-svn: 177670
2013-03-21 21:46:56 +00:00
Jim Ingham 3d0ffd10aa Remove some commented out code.
llvm-svn: 177668
2013-03-21 21:44:20 +00:00
Matt Kopec 1fff9ce35e Select correct -std flag for CMake for different versions of gcc.
llvm-svn: 177663
2013-03-21 20:52:53 +00:00
Jim Ingham c4ca6e271c The outline of the stepping perf test case, doesn't do anything yet.
llvm-svn: 177646
2013-03-21 16:48:24 +00:00
Greg Clayton 5dbe5d4b62 Add correct file headers to all source files.
llvm-svn: 177625
2013-03-21 03:39:51 +00:00
Jason Molenda 5635f77a99 Add a new method GetFunctionAddressAndSizeVector to DWARFCallFrameInfo.
This returns a vector of <file address, size> entries for all of
the functions in the module that have an eh_frame FDE.

Update ObjectFileMachO to use the eh_frame FDE function addresses if
the LC_FUNCTION_STARTS section is missing, to fill in the start 
addresses of any symbols that have been stripped from the binary.

Generally speaking, lldb works best if it knows the actual start
address of every function in a module - it's especially important
for unwinding, where lldb inspects the instructions in the prologue
of the function.  In a stripped binary, it is deprived of this
information and it reduces the quality of our unwinds and saved
register retrieval.  

Other ObjectFile users may want to use the function addresses from 
DWARFCallFrameInfo to fill in any stripped symbols like ObjectFileMachO
does already.
<rdar://problem/13365659> 

llvm-svn: 177624
2013-03-21 03:36:01 +00:00
Greg Clayton ef0d2142ba Modify code to adhere to LLDB coding conventions.
llvm-svn: 177623
2013-03-21 03:32:24 +00:00
Greg Clayton 384dc726b0 Added a lldb-perf test case that will be used to time various aspects of debugging clang with LLDB.
This test case will measure memory usage and expression timings in frame zero and at higher frames.

llvm-svn: 177617
2013-03-21 00:30:04 +00:00
Greg Clayton bd180cb623 Fixed the ValidOffsetForDataOfSize() to use simpler logic. Fixed DataExtractor::BytesLeft() to return the correct value.
llvm-svn: 177616
2013-03-21 00:29:45 +00:00
Greg Clayton c25e21c10e Simplify the logic for DNBDataRef::ValidOffsetForDataOfSize() and DNBDataRef::ValidOffset() functions.
llvm-svn: 177615
2013-03-21 00:24:59 +00:00
Enrico Granata e7ed0afee2 Making a manual mode of operation for measurements, where you can manually call start() and stop() instead of using the function-call syntax
This is especially useful to take measurements that span multiple test steps, or where you need to have different operations fall under the same measurement

An example of use is in the formatters perf test case

llvm-svn: 177597
2013-03-20 23:01:28 +00:00
Enrico Granata e16dfcdb5b Making the test step count a member variable so that it can be accessed easily
llvm-svn: 177594
2013-03-20 22:42:34 +00:00
Enrico Granata d14b6ef6ef Renaming perf. main files from main.cpp to something meaningful
llvm-svn: 177587
2013-03-20 22:12:01 +00:00
Jason Molenda 7430382970 Change DWARFCallFrameInfo from using a vector of AddressRanges to
track the EH FDEs for the functions in a module to using a
RangeDataVector, a more light-weight data structure that only refers
to File addresses.  Makes the initial FDE scan about 3x faster, uses
less memory.
<rdar://problem/13465650> 

llvm-svn: 177585
2013-03-20 21:57:42 +00:00
Enrico Granata f3fb83ac6b Making MemoryGauge work by fixing a Mach API call mistake - saving (and dumping) more information out of the task_info call
llvm-svn: 177580
2013-03-20 21:18:20 +00:00
Matt Kopec 58c0b96d11 Add Linux support for reading/writing extended register sets.
Patch by Ashok Thirumurthi.

llvm-svn: 177568
2013-03-20 20:34:35 +00:00
Enrico Granata bdbda93f35 Cleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid
llvm-svn: 177558
2013-03-20 19:04:28 +00:00
Andy Gibbs caf4116c40 Update source/DataFormatters/CMakeLists.txt to reflect actual source files.
llvm-svn: 177511
2013-03-20 10:30:02 +00:00
Andy Gibbs 27f065af2c Update source/Expression/CMakeLists.txt to reflect actual source files.
llvm-svn: 177503
2013-03-20 09:34:46 +00:00
Sean Callanan 2c04735630 Updated the IRExecutionUnit to keep local copies
of the data it writes down into the process even
if the process doesn't exist.  This will allow
the IR interpreter to access static data allocated
on the expression's behalf.

Also cleaned up object ownership in the
IRExecutionUnit so that allocations are created
into the allocations vector.  This avoids needless
data copies.

<rdar://problem/13424594>

llvm-svn: 177456
2013-03-19 23:03:21 +00:00
Enrico Granata 92373533a5 The formatters for std::shared_ptr, std::weak_ptr, std::list, std::vector and std::map as provided by libc++ are now written in C++ instead of Python
std::deque is still in Python but is much less commonly used

llvm-svn: 177454
2013-03-19 22:58:48 +00:00
Matt Kopec 9502ac6112 Mark TestChangeValueAPI.py as expected fail with gcc as it still reproduces.
llvm-svn: 177447
2013-03-19 22:00:10 +00:00
Greg Clayton 1080fafb69 Update Sketch test case to capture this and use accessors for debugger, target, process and thread.
llvm-svn: 177425
2013-03-19 19:30:33 +00:00
Greg Clayton 53c5ddf0d7 Fixed incorrect python that was trying to validate that we got a valid lldb.SBThread object by checking to see if it is equal to "None".
This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes. 

llvm-svn: 177416
2013-03-19 17:59:30 +00:00
Greg Clayton e0b924e3bf More cleanup on the lldb-perf code:
- TestCase.m_thread is now filled in with the first thread that has a valid
  stop reason. This eliminates the need for the SelectMyThread() functions.
- The first thread that stops for a reason is also set as the selected thread
  in the process in case any command line commands are run.
- Changed launch over to take a SBLaunchInfo parameter so that the launch
  function doesn't keep getting new arguments as they are needed.
- TestCase::Setup() and TestCase::Launch(SBLaunchInfo) now return bool to 
  indicate success of setup and launch.
- ActionWanted::Next(SBThread) was renamed to ActionWanted::StepOver(SBThread)
- ActionWanted::Finish(SBThread) was renamed to ActionWanted::StepOut(SBThread)

llvm-svn: 177376
2013-03-19 04:41:22 +00:00
Sean Callanan 9be9d172bf Fixed handling of function pointers in the IR
interpreter.  They now have correct values, even
when the process is not running.

llvm-svn: 177372
2013-03-19 01:45:02 +00:00
Enrico Granata 6d37cc6501 This checkin removes the last Cocoa formatters that were implemented in Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters
llvm-svn: 177366
2013-03-19 00:27:22 +00:00
Greg Clayton 9585fbfc67 <rdar://problem/13443931>
Fixed a crasher in the SourceManager where it wasn't checking the m_target member variable for NULL.

In doing this fix, I hardened this class to have weak pointers to the debugger and target in case they do go away. I also changed SBSourceManager to hold onto weak pointers to the debugger and target so they don't keep objects alive by holding a strong reference to them.

llvm-svn: 177365
2013-03-19 00:20:55 +00:00
Sean Callanan 8dfb68e039 Refactored the expression parser so that the IR
and the JITted code are managed by a standalone
class that handles memory management itself.

I have removed RecordingMemoryManager and
ProcessDataAllocator, which filled similar roles
and had confusing ownership, with a common class
called IRExecutionUnit.  The IRExecutionUnit
manages all allocations ever made for an expression
and frees them when it goes away.  It also contains
the code generator and can vend the Module for an
expression to other clases.

The end goal here is to make the output of the
expression parser re-usable; that is, to avoid
re-parsing when re-parsing isn't necessary.

I've also cleaned up some code and used weak pointers
in more places.  Please let me know if you see any
leaks; I checked myself as well but I might have
missed a case.

llvm-svn: 177364
2013-03-19 00:10:07 +00:00
Greg Clayton a45a5d86f7 Fixed the README to match the current code.
llvm-svn: 177346
2013-03-18 23:25:00 +00:00
Jim Ingham 3793322df7 Add a comment about how to add a target for a test case.
llvm-svn: 177343
2013-03-18 23:08:30 +00:00
Jim Ingham 65423de84d Move the performance test cases into their own project.
llvm-svn: 177341
2013-03-18 23:05:00 +00:00
Greg Clayton 7b8f738227 Code cleanup:
- don't use preprocessor macros
- use switch statements
- don't put anything in the lldb namespace, use "lldb_perf" namespace.
- Pass the action struct into each TestStep() for each step fill in
- Modify the ActionWanted class to have accessors to make the continue, next, finish, kill instead of using preproc macros

llvm-svn: 177332
2013-03-18 22:34:00 +00:00
Sylvestre Ledru 6d88a690e6 When built with cmake, only call the string functions when the previous commands (utils/GetSourceVersion & utils/GetRepositoryPath successed). Otherwise, they fail when not launched from a repository
llvm-svn: 177225
2013-03-16 17:01:13 +00:00
Enrico Granata 9f71ad4fa8 C++ formatters for NSTimeZone and for CFBitVector
llvm-svn: 177219
2013-03-16 01:50:07 +00:00
Enrico Granata 6a92511a08 NS(Mutable)IndexSet formatter moves from Python to C++
llvm-svn: 177217
2013-03-16 01:18:00 +00:00
Enrico Granata 50b5ee5023 Converting more data formatters to C++ - NSBundle, CFBinaryHeap, NSMachPort and NSNotification
llvm-svn: 177213
2013-03-16 00:50:25 +00:00
Greg Clayton 6482d2305e <rdar://problem/13194155>
Variables view out of sync with lldb in Xcode is now fixed. Depending on what happened stack frames could get out of date and a stale shared pointer (one that is no longer a current frame in a thread) could end up being used. 

Now we don't store a weak_ptr to a frame in the ExecutionContextRef class, we just store its stack ID and we always regrab the frame from the thread by stack ID.

llvm-svn: 177208
2013-03-15 23:54:07 +00:00
Enrico Granata 7277d201a9 Performance improvements to the IsObjCNil () - we only try to resolve the value if the variable under consideration truly is an “Objective-C thing”
This also changes the ClangASTContext to make sure that id is correctly marked as being such an ObjC thing

llvm-svn: 177203
2013-03-15 23:33:15 +00:00
Han Ming Ong 7b641e97ed <rdar://problem/13100435>
Don't discount regions that vmmap is not discounting.

llvm-svn: 177202
2013-03-15 23:19:44 +00:00
Jim Ingham e7b849e4fb Convert the -a option in "image lookup" to a address-expression, and pass the context
in the -a address expression lookup in "image list" so that it actually works.

llvm-svn: 177200
2013-03-15 23:09:19 +00:00
Matt Kopec 862884327f Rework TestChangedValueAPI.py to account for gcc setting multiple breakpoints.
llvm-svn: 177198
2013-03-15 22:49:52 +00:00
Jim Ingham f48e20e15d Make the conditional break test case a little more robust.
llvm-svn: 177196
2013-03-15 22:19:27 +00:00
Jim Ingham 31938cad9c The regular expression command object was resetting the execution context of the
resolved command, which it should not do.  It should adopt whatever context the
regular expression command was called with.  This was causing regular expression
commands run inside breakpoint commands to adopt the currently selected context,
not the one coming from the breakpoint that we hit.

<rdar://problem/13411771>

llvm-svn: 177195
2013-03-15 22:18:26 +00:00
Matt Kopec f99f0b8cf7 Fix Makefile.rules where no icc is installed and -C gcc is used.
Patch by Ashok Thirumurthi.

llvm-svn: 177192
2013-03-15 21:55:13 +00:00
Matt Kopec c6672c8783 Rollback r177173. Some OSs may not have ptrace extensions which lldb expects when building. This needs to be accounted for.
llvm-svn: 177176
2013-03-15 20:00:39 +00:00
Matt Kopec 0de53f062f Add icc support to the test suite
-adds icc to the lit of compilers to run the tests
-adds icc test decorators
-skip TestAnonymous.py for icc

Patch by Ashok Thirumurthi.

llvm-svn: 177174
2013-03-15 19:10:12 +00:00
Matt Kopec 6773276351 Add ptrace extensions to query a register set.
Patch by Ashok Thirumurthi.

llvm-svn: 177173
2013-03-15 19:06:45 +00:00
Enrico Granata 559008649b Porting the Objective-C Class data type’s summary from Python to C++
llvm-svn: 177172
2013-03-15 18:55:30 +00:00
Enrico Granata f68f732746 Moving CFBag and NSBundle summaries from Python to C++
Temporarily disabled non-code-running summaries for CF*Dictionary and NSCountedSet

llvm-svn: 177171
2013-03-15 18:44:08 +00:00
Enrico Granata ebafd2f187 <rdar://problem/13194155>
Fixing an issue where threads and frames could get out of sync and cause ValueObjects to fail to retrieve their values correctly

llvm-svn: 177166
2013-03-15 17:25:04 +00:00
Sean Callanan cb7733c33c Rolled back r176719 because settings with file
names were broken.

<rdar://problem/13422580>

llvm-svn: 177139
2013-03-15 01:39:44 +00:00
Greg Clayton 4a89501f82 <rdar://problem/12537646>
lldb remembers not-found source file, setting target.source-map doesn't make it re-check for it. Now this is fixed. Each time the source path remappings get updated, the modification ID in the PathMappingList gets bumped and then we know the re-check for sources.

llvm-svn: 177125
2013-03-14 22:52:17 +00:00
Jim Ingham cf2667c46e Log the match substring as well in the case where we match the step-avoid regexp.
llvm-svn: 177119
2013-03-14 22:00:18 +00:00
Jim Ingham 3101ba3300 Add some logging to track cases where “step-in” steps out due to the avoid-regexp and the step-in target.
llvm-svn: 177117
2013-03-14 21:44:36 +00:00
Matt Kopec 9eb40a97f7 Recommit lldb realtime output for POSIX.
-Adds workaround for assertion in lldb for TestEvents.py

llvm-svn: 177116
2013-03-14 21:35:26 +00:00
Enrico Granata 26858401a2 Make a README file with an introduction and basic directions for the lldb-perf infrastructure
llvm-svn: 177109
2013-03-14 20:42:53 +00:00
Enrico Granata 86910577cc <rdar://problem/13228487>
A test case for the performance of some LLDB formatters
Changes and improvements to the testing infrastructure itself

llvm-svn: 177100
2013-03-14 19:00:42 +00:00
Greg Clayton faac111870 <rdar://problem/13421412>
Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.

llvm-svn: 177091
2013-03-14 18:31:44 +00:00
Sean Callanan c4b1ab442d Fixed a problem where we didn't return TypedefNameDecls
when clang asked for them by name.

llvm-svn: 177085
2013-03-14 17:21:53 +00:00
Greg Clayton 617995c095 <rdar://problem/13413693>
Fixed a crasher in the new DWARF in .o files line table linking function where "back()" could end up being called on an empty std::vector.

llvm-svn: 177082
2013-03-14 16:47:56 +00:00
Matt Kopec 85cc3b3dbf Backout POSIX realtime lldb output. TestEvents.py is causing lldb to assert.
llvm-svn: 177076
2013-03-14 14:22:40 +00:00
Han Ming Ong 0c27cb7fa1 <rdar://problem/13415471>
Don't get dirty page size if we are not going to send it back

llvm-svn: 176992
2013-03-13 22:51:04 +00:00
Daniel Malea 66586653b7 Add braces to crashed test summary (needed for buildbots to detect crashes)
llvm-svn: 176980
2013-03-13 21:50:49 +00:00
Daniel Malea b7e4e22795 Remove extra whitespace
llvm-svn: 176978
2013-03-13 21:18:54 +00:00
Daniel Malea 6b72269b3d Prepend "FAIL:" string to tests that crash so that buildbots pick them up.
llvm-svn: 176974
2013-03-13 21:08:02 +00:00
Daniel Malea 10320dd06f Minor LLDB test improvements
- fix TestCPPBool (was failing with some versions of GCC due to num_breakpoint_locations)
- speed up tests by skipping git/svn revision parsing by the test harness when running in lit-compatible (parsable) mode

This should resolve the failures reported by http://lab.llvm.org:8011/builders/lldb-x86_64-linux

llvm-svn: 176972
2013-03-13 20:50:05 +00:00
Greg Clayton e4ca515ae1 <rdar://problem/13404189>
Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command:

(lldb) l -10

Which gets turned into:

(lldb) source list --reverse --count 10

Also simplified the code that is used to track showing more source from the last file and line.

llvm-svn: 176961
2013-03-13 18:25:49 +00:00
Greg Clayton 682b60e4b4 <rdar://problem/13396207>
Added logging that will show up in the system console when we try to resume a process that is already running, or has an unexpected state.

llvm-svn: 176960
2013-03-13 18:23:44 +00:00
Jim Ingham 17d023f6ac Add a target setting (target.use-fast-stepping) to control using the "run to next branch" stepping algorithm.
llvm-svn: 176958
2013-03-13 17:58:04 +00:00
Jim Ingham 0c61dee1b9 The step by running from branch to branch pretty much works with this checkin (at least for x86_64) but is still
turned off, it needs more qualification.  If you want to play with it, change the initialization of m_use_fast_step
to true.

llvm-svn: 176923
2013-03-13 01:56:41 +00:00
Jim Ingham 32ce20c5ee DoesBranch needs to compute the instruction if it isn't already done.
Handle the "alternate_isa" correctly.

llvm-svn: 176922
2013-03-13 01:55:16 +00:00
Jim Ingham d19444c48b More cleanup, remove an untrue comment.
llvm-svn: 176921
2013-03-13 01:53:26 +00:00
Jim Ingham 5bb7e1e11f Remove an unused #include.
llvm-svn: 176920
2013-03-13 01:52:33 +00:00
Jim Ingham 9026dee92e Don't use the fact that we stopped with a "Breakpoint" stop reason to decide to step over the breakpoint. It's
better to check directly whether there is a breakpoint site at the PC.

llvm-svn: 176919
2013-03-13 01:52:09 +00:00
Jim Ingham 199e4f7dc5 Add a missing check for getting a NULL oso module back from GetModuleByCompUnitInfo.
llvm-svn: 176918
2013-03-13 01:34:14 +00:00
Jason Molenda 1ad66dbae4 Various fixes for armv7 floating point/vector register support.
Drop the old f registers from debugserver's register list.  Add the
NEON 128-bit q registers to debugserver, support reading and writing.
Add the new contains / invalidates mappings for the s, d, and q 
registers so lldb will know what registers overlay what other registers.
Change the default format of s and d registers to be floating point
instead of hex.  Remove some UTF-8 hyphen chars in comments in the ARM
register number definition headers.  
<rdar://problem/13121797> 

llvm-svn: 176915
2013-03-13 00:14:30 +00:00
Jim Ingham 1b57d17e42 Add a missing call to GetFileRangeMap. It's absence was causing debug info from .o files to sometimes
not get processed.

<rdar://problem/13406310>

llvm-svn: 176914
2013-03-13 00:07:18 +00:00
Sean Callanan 34cf820b8a Switch from CreateTypeSourceInfo, which allocates
uninitialized memory, to getTrivialTypeSourceInfo,
which initializes its memory, when creating trivial
TypeSourceInfos.

<rdar://problem/13332253>

llvm-svn: 176899
2013-03-12 21:22:00 +00:00
Matt Kopec 787d1623b0 Misc. clang build warning fixes.
llvm-svn: 176879
2013-03-12 17:45:38 +00:00
Jim Ingham 7c06a09903 For file & line breakpoints, if there are subsets of contiguous line table entries for the specified line, set the
breakpoint on the first one of each of the contiguous sub-sets of entries, and not all the others.

llvm-svn: 176846
2013-03-12 01:25:22 +00:00
Jim Ingham e674c8315a The default configuration should be Debug, not DebugClang.
llvm-svn: 176845
2013-03-12 01:19:42 +00:00
Greg Clayton 0b0ceb617f Updated the register numbering base documentation for the "gcc", "dwarf", "container-regs" and "invalidate-regs" key/value responses to the "qRegisterInfo" packet.
llvm-svn: 176843
2013-03-12 00:14:38 +00:00
Sean Callanan 60e390cbd5 Created a sample "jump" command that handles
GDB-style linespecs.  This command allows changing
the PC without manually looking up the new address.

llvm-svn: 176841
2013-03-12 00:08:40 +00:00
Matt Kopec 097cd6262d Change Linux/POSIX to output inferior output in realtime.
llvm-svn: 176833
2013-03-11 22:31:31 +00:00
Greg Clayton a4f4223853 Buildbot was failing to build. I guess classes declared in implementation files are treated differently on various compilers causing a "friend class Foo;" to fail for forward declared classes in global namespace.
llvm-svn: 176823
2013-03-11 20:02:03 +00:00
Greg Clayton bff7825a57 <rdar://problem/13372857>
Fixed the exception breakpoints to always use a file filter to make setting exception breakpoint efficient.

llvm-svn: 176821
2013-03-11 18:42:51 +00:00
Jason Molenda 4439450803 Xcode seems to want these lines added to the project file.
llvm-svn: 176792
2013-03-10 21:56:57 +00:00
Sylvestre Ledru 1573b1b32c Match the new declaration of clang::ASTContext::getFunctionType introduced in clang r176726. Fix the build of lldb
llvm-svn: 176790
2013-03-10 20:13:16 +00:00
Jason Molenda 252d6a385c Remove use of the ARMDisassembler framework from
DNBArchImplARM.  This framework is no longer around;
all armv7 devices support using hardware breakpoints
to instruction single step.

llvm-svn: 176761
2013-03-09 07:03:32 +00:00
Jason Molenda 03a00faae4 Also remove actual link against the ARMDisassembler framework from
debugserver's build settings.

llvm-svn: 176760
2013-03-09 06:19:31 +00:00
Jason Molenda cc526b797a We don't need to specify the VALID_ARCHS in the xcode project file.
Also, don't build debugserver with -DUSE_ARM_DISASSEMBLER_FRAMEWORK -
that framework isn't around at this point.

llvm-svn: 176759
2013-03-09 06:15:46 +00:00
Greg Clayton 5a23444033 Remove my print statements I was using for debugging.
llvm-svn: 176753
2013-03-09 02:29:04 +00:00
Greg Clayton 0449678bce <rdar://problem/13384282>
As much as I hate to leave this hacky code in that adds some d and q registers to ARM registers, I must leave it in.

The code is now fixed to not just assume ANY arm target will have registers in a certain order. We now verify the common regs are the same name and byte size before adding the d and q regs.

llvm-svn: 176752
2013-03-09 02:19:08 +00:00
Sean Callanan 6c9265b07e Made LLDB work with the latest Clang. Also fixed
an assertion due to non-implicit Objective-C methods
without source locations.

llvm-svn: 176750
2013-03-09 01:59:31 +00:00
Jim Ingham 168d469a19 Fix a reversed test for "for_expression" in creating C++ exception breakpoints.
Add a missing "break" in processing the -h option to "breakpoint set".

llvm-svn: 176741
2013-03-09 00:48:58 +00:00
Jason Molenda c33136706d Fix assert in RegisterValue::SetBytes if we're trying to
write a 32-byte value into a 32-byte ymm vector reg - that 
is allowed.
<rdar://problem/13350587> 

llvm-svn: 176740
2013-03-09 00:04:17 +00:00
Sean Callanan 83b3da95f6 Removed One Definition Rule warnings because they're
noisy when dealing with anonymous structs.

<rdar://problem/13246914>

llvm-svn: 176738
2013-03-08 23:38:53 +00:00
Greg Clayton 613641d398 <rdar://problem/13361742>
Don't resolve .o file locations when setting the file spec for each .o file in DWARF with debug map. We should trust the path.

llvm-svn: 176725
2013-03-08 21:46:30 +00:00
Sean Callanan 8773ce2fec OptionValueFileSpec shouldn't be doing argument
parsing on the file name it gets.  That confuses
it if there are spaces in the file name.

<rdar://problem/13380392>

llvm-svn: 176719
2013-03-08 20:59:47 +00:00
Enrico Granata 24ccabfdc3 Dump the measurements directly instead of getting their metrics first
(this code needs to be pushed up so that in the basic scenarios TestCase knows to dump all its measurements directly)

llvm-svn: 176718
2013-03-08 20:50:36 +00:00
Enrico Granata f58cececaa Initial checkin of a new project: LLDB Performance Testing Infrastructure
This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance

This is separate from the LLDB testsuite in test/ in that:
a) this uses C++ instead of Python to avoid measures being affected by SWIG
b) this is in very early development and needs lots of tweaking before it can be considered functionally complete
c) this is not meant to test correctness but to help catch performance regressions

There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior.
The resulting output is a PLIST much like the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>fetch-frames</key>
		<real>0.13161715522222225</real>
	</dict>
	<dict>
		<key>file-line-bkpt</key>
		<real>0.029111678750000002</real>
	</dict>
	<dict>
		<key>fetch-modules</key>
		<real>0.00026376766666666668</real>
	</dict>
	<dict>
		<key>fetch-vars</key>
		<real>0.17820429311111111</real>
	</dict>
	<dict>
		<key>run-expr</key>
		<real>0.029676525769230768</real>
	</dict>
</array>
</plist>

Areas for improvement:
- code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!)
- more metrics and test cases
- better error checking

This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool.

llvm-svn: 176715
2013-03-08 20:29:13 +00:00
Sean Callanan 8106d8082c Added very lightweight, statically-allocated
counters for a variety of metrics associated
with expression parsing.  This should give some
idea of how much work the expression parser is
doing on Clang's behalf, and help with hopefully
reducing that load over time.

<rdar://problem/13210748> Audit type search/import for expressions

llvm-svn: 176714
2013-03-08 20:04:57 +00:00
Jason Molenda 9c4a232add Update PlatformDarwin to understand how armv7m / armv7em relate
to the other armv7 types as far as compatibility/interchangability
goes.
<rdar://problem/13361372> 

llvm-svn: 176684
2013-03-08 04:33:44 +00:00
Greg Clayton 1bbcc03455 <rdar://problem/13374267>
Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries.

llvm-svn: 176683
2013-03-08 02:42:06 +00:00
Greg Clayton c4ffd66f06 <rdar://problem/13119621>
Make dynamic type detection faster by using the AST metadata to help out and allow us not to complete types when we don't need to.

After running "purge" on a MacOSX system, the Xcode variables view now populates more than 3x faster with this fix.

llvm-svn: 176676
2013-03-08 01:37:30 +00:00
Jason Molenda 7a1559c239 Add recognition of two more armv7 variants, armv7m and armv7em.
<rdar://problem/13361372> 

llvm-svn: 176674
2013-03-08 01:20:17 +00:00
Jim Ingham b0fac5090f Add a comment to break disable's help to make clearer the relationship between the
enable/disable state of a breakpoint, and of its locations.

llvm-svn: 176672
2013-03-08 00:31:40 +00:00
Jason Molenda c1a6583143 Typeo in warning message.
llvm-svn: 176664
2013-03-07 22:44:42 +00:00
Sean Callanan 3d27e6603a Updated Apple LLDB version to lldb-300.99.0. Also
updated the build system to support the new Apple
LLDB versioning scheme.

llvm-svn: 176662
2013-03-07 22:29:06 +00:00
Daniel Malea 7f454e0aed Fix enum_types test on Linux
- Required flag "-std=c++11" needs to be set before including Makefile.rules

llvm-svn: 176644
2013-03-07 20:13:11 +00:00
Daniel Malea 4185a92b9d Fix issue that causes linux buildbots to ignore errors
- change string "ERROR" to "FAIL" to match clang lit test results

Also, make LLDB tests work on machines that do not have svn and/or git installed

llvm-svn: 176633
2013-03-07 18:39:26 +00:00
Greg Clayton 66a907a6bd Added new properties to lldb.SBModule classes:
"compile_units" returns an array of all compile units in a module as a list() of lldb.SBCompileUnit objects.

"compile_unit" returns a compile unit accessor object that allows indexed access, search by full or partial path, or by regex:

(lldb) script
comp_unit = lldb.target.module['TextEdit'].compile_unit['Document.m']
comp_unit = lldb.target.module['TextEdit'].compile_unit['/path/to/Document.m']
comp_unit = lldb.target.module['TextEdit'].compile_unit[0]
comp_unit = lldb.target.module['TextEdit'].compile_unit[1]
for comp_unit in lldb.target.module['TextEdit'].compile_unit[re.compile("\.m$")]
  print comp_unit

This helps do quick searches and scripting while debugging.

llvm-svn: 176613
2013-03-07 03:25:11 +00:00
Greg Clayton 1fb7c625d0 Stop the "module" property from throwing an exception when the module name was not found in the target module list.
llvm-svn: 176611
2013-03-07 02:58:47 +00:00
Greg Clayton 923bedf52f Added a new module that can dump all line tables for all compile units in any modules that are specified as arguments to the "dump_module_line_tables" command.
I used this to verify that the debug map line tables were the same as previous LLDB releases prior to my change in the DWARF in .o file linking.

llvm-svn: 176610
2013-03-07 02:57:54 +00:00
Daniel Malea 33174017e0 Clean up LLDB CMake build output
- remove "-debug" flag from swig scripts
- use "echo -n" instead of "echo" in dummy target to avoid printing a useless newline

llvm-svn: 176597
2013-03-07 00:52:25 +00:00
Daniel Malea 3c216ace9b Fix running of LLDB tests with cmake+ninja+ccache
- Avoid passing 'ccache' as the test compiler. Instead, use first arg after ccache.

llvm-svn: 176596
2013-03-07 00:50:54 +00:00
Daniel Malea 4ebaace6b3 Fix Linux i386 build
- missing definitions were causing different definitions of type 'off_t', resulting in linker errors
- fix is to define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64

llvm-svn: 176595
2013-03-07 00:48:53 +00:00
Han Ming Ong 0d03deeeb9 <rdar://problem/13119170>
Reap the child process (debugserver) when it is done.

llvm-svn: 176594
2013-03-06 23:59:34 +00:00
Greg Clayton 084fad6a51 <rdar://problem/13362109>
LLDB was not parsing line tables correctly for DWARF in .o files after recent debug map changes. This has now been fixed. 

llvm-svn: 176592
2013-03-06 23:23:27 +00:00
Jason Molenda 4e7511efc7 Remove some tabs and extraneous space chars from ObjectFileMachO.cpp.
Noticed these while working on the last commit.

llvm-svn: 176590
2013-03-06 23:19:17 +00:00
Jason Molenda 255f9bbcf4 Retrieve the dyld shared cache mapping offset from the shared cache instead of hardcoding the value.
Read the version number of the dyld shared cache.
<rdar://problem/13311882> 

llvm-svn: 176589
2013-03-06 23:17:36 +00:00
Andrew Kaylor 7bdeab592d Skipping TestConstVariables on Linux.
The test was marked as expectedFailureLinux, but now it passes with gcc and some versions of clang.  Newer versions of clang introduce a failure due to bad DWARF information.

llvm-svn: 176581
2013-03-06 21:37:41 +00:00
Greg Clayton 00108408ac Added tests to test for "settings set" with trailing whitespaces after the values.
llvm-svn: 176579
2013-03-06 21:17:06 +00:00
Andrew Kaylor 9e9f1db866 Adding support for DW_OP_stack_value in DWARFExpression::Evaluate
llvm-svn: 176578
2013-03-06 21:13:09 +00:00
Sean Callanan f58b12d8eb Added a little bit of logging to ClangFunction to
make it more obvious what's going on.

llvm-svn: 176575
2013-03-06 19:57:25 +00:00
Andrew Kaylor 60cdeb6aa8 Add support for non-register scalar values in DoMaterializeOneVariable.
llvm-svn: 176574
2013-03-06 19:35:33 +00:00
Matt Kopec 7de484640e Improve/Cleanup ptrace wrapper and remove dependency on user.h
Patch by Ashok Thirumurthi.

llvm-svn: 176558
2013-03-06 17:20:48 +00:00
Greg Clayton 5d14fc061f Fixed enum printing for negative enums. There previously was no testing to validate that enum values were being displayed correctly.
Also added C++11 enum test cases to cover enums as int8_t, int16_t int32_t, int64_t, uint8_t, uint16_t, uint32_t, and uint64_t both for DWARF and dSYM cases. The DWARF being emitted by clang is missing the enum integer type, but the code is now ready to accept and deal with the integral type if it is supplied.

llvm-svn: 176548
2013-03-06 06:23:54 +00:00
Greg Clayton 2a844b7ff8 Fixed test suite errors due to new clang -v output.
llvm-svn: 176546
2013-03-06 02:34:51 +00:00
Greg Clayton 21c895e3d5 Now that "settings set" will strip leading and trailing spaces, we need a way to be able to specify string values that contain spaces. So now settings setting <property> <value>" can have a <value> that is quoted:
settings set prompt "(lldb2) "

llvm-svn: 176545
2013-03-06 02:19:38 +00:00
Greg Clayton 62243f8478 Disable JITed code in any processes that use DynamicLoaderStatic.
llvm-svn: 176541
2013-03-06 00:59:41 +00:00
Greg Clayton 3e06753408 <rdar://problem/13341472>
LLDB wasn't printing the names for negative enums. Fixed the signed extraction of enumerators and how they were registered with clang's type system.

llvm-svn: 176533
2013-03-05 23:54:39 +00:00
Greg Clayton 30820f0685 <rdar://problem/13184855>
Spaces in "settings set" value strings no longer cause setting failures.

llvm-svn: 176532
2013-03-05 23:52:49 +00:00
Daniel Malea b6c6e0492b Be more precise in GCC/autoconf build instructions about compiler versions
llvm-svn: 176528
2013-03-05 22:58:53 +00:00
Daniel Malea fad9aae937 Typos: be more precise on the build page when mentioning the non-cmake build system
llvm-svn: 176524
2013-03-05 22:43:08 +00:00
Daniel Malea a2e4598d88 Add instructions for building LLDB with CMake
- suported generators: Ninja and Unix Makefiles
- added instructions to run tests when building with autoconf

llvm-svn: 176522
2013-03-05 22:38:50 +00:00
Daniel Malea ab5c2012d3 Fix Ninja LLDB build on Linux (via cmake -G Ninja)
- resolved circular dependency issue by making liblldb depend directly on LLDBWrapPython.cpp
- removed use of '..' for relative directories -- ninja doesn't like this
- fixed build-order problem

llvm-svn: 176517
2013-03-05 21:59:12 +00:00
Matt Kopec 3041286f64 Add support on POSIX to determine if an inferior has changed while debugging it.
llvm-svn: 176492
2013-03-05 17:23:57 +00:00
Jason Molenda 69b6b635fa Fix ivar ordering for Process ctor to match the order they're
declared in the .h file.

llvm-svn: 176473
2013-03-05 03:33:59 +00:00
Daniel Malea 658fd5798b Un-skipping tests affected by llvm.org/pr15256
patch by Ashok Thirumurthi!

llvm-svn: 176462
2013-03-04 23:15:08 +00:00
Daniel Malea 208b5beb60 Fix makefile and re-enable test disabled due to llvm.org/pr15256
- fix is: don't pass incompatible -stdlib option when building with GCC

llvm-svn: 176460
2013-03-04 23:04:53 +00:00
Greg Clayton 9422dd64f8 <rdar://problem/13338643>
DWARF with .o files now uses 40-60% less memory!

Big fixes include:
- Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed.
- Removed linked address members/methods from lldb_private::Section and lldb_private::Address
- lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future
- Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason
- Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile.
- Changed how the debug map is parsed and stored to be able to:
    - Lazily parse the debug map for each object file
    - not require the address map for a .o file until debug information is linked for a .o file

llvm-svn: 176454
2013-03-04 21:46:16 +00:00
Han Ming Ong 8764fe7d9a <rdar://problem/13338758>
Make it configurable what to profile.
For Mac, we don't use the dirty page size yet and hence there is no need to gather that. This should be way better in not draining the battery since we are operating between 0% to 0.1% on the Mac after this change.

llvm-svn: 176451
2013-03-04 21:25:51 +00:00
Enrico Granata c1a5b2eba8 <rdar://problem/12897838>
Making sure we do not try to copy memory at address 0 - that would make us crash

llvm-svn: 176438
2013-03-04 17:20:57 +00:00
Jason Molenda 503d018111 ProcessMachCore had (until 2013-01-29) some simple checks to find a kernel
in a core file if it didn't start at the beginning of a memory segment.
I added more sophisticated kernel location code to DynamicLoaderDarwinKernel
and removed the simple one in ProcessMachCore.  Unfortunately the kernel
DynamicLoader doesn't get a chance to search around in memory unless there's
a hint that this might be a kernel debug session.  It was easy ot make the
kernel location code static in DynamicLoaderDarwinKernel and call it from
ProcessMachCore on the start of the session, so that's what I did.
<rdar://problem/13326647> 

llvm-svn: 176405
2013-03-02 07:19:32 +00:00
Jim Ingham 0f063ba6b4 Convert from the C-based LLVM Disassembler shim to the full MC Disassembler API's.
Calculate "can branch" using the MC API's rather than our hand-rolled regex'es.
As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att.

<rdar://problem/11319574>
<rdar://problem/9329275>

llvm-svn: 176392
2013-03-02 00:26:47 +00:00
Jim Ingham 0943792a65 Move m_destroy_in_process to Process (from ProcessKDP) since it is generally useful,
and use it to keep from doing the OS Plugin UpdateThreadList while destroying, since
if that does anything that requires the API lock it may deadlock against whoever is
running the Process::Destroy.

<rdar://problem/13308627>

llvm-svn: 176375
2013-03-01 20:04:25 +00:00
Daniel Malea 9e84eb41f6 Add a test case for static member variables
- expected to fail across the board due to llvm.org/pr15401

Patch by Ashok Thirumurthi!

llvm-svn: 176362
2013-03-01 18:25:42 +00:00
Matt Kopec 66fd4b1ab9 Fix string warning I introduced with indirect function support.
llvm-svn: 176360
2013-03-01 17:44:31 +00:00
Matt Kopec c51b243a43 Update TestCallStdStringFunction to expected fail for gcc and account for multiple breakpoint locations.
Patch from Ashok Thirumurthi.

llvm-svn: 176357
2013-03-01 17:29:16 +00:00
Jason Molenda ce62fd72f6 Patch from Andrew Fish to add recognition of some additional
KDP packets.

llvm-svn: 176319
2013-03-01 00:43:19 +00:00