Commit Graph

5696 Commits

Author SHA1 Message Date
Sean Callanan 2cc1fbfc9b Switched AppleObjCRuntimeV2::CreateClassDescriptor
over to simply update its cache and then look up
the descriptor in the cache.  This is fine because
the cache now builds much faster (since descriptors
are minimal).

Metaclasses aren't in the cache, so I switched
the Describe method for class descriptors from using
GetClassDescriptor to manually creating an automatic
ClassDescriptorV2.

llvm-svn: 165579
2012-10-10 00:46:46 +00:00
Sean Callanan 156d16cb04 Thinned the AppleObjCRuntimeV2's class descriptors.
The following are now derived lazily:

- The name of the class (cached);
- the instance size of the class (not cached);

The following have been removed entirely:

- Whether the class is realized.  This is an
  implementation detail.
- The contents of the objc_class object.  That
  object can be read as needed.
- Whether the class is valid.  The fact that
  we vended a class to begin with means it's
  valid.  We will only give up looking parts
  of it up if they are not in the format we
  expect.

llvm-svn: 165567
2012-10-09 23:45:42 +00:00
Enrico Granata a5d3ba008b <rdar://problem/12462575> Refactoring a block of shared code in the NSString data formatter
llvm-svn: 165557
2012-10-09 22:44:18 +00:00
Sean Callanan 880ee17fb8 Cleanup in the AppleObjCRuntimeV2 to make descriptors
lighter-weight so that the cache can be populated
faster.

- I Added a ProcessWP to the runtime so I can
  take it out of the individual descriptors, saving
  space;
- I made the constructors for the descriptors
  private so that only the runtime can invoke them; 
  and
- I removed the constructor that takes a ValueObject
  since the logic for using a ValueObject is in the
  runtime.

llvm-svn: 165549
2012-10-09 21:21:35 +00:00
Jason Molenda 0a72520f22 Patch from Dan Malea to fix a build break I introduced yesterday.
Thanks again Dan!

llvm-svn: 165519
2012-10-09 18:40:44 +00:00
Greg Clayton 77fbc8176d Changes to clean up the runtime and how the ISA caches are managed.
llvm-svn: 165516
2012-10-09 17:51:53 +00:00
Greg Clayton 85c2a72f2a Fixed the redo.py script to emit correct arch and compiler options after dotest.py was switched over to use argparse.
llvm-svn: 165507
2012-10-09 16:54:55 +00:00
Jason Molenda bb860bd264 Add a parameter to Symbols::DownloadObjectAndSymbolFile() to control
whether we try to call an external program to load symbols unconditionally,
or if we check the user's preferences before calling it.

ProcessMachCore now sets CanJIT to false - we can't execute code in a core file.

DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule changed
to load the kernel from an on-disk file if at all possible.
Don't load the kext binaries out of memory from the remote systems - their linkedit doesn't
seem to be in a good state and we'll error out down in SymbolVendorMacOSX if we try to use
the in-memory images.
Call Symbols::DownloadObjectAndSymbolFile to get the kext/kernel binary -- the external
program may be able to give us a file path on the local filesystem instead of reading
the binary / dSYM over a network drive every time.  Fall back to calling 
Target::GetSharedModule() like before if DownloadObjectAndSymbolFile fails.

llvm-svn: 165471
2012-10-09 01:17:11 +00:00
Greg Clayton 13d4dfd3f2 Fix a build warning and a dangerous possible crasher.
llvm-svn: 165460
2012-10-08 23:50:19 +00:00
Greg Clayton 9ba42d11aa Make DebugMapModule destructor virtual since it inherits from Module.
llvm-svn: 165441
2012-10-08 22:48:57 +00:00
Greg Clayton 3a18e31945 Added a new "module" log channel which covers module creation, deletion, and common module list actions.
Also added a new option for "log enable" which is "--stack" which will print out a stack backtrace for each log line.

This was used to track down the leaking module issue I fixed last week.

llvm-svn: 165438
2012-10-08 22:41:53 +00:00
Greg Clayton ae23ed336b Checking in fixes that I used to track down a leaking module. The heap module can now search the vm regions with the --vm-regions options to any of the heap functions. This is currently slow and often will time out when run on a large program since our user expression timeout is set to 500000 usec. We need to add an API to LLDB where we can specify the timeout for an expression.
llvm-svn: 165437
2012-10-08 22:39:38 +00:00
Enrico Granata beea93c130 <rdar://problem/12200505> Fixing a logical error in SBProcess, where the get_process_thread_list function was creating invalid threads_access instances, and hence failing to correctly fill in the list
llvm-svn: 165421
2012-10-08 19:06:11 +00:00
Enrico Granata f75c976928 Silly me! There was a closing ) missing from one of the lines - and Python complained about syntax errors on the next line. It being a Friday afternoon made the rest
llvm-svn: 165420
2012-10-08 19:01:10 +00:00
Enrico Granata 944b4c4c1b Retrying to apply Vishal's patch - hopefully this time it won't break Jason's build
llvm-svn: 165410
2012-10-08 17:32:55 +00:00
Micah Villmow 8468dbecf2 Move TargetData to DataLayout.
llvm-svn: 165396
2012-10-08 16:28:57 +00:00
Jason Molenda 53667f5da1 In DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule(),
if we have a kernel binary, set the target's architecture to match.

Include the target's architecture in the ModuleSpec when we're searching for the 
kext binaries on the local system -- otherwise we won't get a specific slice of
a fat file picked out for us and we won't use the returned Module correctly.

Remove the redundant attempt to find a file on the local filesystem from this method.


In ProcessGDBRemote::CheckForKernel(), if we have a kernel binary in memory, mark
the canJIT as false.  There is no jitting code in kernel debug sessions.

llvm-svn: 165357
2012-10-06 02:02:26 +00:00
Jason Molenda cc62f28735 Revert Vishal's patch that Enrico commited, at least for the weekend. With it applied,
starting lldb I get

% ./lldb -x
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/build/Debug/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py", line 9008
    raise TypeError("No array item of type %s" % str(type(key)))
        ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
(lldb)


I did a clean build and still got the problem so I'm backing this out until Enrico can
look at it.

llvm-svn: 165356
2012-10-06 01:46:12 +00:00
Jim Ingham 215341c25b Make the error message from regex commands use the command's syntax string if it exists rather than a generic but
not at all helpful message about not matching some unknown regex...

llvm-svn: 165349
2012-10-06 00:27:04 +00:00
Enrico Granata ffe2d52a06 patch from Vishal Patel to improve our lldb.value wrapper
llvm-svn: 165348
2012-10-06 00:06:18 +00:00
Enrico Granata cd29fefbff <rdar://problem/12442990> Fix the implementation of lldb.value.__eq__
llvm-svn: 165344
2012-10-05 23:20:58 +00:00
Enrico Granata e3fcd2bb53 <rdar://problem/12426557> Fixing the NSIndexSet data formatter
llvm-svn: 165341
2012-10-05 22:58:46 +00:00
Jason Molenda 675e45c770 Remove "k" as an alias for "kill". It doesn't ask for confirmation and
it's too easy to type by mistake when typing "l" (read: I did this once).

llvm-svn: 165340
2012-10-05 22:56:23 +00:00
Jason Molenda 48d88919d7 Remove two more cases of "-w write" being specified
to watch var set/exp -- that's now the default in the
shipped lldb.

llvm-svn: 165333
2012-10-05 20:28:11 +00:00
Jason Molenda 80f1663a9c Improve shortened examples of the watchpoint commands.
Document "f <n>" selects frame n.  
"t <n>" selects thread n but this was just added to TOT
so most people won't have access to an lldb that accepts it.

llvm-svn: 165332
2012-10-05 20:25:53 +00:00
Jim Ingham 067df8090a Remove the bt alias I inadvertently added back in in my last checkin.
llvm-svn: 165330
2012-10-05 19:48:19 +00:00
Jim Ingham ca36cd16e4 Add one-shot breakpoints (-o option to "break set") and a tbreak alias for our gdb friends.
llvm-svn: 165328
2012-10-05 19:16:31 +00:00
Jim Ingham 874f43cadc Fix a test failure caused by checkin 165274.
llvm-svn: 165327
2012-10-05 19:14:57 +00:00
Jason Molenda 766e7277ed one more small fix for the gdb-comes-first column order
llvm-svn: 165301
2012-10-05 05:31:01 +00:00
Jason Molenda 4cddfedf53 Change the "bt" command alias defined in CommandInterpreter::LoadCommandDictionary.
It is now a regex command alias that more faithfully emulates gdb's
behavior, most importantly, "bt 5" will backtrace 5 frames of the
currently selected thread.  "bt all" still backtraces all threads
(unlike gdb) and for users who have learned to use "bt -c 5", that
form is still accepted.

llvm-svn: 165300
2012-10-05 05:29:32 +00:00
Jason Molenda a8805d3809 Symbols::LocateMacOSXFilesUsingDebugSymbols() - perform tilde
expansion on the dSYM path we find if it starts with a tilde.

llvm-svn: 165299
2012-10-05 04:57:34 +00:00
Jason Molenda 840e2819c6 typeo
llvm-svn: 165297
2012-10-05 04:29:13 +00:00
Jason Molenda 293e210a59 typeo
llvm-svn: 165296
2012-10-05 04:28:53 +00:00
Jason Molenda 74f29358b1 Update the intro paragraph of text describing the table below to
reflect that the columns were just swapped.

llvm-svn: 165295
2012-10-05 04:28:33 +00:00
Jason Molenda c8fd91603a Swap the columns in the lldb & gdb command comparison table. I
often hear feedback from people that having the lldb commands on
the left hand side is non-intuitive -- they say "I want a *gdb* to
*lldb* table, not a *lldb* to *gdb* table".  It doesn't seem odious
to go from the right-hand column to the left hand column but I've
heard this same feedback enough that it's also pointless to keep
the format lldb-first, gdb-second when it was an arbitrary choice
to begin with.

llvm-svn: 165294
2012-10-05 04:26:06 +00:00
Enrico Granata 70fd574c2e <rdar://problem/12099999> renaming SBStream::Printf to Print in the scripting world in order to avoid supporting varargs through SWIG
llvm-svn: 165274
2012-10-04 23:54:09 +00:00
Enrico Granata 4d6cd886f5 A tweak to the previous commit to ensure that we don't try to use -> on a NULL pointer (should not happen but better be safe than sorry)
llvm-svn: 165272
2012-10-04 23:17:01 +00:00
Enrico Granata e6f1b76fef <rdar://problem/12413390> Fixing an issue where synthetic ValueObjects do not properly resolve their value
llvm-svn: 165271
2012-10-04 23:13:00 +00:00
Jason Molenda ccd41e55f1 Ran the sources through the compiler with -Wshadow warnings
enabled after we'd found a few bugs that were caused by shadowed
local variables; the most important issue this turned up was
a common mistake of trying to obtain a mutex lock for the scope
of a code block by doing

        Mutex::Locker(m_map_mutex);

This doesn't assign the lock object to a local variable; it is
a temporary that has its dtor called immediately.  Instead,

        Mutex::Locker locker(m_map_mutex);

does what is intended.  For some reason -Wshadow happened to
highlight these as shadowed variables.

I also fixed a few obivous and easy shadowed variable issues
across the code base but there are a couple dozen more that
should be fixed when someone has a free minute.
<rdar://problem/12437585>

llvm-svn: 165269
2012-10-04 22:47:07 +00:00
Sean Callanan bfeb28087a Removed a directive to delete the test subdirectories
from LLVM and Clang.  This made "svn update" very
unpleasant if the original repository was fetched by
build-llvm.pl.

llvm-svn: 165268
2012-10-04 22:37:53 +00:00
Sean Callanan 48954c95a7 Made the i386 ABI mark EBP as non-volatile,
because the unwinders typically can find its
value.

llvm-svn: 165266
2012-10-04 22:24:27 +00:00
Jim Ingham 2f355a7fca ClangASTContext::GetIndexOfChildWithName - increment the child index we plan to return as we iterate through the ivars.
<rdar://problem/12433299>

llvm-svn: 165264
2012-10-04 22:22:16 +00:00
Sean Callanan 464a5b57f9 Fixed an assertion in the SymbolFile resulting
from a NULL ObjCInterfaceDecl.

llvm-svn: 165261
2012-10-04 22:06:29 +00:00
Enrico Granata 476b9ee82b <rdar://problem/12424824> Making sure that we correctly update our synthetic children provider for NSDictionary - providing better support for dynamic types by letting the filter recalculate itself when the type of the object changes
llvm-svn: 165260
2012-10-04 21:46:06 +00:00
Enrico Granata 7b8c0389e1 <rdar://problem/12424824> Making sure that we correctly update our synthetic children provider for NSArray - the same work will need to be done for NSDictionary
llvm-svn: 165252
2012-10-04 21:04:46 +00:00
Jason Molenda 31a6961c13 Patch submitted by Dan Malea -- I introduced a dependency between
ProcessGDBRemote and DynamicLoaderDarwinKernel and a patch was needed
to get this building on Linux.  Thanks!

llvm-svn: 165193
2012-10-04 02:16:06 +00:00
Jason Molenda 593dd76044 Remove a few debug printf's that were left in ProcessKDP.
llvm-svn: 165192
2012-10-04 02:06:30 +00:00
Enrico Granata f175ad152c <rdar://problem/12099592> Adding back a bunch of code-running summaries
llvm-svn: 165186
2012-10-03 23:53:45 +00:00
Jim Ingham a0cc6b24be Don't turn on the debugserver log by default.
llvm-svn: 165176
2012-10-03 22:31:30 +00:00
Enrico Granata 83805259e1 <rdar://problem/12408181> Fixing a bug where we would try to look for types in a module, and then fail to look for them anywhere else because the same SymbolContext was being passed everywhere
llvm-svn: 165169
2012-10-03 21:31:35 +00:00
Sean Callanan 7505079a1f An API in Clang got renamed; fixing LLDB to match.
llvm-svn: 165144
2012-10-03 19:23:27 +00:00
Jason Molenda 5e8534efe7 The kernel loading code is now isolated in the DynamicLoaderDarwinKernel;
remove the duplicates of this code in ProcessGDBRemote and ProcessKDP.
These two Process plugins will hardcode their DynamicLoader name to be
the DynamicLoaderDarwinKernel so the correct DynamicLoader is picked,
and return the kernel load address as the ImageInfosAddress.
<rdar://problem/12417038> 

llvm-svn: 165080
2012-10-03 01:29:34 +00:00
Jason Molenda 743e439608 Change DynamicLoaderDarwinKernel::OSKextLoadedKextSummary to use
the Symbols::LocateExecutableObjectFile method to locate kexts and
kernels instead of copying them out of the memory of the remote
system.  This is the fix for <rdar://problem/12416384>.

Fix a variable shadowing problem in
Symbols::LocateMacOSXFilesUsingDebugSymbols which caused the symbol
rich executable binaries to not be found even if they were listed
in the dSYM Info.plist.

Change Symbols::DownloadObjectAndSymbolFile to ignore dsymForUUID's
negative cache - this is typically being called by the user and we
should try even if there's a incorrect entry in the negative cache.

llvm-svn: 165061
2012-10-02 22:23:42 +00:00
Greg Clayton 548e9a3e61 <rdar://problem/11791234>
Shared libraries on MacOSX were not properly being removed from the shared
module list when re-running a debug session due to an error in:

Module::MatchesModuleSpec()

llvm-svn: 164991
2012-10-02 06:04:17 +00:00
Jason Molenda 68b3607fa2 Handle KASLR kernel loading for kernel corefiles.
Reduce the amount of output that DynamicLoaderDarwinKernel
prints for each kext it loads.
<rdar://problem/7714201> 

llvm-svn: 164985
2012-10-02 03:49:41 +00:00
Enrico Granata 83c85e4193 <rdar://problem/12349509> Renaming the structure that we use for NSDictionary children
llvm-svn: 164973
2012-10-01 21:49:10 +00:00
Enrico Granata e00af8093c <rdar://problem/12406088> Fixing a crasher with adding a regex command, due to accessing a shared pointer without first checking for NULL
llvm-svn: 164950
2012-10-01 17:19:37 +00:00
Jason Molenda d1fae144ba Add the RelocateOrLoadKernel and LoadKernel methods to ProcessGDBRemote::DoRemoteConnect().
When attaching to a remote system that does not look like a typical vendor system, and no
executable binary was specified to lldb, check a couple of fixed locations where kernels
running in ASLR mode (slid in memory to a random address) store their load addr when booted
in debug mode, and relocate the symbols or load the kernel wholesale from the host computer
if we can find it.  

<rdar://problem/7714201>

llvm-svn: 164888
2012-09-29 08:03:33 +00:00
Jason Molenda 4bd4e7e3ba Add support for debugging KASLR kernels via kdp (the kernel being
loaded at a random offset).

To get the kernel's UUID and load address I need to send a kdp
packet so I had to implement the kernel relocation (and attempt to
find the kernel if none was provided to lldb already) in ProcessKDP
-- but this code really properly belongs in DynamicLoaderDarwinKernel.

I also had to add an optional Stream to ConnectRemote so
ProcessKDP::DoConnectRemote can print feedback about the remote kernel's
UUID, load address, and notify the user if we auto-loaded the kernel via
the UUID.

<rdar://problem/7714201>

llvm-svn: 164881
2012-09-29 04:02:01 +00:00
Sean Callanan eb918cd789 Now in the presence of an Objective-C version 2
runtime, we read method signatures for both class
and instance methods out of the runtime data.

(lldb) fr var str
(NSString *) str = 0x0000000105000180 @"Hello from '/Volumes/Data/projects/lldb/test/lang/objc/foundation/a.out'"
(lldb) expr str.length
(unsigned long long) $0 = 72
(lldb) expr [NSString stringWithCString:"Hello world!" encoding:1]
(id) $1 = 0x0000000105100050
(lldb) po $1
$1 = 0x0000000105100050 Hello world!

(lldb) fr var array1
(NSArray *) array1 = 0x000000010010a6e0 @"3 objects"
(lldb) expr array1.count
(unsigned long long) $0 = 3
(lldb) expr [array1 objectAtIndex:2]
(id) $1 = 0x00000001000025d0
(lldb) po $1
$1 = 0x00000001000025d0 array1 object3

Notice that both regular and property-style notation
work.  I still need to add explicit support for
properties with non-default setters/getters.

This information is only queried if an Objective-C
object does not have debug information for a complete
type available.  Otherwise we query debug information
as usual.

llvm-svn: 164878
2012-09-29 01:53:36 +00:00
Enrico Granata 6d39077fe7 <rdar://problem/12378910> Fix a bunch of other places where similar problems could happen
llvm-svn: 164871
2012-09-29 00:47:43 +00:00
Enrico Granata 60b81dff85 <rdar://problem/12378910> Fixing a potential crasher in the data formatters where we fail to check for NULL or empty class name
llvm-svn: 164870
2012-09-29 00:45:53 +00:00
Enrico Granata 21dfcd9d41 Implementing plugins that provide commands.
This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands
It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface

There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin.

Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command

For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands

Caveats:
	Currently, the new API objects and features are not exposed via Python.
	The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object)
	There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins
	There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own

llvm-svn: 164865
2012-09-28 23:57:51 +00:00
Greg Clayton 3852b3e189 <rdar://problem/12398225>
Improve performance of StringExtractor::GetHexS8().

llvm-svn: 164852
2012-09-28 21:51:54 +00:00
Sean Callanan d473424d53 Fixed a bug where if something went wrong while
constructing the ObjCInterfaceDecl for an ISA,
we'd continue and try to use that Decl anyway,
possibly causing a crash.

llvm-svn: 164844
2012-09-28 20:47:47 +00:00
Filipe Cabecinhas e26391a43f Fix a bug introduced in an earlier revision: actually return the StopReason, when we have a StopInfo object.
llvm-svn: 164825
2012-09-28 15:55:43 +00:00
Jason Molenda f49306a2c6 Recognize the eax/ebp/eip etc version of x86 register
names in addition to the rax/rbp/rip register names when
deciding whether a register is volatile or not.

llvm-svn: 164812
2012-09-28 05:46:55 +00:00
Jason Molenda 65c28cb47a Fix the extra space char being emitted in this message when breakpoints resolve -
1 location  added to breakpoint 2

llvm-svn: 164810
2012-09-28 01:50:47 +00:00
Sean Callanan 21b51062db Improved the runtime reading to also get data
out of the metaclass, so as to enumerate class
methods for an object.

llvm-svn: 164808
2012-09-27 23:47:51 +00:00
Greg Clayton b5f0feabae Wrapped up the work I am going to do for now for the "add-dsym" or "target symfile add" command.
We can now do:

Specify a path to a debug symbols file:
(lldb) add-dsym <path-to-dsym>

Go and download the dSYM file for the "libunc.dylib" module in your target:
(lldb) add-dsym --shlib libunc.dylib

Go and download the dSYM given a UUID:
(lldb) add-dsym --uuid <UUID>

Go and download the dSYM file for the current frame:
(lldb) add-dsym --frame

llvm-svn: 164806
2012-09-27 22:26:11 +00:00
Jason Molenda 47d114ac01 Patch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.
llvm-svn: 164801
2012-09-27 21:26:57 +00:00
Sean Callanan 2885a7088d Fixed some bugs in the runtime reader code. Also
added a parser for method signatures in the
Objective-C @encode format.

llvm-svn: 164792
2012-09-27 20:38:15 +00:00
Greg Clayton 6f485f3f77 Ashok Thirumurthi patch to enable the latest and greatest DWARF forms from the DWARF 4 specification.
llvm-svn: 164779
2012-09-27 16:48:25 +00:00
Filipe Cabecinhas ebca38a4c5 Fixed a typo.
llvm-svn: 164777
2012-09-27 15:31:38 +00:00
Greg Clayton c8f814d1df Added the ability to download a symboled executable and symbol file given a UUID.
llvm-svn: 164753
2012-09-27 03:13:55 +00:00
Jason Molenda c36b184fa2 Change the kdp-remote alias to require a hostname (instead of allowing a zero-length hostname to be specified).
llvm-svn: 164752
2012-09-27 02:47:55 +00:00
Jim Ingham 1f51e60b74 Implement returning integer values in "thread return" for arm, x86_64 and i386. Also returns
floats & doubles on x86_64.

<rdar://problem/8356523>

llvm-svn: 164741
2012-09-27 01:15:29 +00:00
Greg Clayton 91e407ea07 If we are attached to a platform, then make sure that we can verify that a process exists when attaching by "pid" before we try and do a lengthy command that could take a while to timeout.
llvm-svn: 164738
2012-09-27 00:03:39 +00:00
Greg Clayton e86fd74901 Added "k" as an alias to "process kill" since the new "kdb-remote" will now conflict with it.
llvm-svn: 164737
2012-09-27 00:02:27 +00:00
Jason Molenda e5b55eadda Add examples of using the kdp-remote and gdb-remote commands to connect to
gdb-remote protocol and kdp protocol systems.

llvm-svn: 164730
2012-09-26 22:42:25 +00:00
Greg Clayton 30c0a1cf94 Add convenience aliases to allow easy attaching to a remote gdb server or kdp (darwin kernel) server with the new "gdb-remote" regex alias and "kdp-remote" regex alias commands.
llvm-svn: 164729
2012-09-26 22:26:47 +00:00
Sean Callanan 4ca7389925 Added support for the DebugClang configuration to the
testsuite.

llvm-svn: 164723
2012-09-26 21:16:15 +00:00
Filipe Cabecinhas df461db533 Patch by Matt, to get lldb to build with the updated llvm+clang versions (via Makefiles).
llvm-svn: 164703
2012-09-26 16:27:06 +00:00
Filipe Cabecinhas 563a9521e4 Make lldb more C++11 friendly.
llvm-svn: 164702
2012-09-26 16:27:04 +00:00
Sean Callanan f601503ae6 Fixed a bug in the path remapper that caused
a crash if the path to be remaped was NULL.

<rdar://problem/12371888>

llvm-svn: 164653
2012-09-26 01:28:11 +00:00
Jim Ingham 11c8108d57 Add an API to figure out whether a breakpoint is internal or not.
llvm-svn: 164648
2012-09-25 23:55:19 +00:00
Jason Molenda c74198dedd The iOSSimulator platform should create a PlatformDarwin with
is_host == true so PlatformDarwin knows it can do same-host
operations like process lookup.  <rdar://problem/12296249> 

llvm-svn: 164647
2012-09-25 23:32:06 +00:00
Greg Clayton 984fee5b8f Added process attach options and also use the SBLaunchInfo and SBAttachInfo.
llvm-svn: 164619
2012-09-25 18:27:12 +00:00
Greg Clayton 97d5cf05eb <rdar://problem/9959501>
More KDP debugging process. We can not set breakpoints, hit them, resume, step and detach while running.

llvm-svn: 164584
2012-09-25 02:40:06 +00:00
Enrico Granata 64e15fc956 Making sure we do not try to compare a NULL string - which would cause us to crash
llvm-svn: 164574
2012-09-24 23:30:10 +00:00
Sean Callanan 771f1de241 Added a new Xcode build configuration, DebugClang,
which builds a Debug+Asserts build of Clang and
links LLDB against it.  The Debug configuration
builds Clang with Release+Asserts, for faster
linking and smaller memory footprint when debugging
the build LLDB.

llvm-svn: 164573
2012-09-24 23:21:18 +00:00
Sean Callanan c2bd8c2158 Removed some debugging cruft.
llvm-svn: 164572
2012-09-24 23:11:56 +00:00
Jason Molenda bdde850228 Fix string comparisons in ABIMacOSX_i386::RegisterIsCalleeSaved so
that volatile registers are correctly reported for this ABI.
We were incorrectly passing up volatile registers from callee
frames.

llvm-svn: 164564
2012-09-24 22:51:04 +00:00
Sean Callanan 3d654b3044 Brought LLDB top-of-tree into sync with LLVM/Clang
top-of-tree.  Removed all local patches and llvm.zip.

The intent is that fron now on top-of-tree will
always build against LLVM/Clang top-of-tree, and
that problems building will be resolved as they
occur.  Stable release branches of LLDB can be
constructed as needed and linked to specific release
branches of LLVM/Clang.

llvm-svn: 164563
2012-09-24 22:25:51 +00:00
Sean Callanan 32a5ba5b47 Made TestHiddenIvars an expected failure with
"frame variable".  "expr" finds hidden ivars
correctly.

llvm-svn: 164558
2012-09-24 21:34:40 +00:00
Jim Ingham 43de0f95ed Remove a couple of debugging printf's from the testsuite.
llvm-svn: 164544
2012-09-24 18:11:54 +00:00
Jim Ingham 493dffe2b1 Missed a few places where I didn't delete the obsolete (commented out) version of the breakpoint creation.
llvm-svn: 164436
2012-09-22 00:14:47 +00:00
Jim Ingham 63dfc725a7 Fix all the test case breakages caused by folks writing tests all over the place that depended explicitly
on the output of "break set".  Please don't do this sort of thing!!!!!

llvm-svn: 164433
2012-09-22 00:05:11 +00:00
Jim Ingham 1391cc7d51 Change the new breakpoint creation output (primarily from "break set") to something more useful.
<rdar://problem/11333623>

llvm-svn: 164432
2012-09-22 00:04:04 +00:00
Enrico Granata 165f8af8c5 Initial commit of a new testsuite feature: test categories.
This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories.

Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs.
If a test-case does not provide its own categories, we will look for categories in the class that contains the test case.
If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings.
The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file).

The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run.
(example: ./dotest.py --category objc --category expression)

All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering.
A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use.

All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category.

In the end, failures will be reported on a per-category basis, as well as in the usual format.

This is the very first stage of this feature. Feel free to chime in with ideas for improvements!

llvm-svn: 164403
2012-09-21 19:10:53 +00:00