Commit Graph

10010 Commits

Author SHA1 Message Date
Greg Clayton 45f4f8bd7e Fix comments to match the current reality.
llvm-svn: 221633
2014-11-10 21:48:12 +00:00
Greg Clayton bd549169d7 Fix selectors not being objc-uniquified in the expression parser after a recent renaming in clang (clang change for revision 221451). This broke all objective C expressions in LLDB.
llvm-svn: 221632
2014-11-10 21:45:59 +00:00
Enrico Granata 4c67655b45 Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
llvm-svn: 221624
2014-11-10 19:51:57 +00:00
Ed Maste 29a4584484 Fix new noreturn test on !darwin platforms
r221575 introduced a NoreturnUnwind test that did not skip the dsym
test on non-darwin platforms, and had the @dwarf_test case as an exact
copy of the dsym case (including the test name, test_with_dsym).

llvm-svn: 221611
2014-11-10 17:22:47 +00:00
Shawn Best e1a76dba0d LLGS Android target support (r221570) missed adding some files: http://reviews.llvm.org/D6166
llvm-svn: 221593
2014-11-10 15:06:15 +00:00
Jason Molenda bd07fd57f6 Add a RegisterNumber class to RegisterContextLLDB.h and start using
it in RegisterContext.cpp.

There's a lot of bookkeeping code in RegisterContextLLDB where it has
to convert between different register numbering schemes and it makes 
some methods like SavedLocationForRegister very hard to read or
maintain.  Abstract all of the details about different register numbering
systems for a given register into this new class to make it easier 
to understand what the method is doing.

Also add register name printing to all of the logging -- that's easy to
get now that I've got an object to represent the register numbers.

There were some gnarly corner cases of this method that I believe
I've translated correctly - initial testing looks good but it's
possible I missed a corner case, especially with architectures which
uses a link-register aka return address register like arm32/arm64.
Basic behavior is correct but there are a lot of corner casese that are
handled in this method ...

llvm-svn: 221577
2014-11-08 08:09:22 +00:00
Jason Molenda cf29675d95 Fix a corner case with the handling of noreturn functions.
If a noreturn function was the last function in a section,
we wouldn't correctly back up the saved-pc value into the
correct section leading to us showing the wrong function in
the backtrace.

Also add a backtrace test with an attempt to elicit this 
particular layout.  It happens to work out with clang -Os
but other compilers may not quite get the same layout I'm
getting at that opt setting.  We'll still be exercising the
basic noreturn handling in the unwinder even if we don't get
one function at the very end of a section.

<rdar://problem/16051613> 

llvm-svn: 221575
2014-11-08 05:38:17 +00:00
Shawn Best 8da0bf3b7c LLGS Android target support - for Andy Chien : http://reviews.llvm.org/D6166
llvm-svn: 221570
2014-11-08 01:41:49 +00:00
Shawn Best 181b09b7c3 fix for unit tests finding path to LLDB.h http://reviews.llvm.org/D6177
llvm-svn: 221566
2014-11-08 00:04:04 +00:00
Zachary Turner 02862bc83a Remove the top-level DebugDriverThread in ProcessWindows.
Originally the idea was that we would queue requests to a master
thread that would dispatch them to other slave threads each
responsible for debugging an individual process.  This might make
some scenarios more scalable and responsive, but for now it seems
to be unwarranted complexity for no observable benefit.

llvm-svn: 221561
2014-11-07 23:44:13 +00:00
Enrico Granata 52ab271878 This was meant to be count, not m_count
llvm-svn: 221541
2014-11-07 20:37:17 +00:00
Enrico Granata 03c9635199 SBValue::Cast is deprecated. This does not work as reliably as free-form casting via the expression evaluator. Some of our clients depend on it, so we can't remove it. But any new adopters should favor the expression parser as the way forward
llvm-svn: 221540
2014-11-07 20:22:18 +00:00
Rafael Espindola 97ae14e166 Use llvm::StringRefMemoryObject NFC.
llvm-svn: 221509
2014-11-07 04:24:12 +00:00
Greg Clayton 860fac5338 Fixes so tests compile and run remotely.
Fixes include:
- dont set or change LDFLAGS, but set LD_EXTRAS instead
- fix compilation errors for iOS based builds with objective C code
    - fix test cases to create classes instead of relying on classes from AppKit 
    - rename things where it makes sense

llvm-svn: 221496
2014-11-06 22:59:28 +00:00
Greg Clayton ef95321229 Changed program to go along with the previous commit to allow this test to be run remotely via lldb-platform.
llvm-svn: 221494
2014-11-06 22:56:56 +00:00
Greg Clayton f324020b7c Fix the test to not have to run the binary separately first to get the golden output, use the process STDOUT instead.
This helps this test be able to be run remotely.

llvm-svn: 221493
2014-11-06 22:56:15 +00:00
Greg Clayton 2dd4365038 Make sure stderr is filtered out in case xcodebuild or xcrun print errors when getting the SDK path and use xcrun to find the SDK path.
llvm-svn: 221492
2014-11-06 22:55:09 +00:00
Enrico Granata f35bc63220 This is a large, but clearical, commit that enables the C++ formatters to take on the additional TypeSummaryOptions argument. It is still not used for anything, but it is now there. Adding support for this extra argument to Python formatters will follow suit
llvm-svn: 221486
2014-11-06 21:55:30 +00:00
Enrico Granata c1247f5596 Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way
Two flags are introduced:
- preferred display language (as in, ObjC vs. C++)
- summary capping (as in, should a limit be put to the amount of data retrieved)

The meaning - if any - of these options is for individual formatters to establish
The topic of a subsequent commit will be to actually wire these through to individual data formatters

llvm-svn: 221482
2014-11-06 21:23:20 +00:00
Sean Callanan 4c508df925 Handle types from the runtime that conform to
protocols.

<rdar://problem/18883778>

llvm-svn: 221476
2014-11-06 19:26:10 +00:00
Greg Clayton e6352e4797 Pick better floating point numbers (ones that can be exactly represented) in floating point instead of something that can't to avoid test suite failures on different devices and architectures.
<rdar://problem/18826900>

llvm-svn: 221468
2014-11-06 18:39:39 +00:00
Shawn Best eb3e905027 fixed minor code indenting http://reviews.llvm.org/D6127
llvm-svn: 221467
2014-11-06 17:52:15 +00:00
Deepak Panickal bc8c68ec02 Fix lldb-mi warnings so that it builds when --enable-werror is set.
llvm-svn: 221452
2014-11-06 13:42:49 +00:00
Greg Clayton 81eed943a3 Fixed the C++ method name class to be a bit more picky about what it identifies as a C++ method.
This was done by using regular expressions on any basename we find to ensure it is valid.

This fixed setting breakpoints by name with values like '[J]com.robovm.debug.server.apps.SleepLoop.startingUp()V'. This was previously triggering the C++ method name class to identify the string as C++ with a basename of '[J]com.robovm.debug.server.apps.SleepLoop.startingUp' which was obviously incorrect. 

The changes also fixed errors in templated function names like "void foo<int>(...)" where "void foo<int>" was being identified incorrectly as the basename. We also handle more C++ operators correctly now.

llvm-svn: 221416
2014-11-05 23:56:37 +00:00
Reid Kleckner ee3c175e6b cmake: Make the LLDB standalone build work for me
This allows me to generate a Visual Studio solution that builds LLDB if
you have standalone builds of LLVM and Clang lying around.
Unfortunately, you have to pass *four* CMake variables in, but it means
you don't have to take the extra step of installing Clang and LLVM to
some package prefix.

Hopefully this will generate a more usable XCode project too.

llvm-svn: 221413
2014-11-05 23:23:18 +00:00
Zachary Turner 742346a22f Decouple ProcessWindows from the Windows debug driver thread.
In the llgs world, ProcessWindows will eventually go away and
we'll implement a different protocol.  This patch decouples
ProcessWindows from the core debug loop so that this transition
will not be more difficult than it needs to be.

llvm-svn: 221405
2014-11-05 22:16:28 +00:00
Enrico Granata ab0e831485 Allow inline test case to register actually useful teardown hooks by allowing a hook to be passed back the test instance, were it not to be already bound to self. Use this ability to make the reversal of escape-non-printables a teardown hook for added reliability of the testing logic
llvm-svn: 221402
2014-11-05 21:31:57 +00:00
Sean Callanan 43270c34d5 Fixed the Objective-C stripped ivar test to ensure
that we load debug information properly.  If we don't
explicitly add-dsym, sometimes Spotlight will help out
and tell us about the dSYM but we shouldn't be relying
on that.  Thanks to Jim for catching this.

<rdar://problem/16424661>

llvm-svn: 221400
2014-11-05 21:24:27 +00:00
Enrico Granata ebdc1ac014 Add a setting escape-non-printables that drives whether the StringPrinter should or should not escape sequences such as \t, \n, .. and generally any non-printing character
The recent StringPrinter changes made this behavior the default, and the setting defaults to yes
If you want to change this behavior and see non-printables unescaped (e.g. "a\tb" as "a    b"), set it to false

Fixes rdar://12969594

llvm-svn: 221399
2014-11-05 21:20:48 +00:00
Zachary Turner 0d594e136e Fix LLDB build as a result of upstream LLVM changes.
llvm-svn: 221378
2014-11-05 18:37:53 +00:00
Shawn Best 629680e499 for Oleksiy Vyalov - Redirect stdin, stdout and stderr to /dev/null when launching LLGS process. Differential Revision: http://reviews.llvm.org/D6105
llvm-svn: 221324
2014-11-05 00:58:55 +00:00
Zachary Turner ea66dac7cd Rename some classes in ProcessWindows.
Renamed monitor -> driver, to make clear that the implementation here
is in no way related to that of other process plugins which have also
implemented classes with similar names such as DebugMonitor.

Also created a DebugEventHandler interface, which will be used by
implementors to get notified when debugging events happen in the
inferiors.

llvm-svn: 221322
2014-11-05 00:33:28 +00:00
Eric Christopher 8b1bea8aee Avoid building lldb-mi when --enable-werror is set
as it doesn't build and is optional.

llvm-svn: 221315
2014-11-04 23:30:30 +00:00
Shawn Best fd13743f57 for Siva Chandra: Fix compilation of StringPrinter.cpp with GCC. Differential Revision: http://reviews.llvm.org/D6122
llvm-svn: 221310
2014-11-04 22:43:34 +00:00
Enrico Granata 0eb0ec298c Fix a problem where ValueObjectVariable was not correctly setting its 'has value changed' flag for scalar valued variables. This fixes rdar://17851144
llvm-svn: 221298
2014-11-04 21:28:50 +00:00
Enrico Granata 404ab37e8b Fix the build for LLVM changes
llvm-svn: 221286
2014-11-04 19:33:45 +00:00
Jason Molenda 8030ffda91 Add recognition for another x86 epilogue sequence (ret followed by
a nop).  Fixes an instruction stepping problem when trying to step
over the final instructions of an epilogue.
<rdar://problem/18068877> 

llvm-svn: 221241
2014-11-04 05:48:11 +00:00
Jason Molenda 9bb421d38b Add one extra sanity check to RegisterContextLLDB::TryFallbackUnwindPlan
so it doesn't try the arch default if a comiler-generated (eh_frame,
compact unwind info) based unwind plan has failed.

llvm-svn: 221239
2014-11-04 05:35:32 +00:00
Jason Molenda 4b00893243 Back out r221229 -- instead of trying to identify the end of the unwind,
let's let lldb try the arch default unwind every time but not destructively --
it doesn't permanently replace the main unwind method for that function from
now on.

This fix is for <rdar://problem/18683658>.  

I tested it against Ryan Brown's go program test case and also a
collection of core files of tricky unwind scenarios 
<rdar://problem/15664282> <rdar://problem/15835846>
<rdar://problem/15982682> <rdar://problem/16099440>
<rdar://problem/17364005> <rdar://problem/18556719> 
that I've fixed over the last 6-9 months.

llvm-svn: 221238
2014-11-04 05:28:40 +00:00
Eric Christopher 0010b202ba Fix one more [-Werror,-Winconsistent-missing-override] error.
llvm-svn: 221232
2014-11-04 03:14:57 +00:00
Eric Christopher 7ab81b9149 Fix a bunch of [-Werror,-Winconsistent-missing-override] errors.
llvm-svn: 221231
2014-11-04 03:13:17 +00:00
Jason Molenda d98c3abf9f After we've completed a full backtrace, we'll have one frame which
is "invalid" -- it is past the end of the stack trace.  Add a new
method IsCompletedStackWalk() so we can tell if an invalid stack
frame is from a complete backtrace or if it might be worth re-trying
the last unwind with a different method.

This fixes the unwinder problems Ryan Brown was having with go
programs.  The unwinder can (under the right circumstances) still
destructively replace unwind plans permanently - I'll work on
that in a different patch.  

<rdar://problem/18683658> 

llvm-svn: 221229
2014-11-04 02:31:50 +00:00
Greg Clayton 8691dc5b75 Fixed SBTarget::ReadMemory() to work correctly and the TestTargetAPI.py test case that was reading target memory in TargetAPITestCase.test_read_memory_with_dsym and TargetAPITestCase.test_read_memory_with_dwarf.
The problem was that SBTarget::ReadMemory() was making a new section offset lldb_private::Address by doing:


size_t
SBTarget::ReadMemory (const SBAddress addr,
                      void *buf,
                      size_t size,
                      lldb::SBError &error)
{
        ...
        lldb_private::Address addr_priv(addr.GetFileAddress(), NULL);
        bytes_read = target_sp->ReadMemory(addr_priv, false, buf, size, err_priv);


This is wrong. If you get the file addresss from the "addr" argument and try to read memory using that, it will think the file address is a load address and it will try to resolve it accordingly. This will work fine if your executable is loaded at the same address (no slide), but it won't work if there is a slide.

The fix is to just pass along the "addr.ref()" instead of making a new addr_priv as this will pass along the lldb_private::Address that is inside the SBAddress (which is what we want), and not always change it into something that becomes a load address (if we are running), or abmigious file address (think address zero when you have 150 shared libraries that have sections that start at zero, which one would you pick). The main reason for passing a section offset address to SBTarget::ReadMemory() is so you _can_ read from the actual section + offset that is specified in the SBAddress. 

llvm-svn: 221213
2014-11-04 00:56:30 +00:00
Sean Callanan 11533184d7 Added a test case for reading ivars from the
Objective-C runtime.  We'll need to do more
(subclasses, partially-defined classes, etc.)
but this tests that at least the basics work.

llvm-svn: 221208
2014-11-04 00:06:34 +00:00
Zachary Turner 8f21174700 Implement a framework for live debugging on Windows.
When processes are launched for debugging on Windows now, LLDB
will detect changes such as DLL loads and unloads, breakpoints,
thread creation and deletion, etc.

These notifications are not yet propagated to LLDB in a way that
LLDB understands what is happening with the process.  This only
picks up the notifications from the OS in a way that they can be
sent to LLDB with subsequent patches.

Reviewed by: Scott Graham

Differential Revision: http://reviews.llvm.org/D6037

llvm-svn: 221207
2014-11-04 00:00:12 +00:00
Greg Clayton a3f3fd35ae Fix this test to set a breakpoint at the correct location that will always get hit so it doesn't intermittently fail on MacOSX.
llvm-svn: 221201
2014-11-03 23:10:56 +00:00
Greg Clayton ed59d756d8 Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221197
2014-11-03 23:02:08 +00:00
Greg Clayton c91d49b505 Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221196
2014-11-03 22:58:38 +00:00
Greg Clayton 118593a3af The change previously committed as 220983 broke large binary memory reads. I kept the "idx - 1" fix from 220983, but reverted the while loop that was incorrectly added.
The details are: large packets (like large memory reads (m packets) or large binary memory reads (x packet)) can get responses that come in across multiple read() calls. The while loop that was added meant that if only a partial packet came in (like only "$abc" coming for a response) GDBRemoteCommunication::CheckForPacket() was called, it would deadlock in the while loop because no more data is going to come in as this function needs to be called again with more data from another read. So the original fix will need to be corrected and resubmitted.

<rdar://problem/18853744>

llvm-svn: 221181
2014-11-03 21:02:54 +00:00
Filipe Cabecinhas dfa8688082 Fix the Makefile build by actually building ABI/SysV-ppc
llvm-svn: 221111
2014-11-02 22:03:15 +00:00
Ed Maste d455a1ecb8 Update for LLVM API change in r221024
llvm-svn: 221073
2014-11-02 00:24:22 +00:00
Justin Hibbits 3411c3ea53 Use kern.proc.auxv to get the aux data
Summary:
Instead of using a homegrown solution to get the auxv from a process, instead
use the OS-provided sysctl to get the needed data.  This allows the same code to
be used for both 32-bit and 64-bit processes on a 64-bit host.

Reviewers: emaste

Reviewed By: emaste

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D6071

llvm-svn: 221063
2014-11-01 21:27:08 +00:00
Sean Callanan ada6d1693e Complete the superclass type when completing an
Objective-C class type.

llvm-svn: 221022
2014-10-31 23:55:36 +00:00
Shawn Best 3ab672d7ef TOT broken by R220956 - Differential Revision: http://reviews/llvm.org/D6066
llvm-svn: 221018
2014-10-31 23:20:13 +00:00
Stephane Sezer 15d810fa29 Always transmit SIGPROF back to the inferior.
Summary:
SIGPROF is used for profiling processes (with google-perftools for
instance), which results in the inferior receiving a SIGPROF from the
kernel every few milliseconds. Instead of stopping the debugging session
and notifying the user of this, we should just pass the signal and keep
running.

This follows the behavior we have in UnixSignals.cpp.

Test Plan: Run LLDB on linux with a binary using google-perftools, see that execution gets interrupted all the time because we receive SIGPROF. Apply the patch, everything works fine.

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D5953

llvm-svn: 221011
2014-10-31 22:37:24 +00:00
Jason Molenda fca26da446 SBAddress currently *may* have an Address object or it may not.
If it has an Address object, it is assumed to be Valid.
Change SBAddress to always have an Address object and check
whether it is valid or not in those case.

This is fixing a subtle problem where we ended up with
a SBAddress with an Address of LLDB_INVALID_ADDRESS could
run through a copy constructor and turn into an SBAddress
with no Address object being backed (because it wasn't
distinguishing between invalid-Address versus no-Address.)

The cost of an Address object is not high and this will be
an easy mistake for someone else to make; I'm fixing
SBAddress so it doesn't come up again.
<rdar://problem/18069407> 

llvm-svn: 221002
2014-10-31 21:30:59 +00:00
Shawn Best 396f80a1ea commit on behalf of Oleksiy Vyalov Fix junk content handling within GDBRemoteCOmmunication::CheckForPacket 1. Avoid removing of an extra symbol from m_bytes. 2. iterate over m_bytes until useful content is found. Differential Revision: http://reviews.llvm.org/D6042
llvm-svn: 220983
2014-10-31 18:18:23 +00:00
Sean Callanan acff5e60b5 In ValueObjectDynamicValue, trust what comes from
the runtime rather than trying to fix it up,
because now those types have ivars regardless of
whether they come from "frame variable" or from
expressions.

Patch by Enrico Granata.

llvm-svn: 220982
2014-10-31 18:07:44 +00:00
Sean Callanan 9dfe45ff1c Updated the Objective-C runtime type vendor to
load ivars into classes that are reported to the
Objective-C runtime.

llvm-svn: 220981
2014-10-31 18:06:26 +00:00
Sean Callanan b678b90749 - Fixed a bug where ::Describe for class descriptors
would fail if the class had no ivars.

- Updated use of the RealizeType API by the class
  descriptors to use "for_expression" rather than
  the misnamed "allow_unknownanytype."

llvm-svn: 220980
2014-10-31 18:05:26 +00:00
Sean Callanan a330933f15 - Use "for_expression" rather than "allow_unknownanytype"
to indicate that we're doing stuff for the expression
  parser.

- When for_expression is true, look through @s and find
  the actual class rather than just returning id. 

- Rename BuildObjCObjectType to BuildObjCObjectPointerType
  since it's actually returning an object *pointer* type.

llvm-svn: 220979
2014-10-31 18:02:30 +00:00
Justin Hibbits db39cdfbb7 Fix some bugs from D5988
Summary:
Ed Maste found some problems with the commit in D5988.  Address most of these.
While here, also add floating point return handling.  This doesn't handle
128-bit long double yet.  Since I don't have any system that uses it, I don't
currently have plans to implement it.

Reviewers: emaste

Reviewed By: emaste

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D6049

llvm-svn: 220963
2014-10-31 15:57:52 +00:00
Jason Molenda 0abae879ad Update default disassembly format string so we get
better output when we don't have any symbol name.
It looked like this:

0x1097fd029 <ud2    
0x1097fd02b <addb   %al, (%rax)

now, like this:

0x10cdd3064: ud2    
0x10cdd3066: addb   %al, (%rax)

<rdar://problem/18833391> 

llvm-svn: 220948
2014-10-31 03:40:06 +00:00
Jason Molenda 968abb448a Update xcode project file to build new ppc files.
llvm-svn: 220947
2014-10-31 03:39:11 +00:00
Justin Hibbits 6256a0ea8f First cut of PowerPC(64) support in LLDB.
Summary:
This adds preliminary support for PowerPC/PowerPC64, for FreeBSD.  There are
some issues still:

 * Breakpoints don't work well on powerpc64.
 * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host.
 * Backtraces don't work.  This is due to PowerPC ABI using a backchain pointer
   in memory, instead of a dedicated frame pointer register for the backchain.
 * Breakpoints on functions without debug info may not work correctly for 32-bit
   powerpc.

Reviewers: emaste, tfiala, jingham, clayborg

Reviewed By: clayborg

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D5988

llvm-svn: 220944
2014-10-31 02:34:28 +00:00
Greg Clayton c3eefa39cc Get the correct process architecture in ProcessKDP::DidAttach().
<rdar://problem/18806212>

llvm-svn: 220938
2014-10-31 00:06:52 +00:00
Zachary Turner c19cf1d424 Remove #include <codecvt>. It isn't supported on all compilers.
Also it wasn't being used anyway, so it appears to be a dead include.

llvm-svn: 220921
2014-10-30 19:42:08 +00:00
Enrico Granata 2206b48d6d Also port the C string reading code in ValueObject over to using StringPrinter API
llvm-svn: 220917
2014-10-30 18:27:31 +00:00
Ed Maste 98b6546dde Remove hex character number from wchar_t test
After r220894 (StringPrinter change) it is no longer emitted. Update the
test rather than considering it a bug as the new format is preferred.

llvm-svn: 220914
2014-10-30 17:41:11 +00:00
Ed Maste 236a5bc619 Fix CMake build, adding StringPrinter.cpp from r220894
llvm-svn: 220909
2014-10-30 14:50:42 +00:00
Enrico Granata ca6c8ee23b Start adopting the StringPrinter API. The StringPrinter API is the new blessed way of printing strings that supports escaping non-printables, and has better handling of different UTF encodings
llvm-svn: 220894
2014-10-30 01:45:39 +00:00
Jason Molenda f4c87d69b0 Remove unused service plist.
llvm-svn: 220892
2014-10-30 01:04:59 +00:00
Enrico Granata a449e8642f Add the ability for a ClangASTType to be marked as 'packed' when constructed
llvm-svn: 220891
2014-10-30 00:53:28 +00:00
Enrico Granata 76b08d584b Fix the NSPathStore2 data formatter to actually handle the explicit length stored inside the object. The meat of this commit, however, is a nice little API for easily adding new __lldb_autogen_ helper types to an AST context
llvm-svn: 220881
2014-10-29 23:08:02 +00:00
Ed Maste 2ec8e1bd20 Temporarily disable test on FreeBSD that is asserting
llvm.org/pr21325

llvm-svn: 220871
2014-10-29 20:02:54 +00:00
Ed Maste e95d9d2c04 Skip test that's hanging on FreeBSD until it can be investigated
llvm.org/pr21411

llvm-svn: 220856
2014-10-29 15:09:27 +00:00
Enrico Granata b6d7cba141 Shuffle a couple of formatters around. This should fix the bug that never dies, aka rdar://15154623
llvm-svn: 220836
2014-10-29 01:03:09 +00:00
Enrico Granata e0afce767a Add a few functions to SBType to handle arrays and typedefs. Fixes rdar://12675166
llvm-svn: 220824
2014-10-28 21:44:06 +00:00
Enrico Granata 90ff6428c9 Add a few words of documentation for the the $\{var.script:\} feature
llvm-svn: 220823
2014-10-28 21:13:31 +00:00
Enrico Granata 88282c69f3 Add a feature where a string data formatter can now be partially composed of Python summary functions
This works similarly to the {thread/frame/process/target.script:...} feature - you write a summary string, part of which is

${var.script:someFuncName}
someFuncName is expected to be declared as
def someFuncName(SBValue,otherArgument) - essentially the same as a summary function

Since . -> [] are the only allowed separators, and % is used for custom formatting, .script: would not be a legitimate symbol anyway, which makes this non-ambiguous

llvm-svn: 220821
2014-10-28 21:07:00 +00:00
Sean Callanan e17428acfa Added the ability to add attributes to inline
testcases.  Also fixed one of the testcases to
not run on the platforms that don't support
Objective-C.

We want to do better with the Objective-C attribute
but we'll do that in a future commit.

llvm-svn: 220820
2014-10-28 20:23:20 +00:00
Enrico Granata 4f2fe82b6d When trying to get the element type of an array type, do not go to the canonical type, since that will strip typedefs where we want them to be preserved. Fixes rdar://15453076
llvm-svn: 220810
2014-10-28 18:25:50 +00:00
Jason Molenda 2586e94bfb Add breakpoint instruction byte sequences for arm to
PlatformLinux::GetSoftwareBreakpointTrapOpcode.

Patch by Stephane Sezer.
http://reviews.llvm.org/D5923

llvm-svn: 220762
2014-10-28 03:43:54 +00:00
Jason Molenda 0f7828cf6d Clarify the launch style for debugserver to use.
<rdar://problem/18786645> 

llvm-svn: 220761
2014-10-28 03:15:33 +00:00
Jim Ingham c891d86349 Add a test for setting and hitting the C++ Exception throw breakpoint.
llvm-svn: 220743
2014-10-28 00:53:20 +00:00
Greg Clayton dc574df04f Make sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so you can easily add to the flags of all targets.
llvm-svn: 220720
2014-10-27 21:14:34 +00:00
Enrico Granata e9afaf71f7 This looks like the actual path under which the builder looks for LLDB headers, so use this path instead
llvm-svn: 220718
2014-10-27 20:31:12 +00:00
Hafiz Abid Qadeer f289628178 Stub out 'close' call on m_master_fd for Windows.
PseudoTerminal.cpp uses a dummy implementation of posix_openpt for Windows. This
implementation just returns 0. So m_master_fd is 0. But destructor calls 'close'
on m_master_fd. This 'close' calls seems un-necessary as m_master_fd was never
opened in first place and calling 'close' on 0 can have other un-intended 
consequences.

I am committing it as obvious as it is only a one-liner. Long term, we may want
to refactor this class.

llvm-svn: 220705
2014-10-27 19:27:00 +00:00
Ed Maste 49e4068781 Skip ObjC test on FreeBSD that does not build
llvm-svn: 220681
2014-10-27 15:01:59 +00:00
Todd Fiala 479f230032 Fix the TestCreateAfterAttach test for llgs-local on ptracer lock-down.
llvm-svn: 220661
2014-10-27 00:58:27 +00:00
Todd Fiala 0135e236b6 Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
llvm-svn: 220660
2014-10-27 00:31:05 +00:00
Todd Fiala 789d29df34 Fix up TestRegisters for Linux ptracer lock-down.
All of these test fixups are prep work for when llgs is
running with llgs for local process debugging, where these
tests fail without the ptracer lock-down suppression.

llvm-svn: 220656
2014-10-26 22:25:33 +00:00
Todd Fiala 25a0ad9707 Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.
Similar to previous fix, this augments the test inferior to
immediately indicate it may be ptraced by any Linux process
when the appropriate symbols are defined.

This seems to indicate we need to fix our lldb attach logic to
catch when an attach fails, and trigger an appropriate error
instead of the current behavior of hanging indefinitely.

llvm-svn: 220654
2014-10-26 22:08:56 +00:00
Hafiz Abid Qadeer 01db53848e Added a missing call to 'Reset'.
HostThreadWindows::Join() did not call the Reset as is done by
the HostThreadPosix::Join(). As a result, future call to 
IsJoinable() can fail.

Committed as obvious.
 

llvm-svn: 220651
2014-10-26 21:38:43 +00:00
Todd Fiala f183754779 Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.
Similar to a recent test I fixed for gdb-remote attach scenarios, this
fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and
later, where ptrace starts requiring a ptracer to be an ancestor of the
inferior to be ptraced.  This change checks for Linux and the ptrace-related
flags.  If they're found, it tries to switch on the "allow any ptracer" mode
for the inferior as the first statements in the program.  It's a best-effort
solution - if the prctl call fails, the failure is ignored, and probably will
lead to the test failing.

The ptrace security behavior can be modified system-wide, but is outside the
scope of the test to address.  Hence I went with this particular solution.

llvm-svn: 220650
2014-10-26 21:37:46 +00:00
Jim Ingham fa39bb4a56 Setting breakpoints with name mask eFunctionNameTypeBase was broken for straight C names by 220432. Get
that working again.

llvm-svn: 220602
2014-10-25 00:33:55 +00:00
Zachary Turner 7c2896a234 Implement explicit thread stack size specification on Windows.
llvm-svn: 220596
2014-10-24 22:06:29 +00:00
Ed Maste 40dc7eb150 Remove duplicated new file content
llvm-svn: 220591
2014-10-24 20:49:50 +00:00
Jim Ingham 65b3f547cd Patch from ovyalov@google.com:
Handle pexpect exceptions correctly so that processes spawned with 
pexpect are always reaped.

llvm-svn: 220583
2014-10-24 18:51:57 +00:00
Zachary Turner 047a070f7c Make ProcessWindows just use Host::LaunchProcess.
llvm-svn: 220574
2014-10-24 17:51:56 +00:00
Enrico Granata ecbe7c03a0 This test case should not rely on stepping behavior because that might chance due to inlining. Set breakpoints where you want them instead. Fixes rdar://18724175
llvm-svn: 220513
2014-10-23 21:35:18 +00:00
Enrico Granata 249d639786 Fix a problem where an SBType was advertising its static type class even though a dynamic type was available. Solves rdar://18744420
llvm-svn: 220511
2014-10-23 21:15:20 +00:00
Ed Maste e1b25368f0 Disable dsym tests on !Darwin hosts
This was missing from r219984

llvm.org/pr21324

llvm-svn: 220485
2014-10-23 15:21:45 +00:00
Hafiz Abid Qadeer ae9446088b Fix code where goto jumped over local variable initialization.
llvm-svn: 220473
2014-10-23 10:36:53 +00:00
Enrico Granata 2809b98c0e Reverting r220435. Jim Ingham and I discussed this for a bit, and we came up with a better command model for this feature
llvm-svn: 220437
2014-10-22 22:33:08 +00:00
Enrico Granata 83f231854a Add a 'type info' command, which can be fed one or more local variables - and it will spew out the list of formatters that apply to each of those variables, if any
llvm-svn: 220435
2014-10-22 22:04:40 +00:00
Enrico Granata 6714a0fd09 More cleanup of the CXXFormatterFunctions header
llvm-svn: 220433
2014-10-22 21:47:27 +00:00
Greg Clayton c3795409c9 Fixed name lookups for names that contain "::" but aren't actually C++ qualified C++ names.
To do this, I fixed the  CPPLanguageRuntime::StripNamespacesFromVariableName() function to use a regular expression that correctly determines if the name passed to it is a qualfied C++ name like "a:🅱️:c" or "b::c". The old version of this function was treating '__54-[NSUserScriptTask executeWithInterpreter:arguments::]_block_invoke' as a match with a basename of ']_block_invoke'.

Also fixed a case in the by name lookup of functions where we wouldn't look for the full name if we actually tried to call CPPLanguageRuntime::StripNamespacesFromVariableName() and got an empty basename back.

<rdar://problem/18527866>

llvm-svn: 220432
2014-10-22 21:47:13 +00:00
Greg Clayton fa226b74d1 Re-use the GetMatchAtIndex() that uses the StringRef to avoid code duplication and properly detect when a capture is invalid and return false.
llvm-svn: 220431
2014-10-22 21:43:15 +00:00
Zachary Turner b5c4971a4c Fix CMake build broken after r220421.
llvm-svn: 220430
2014-10-22 21:18:29 +00:00
Enrico Granata e85fe3a4d1 Reorganize some of the data formatters code to simplify CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T>
llvm-svn: 220421
2014-10-22 20:34:38 +00:00
Enrico Granata 4bd54a1544 Fixed a problem in the lldbinline logic where C++ files could not be validly compiled
llvm-svn: 220420
2014-10-22 20:33:34 +00:00
Enrico Granata 50bed5e86f Fix a problem where summary strings could not use a synthetically generated value as part of themselves
llvm-svn: 220414
2014-10-22 20:14:09 +00:00
Shawn Best 13491c4f24 Sort unit test failures by name - submitted for Vince Harron http://reviews.llvm.org/D5904
llvm-svn: 220406
2014-10-22 19:29:00 +00:00
Matthew Gardiner c928de3e8e Added functions to the C++ API, for the benefit of non-8-bit byte architectures.
New functions to give client applications to tools to discover target byte sizes
for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the
SBTarget class, since they seemed to be useful utilities to have.

Each new API has had a test case added.

http://reviews.llvm.org/D5867

llvm-svn: 220372
2014-10-22 07:22:56 +00:00
Jim Ingham a672ecefef The breakpoint location hit counts were getting incremented in
BreakpointLocation::ShouldStop.  That worked but wasn't really right,
since there's nothing to guarantee that won't get called more than
once.  So this change moves that responsibility to the StopInfoBreakpoint
directly, and then it uses the BreakpointSite to actually do the bumping.

Also fix a test case that was assuming if you had many threads running some 
code with a breakpoint in it, the hit count when you stopped would always be
1.  Many of the threads could have hit it at the same time...

<rdar://problem/18577603>

llvm-svn: 220358
2014-10-22 01:54:17 +00:00
Enrico Granata 622be238eb Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593
llvm-svn: 220322
2014-10-21 20:52:14 +00:00
Eric Christopher 098f898fd2 Move anonymous types declared in an anonymous union to
outside the anonymous union as it's a language extension
we don't normally support.

llvm-svn: 220320
2014-10-21 20:39:34 +00:00
Eric Christopher f75b0ee2ab Remove unused variable.
llvm-svn: 220319
2014-10-21 20:36:17 +00:00
Eric Christopher a2b05d0441 Fix implicit conversion of NULL constant to 'bool'.
llvm-svn: 220318
2014-10-21 20:35:35 +00:00
Enrico Granata dd86f33902 Add typemaps to handle the transformation of Python list of strings into a 'char const **'. This fixes zephyr's issue with SBTarget::Launch without splitting the API into multiple names
llvm-svn: 220306
2014-10-21 17:49:24 +00:00
Greg Clayton dc6224e0a3 Make the "synchronous" mode actually work without race conditions.
There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.

llvm-svn: 220254
2014-10-21 01:00:42 +00:00
Sean Callanan 35e678c7e0 Don't allow the expression parser to magically
look through 'self' at its ivars.  It produces
surprising results.

<rdar://problem/18698760>

llvm-svn: 220220
2014-10-20 18:36:58 +00:00
Ed Maste 1b102650cb Skip dsym test on !Darwin
r219978 fixed this test to work on Darwin, and removed the expected
failure decorator, but it then started running (and failing) on FreeBSD.

I'd think @dsym_test should skip the test on all non-Darwin operating
systems. It seems not to be the case, so for now skip it the same way as
done for other @dsym_test tests.

llvm-svn: 220219
2014-10-20 18:12:46 +00:00
Zachary Turner cb5742b828 Don't use mkstemp, as it doesn't exist on Windows.
Differential Revision: http://reviews.llvm.org/D5849
Reviewed by: Jason Molenda

llvm-svn: 220218
2014-10-20 17:46:56 +00:00
Zachary Turner 10687b0ea5 Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.
Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton

llvm-svn: 220217
2014-10-20 17:46:43 +00:00
Todd Fiala 30846cd941 Fix 4 failing llgs-related tests on a stock Ubuntu 14.04 x86_64 system./
This fix addresses a requirement on some Linux kernels that limits
a PTRACER to be an ancestor of the ptraced process.  The fix in this
case is to have the inferior test exe explicitly allow any ptracer
to attach.

This fixes several ptrace-related issues that I did not see on a modified
kernel we used internally on my team.

See http://reviews.llvm.org/D5846 for details.

This fixes these previously failing tests on stock Ubuntu systems:

FAIL: LLDB (suite) :: TestGdbRemoteProcessInfo.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestGdbRemoteAttach.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestLldbGdbServer.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)

FAIL: LLDB (suite) :: TestGdbRemoteKill.py (Linux vagrant 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64)
llvm-svn: 220181
2014-10-20 03:56:46 +00:00
Greg Clayton a6cffdecde Fixed python API event test cases.
Issues were:
1 - It isn't good to have more than one listener for the process events, just supply a listener at launch instead of making a one then have the process broadcaster add a new listener
2 - run in async mode

llvm-svn: 220113
2014-10-17 23:58:27 +00:00
Sean Callanan 766cf60961 Make the registerEHFrame function do nothing,
because the default implementation isn't meant
to run against a target process.

<rdar://problem/16639561>

llvm-svn: 220100
2014-10-17 23:02:41 +00:00
Enrico Granata 39e4bb3bc5 Do not delete the class, or else multiple tests that try to rely on lldbinline will fail
llvm-svn: 220095
2014-10-17 21:50:42 +00:00
Sean Callanan 5e3bdbff3f Fixed the expression parser to handle cases where
GetValueForVariableExpressionPath returns NULL and
doesn't set an error.

<rdar://problem/18682916>

llvm-svn: 220070
2014-10-17 18:16:04 +00:00
Enrico Granata 0e478f5aa3 Make a general helper function on the AST context to retrieve a type by identifier in the fashion needed by data formatters
llvm-svn: 220059
2014-10-17 17:56:59 +00:00
Jason Molenda 8e96e6b6f2 Break out of the command word parsing loop if we hit
an invalid combination of words; don't accidentally
continue trying to parse the command line.
clang static analysis fixit.

llvm-svn: 220026
2014-10-17 02:10:33 +00:00
Jason Molenda 81926c3ffe Add #if 0 around unreachable block of code to suppress warnings.
clang warnings.

llvm-svn: 220025
2014-10-17 01:56:57 +00:00
Jason Molenda 9bdc4e1a59 Add null-checks around getter/setter before using them.
clang static analyzer fixit.

llvm-svn: 220024
2014-10-17 01:55:08 +00:00
Jason Molenda 84843ed536 A << operation would be undefined for a bit-selecting
function because of a '1u' making it a 32-bit value
when it really needed to be a 64-bit value.  Trivial to fix
once I figured out what was going on.
clang static analzyer fixit.

llvm-svn: 220022
2014-10-17 01:52:30 +00:00
Jason Molenda 5b94115d50 Remove always-true part of a conditional expression.
clang warning.

llvm-svn: 220018
2014-10-17 01:38:10 +00:00
Jason Molenda 61e0a3ef1f Put #if 0 blocks around three sections of code that are intentionally
unreachable so we don't get warnings about them.

Completely initialize a structure instead of leaving some of its fields
potentially indeterminate (although in reality they would all be set 
before use -- but the compiler warning doesn't know that).

clang warning.

llvm-svn: 220017
2014-10-17 01:36:20 +00:00
Enrico Granata cf3ab58e47 Making all @expectedFailure markers take an explicit bugnumber annotation. This used to be optional, but that makes it harder to track what tests are failing for what reason. So, make it mandatory, in the form of refusing to run the test suite if annotations are missing
llvm-svn: 220012
2014-10-17 01:11:29 +00:00
Enrico Granata 4b2f7456ad Don't enable the log here. It was just me debugging
llvm-svn: 220011
2014-10-17 01:09:06 +00:00
Enrico Granata ed1d075d78 Add a few more bug IDs for x'fail test cases
llvm-svn: 220003
2014-10-17 00:47:44 +00:00
Sean Callanan d950fa7165 Made multi-line test case actions possible in
the inline test cases.  This makes them much
more readable.

llvm-svn: 220001
2014-10-17 00:39:37 +00:00
Enrico Granata e2669ba6d4 Attach a bug number to these failures
llvm-svn: 219986
2014-10-16 23:17:46 +00:00
Enrico Granata d15ad22048 Split this test case to handle each literal kind uniquely
llvm-svn: 219985
2014-10-16 23:16:13 +00:00
Sean Callanan 816cb3eed4 Added a new kind of test case: the "inline" test
case.  This test case style attempts to shed all
of the boilerplate that is required for test
cases, and let 80% of test cases use a much terser
syntax.

Inline testcases have much simplified python files
(the corresponding .py file should contain two
lines of code) and require no Makefile, because the
Makefile is generated automatically.  Breakpoints
are set automatically and the indicated breakpoint
actions (specified after a magic //% comment) are
executed when the breakpoint is hit.

All other testcases are unaffected.

One thing I'm not really happy with yet is the way
multiple actions for the same line are specified.
I'm going to use lang/c/struct_types as a guinea
pig to develop this further.

llvm-svn: 219984
2014-10-16 23:15:22 +00:00
Jason Molenda bc464ee614 Change a use of mktemp() to mkstemp() for better security.
We have two more uses of mktemp still in the source base
but they'll take a little more consideration.
clang static analyzer fixit.

llvm-svn: 219983
2014-10-16 23:10:03 +00:00
Enrico Granata 511247188f The number '5' triggers a bug unrelated to LLDB, and is not instrumental to this test in any way. Use another, randomly chosen, number to make the test pass again and provide useful actionable feedback about things that truly matter
llvm-svn: 219982
2014-10-16 23:06:40 +00:00
Enrico Granata 82909b9f1d Some more test marking
llvm-svn: 219981
2014-10-16 23:03:06 +00:00
Enrico Granata d2657c53ac This test needs the SB headers to make sense
llvm-svn: 219980
2014-10-16 23:02:45 +00:00
Jim Ingham da3a386622 Add a test for the -b (batch mode) option to the lldb driver.
llvm-svn: 219979
2014-10-16 23:02:14 +00:00
Enrico Granata a0524bd159 Fix this test case to actually work - it was relying on a certain 'po' output which wasn't occurring
llvm-svn: 219978
2014-10-16 23:02:03 +00:00
Enrico Granata 83e7f68d39 Some more failure to bug tracking
llvm-svn: 219973
2014-10-16 22:27:17 +00:00
Enrico Granata 0d976f0699 Associate a bug tracking ID with this test case
llvm-svn: 219972
2014-10-16 22:06:26 +00:00
Enrico Granata be7d285e73 This test actually works alright - we were just checking for the wrong string
llvm-svn: 219971
2014-10-16 22:04:05 +00:00
Enrico Granata d116f4a0a0 I see this test case crash - skip for now
llvm-svn: 219970
2014-10-16 21:42:34 +00:00
Jason Molenda e5d8eaf042 Only call RemovePersistentVariable on expr_result if that shared
pointer contains something.

llvm-svn: 219966
2014-10-16 21:25:43 +00:00
Enrico Granata 8d9c2da2d1 Rework this code so that it does not trigger a compiler warning. NFC
llvm-svn: 219964
2014-10-16 21:18:58 +00:00
Jason Molenda 48c0440d97 Fix MemoryHistory plugin to check whether the plugin
was able to create itself before returning the shared
pointer to it.
clang warning.

llvm-svn: 219936
2014-10-16 16:59:23 +00:00
Jason Molenda 823d8f6246 Most of this function checks to see if m_process is non-null before
dereferencing it, except for this one section of code.  Add a null
check around it.
clang static analyzer fix.

llvm-svn: 219920
2014-10-16 08:43:27 +00:00
Jason Molenda 9bc86593a2 Another logical-or vrs. bitwise-or mixup in ClangUserExpression.
clang unreachable code warning.

llvm-svn: 219918
2014-10-16 08:27:27 +00:00
Jason Molenda b3795a4f5e Enable warnings in the debugserver project file..
llvm-svn: 219917
2014-10-16 08:16:29 +00:00
Jason Molenda 0060a38e7b A series of bit-flag values should be bitwise-or'ed not logical-or'ed.
clang unreachable code warning.

llvm-svn: 219916
2014-10-16 08:15:11 +00:00
Jason Molenda f8a7cfad6d Remove unreachable code.
llvm-svn: 219915
2014-10-16 08:08:13 +00:00
Jason Molenda 637822e3d1 Remove unreachable code.
llvm-svn: 219914
2014-10-16 08:07:54 +00:00
Jason Molenda 97e704b2af Add /* DISABLES CODE */ annotation before if (0) to mark it as intentional.
llvm-svn: 219913
2014-10-16 08:07:20 +00:00
Jason Molenda a68e4dcd7e Remove unreachable code.
llvm-svn: 219912
2014-10-16 08:05:49 +00:00
Jason Molenda 665f12a870 Remove unreachable code.
llvm-svn: 219911
2014-10-16 08:05:22 +00:00
Jason Molenda ecafcb867a Xcode recommended these changes to the project file. It recommended
a number of warnings to be enabled.  The one making the most noise
across the code base right now is CLANG_WARN_UNREACHABLE_CODE = YES.

llvm-svn: 219910
2014-10-16 08:04:28 +00:00
Jason Molenda 60b5da6c3c Remove unused initialization.
clang static analyzer fixit.

llvm-svn: 219909
2014-10-16 07:53:46 +00:00
Jason Molenda 18f5fd3a43 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219908
2014-10-16 07:52:17 +00:00
Jason Molenda 8b5f2cfc19 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219907
2014-10-16 07:49:27 +00:00
Jason Molenda 1e6cf05763 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219905
2014-10-16 07:47:37 +00:00
Jason Molenda 5cf1e237f0 Remove unused variable.
clang static analyzer fixit.

llvm-svn: 219904
2014-10-16 07:41:32 +00:00
Jason Molenda 275746d768 Ryan Brown's patch to handle DW_OP_call_frame_cfa addresses
as load addreses instead of host addresses.
http://reviews.llvm.org/D5735

llvm-svn: 219896
2014-10-16 02:56:12 +00:00
Jason Molenda 42f4c7e720 Fix accidental over-checking of args in launcherXPCService.
llvm-svn: 219895
2014-10-16 02:53:57 +00:00
Jason Molenda 4ecbc44f79 Fix a potential null pointer deref & a potential memory leak,
also reformat to conform to the usual lldb coding conventions
a little better.
clang static analyzer fixit.

llvm-svn: 219893
2014-10-16 02:08:11 +00:00
Jason Molenda 3206b1e077 Remove unnecessary update of 'name' local.
clang static analyzer fixit.

llvm-svn: 219892
2014-10-16 01:55:21 +00:00
Jason Molenda 3c86c7e3a2 Remove unused change to argc/argv after long option parsing has been completed.
clang static analyzer fixit.

llvm-svn: 219891
2014-10-16 01:50:14 +00:00
Jason Molenda 1446881254 Ensure that user_exe_path is non-NULL before derferencing.
We've already created a FileSpec based on this local and 
this code path would never be executed if it is an invalid
FilePath - but the static analyzer doesn't know this and I
want to placate it.
clang static analyzer fixit.

llvm-svn: 219890
2014-10-16 01:42:11 +00:00
Jason Molenda 60db6e43ca Guard against NULL derefs.
clang static analyzer fixits.

llvm-svn: 219889
2014-10-16 01:40:16 +00:00
Jason Molenda d31c800ce0 Ah, accidentally committed a patch I didn't mean to.
llvm-svn: 219888
2014-10-16 01:27:31 +00:00
Jason Molenda 320e7b3897 It's possible for long_options[long_options_index].definition to be null
from the previous for() loop - check that it is non-null before trying
to deref it.
clang static analyzer fixit.

llvm-svn: 219887
2014-10-16 01:26:51 +00:00
Jason Molenda aee7eb5ed1 Check that process is non-null before calling a method in it.
clang static analyzer fixit.

llvm-svn: 219886
2014-10-16 01:23:06 +00:00
Jason Molenda 4c9bd87916 It's possible for this function to not be passed a CompUnit*; add
guards around a few additional uses of the cu local pointer.
clang static analyzer fixit.

llvm-svn: 219885
2014-10-16 01:21:25 +00:00
Jason Molenda 76513fd9bc Give old_state a default value so we won't try to restore
an uninitialized value.  In reality the code block that 
initializes it and the code block that restores it will always
match up - but the analyzer doesn't know that and I want to 
quiet it, so...
clang static analyzer fixit.

llvm-svn: 219869
2014-10-15 23:39:31 +00:00
Jason Molenda 900dbdc4d9 Give user_id a default invalid value so we don't
possibly use it uninitialized in a log message later.
clang static analyzer fixit.

llvm-svn: 219865
2014-10-15 23:27:12 +00:00
Jason Molenda aeb9a06ff5 Fix unused-variable warnings from the clang static analyzer.
llvm-svn: 219863
2014-10-15 23:13:51 +00:00
Jason Molenda 026aa4962a Mechanical change to FastDemangle to make it closer to the lldb
coding conventions.  Lots of whitespace et al changes but no
content changes.

llvm-svn: 219856
2014-10-15 22:11:15 +00:00
Enrico Granata de4de39c9d This should keep the non-Xcode-based builds happy
llvm-svn: 219853
2014-10-15 21:39:17 +00:00
Enrico Granata 5510a5762c Add synthetic children support for NSIndexPath
llvm-svn: 219852
2014-10-15 21:38:32 +00:00
Enrico Granata db2ecad3cd The NSDate formatter should use GMT instead of the local timezone. Fixes rdar://13416848
llvm-svn: 219841
2014-10-15 20:18:58 +00:00
Enrico Granata b0c5b8f228 Make this test case more resilient in the face of line-table and inlining changes
llvm-svn: 219828
2014-10-15 18:42:45 +00:00
Greg Clayton 807b6b326d Allow ThreadLauncher::LaunchThread() to specify a minimum stack byte size when launching threads.
This defaults to zero, which means to use the system default.

NOTE: Windows will need to implement this.

<rdar://problem/18644448>

llvm-svn: 219821
2014-10-15 18:03:59 +00:00
Zachary Turner cb37ddda0d Remove some unnecessary headers from Host.cpp
After the recent migration of code out of Host.cpp, many
unnecessary headers were still being included.  This prunes the
include list down to only what is still necessary.

llvm-svn: 219814
2014-10-15 17:27:11 +00:00
Matthew Gardiner 6e7b0a088e Improve the handling of kalimba ELF file section type recognition.
Recognise the SHT_NOBITS property in kalimba ELF, and determine this to be
of type zerofilled. Subsequently recognise this type to represent bytes
on the target's DATA address space, and therefore be sized accordingly.

llvm-svn: 219782
2014-10-15 08:21:54 +00:00
Jason Molenda 270c52c8dc Be more consistent about null checks for the Process and ABI
in GetFullUnwindPlanForFrame() - the code was mostly checking
that we had an active Process and ABI but not always.
clang static analyzer fixit.

llvm-svn: 219772
2014-10-15 03:11:37 +00:00
Jason Molenda d91a662a2e Make sure local var cu is non-NULL before dereferencing.
(it was checked for NULL-ness in some places, not in others)
clang static analyzer fixit.

llvm-svn: 219771
2014-10-15 03:07:39 +00:00
Jason Molenda 4d9f3b0e50 Remove unneeded local var initialization.
clang static analyzer fixit.

llvm-svn: 219770
2014-10-15 03:06:23 +00:00
Jason Molenda 9aae9fcbaf Make sure is_indirect local var is initialized; there
exists a code path where it could be used while uninitialized.
clang static analyzer fixit.

llvm-svn: 219769
2014-10-15 03:05:38 +00:00
Jason Molenda 68c8521e71 Ensure that m_syntax is initialized in all the FileSpec
constructors.
clang static analyzer fixit.

llvm-svn: 219768
2014-10-15 03:04:33 +00:00