Commit Graph

10419 Commits

Author SHA1 Message Date
Chaoren Lin 20433ae11b Fixed TestInferiorChanged
replaced expected stop reason 'address invalid' with 'signal SIGSEGV'

llvm-svn: 227921
2015-02-03 01:51:06 +00:00
Chaoren Lin 0c1463d4ea Fixed TestInferiorCrashing failures
LLGS debugging is outputting different thread stop reasons than
local linux debugging.  The stop reasons are reasonable so I've left
left them alone.  Might update them to match darwin in the future.

llvm-svn: 227920
2015-02-03 01:51:05 +00:00
Chaoren Lin 6626b5c25e Added support for writing registers larger than 64 bits
llvm-svn: 227919
2015-02-03 01:51:03 +00:00
Chaoren Lin 911a6dcaa9 LLGS local - signal stops inferior in debugger
NativeProcessLinux::MonitorSignal was automatically resuming threads
that stopped due to a signal.  This is inconsistent with the
behavior of lldb and gdb.  This change removes the automatic resume.

Fixes
TestSendSignal.py
TestSignalsAPI.py
if PLATFORM_LINUX_FORCE_LLGS_LOCAL is in the environment vars.

llvm-svn: 227918
2015-02-03 01:51:02 +00:00
Chaoren Lin e9547b8052 Fix up NativeProcessLinux::Interrupt() to use thread state coordinator mechanism.
llvm-svn: 227917
2015-02-03 01:51:00 +00:00
Chaoren Lin aab58633b7 Added code to prevent "administrative stop" from overwriting a real stop reason.
Note this code path should not happen - it implies a bug in another part of
the code.  For the thread to receive the stop signal as it is handled, the
and for it to already have a stop reason, it implies the kernel was able to
tell the thread that it stopped while it was stopped.  More likely this
seems to indicate a bug where an actual thread start was not getting correctly
logged.  If it does get hit, we'll want to understand the sequence to figure
out if it is truly legitimate or if it implies another bug.

llvm-svn: 227916
2015-02-03 01:50:57 +00:00
Chaoren Lin c0e5ac84b0 Fix step commands that mix running threads and stepping threads.
This fixes https://github.com/tfiala/lldb/issues/62.

llvm-svn: 227915
2015-02-03 01:50:56 +00:00
Chaoren Lin 9d617ba613 Disabled local-llgs hijacking of state on startup; passed along signo to killed process.
It looks like Shawn's fix addresses what the initial hijacking was trying
to accomplish per conversations with Greg and Jim.  The hijacking was
causing several tests to hang (#61, #62, #63, #64, #67, possibly more).
These tests now just fail rather than hang with this modification.

llvm-svn: 227914
2015-02-03 01:50:54 +00:00
Chaoren Lin b8af31d4b6 Fix some bugs in llgs thread state handling.
* When the thread state coordinator is told to skip sending a stop request
  for a running thread that is ignored (e.g. the thread that steps in a
  step operation is technically running and should not have a stop sent
  to it, since it will stop of its own accord per the kernel step operation),
  ensure the deferred signal notification logic still waits for the
  skipped thread.  (i.e. we want to defer the notification until the
  stepping thread is indeed stopped, we just don't want to send it a tgkill).

* Add ThreadStateCoordinator::RequestResumeAsNeeded().  This variant of the
  RequestResume() method does not call the error function when the thread
  is already running.  Instead, it just logs that the thread is already
  running and skips the resume operation.  This is useful for the case of
  vCont;c handling, where we tell all threads that they should be running.
  At the place we're calling, all we know is "we want this thread running if
  it isn't already," and that's exactly what this command does.

* Formatting change (minor) in NativeThreadLinux logging.

llvm-svn: 227913
2015-02-03 01:50:51 +00:00
Chaoren Lin 03f12d6b22 llgs: more work on thread stepping.
See https://github.com/tfiala/lldb/issues/75.  Not fixed yet but
continuing to push this further.

Fixes:
* Resume() now skips doing deferred notifications if we're doing a
  vCont;{c,C}.  In this case, we're trying to start something up,
  not defer a stop notification.  The default thread action stop
  mode pickup was triggering a stop because it had at least one
  stop, which was wrong in the case of a continue.  (Bug introduced
  by previous change.)

* Added a variant to ThreadStateCoordinator to specify a set of
  thread ids to be skipped when triggering stop notifications to
  non-stopped threads on a deferred signal call.  For the case of
  a stepping thread, it is actually told to step (and is running)
  for a brief moment, but the thread state coordinator would think
  it needed to send the stepping thread a stop, which id doesn't
  need to do.  This facility allows me to get around that cleanly.

With this change, behavior is now reduced to something I think is
essentially a different bug:

* Doing a step into libc code from my code crashes llgs.
* Doing a next out of a function in my own code crashes llgs.

llvm-svn: 227912
2015-02-03 01:50:49 +00:00
Chaoren Lin ae29d39570 llgs: fix up some handling of stepping.
Tracked down while working on https://github.com/tfiala/lldb/issues/75.
This is not a complete fix for that issue, but moves us farther along.

Fixes:
* When a thread step is requested via vCont:{s,S}, Resume() now marks
  the stepping thread as (1) currently stepping and (2) does trigger
  the deferred signal for the stepped thread.  This fixes a bug where
  we were actually triggering a deferred stop cycle here for the non-stepping
  thread since the single step thread was not part of the Resume()
  deferred signal mechanism.  The stepping thread is also marked in
  the thread state coordinator as running (via a resume callback).

* When we get the SIGTRAP signal for the step completion, we don't
  do a deferred signal call - that happened during the vCont:{s,S}
  processing in Resume() already.  Now we just need to mark that
  the stepping thread is now stopped.  If this is the last thread
  in the set that needs to stop, it will trigger the process/delegate
  stop call that will notify lldb.  Otherwise, that'll happen when
  the final thead we're waiting for stops.

Misc:
* Fixed up thread stop logging to use a leading 0 (0x%PRIx32) so
  we don't get log lines like 0x5 for 0x05 SIGTRAP.

llvm-svn: 227911
2015-02-03 01:50:46 +00:00
Chaoren Lin 938fcf63ed llgs: fixed a bug in deferred signal thread id; added coordinator enqueue logging.
The deferred signal thread id was being set with the process id
unintentionally in NativeProcessLinux::CallAfterRunningThreadsStop().

llvm-svn: 227910
2015-02-03 01:50:44 +00:00
Chaoren Lin fa03ad2ebc Get initial thread state coordinator integration working.
* Fixed bug in run loop where run loop return enum was being treated
  erroneously like an int, causing the TSC event loop to terminate
  prematurely.

* Added an explicit scope in NativeProcessLinux::Resume() for the
  threads lock lifetime.  (This was likely unnecessary but is
  more explicit.)

* Fixed a bug in ThreadStateCoordinator where resume execution was
  not updating the internal state about the thread assumed to be
  running now.  I'll add a test and upstream this in a moment.

* Added a verbose logging mechanism to event processing within
  ThreadStateCoordinator.  It is currently enabled when the
  'log enable lldb thread' is true upon inferior launch/attach.

llvm-svn: 227909
2015-02-03 01:50:42 +00:00
Chaoren Lin 56f981bfce Added remote-build.py and wired it into Xcode for Linux and MacOSX+Linux builds.
llvm-svn: 227908
2015-02-03 01:50:39 +00:00
Enrico Granata 9c3a07984f Allow customizing the timeout of the inferior
llvm-svn: 227906
2015-02-03 01:06:35 +00:00
Enrico Granata 9c58e8aac4 And, do not define arguments twice
llvm-svn: 227905
2015-02-03 01:00:44 +00:00
Enrico Granata 35dd52cf3e Allow pexpect exact matches
llvm-svn: 227904
2015-02-03 00:59:28 +00:00
Oleksiy Vyalov 926af0cdcb Make "process attach" command to support attaching to remote process in case if selected platform allows this.
http://reviews.llvm.org/D7358

llvm-svn: 227899
2015-02-03 00:04:35 +00:00
Enrico Granata 18cf8e018a Some cleanup in lldbpexpect
llvm-svn: 227889
2015-02-02 23:03:37 +00:00
Enrico Granata 15c752f9fa Nice syntax typo in lldbpexpect
llvm-svn: 227887
2015-02-02 22:55:46 +00:00
Enrico Granata 78b7d5fab2 Add an helper class to write pexpect-based test cases
Over time, we should improve this class and port all pexpect based testing over to using this

llvm-svn: 227875
2015-02-02 22:12:39 +00:00
Greg Clayton e89941b3bb Lock the Platform mutex in PlatformDarwin::GetDeveloperDirectory().
Partial fix for: <rdar://problem/19575304>

llvm-svn: 227863
2015-02-02 21:18:46 +00:00
Greg Clayton 7597b353b3 Make one mutex for the lldb_private::Platform class that can be used to protect with modifying member variables. This mutex is designed to be used for simple modifications, so the lock should be taken, modify the member variable and released. We need to make sure this isn't used with any code that cause code to rely or reenter on another thread.
Partial fix for: <rdar://problem/19575304>

llvm-svn: 227855
2015-02-02 20:45:17 +00:00
Zachary Turner 6fd3f34d1f Make SBTarget::Launch() respect the stop_at_entry argument.
Patch by Ilia K
Differential Revision: http://reviews.llvm.org/D7271

llvm-svn: 227833
2015-02-02 18:50:01 +00:00
Hafiz Abid Qadeer 6a4ea636f3 Fix log file generation in lldb-mi.
When it runs, lldb-mi creates a log file. There is an option --noLog
to disable the creation but it does not work and you end up with log 
file. This happens as log is enabled in a few places in the code 
although it has been disabled by this option.

This commit tried to fix the problem in the following way.

Log file generation is disabled by default.
You can enable it by giving --log option. It is the only way to enable
it. Rest of the call have been removed.

So the code basically remove the calls that enable the log 
unconditionally and changes the option --noLog to --log.

llvm-svn: 227810
2015-02-02 17:08:25 +00:00
Hafiz Abid Qadeer 54ba124098 Make --thread argument optional for various commands.
Currently it was marked as mandatory for many commands. Although it
is recommended that fronends generate this argument, it is not
mandatory. GDB seems to treat it as optional too.

llvm-svn: 227798
2015-02-02 12:17:33 +00:00
Ed Maste 655b59854f Adapt test for tid format on non-Darwin platforms
llvm-svn: 227580
2015-01-30 16:45:24 +00:00
Ed Maste 87ff93c0fd Restrict SigtrampUnwind test to Darwin only
It needs OS-specific knowledge and has not yet been adapted to other
systems.

llvm-svn: 227579
2015-01-30 16:33:02 +00:00
Ed Maste a8f3f76f63 Skip Objective-C test on non-Darwin platforms
llvm-svn: 227578
2015-01-30 16:31:07 +00:00
Jason Molenda ab223c1ec8 Small tweak to the name of kernel binaries that we look
for; match files starting with "mach", not "mach." so
the old common name mach_kernel will still be matched.

llvm-svn: 227552
2015-01-30 02:28:06 +00:00
Jason Molenda 3db7ebc87f If lldb is being built with ASAN instrumentation, have lldb
create its own threads with 8MB additional maximum stack size.
Extra room is needed for the bookkeeping needed for this 
instrumentation.

llvm-svn: 227421
2015-01-29 06:28:36 +00:00
Jason Molenda 9a435729b4 When starting a kernel debug session (PlatformDarwinKernel), scan
for executable binaries on the local filesystem so the user doesn't
need to provide the path to the correct binary manually.

Also have lldb search for kexts/the kernel in the current working
directory in addition to all the usual places.

<rdar://problem/18126501> 

llvm-svn: 227419
2015-01-29 06:20:05 +00:00
Enrico Granata 7684e6e1c2 Add logic to ClangASTType and SBType to discover information about vector types
llvm-svn: 227383
2015-01-28 22:18:02 +00:00
Greg Clayton d26a1e5060 Fixed the failing test:
./dotest.py -A x86_64 -C clang -v -t  -f TestImageListMultiArchitecture.test_image_list_shows_multiple_architectures

The problem was that if the platform wasn't compatible with the current file in the "target create" command, it wasn't finding a platform that was like it used to.

Also, the currently selected platform was being used upload the file _before_ the target was created which was incorrect as "target create a.out" might switch platforms if its architecture doesn't match, so I moved the uploading to happen after the target was created so we use the right platform (the one in the target, not the selected one).

llvm-svn: 227380
2015-01-28 22:08:17 +00:00
Greg Clayton 6f4a43e581 Fixed compiler warnings for functions that weren't marked virtual and the functions didn't have "override" on them.
llvm-svn: 227366
2015-01-28 20:47:27 +00:00
Enrico Granata 2265acf39e Harden against the process pointer being null - this seems like it shouldn't happen, except it did - by a user stopping the debugger while the variables view was refreshing
Fixes rdar://19599357

llvm-svn: 227350
2015-01-28 19:23:51 +00:00
Enrico Granata 7e0255c769 As promised, make this more efficient by only doing all the busy work when necessary
llvm-svn: 227342
2015-01-28 18:45:28 +00:00
Oleksiy Vyalov f8ce61c5d8 Launch lldb-gdbserver in same process group when launched remotely using lldb-platform - commit on behalf of flackr.
http://reviews.llvm.org/D7211

llvm-svn: 227329
2015-01-28 17:36:59 +00:00
Enrico Granata d7cb643ef0 Emit a warning the first time that one tries to resolve the size of a type passing a nullptr ExecutionContext - but only when it might actually make a difference
This should help us find these cases and act on them

llvm-svn: 227289
2015-01-28 01:41:00 +00:00
Greg Clayton ccd2a6d958 Changes in 226712 needed some fixing as a platform is almost always selected and even if platform options are specified when doing a "target create" they would get ignored if a platform was already selected.
The change was made so we could re-use a platform if one was already created instead of creating a new one, but it would fail in the above case. To fix this, if we have a selected platform, we verify that the platform matches the current platform before we try to re-use it. We do this by asking the OptionGroupPlatform if the platform matches. If so, it returns true and we don't create a new platform, else we do.

llvm-svn: 227288
2015-01-28 01:33:37 +00:00
Jim Ingham 603985fc37 SBThread::GetDescription should use the Thread format instead of making up
some format of its own.

llvm-svn: 227285
2015-01-28 01:18:01 +00:00
Jim Ingham d1f2536829 Use LLDB_INVALID_FRAME_ID for invalid frame ID's.
llvm-svn: 227283
2015-01-28 01:17:26 +00:00
Enrico Granata 951bdd5f41 Move several GetByteSize() calls over to the brave new world of taking an ExecutionContext*
And since enough of these are doing the right thing, add a test case to verify we are doing the right thing with freeze drying ObjC object types

Fixes rdar://18092770

llvm-svn: 227282
2015-01-28 01:09:45 +00:00
Greg Clayton 65b0e7630d If we say:
(lldb) b isEqual:

We end up calling "breakpoint set --name "isEqual:" and it was not checking for selectors due to a logic error.

llvm-svn: 227281
2015-01-28 01:08:39 +00:00
Enrico Granata 3842b9ff8d More work for the dynamic type size feature
Namely, this commit provides an actual implementation of how to retrieve the byte size in a sane way for an ObjC class, by scanning ivar offsets and byte sizes, figuring out the farthest-from-base ivar, and adding its byte size to that

Still NFC

llvm-svn: 227277
2015-01-28 00:45:42 +00:00
Enrico Granata 1cd5e921e1 Preparatory infrastructural work to support dynamically determining sizes of ObjC types via the runtime
This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for)
The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee)

This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help
No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet

llvm-svn: 227274
2015-01-28 00:07:51 +00:00
Greg Clayton 56f455c9fc Added test case to make sure we don't regress on settings breakpoints by selector and with the various partially specified ObjC specified breakpoints.
This test tests the equivalent of:
    breakpoint set --name count
    breakpoint set --selector count
    breakpoint set --name isEqual:
    breakpoint set --selector isEqual:
    breakpoint set --name "-[MyClass(MyCategory) myCategoryFunction]"
    breakpoint set --name "-[MyClass myCategoryFunction]"
    breakpoint set --name "[MyClass myCategoryFunction]"

llvm-svn: 227271
2015-01-27 23:45:56 +00:00
Enrico Granata f55afeb432 Fix a typo in code-signing.txt
llvm-svn: 227268
2015-01-27 23:26:59 +00:00
Chaoren Lin d4aa215c90 Fix copy paste error in file header.
llvm-svn: 227222
2015-01-27 18:40:25 +00:00
Hafiz Abid Qadeer 692f5f3795 Clean lldb-mi test cases.
This patch adds lldbmi_testcase.MiTestCaseBase class and removes
a lot of repitition in the lldb-mi test cases. Also cleans import
list and code-style.

Presented for review in http://reviews.llvm.org/D7162.
Patch from Ilia K <ki.stfu@gmail.com>.

llvm-svn: 227218
2015-01-27 18:03:50 +00:00
Jim Ingham 27e5fe8604 The MCJIT doesn't seem to call getPointerForNamedFunction from the MemoryManager anymore, switching to getSymbolAddress, which
it does call, and implementing it so that we once again look up external symbols in the JIT.

Also juked the error reporting from the JIT a little bit.

This resolves:
http://llvm.org/bugs/show_bug.cgi?id=22314

llvm-svn: 227217
2015-01-27 18:03:05 +00:00
Enrico Granata ca84e982c8 Apply the transformation to the static type as well as the dynamic type. It doesn't make sense to carry along an untransformed static type
llvm-svn: 227166
2015-01-27 02:46:27 +00:00
Greg Clayton e507bce2de Allow python command interpreter commands to be interruptable via CTRL+C.
<rdar://problem/17935601>

llvm-svn: 227163
2015-01-27 01:58:22 +00:00
Greg Clayton 199e7c125e Fix the test to disassemble as if at address zero, not at an invalid address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL.
This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. So we were asking for 3 bytes to be disassembled at address 0xffffffffffffffff which would cause an unsigned overflow and cause the MemoryObject to refuse to read anymore bytes.

llvm-svn: 227153
2015-01-27 00:22:36 +00:00
Enrico Granata 3de4971a7a Add an overload of SetValueFromCString() to ValueObjectSynthetic that is just a passthrough to the parent object
Without this overload, attempts to edit the value of a variable with synthetic children enabled would change the value inside the synthetic ValueObject, but not propagate the changes to the underlying storage, hence resulting in no write for any meaningful purpose

Comes with a test case, and fixes rdar://19586311

llvm-svn: 227120
2015-01-26 19:33:52 +00:00
Zachary Turner 0bf09687fb Fix darwin-debug build in cmake (OS X)
This patch fixes test_launch_in_terminal test which doesn't work
in OS X since the moment as it was added in r225284. The test fails
because Target::Launch returns the following error: "the darwin-debug
executable doesn't exist at
<output_dir>/lib/python2.7/site-packages/lldb/darwin-debug'".

Patch by Ilia K
Differential Revision: http://reviews.llvm.org/D7102

llvm-svn: 227096
2015-01-26 17:23:18 +00:00
Hafiz Abid Qadeer a73d1ce74f Also except OSError when terminating a child.
Ilia K <ki.stfu@gmail.com> sent this patch. He noted that it was possible for
child to be terminated after isAlive call and before we send it quit command.
In this case, sending command to it causes OSError. This patch just adds this
exception to the except list.

llvm-svn: 227086
2015-01-26 12:03:05 +00:00
Jason Molenda 71d3025ff7 Add link to github x86-psABI repo where the ABI doc is being
revised.

llvm-svn: 227083
2015-01-26 10:07:39 +00:00
Greg Clayton 94976f70af Adding the ability to get the language from a mangled name. This isn't used in the SVN LLDB, but will be used in another codebase based on the SVN LLDB.
llvm-svn: 226962
2015-01-23 23:18:53 +00:00
Vince Harron d40ef9993e Fixing TestRegisters on Linux with LLGS
This patch fixes TestRegisters on Linux with LLGS

Introduce GetUserRegisterCount on RegisterInfoInterface to distinguish
lldb internal registers (e.g.: DR0-DR7) during register counting.

Update GDBRemoteCommunicationServer to skip lldb internal registers on
read/write register and on discover register.

Submitted for Tamas Berghammer

llvm-svn: 226959
2015-01-23 22:57:00 +00:00
Vince Harron 083ca45c17 Renamed UpdateSDKDirectoryInfosInNeeded->IfNeeded
Also removed extra call to UpdateSDKDirectoryInfosIfNeeded

llvm-svn: 226957
2015-01-23 22:50:34 +00:00
Vince Harron b956a81efb fixed up some logging messages (options and wait_pid were swapped)
llvm-svn: 226956
2015-01-23 22:48:28 +00:00
Oleksiy Vyalov 7ed92fbbe8 Fix CMake build - add readline dependency on ${PYTHON_LIBRARY}.
llvm-svn: 226933
2015-01-23 20:09:14 +00:00
Deepak Panickal 9d02a6699d Fix handling of data-disassemble command arguments.
llvm-svn: 226909
2015-01-23 14:31:56 +00:00
Tamas Berghammer 8cd5f6f41b Cleanup do-gtest.py
* Add comments
* Refactor output manipulation (cleanup + minor bug fixes)
* Add better error reporting on test failure

llvm-svn: 226907
2015-01-23 11:02:28 +00:00
Tamas Berghammer 5a9919ff35 Fix indentation in ValueObject.cpp (test commit)
llvm-svn: 226906
2015-01-23 10:54:21 +00:00
Jason Molenda f16dbb8b07 debug printfs that got left in. I blame greg.
llvm-svn: 226892
2015-01-23 01:34:19 +00:00
Kate Stone 6d3dabc622 Workaround for what looks like an OS X-specific libedit issue
Other platforms may benefit from something similar if issues arise.  The
libedit library doesn't explicitly initialize the curses termcap library,
which it gets away with until TERM is set to VT100 where it stumbles over
an implementation assumption that may not exist on other platforms.

<rdar://problem/17581929>

llvm-svn: 226891
2015-01-23 01:06:10 +00:00
Jason Molenda 8122bb0e19 Two fixes for compact unwind decoding for frameless large-stack-size
i386/x86_64 functions.  The stack size was being multiplied by the
pointer size incorrectly.  The register permutation placeholders
(UNWIND_X86_REG_NONE) were decrementing the stack offset of the
saved registers when it should not have been.

<rdar://problem/19570035> 

llvm-svn: 226889
2015-01-23 01:02:32 +00:00
Jim Ingham 0895e3406c Remove the "/" from the end of rpath paths. Having it there causes the
paths we get from dladdr to have "//" in it internally, and while that is
formally correct it is just asking for somebody to misparse it... 

llvm-svn: 226886
2015-01-23 00:39:13 +00:00
Enrico Granata 953a3df779 Replace more runCmd('continue') with process control API.
llvm-svn: 226860
2015-01-22 20:53:04 +00:00
Zachary Turner 3597097671 Change wildcard . to literal . in regex for copying python.
On Windows we copy python27(_d).dll to the bin directory.  We do
this by looking at the PYTHON_LIBRARY specified by the user, which
is something like C:\foo\python27_d.lib, and replacing ".lib" with
".dll".  But ".lib" as a regex will also match "flib", etc.  So
make this a literal . instead of a wildcard .

llvm-svn: 226858
2015-01-22 20:30:29 +00:00
Oleksiy Vyalov 49b71c609c Make OSX test run firewall friendly.
http://reviews.llvm.org/D7115

llvm-svn: 226856
2015-01-22 20:03:21 +00:00
Enrico Granata 7a2421095c Add a benchmark test case that shows how much slower repeat 'continue' commands are than going through the SB API directly
llvm-svn: 226852
2015-01-22 19:33:53 +00:00
Zachary Turner ef489e9751 Error::Clear() should reset the type to invalid instead of generic.
This matches the behavior of the default constructor, so is
technically more correct.

Patch by Chaoren Lin
Differential Revision: http://reviews.llvm.org/D7113

llvm-svn: 226851
2015-01-22 19:30:05 +00:00
Zachary Turner 5e6f45201f Don't stomp the triple when loading a PECOFF target.
When you create a target, it tries to look for the platform's list
of supported architectures for a match.  The match it finds can
contain specific triples, like i386-pc-windows-msvc.  Later, we
overwrite this value with the most generic triple that can apply
to any platform with COFF support, causing some of the fields of
the triple to get overwritten.

This patch changes the behavior to only merge in values from the COFF
triple if the fields of the matching triple were unknown/unspecified
to begin with.

This fixes load address resolution on Windows, since it enables the
DynamicLoaderWindows to be used instead of DynamicLoaderStatic.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D7120

llvm-svn: 226849
2015-01-22 18:59:05 +00:00
Greg Clayton cd6bbba186 Fix the -*-version-min option to not try and use the current OS version for iOS and the simulator since llvm/clang will assert and kill LLDB.
llvm-svn: 226846
2015-01-22 18:25:49 +00:00
Jason Molenda 07fd86a9df Update ExpressionSourceCode::GetText() to match the
name of the iOS simulator platform which was changed
in r181631.
<rdar://problem/19200084> 

llvm-svn: 226789
2015-01-22 06:31:58 +00:00
Enrico Granata de61ebafcf Add an API to ValueObject that iterates over the entire parent chain via a callback, and rewrite GetRoot() in terms of this general iteration API. NFC
llvm-svn: 226771
2015-01-22 03:07:34 +00:00
Jason Molenda 03176d781f File::Read(), when asked to read the contents of a file into a heap
buffer and to add a nul terminator byte, was incorrectly resizing
its buffer so the nul terminator was not included.

Problem found by clang ASAN instrumentation when using an
expression prefix file which was read via this mechanism.

<rdar://problem/19556459> 

llvm-svn: 226753
2015-01-22 00:41:05 +00:00
Jason Molenda d50c398c69 Add Utility/UriParser.cpp to the lldb-core target so xcode builds
work again.

llvm-svn: 226752
2015-01-22 00:39:36 +00:00
Kate Stone cc391a0a12 Expression evaluation for functions with unknown signatures on works by
inferring the function signature.  This works well where the ABI doesn't
distinguish between variadic and fixed argument lists, but on arm64 the
calling conventions differ.  The default assumption works for fixed argument
lists, but variadic functions require explicit prototypes to be called.

By far the most common case where this is an issue is when attempting to use
 printf().  This change augments the default expression prefix to include a
working variadic prototype for the function.

<rdar://problem/19024779>

llvm-svn: 226744
2015-01-21 23:39:16 +00:00
Zachary Turner 5a7e8d09a8 Implement ProcessWindows::GetMemoryRegionInfo.
llvm-svn: 226742
2015-01-21 23:26:40 +00:00
Enrico Granata e24b8a03b9 Speed these tests up quite significantly by using the SB API instead of running the "continue" command at each step
The reason why one mechanism is so much faster than the other (as in, ~10 seconds vs. ~1 minute) is quite baffling to me at the moment, but these are not process handling tests, so do what's faster

llvm-svn: 226730
2015-01-21 22:51:59 +00:00
Vince Harron 1b5a74eea7 This patch gets remote-linux platform able to run processes
Make sure the selected platform is always used

Make sure that the host uses the connect://hostname to connect to both
the lldb-platform and the lldb-gdbserver rather than what the platform
reports as the hostname of the lldb-gdbserver

Make sure that lldb-platform uses the IP address on it's connection
back to the host instead of the hostname that the host sends to it
when launching lldb-gdbserver with the remote host information

Tested on OSX and Linux

llvm-svn: 226712
2015-01-21 22:42:49 +00:00
Greg Clayton 7bd4c60043 Abstract the details from regex.h a bit more by not allowing people to specify compile and execute flags for regular expressions. Also enable better regular expressions if they are available by check if the REG_ENHANCED is available and using it if it is.
Since REG_ENHANCED is available on MacOSX, this allow the use of \d (digits) \b (word boundaries) and much more without affecting other systems.

<rdar://problem/12082562>

llvm-svn: 226704
2015-01-21 21:51:02 +00:00
Kate Stone 2136ace961 Fixed a makefile rule used by several tests
Now quotes dsymutil path, required when running tests where the toolchain is in a path that contains a space

llvm-svn: 226695
2015-01-21 19:30:00 +00:00
Zachary Turner 02b882a69b Revert "Some fixes for linking Python on Windows."
This reverts commit r226679.  For some reason it was
not generating the same behavior as manually specifying
the include dir, library path, and exe path, and it was
causing the test suite to fail to run.

llvm-svn: 226683
2015-01-21 18:30:40 +00:00
Zachary Turner f3a7da349c Some fixes for linking Python on Windows.
CMake FindPythonLibs will look for multiple versions of Python
including both debug and release, and build up a list such as
(debug <debugpath> optimized <optimizedpath>).  This confuses
the logic we have in CMake to copy the correct python dll to
the output directory so that it need not be in your system's PATH.

To alleviate this, we manually split this list and extract out
the debug and release versions of the python library, and copy
only the correct one to the output directory.

llvm-svn: 226679
2015-01-21 17:53:10 +00:00
Enrico Granata ed3228aa5f Allow individual ValueObjects to pick their preferred display language
Most of the time, we can use context information just fine to choose a language (i.e. the language of the frame that the root object was defined in, if any); but in some cases, synthetic children may be fabricated as root frame-less entities, and then we wouldn't know any better

This patch allows (internal) synthetic child providers to set a display language on the children they generate, should they so choose

llvm-svn: 226634
2015-01-21 01:47:13 +00:00
Jason Molenda e527c5810c Adding compact unwind as a source of unwind information
introduced subtle bugs in two places in 
RegisterContextLLDB::GetFullUnwindPlanForFrame where 
it specifically wanted to get an eh_frame unwind plan
and was using "Get CallSite UnwindPlan" as synonymous
with that.  But now we have two different types of 
unwind plan that can be returned in that case, and
compact unwind won't behaves as needed.

<rdar://problem/19528559> 

llvm-svn: 226631
2015-01-21 01:26:28 +00:00
Zachary Turner 83887fb7dc Fix some platform specific paths in TestSettings.py.
We were referring to hardcoded paths /bin/ls and /bin/cat.  For
the purposes of this test, the actual value it's set to doesn't
matter, and it might as well be a non-existent path.  All that
matters is that the before and after values have to match, and
that trailing whitespace is stripped.  On Windows FileSpec
(correctly) converts /bin/ls to D:\bin\ls though, so the before
and after values won't match.  So this patch just correctly builds
up a valid path in a platform-agnostic manner, and verifies that
it matches before and after the set.

llvm-svn: 226625
2015-01-21 00:40:27 +00:00
Greg Clayton 6746950645 Add missing case statement to quiet a compiler warning.
llvm-svn: 226617
2015-01-20 22:41:14 +00:00
Zachary Turner 0c426319f6 XFAIL pexpect tests on Windows.
At some point we will need to either provide a pexpect equivalent
on Windows, or provide some other method of doing out-of-process
tests.

Even with a pexpect replacement, it may be worth re-evaluating
some of these tests to see if they would be better served as
in-process tests.  The larger issue of coming up with a pexpect
replacement on Windows is tracked in http://llvm.org/pr22274.

llvm-svn: 226614
2015-01-20 22:36:03 +00:00
Greg Clayton e72ea04b4d Remove unused function:
lldb::pid_t
Host::LaunchApplication (const FileSpec &app_file_spec);

This had use of a function FSPathMakeRef(const UInt8*, FSRef *, ...) that was deprecated in 10.8. 

Removing this fucntion since it wasn't used and was causing warnings.

llvm-svn: 226608
2015-01-20 21:05:21 +00:00
Greg Clayton 87e36a7a08 Update the deployment target on MacOSX to be 10.8. The change is mainly to get the REG_ENHANCED stuff in regex.h and shouldn't affect other targets.
llvm-svn: 226607
2015-01-20 20:45:49 +00:00
Zachary Turner 2d53c31eb7 Don't remove backslashes from arguments unless the following char is recognized.
This fixes file paths on Windows, as you can now write, for example,
file d:\foo\bar.txt, but does not break the case that this tokenization
logic was originally designed for, which is to allow escaping of things
like quotes and double quotes, so that all of the escapable characters
can appear in the same string together.

Reviewed by: Jim Ingham, Greg Clayton
Differential Revision: http://reviews.llvm.org/D7018

llvm-svn: 226587
2015-01-20 17:53:36 +00:00
Ed Maste 135f6abd48 Fix help test cases after r226068
From: Ilia K <ki.stfu@gmail.com>
Differential Revision: http://reviews.llvm.org/D7066

llvm-svn: 226568
2015-01-20 15:13:01 +00:00
Jason Molenda 3bc66f1f47 Fix creation of StringRef in FileSpec::ResolveUsername()
so it doesn't assume that the SmallVector<char> will have
nul terminator.  It did not in at least one case.
Caught by ASAN instrumentation.

llvm-svn: 226544
2015-01-20 04:20:42 +00:00
Jason Molenda 65e0642d03 Don't mention a "--core-file" argument to target create. It is
"--core".

<rdar://problem/19518164> 

llvm-svn: 226543
2015-01-20 03:06:17 +00:00
Greg Clayton ee3626ec16 Added an Xcode target so we build the "lldb-mi" executable as part of the "desktop" and "desktop no xpc" targets.
Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff.

<rdar://problem/19198581> 

llvm-svn: 226530
2015-01-20 00:04:26 +00:00
Jim Ingham d5ac1ab65d Fix a race condition where you could set the selected thread & target in the
CommandInterpreter's execution context AFTER the process had started running
and before it initially stopped.  Also fixed one test case that was implicitly
using this (and an abuse of the async mode) to accidentally succeed.

<rdar://problem/16814726>

llvm-svn: 226528
2015-01-19 23:51:51 +00:00
Vince Harron db93444f26 Print out the full output of gtest
This patch fixes a bug that prevented all gtest output from being
displayed.

Submitted for Tamas Berghammer

llvm-svn: 226477
2015-01-19 18:18:24 +00:00
Vince Harron 81f0746cac Fixed Linux build error in gtest
llvm-svn: 226471
2015-01-19 17:31:22 +00:00
Chandler Carruth 215d939ada Update to reflect the API change to createMCSymbolizer in LLVM r226416.
This should fix the LLDB build since that change.

llvm-svn: 226427
2015-01-19 03:07:25 +00:00
Nico Weber 74e7fb9aae Try to fix the Windows build after r226362.
llvm-svn: 226372
2015-01-17 06:32:54 +00:00
Enrico Granata 5b8cacdb5f Commit fix for a static analyzer issue where a string pointer could theoretically be NULL..
llvm-svn: 226366
2015-01-17 02:46:20 +00:00
Vince Harron eb303ee5df Added Connection::GetURI()
This function returns a URI of the resource that the connection is connected to. This is especially important for connections established by accepting a connection from a remote host.

Also added implementations for ConnectionMachPort, ConnectionSharedMemory, 
Also fixed up some documentation in Connection::Write
Renamed ConnectionFileDescriptorPosix::SocketListen to ConnectionFileDescriptorPosix::SocketListenAndAccept
Fixed a log message in Socket.cpp

Differential Review: http://reviews.llvm.org/D7026

llvm-svn: 226362
2015-01-17 02:20:29 +00:00
Jason Molenda 35c998718c Add comments explaining the unwind setup in
ABIMacOSX_i386::CreateFunctionEntryUnwindPlan, 
ABIMacOSX_i386::CreateDefaultUnwindPlan,
ABISysV_x86_64::CreateFunctionEntryUnwindPlan,
ABISysV_x86_64::CreateDefaultUnwindPlan

llvm-svn: 226347
2015-01-16 23:54:15 +00:00
Enrico Granata 8bfb5544cf Several improvements to the shush script
llvm-svn: 226343
2015-01-16 23:16:22 +00:00
Vince Harron ded5ff6fce Compile fix for WIN32
llvm-svn: 226301
2015-01-16 19:07:30 +00:00
Enrico Granata baa15585ca Add a utility script that executes an inferior process tucking its output away somewhere safe, and not letting error messages escape
This has potential to be useful in build automation environments

llvm-svn: 226300
2015-01-16 18:59:54 +00:00
Greg Clayton ef5c9503e3 Take extra care to ensure we don't deref a NULL pointer.
llvm-svn: 226299
2015-01-16 18:59:48 +00:00
Vince Harron 76861ea8f7 minor refactoring to remove unneeded/unspecific header files
Differential review: http://reviews.llvm.org/D6919

llvm-svn: 226249
2015-01-16 06:47:43 +00:00
Jason Molenda bcc5785958 Fixes to DNBArchImpl in debugserver to correctly get/set
the register state when debugging AArch32 programs (armv7
programs running on an armv8 processor).  Most notably,
there is no "fpscr" register in the register context -
there is an fpsr and an fpcr.

Also fix a bug where the floating point values could not
be written in armv7 processes.
<rdar://problem/18977767> 

llvm-svn: 226244
2015-01-16 02:31:35 +00:00
Vince Harron 014bb7da79 Add Socket::Get[Remote/Local]IpAddress and unit tests
Differential Revision: http://reviews.llvm.org/D6917

llvm-svn: 226234
2015-01-16 00:47:08 +00:00
Nico Weber 0a3a7ccb3a Give lldb a clean null build.
`ninja lldb` used to always run "echo -n", which on OS X results in literally
echoing "-n" to the screen.  Just remove the command from add_custom_target,
then it only adds an alias and `ninja lldb` now reports "no work to do".

Other than that, no intended behavior change.

llvm-svn: 226233
2015-01-16 00:35:05 +00:00
Jason Molenda 3f194f7997 Add comment regarding which i386 registers are non-volatile instead of
just pointing to the standard document regarding this.

llvm-svn: 226231
2015-01-16 00:27:25 +00:00
Zachary Turner f194c50fc3 Some fixes for thread stepping on Windows.
This hooks up the changes necessary to set the trap flag on the
CPU and properly manage the process and thread's resume state
and private state so that the ThreadPlan does its thing.

Stepping still doesn't work as of this change, because there are
some issues with stack frames where it doesn't update the thread's
frame list correctly when it breaks inside of a function, but
I will try to fix that separately.

llvm-svn: 226221
2015-01-15 22:54:08 +00:00
Zachary Turner 8f3f7beac4 During source manager test, write back the file using binary mode.
On Windows, opening with "w" opens it as text instead of binary.
This causes translation of newline characters, so that "\n" turns
into "\r\n", which in turn leads to git detecting that the file
has changed and wanting to commit it.

llvm-svn: 226220
2015-01-15 22:53:44 +00:00
Greg Clayton d237ae4b2f Fixed the regex test case after recent modifications to the "help" command output.
<rdar://problem/18527567>

llvm-svn: 226218
2015-01-15 22:52:17 +00:00
Vince Harron e6c5dcf512 UriParser - fixed potential buffer overrun
Switched from ::strtoul to StringConvert::ToUInt32
Changed port output parameter to be -1 if port is unspecified

llvm-svn: 226204
2015-01-15 20:57:01 +00:00
Vince Harron 5275aaa0cc Moved Args::StringToXIntYZ to StringConvert::ToXIntYZ
The refactor was motivated by some comments that Greg made
http://reviews.llvm.org/D6918

and also to break a dependency cascade that caused functions linking
in string->int conversion functions to pull in most of lldb

llvm-svn: 226199
2015-01-15 20:08:35 +00:00
Nico Weber 92b25b9649 Fix a -Wnull-conversion warning.
llvm-svn: 226181
2015-01-15 17:55:24 +00:00
Nico Weber f37054fbde Fix build after clang r226128.
llvm-svn: 226180
2015-01-15 17:51:05 +00:00
Sylvestre Ledru a9a57804ea In commit clang r226096, DefinitionRequired has been removed. Do the same in lldb implementation
llvm-svn: 226162
2015-01-15 11:50:50 +00:00
Jim Ingham d919163a69 Fix a little thinko in r226017 - the code to actually add the demangled name to the Mangled object got
moved into the #else branch of the #if/#elif/#endif, so it wasn't getting done in the #if case anymore.

Keep the code to add the demangled name outside of the #if, and then just free the demangled_name
and set it back to NULL in the Windows case.

<rdar://problem/19479499>

llvm-svn: 226088
2015-01-15 03:34:31 +00:00
Greg Clayton f7bb1fba36 Don't crash when we can't find a block for some reason, just try and do the right thing and fail gracefully.
<rdar://problem/19196221>

llvm-svn: 226087
2015-01-15 03:13:44 +00:00
Greg Clayton 103f309504 Don't crash when we run into lexical block address range problems, just ignore the bad ranges and log an error message asking the user to file a bug.
<rdar://problem/19021931>

llvm-svn: 226085
2015-01-15 03:04:37 +00:00
Greg Clayton 2501e5e2ea Modified LLDB to be able to lookup global variables by address.
This is done by adding a "Variable *" to SymbolContext and allowing SymbolFile::ResolveSymbolContext() so if an address is resolved into a symbol context, we can include the global or static variable for that address.

This means you can now find global variables that are merged globals when doing a "image lookup --verbose --address 0x1230000". Previously we would resolve a symbol and show "_MergedGlobals123 + 1234". But now we can show the global variable name.

The eSymbolContextEverything purposely does not include the new eSymbolContextVariable in its lookup since stack frame code does many lookups and we don't want it triggering the global variable lookups.

<rdar://problem/18945678> 

llvm-svn: 226084
2015-01-15 02:59:20 +00:00
Ed Maste 19c55b5d12 Fix build after r226068: cannot initialize 'int' with 'nullptr_t'
llvm-svn: 226076
2015-01-15 02:07:28 +00:00
Jim Ingham d762df8c24 Make sure that when a breakpoint is hit but its condition is not met,
the hit count is not updated.
Also, keep the hit count for the breakpoint in the breakpoint.  We were
using just the sum of the location's hit counts, but that was wrong since if a shared library is
unloaded, and the location goes away, the breakpoint hit count should not suddenly drop
by the number of hits there were on that location.

llvm-svn: 226074
2015-01-15 01:41:04 +00:00
Kate Stone a487aa4cdb Three related changes to help:
The default help display now shows the alias collection by default, and hides commands whose named begin with an underscore.  Help is primarily useful to those unfamiliar with LLDB and should aim to answer typical questions while still being able to provide more esoteric answers when required.  To that latter end an argument to include the hidden commands in help has been added, and instead of having a help flag to show aliases there is now one to hide them.  This final change might be controversial as it repurposes the -a shorthand as the opposite of its original meaning.

The previous implementation of OutputFormattedHelpText was easily confused by embedded newlines.  The new algorithm correctly breaks on the FIRST newline or LAST space/tab before the target column count rather than treating all whitespace interchangeably.

Command interpreters now have the ability to specify help prologue text and a command prefix string.  Neither are used in the current LLDB sources but are required to support REPL-like extensions where LLDB commands must be prefixed and additional help text is required to explain how to access traditional debugging commands.

<rdar://problem/17751929>
<rdar://problem/16953815>
<rdar://problem/16953841>
<rdar://problem/16930173>
<rdar://problem/16879028>

llvm-svn: 226068
2015-01-15 00:52:41 +00:00
Enrico Granata 02d87608c1 Reenable the logic to take an integer value and attempt to "po" it as an ObjC object
While there is quite a bit of potential for mishaps due to tagged pointers, and after quite some internal discussion, this seems a saner behavior given how "po" stands for "print OBJECT". The argument being that we should make at least some sensible attempt to print the thing the user passed as-if it was an object

Fixes rdar://19423124

llvm-svn: 226062
2015-01-14 23:58:18 +00:00
Zachary Turner d46476b52a Only set the StopInfo on Windows if the stop is valid for this thread.
llvm-svn: 226054
2015-01-14 22:58:19 +00:00
Zachary Turner 4f1a39584e Don't try to link libpthread on Windows.
llvm-svn: 226053
2015-01-14 22:58:09 +00:00
Zachary Turner 12947b7e25 Fix a number of tests on Windows.
These fix various issues with path handling and disable a few tests
which use features of LLVM which are not yet supported on Windows.

llvm-svn: 226042
2015-01-14 21:42:53 +00:00
Greg Clayton 6e7ab02cff Specify ObjC++ when running heap commands in case we are stopped in a frame with another language.
This ensures the expression gets runs with the correct language.

<rdar://problem/18816647>

llvm-svn: 226041
2015-01-14 21:37:19 +00:00
Vince Harron 4d2857321d Fixes compilation/run error with BUILD_SHARED_LIBS=TRUE
BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64
This patch fixes the link errors and also some runtime errors

Test Plan:
CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm
ninja
ninja check-lldb

llvm-svn: 226039
2015-01-14 21:01:15 +00:00
Ed Maste 55f74e829b test: Add workaround for FreeBSD libedit vs readline issue
If stdout is not a terminal Python executes
    rl_variable_bind ("enable-meta-key", "off");

This produces a warning with FreeBSD's libedit because the
enable-meta-key variable is unknown.  Not an issue on Apple because
cpython commit f0ab6f9f0603 added a #ifndef __APPLE__ around the call.
See http://bugs.python.org/issue19884 for more information.

For now we just discard the warning output to get the tests working
again on FreeBSD.

llvm-svn: 226037
2015-01-14 20:32:33 +00:00
Greg Clayton 456f2712b3 Typing "gui" will crash programs that don't give LLDB a real terminal.
We now verify that the debugger's input file is a valid terminal file descriptor before allowing the "gui" command to try to run. 

Xcode would crash if you typed "gui" at the command line prior to this fix.

<rdar://problem/18775851>

llvm-svn: 226027
2015-01-14 19:45:21 +00:00
Zachary Turner a45fa2ccaa Implement demangling on Windows.
llvm-svn: 226017
2015-01-14 18:34:43 +00:00
Zachary Turner e2dcbd001c Add null pointer checks to some SBStream functions.
llvm-svn: 226016
2015-01-14 18:34:35 +00:00
Oleksiy Vyalov 4771829225 Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes.
http://reviews.llvm.org/D6954

llvm-svn: 225923
2015-01-14 01:31:27 +00:00
Jason Molenda bed7f07080 Save & restore the array of which registers have already been
saved/restored across a mid-function epilogue.  We ignore 
repeated push/pops of a register so once we saw one 'pop %rbp',
we'd ignore it the second time we saw it.
<rdar://problem/19417410>

llvm-svn: 225853
2015-01-13 23:48:53 +00:00
Oleksiy Vyalov d5f8b6a6ca Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver.
http://reviews.llvm.org/D6954

llvm-svn: 225849
2015-01-13 23:19:40 +00:00
Greg Clayton 332e8b1cd4 Fixed an issue where if the operating system python plug-in is changed at runtime, it wouldn't cause the process to reload the new operating system plug-in, now it does.
This is currently controlled by a setting:

(lldb) settings set target.process.python-os-plugin-path <path>

Or clearing it with:

(lldb) settings clear target.process.python-os-plugin-path 

The process will now reload the OperatingSystem plug-in.

This was implemented by:
- adding the ability to set a notify callback for when an option value is changed
- added the ability for the process plug-in to load the operating system plug-in on the fly
- fixed bugs in the Process::GetStatus() so all threads are displayed if their thread IDs are larger than 32 bits
- adding a callback in ProcessProperties to tell when the "python-os-plugin-path" is changed by the user
- fixing a crasher in ProcessMachCore that happens when updating the thread list when the OS plugin is reloaded

llvm-svn: 225831
2015-01-13 21:13:08 +00:00
Jason Molenda 26cc634dbf Enhance the eh_frame unwind instruction augmenter so that
it will do the right thing on x86 routines with a mid-function
epilogue sequence (where the unwind rules need to be reinstalled
after the epilogue has completed).
<rdar://problem/19417410> 

llvm-svn: 225773
2015-01-13 07:39:03 +00:00
Jason Molenda 91805e6f56 Add an additional check to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite
which will verify if the eh_frame instructions include details about
the prologue or not.  Both clang and gcc include prologue instructions
but there's no requirement for them to do so -- and I'm sure we'll
have to interoperate with a compiler that doesn't generate prologue
info at some point.

I don't have any compilers that omit the prologue instructions so the
testing was of the "makre sure augmented unwind info is still created".
With an eh_frame without prologue, this code should reject the 
augmentation scheme altogether and we should fall back to using assembly
instruction profiling.

llvm-svn: 225771
2015-01-13 06:07:07 +00:00
Jason Molenda 34549b8f75 Change the x86 assembly instruction unwind parser to
step through the complete function looking for any epilogue
instructions.  If we find an epilogue sequence, re-instate
the correct unwind instructions if there is more code past
that epilogue -- this will correctly handle an x86 function
with multiple epilogues in it.

NB there is still a bug with the "eh_frame augmented" 
UnwindPlans and mid-function epilogues.  Looking at that next.

<rdar://problem/18863406> 

llvm-svn: 225770
2015-01-13 06:04:04 +00:00