Commit Graph

115 Commits

Author SHA1 Message Date
Jason Molenda f62080451c The x86 instruction unwinder can be asked to disassemble non-instruction
blocks of memory, and if the final bytes of that block look like a long
x86 instruction, it can cause the llvm disassembler to read past the end
of the buffer.  Use the maximum allowed instruction length that we pass
to the llvm disassembler as a way to limit this to the size of the buffer.

An example of how to trigger this is when lldb does a function call, it
puts a breakpoint on the beginning of main() and uses that as the return
address from the function call.  When we stop at that location, lldb may
try to find the first frame up the stack.  Because this is on the first
instruction of a function, it will get the word-size value at the stack
pointer and assume that this was the caller's pc value.  But this is random
stack memory and could point to anything - an object in memory, something
in the data section, whatever.  And if we have a symbol for that thing,
we'll try to disassemble it.

This was leading to infrequent crashes in customer scenarios; figured out
what was happening with address sanitizer.

<rdar://problem/30463256> 

llvm-svn: 307454
2017-07-08 00:12:15 +00:00
Pavel Labath 8996346bba [UnwindAssembly/x86] Add support for "lea imm(%ebp), %esp" pattern
Summary:
The instruction pattern:
and $-16, %esp
sub $imm, %esp
...
lea imm(%ebp), %esp

appears when the compiler is realigning the stack (for example in
main(), or almost everywhere with -mstackrealign switch). The "and"
instruction is very difficult to model, but that's not necessary, as
these frames are always %ebp-based (the compiler also needs a way to
restore the original %esp). Therefore the plans we were generating for
these function were almost correct already. The only place we were doing
it wrong were the last instructions of the epilogue (usually just
"ret"), where we had to revert to %esp-based unwinding, as the %ebp had
been popped already.

This was wrong because our "distance of esp from cfa" counter had picked
up the "sub" instruction (and incremented the counter) but it had not
seen that the register was reset by the "lea" instruction.

This patch fixes that shortcoming, and adds a test for handling
functions like this.

I have not been able to tickle the compiler into producing a 64-bit
function with this pattern, but I don't see a reason why it couldn't
produce it, if it chose to, so I add a x86_64 test as well.

Reviewers: jasonmolenda, tberghammer

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D34750

llvm-svn: 306666
2017-06-29 12:40:13 +00:00
Zachary Turner 97206d5727 Rename Error -> Status.
This renames the LLDB error class to Status, as discussed
on the lldb-dev mailing list.

A change of this magnitude cannot easily be done without
find and replace, but that has potential to catch unwanted
occurrences of common strings such as "Error".  Every effort
was made to find all the obvious things such as the word "Error"
appearing in a string, etc, but it's possible there are still
some lingering occurences left around.  Hopefully nothing too
serious.

llvm-svn: 302872
2017-05-12 04:51:55 +00:00
Michal Gorny c4e42d2c66 PluginUnwindAssemblyX86: add missing linkage to MCDisasm
Add missing linkage of the lldbPluginUnwindAssemblyX86 to LLVMMCDisasm
library. This fixes the following build failure when linking against
shared libraries:

    lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::instruction_length(unsigned char*, int&): error: undefined reference to 'LLVMDisasmInstruction'
    lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::~x86AssemblyInspectionEngine(): error: undefined reference to 'LLVMDisasmDispose'
    lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::x86AssemblyInspectionEngine(lldb_private::ArchSpec const&): error: undefined reference to 'LLVMCreateDisasm'

Differential Revision: https://reviews.llvm.org/D31369

llvm-svn: 298777
2017-03-25 18:51:37 +00:00
Zachary Turner 666cc0b291 Move DataBuffer / DataExtractor and friends from Core -> Utility.
llvm-svn: 296943
2017-03-04 01:30:05 +00:00
Zachary Turner 29cb868aa4 Isolate Target-specific functionality of DataExtractor.
In an effort to move the various DataBuffer / DataExtractor
classes from Core -> Utility, we have to separate the low-level
functionality from the higher level functionality.  Only a
few functions required anything other than reading/writing
raw bytes, so those functions are separated out into a
more appropriate area.  Specifically, Dump() and DumpHexBytes()
are moved into free functions in Core/DumpDataExtractor.cpp,
and GetGNUEHPointer is moved into a static function in the
only file that it's referenced from.

Differential Revision: https://reviews.llvm.org/D30560

llvm-svn: 296910
2017-03-03 20:57:05 +00:00
Zachary Turner 6f9e690199 Move Log from Core -> Utility.
All references to Host and Core have been removed, so this
class can now safely be lowered into Utility.

Differential Revision: https://reviews.llvm.org/D30559

llvm-svn: 296909
2017-03-03 20:56:28 +00:00
Jason Molenda b8ebcb5197 x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite could access
the byte past the end of the buffer it had been given.  ASAN catch.
<rdar://problem/30774863> 

llvm-svn: 296733
2017-03-02 05:08:10 +00:00
Zachary Turner 01c3243fc1 Remove dependencies from Utility to Core and Target.
With this patch, the only dependency left is from Utility
to Host.  After this is broken, Utility will finally be
standalone.

Differential Revision: https://reviews.llvm.org/D29909

llvm-svn: 295088
2017-02-14 19:06:07 +00:00
Chris Bieneman 8c31ea917a Fix another build issue with shared libraries on Linux
In r294767, I added these dependencies in the wrong place.

llvm-svn: 294768
2017-02-10 18:39:26 +00:00
Chris Bieneman ba170c2ad8 Fix another build issue with shared libraries on Linux
llvm-svn: 294767
2017-02-10 18:37:02 +00:00
Chris Bieneman 8909b6804c Fix build issue with shared libraries reported via email
llvm-svn: 294763
2017-02-10 17:47:55 +00:00
Ismail Donmez 75dcfe8449 Revert r294580 , it didn't fix the shared build
llvm-svn: 294583
2017-02-09 12:30:09 +00:00
Ismail Donmez 4200948c5a Fix shared library build
llvm-svn: 294580
2017-02-09 10:59:33 +00:00
Zachary Turner bf9a77305f Move classes from Core -> Utility.
This moves the following classes from Core -> Utility.

ConstString
Error
RegularExpression
Stream
StreamString

The goal here is to get lldbUtility into a state where it has
no dependendencies except on itself and LLVM, so it can be the
starting point at which to start untangling LLDB's dependencies.
These are all low level and very widely used classes, and
previously lldbUtility had dependencies up to lldbCore in order
to use these classes.  So moving then down to lldbUtility makes
sense from both the short term and long term perspective in
solving this problem.

Differential Revision: https://reviews.llvm.org/D29427

llvm-svn: 293941
2017-02-02 21:39:50 +00:00
Chris Bieneman 3173c964da [CMake] [4/4] Update a batch of plugins
This is extending the updates from r293696 to more LLDB plugins.

llvm-svn: 293701
2017-01-31 22:31:38 +00:00
David Blaikie a322f36cfd Make lldb -Werror clean for -Wstring-conversion
Also found/fixed one bug identified by this warning in
RenderScriptx86ABIFixups.cpp where a string literal was being used in an
effort to provide a name for an instruction/register, but was instead
being passed as the bool 'isVolatile' parameter.

llvm-svn: 291198
2017-01-06 00:38:06 +00:00
Zachary Turner c156427ded Don't allow direct access to StreamString's internal buffer.
This is a large API change that removes the two functions from
StreamString that return a std::string& and a const std::string&,
and instead provide one function which returns a StringRef.

Direct access to the underlying buffer violates the concept of
a "stream" which is intended to provide forward only access,
and makes porting to llvm::raw_ostream more difficult in the
future.

Differential Revision: https://reviews.llvm.org/D26698

llvm-svn: 287152
2016-11-16 21:15:24 +00:00
Jason Molenda 6853cca1c9 Add a first unit test for the arm64 instruction profiled unwind
plan generator.

Fix a small bug in EmulateInstructionARM64::GetFramePointerRegister
which was returning the stack pointer reg instead of fp, prevented
the unwinder from recognizing the switch to using the fp in a
function. (<rdar://problem/28663117>)

Add a new eContextRestoreStackPointer context hint so that the arm64
emulator can flag when the frame pointer value is copied back in to
the stack pointer and that should be used to compute the canonical
frame address again in an epilogue sequence.  (<rdar://problem/28704862>)

Small changes to UnwindAssemblyInstEmulation to have a method we can
call without a live process/thread/etc for unit tests.

<rdar://problem/28663117> 
<rdar://problem/28704862> 
<rdar://problem/28509178> 

llvm-svn: 283847
2016-10-11 02:24:00 +00:00
Jason Molenda 2630acc0c5 Finish adding the individual instruction tests to the x86 unwinder
unittests.  If I have time, I'd like to see if I can write some
tests of the eh_frame augmentation which is a wholly separate code
path (it seems like maybe it should be rolled into the main instruction
scanning codepath, to be honest, and operate on the generated
UnwindPlan instead of bothering with raw instructions at all).  

Outside the eh_frame augmentation, I'm comfortable that this unwind
generator is being tested well now.

llvm-svn: 283186
2016-10-04 05:10:06 +00:00
Jason Molenda c0657a6ceb Add support for some extended push instructions in i386/x86_64 like
'push 0x20(%esp)' which clang can generate when emitting
-fomit-frame-pointer code for 32-bit.

Add a unit test program which includes this instruction.

Also fix a bug in the refactoring/rewrite of the x86 assembly
instruction profiler where I'd hard coded it as a 64-bit disassembler
instead of using the ArchSpec to pick a 32-bit or 64-bit disassembler
from llvm.  When the disassembler would hit an instruction
that is invalid in 64-bit mode, it would stop disassembling the function.
This likely led to the TestSBData testsuite failure on linux with 32-bit
i386 and gcc-4.9; I'll test that in a bit.

The newly added unit test program is 32-bit i386 code and it includes
an instruction which is invalid in 64-bit mode so it will catch this.

<rdar://problem/28557876> 

llvm-svn: 282991
2016-10-01 00:19:26 +00:00
Jason Molenda 74b8fbcba7 Re-commit the changes from r282565 that I had to back out because of
a linux bot test failure.  That one is fixed; hopefully there won't
be any others turned up this time.

The eh_frame augmentation code wasn't working right after the 
reorg/rewrite of the classes.  It works correctly now for the one
test that was failing - but we'll see what the test bots come up
with. 

<rdar://problem/28509178> 

llvm-svn: 282659
2016-09-29 01:00:16 +00:00
Jason Molenda 536ff0dd2f Reverting r282565.
A testbot found a regression introduced in the testsuite with
the changes in r282565 on Ubuntu (TestStepNoDebug.ReturnValueTestCase).
I'll get this set up on an ubuntu box and figure out what is happening
there -- likely a problem with the eh_frame augmentation, which isn't
used on macosx.

llvm-svn: 282566
2016-09-28 03:16:14 +00:00
Jason Molenda 1c9858b298 Refactor the x86 UnwindAssembly class into a separate class called
x86AssemblyInspectionEngine and the current UnwindAssembly_x86 to
allow for the core engine to be exercised by unit tests.

The UnwindAssembly_x86 class will have access to Targets, Processes,
Threads, RegisterContexts -- it will be working in the full lldb
environment.

x86AssemblyInspectionEngine is layered away from all of that, it is
given some register definitions and a bag of bytes to profile.

I wrote an initial unittest for a do-nothing simple x86_64/i386
function to start with.  I'll be adding more.

The x86 assembly unwinder was added to lldb early in its bringup;
I made some modernization changes as I was refactoring the code
to make it more consistent with how we write lldb today.

I also added RegisterContextMinidump_x86_64.cpp to the xcode project
file so I can run the unittests from that.

The testsuite passes with this change, but there was quite a bit of
code change by the refactoring and it's possible there are some 
issues.  I'll be testing this more in the coming days, but it looks
like it is behaving correctly as far as I can tell with automated
testing.

<rdar://problem/28509178> 

llvm-svn: 282565
2016-09-28 02:52:19 +00:00
Kate Stone b9c1b51e45 *** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
2016-09-06 20:57:50 +00:00
Greg Clayton 32c940de37 Now that there are no cycles that cause leaks in the disassembler/instruction classes, we can get rid of the FIXME lines that were working around this issue.
<rdar://problem/26684190>

llvm-svn: 272071
2016-06-07 23:19:00 +00:00
Tamas Berghammer 73bcca5b3d Stack unwinding emulation: handle adjustment of FP
This change is improving the instruction emulation based unwinding to
handle when the frame pointer is adjusted (increment/decrement) after
it has been initialized. The situation can occur in the prologue of
some function where FP is adjusted before it is copied back to SP.

Example code (thumb, generated by gcc 4.8):
< +0>: push  {r4, r7, lr}
< +2>: sub   sp, #0x14
< +4>: add   r7, sp, #0x0
...
<+50>: adds  r7, #0x14 ; The CL fixes the handling of this instruction
<+52>: mov   sp, r7    ; Previously unwinding from here was broken
<+54>: pop   {r4, r7, pc}

Differential revision: http://reviews.llvm.org/D17295

llvm-svn: 261318
2016-02-19 10:59:25 +00:00
Tamas Berghammer 10e9923841 Fix handling of the arm IT instruction in the unwinder
The IT instruction can specify condition code for up to 4 consecutive
instruction and it is used quite often by clang in epilogues causing
an issue when trying to unwind from locations covered by the IT
instruction and for locatins inmediately after the IT instruction.

Changes made to fix it:
* Introduce the concept of conditional instruction block what is a list
  of consecutive instructions with the same condition. We update the
  unwind information during the conditional instruction block and when
  we reach the end of it (first instruction with a differemt condition)
  then we restore the unwind information we had before the condition.
* Fix a bug in the ARM instruction emulator where neither PC nor the
  ITSTATE was advanced when we reached an instruction what we can't
  decode.

After the change we have no regression on android-arm running the
regular test suit and TestStandardUnwind also passes when running it
with clang as the compiler (previously it failed on an IT instruction).

Differential revision: http://reviews.llvm.org/D16814

llvm-svn: 260368
2016-02-10 10:42:13 +00:00
Eugene Zelenko c33088f41e Remove autoconf support from source directories.
Differential revision: http://reviews.llvm.org/D16662

llvm-svn: 259098
2016-01-28 22:05:24 +00:00
Jason Molenda dae3c57189 Add support for the LEAVE x86 instruction to AssemblyParse_x86.
llvm-svn: 257209
2016-01-08 21:13:26 +00:00
Eugene Zelenko ab7f6d04db Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13951

llvm-svn: 250925
2015-10-21 18:46:17 +00:00
Saleem Abdulrasool 8b8d2a4d99 Silence some -Wunused-but-set-variable with gcc 5.2.0
Cleanup some unused variables.  NFC.

llvm-svn: 250661
2015-10-18 19:34:31 +00:00
Bruce Mitchener db25a7a245 [cmake] Remove LLVM_NO_RTTI.
Summary:
This doesn't exist in other LLVM projects any longer and doesn't
do anything.

Reviewers: chaoren, labath

Subscribers: emaste, tberghammer, lldb-commits, danalbert

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

llvm-svn: 246749
2015-09-03 08:46:55 +00:00
Tamas Berghammer f5d3e66bf5 Fix assertion failure caused by r245546
Change the way EmulateInstruction::eContextPopRegisterOffStack handled
in UnwindAssemblyInstEmulation::WriteRegister to accomodate for
additional cases when eContextPopRegisterOffStack (pop PC/FLAGS).

llvm-svn: 245690
2015-08-21 10:49:09 +00:00
Tamas Berghammer 99c40e673a Improve instruction emulation based stack unwinding
On ARM there is no difference petween a pop and a load instruction so
a register can be loaded multiple times during the function. Add check
to threat the load as a restore only if it do the restore from the
same location where the register was saved.

Differential revision: http://reviews.llvm.org/D11947

llvm-svn: 245546
2015-08-20 09:09:01 +00:00
Tamas Berghammer 022622f1d4 Improve conditional opcode handling in emulation based unwinding
Don't chane the CFI information when a conditional instruction
is emulated (eg.: popeq {r0, pc}) because the CFI for the next
instruction should be the same as the CFI for the current instruction.

Differential revision: http://reviews.llvm.org/D11258

llvm-svn: 242519
2015-07-17 11:44:14 +00:00
Keno Fischer 2069de9813 [Makefiles] Align library names with CMake build
Summary: This aligns the library names used by the Makefile build to be the same as those create by the CMake build to make switching between the two easier. The only major difficulty was lldbHost which was one library in the CMake system and several in the Makefile system. Most of the other changes are trivial renames.

Reviewers: labath

Subscribers: emaste, tberghammer, lldb-commits

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

llvm-svn: 242196
2015-07-14 20:25:19 +00:00
Tamas Berghammer f366af309a Ignore "push/pop {sp}" in emulation based unwinding
These instructions confusing the unwind code because in case of a
push it assumes that the original valu of a register is pushed to
the stack what is not neccessarily true in case of SP. The same is
true for the pop (in the opposite way).

Differential revision: http://reviews.llvm.org/D10806

llvm-svn: 241051
2015-06-30 09:35:46 +00:00
Tamas Berghammer 67ec5458a7 Add branch emulation to aarch64 instruction emulator
The emulation of the branches are required by the new stack
unwinding logic to reinstantiate the prologue at the right place.

Differential revision: http://reviews.llvm.org/D10702

llvm-svn: 240769
2015-06-26 09:41:32 +00:00
Tamas Berghammer 44ff9ccede Improve instruction emulation based stack unwinding on ARM
* Add and fix the emulation of several instruction.
* Disable frame pointer usage on Android.
* Specify return address register for the unwind plan instead of explict
  tracking the value of RA.
* Replace prologue detection heuristics (unreliable in several cases)
  with a logic to follow the branch instructions and restore the CFI
  value based on them. The target address for a branch should have the
  same CFI as the source address (if they are in the same function).
* Handle symbols in ELF files where the symbol size is not specified
  with calcualting their size based on the next symbol (already done
  in MachO files).
* Fix architecture in FuncUnwinders with filling up the inforamtion
  missing from the object file with the architecture of the target.
* Add code to read register wehn the value is set to "IsSame" as it
  meanse the value of a register in the parent frame is the same as the
  value in the current frame.

Differential revision: http://reviews.llvm.org/D10447

llvm-svn: 240533
2015-06-24 11:27:32 +00:00
Tamas Berghammer 86e7018e79 Add support for 'leal' instruction to UnwindAssembly-x86
Gcc for android use the leal instruction to substract from the stack
pointer in the prologue of a function call. This patch add basic support
for evaluating this instruction to support stack unwinding on
android-x86.

Differential revision: http://reviews.llvm.org/D8583

llvm-svn: 233178
2015-03-25 10:46:45 +00:00
Bhushan D. Attarde 29e5937cd9 Initial Assembly profiler for mips64
Summary:
This is initial implementation of assembly profiler which only scans prologue/epilogue assembly instructions to create CFI instructions.

Reviewers: clayborg, jasonmolenda

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

llvm-svn: 232619
2015-03-18 09:21:29 +00:00
Zachary Turner af0f45f1c9 Don't #include ClangPersistentVariables.h from Process.h
Nothing from this header file was even being referenced in
Process.h anyway, so it was a completely unnecessary include.

llvm-svn: 231131
2015-03-03 21:05:17 +00:00
Zachary Turner 32abc6edac Reduce header footprint of Target.h
This continues the effort to reduce header footprint and improve
build speed by removing clang and other unnecessary headers
from Target.h.  In one case, some headers were included solely
for the purpose of declaring a nested class in Target, which was
not needed by anybody outside the class.  In this case the
definition and implementation of the nested class were isolated
in the .cpp file so the header could be removed.

llvm-svn: 231107
2015-03-03 19:23:09 +00:00
Pavel Labath ab970f5e08 UnwindPlan::Row refactor -- add support for CFA set by a DWARF expression
Summary:
This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set
by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new
class CFAValue and moving all CFA setting/getting code there. Note that code using the new
CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore,
this patch should not change the functionality in any way.

Test Plan: Ran tests on Mac and Linux. No regressions detected.

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits

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

llvm-svn: 230210
2015-02-23 10:19:16 +00:00
Jason Molenda c980fa92eb Change the default disassembly format again. First attempt at
changing it was in r219544 - after living on that for a few 
months, I wanted to take another crack at this.

The disassembly-format setting still exists and the old format
can be user specified with a setting like

${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: 

This patch was discussed in http://reviews.llvm.org/D7578

<rdar://problem/19726421>

llvm-svn: 229186
2015-02-13 23:24:21 +00:00
Chandler Carruth d066d3a7b4 Fix the last two warnings I see on Linx building 'lldb': mismatched
signed and unsigned types in comparisons.

For the text offset, use the addr_t type that is used elsewhere to get
these kinds of offsets, and which it is being compared against. This
seems to make things more consistent.

For the other, the numbers are clearly small and uninteresting, so just
cast them to the most boring 'int' type.

llvm-svn: 229085
2015-02-13 08:16:15 +00:00
Greg Clayton 554f68d385 Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity class.
Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. 

The new code improves on this with the following features:
1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry.
2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format
3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it.
4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly
5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings
6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features.
7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries.

These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more).

llvm-svn: 228207
2015-02-04 22:00:53 +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
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