Crash every time with new target logging is now fixed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169394 91177308-0d34-0410-b5e6-96231b3b80d8
Backed out part of the ABI changes that were checked in because it breaks the i386 test suite as it makes backtraces for the first instruction of a function fail. Stepping relies on backtraces being correct, so I am reverting what is causing the breakage.

I filed this to track the fix:

<rdar://problem/12817918> Recent i386 ABI changes break the i386 test suite because stack backtracing is busted when stopped in trampolines




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169409 91177308-0d34-0410-b5e6-96231b3b80d8
Define isprint8() wrapper around isprint() in order to avoid crashes on Linux



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169417 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12749733>

Always allows getting builtin types by name even if there is no backing debug information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169424 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12560257>

Fixed arrays with a size of 1 to correctly have 1 member when DW_AT_upper_bound was set to zero and no other attributes were set.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169431 91177308-0d34-0410-b5e6-96231b3b80d8
Adding missing log->Printf instead of printf in Target::SetArchitecture
for target logging.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169444 91177308-0d34-0410-b5e6-96231b3b80d8
Rewrote the bitfield logic.  Major changes include:

- Removed the BitfieldMap class because it is unnecessary.
  We now just track the most recently added field.

- Moved the code that calculates bitfield widths so it
  can also be used to determine whether it's necessary
  to insert anonymous fields.

- Simplified the anonymous field calculation code into
  three cases (two of which are resolved identically).

- Beefed up the bitfield testcase.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169449 91177308-0d34-0410-b5e6-96231b3b80d8
Move isprint8() into lldb_private as per post-commit review from Stefanus



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169454 91177308-0d34-0410-b5e6-96231b3b80d8
The expression parser will now check the validity
of the "self"/"this" pointer for the current stack
frame before wrapping expressions in C++ or
Objective-C methods.  This works around bad debug
info where the compiler emits a "this" or "self"
but doesn't give any way to find its location.

<rdar://problem/12809985>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169461 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12560257>

Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169465 91177308-0d34-0410-b5e6-96231b3b80d8
Fix ABIMacOSX_i386::RegisterIsVolatile to return the negated value of 
RegisterIsCalleeSaved.  Add ebp back to the list of registers that
are callee saved.
<rdar://problem/12817918> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169466 91177308-0d34-0410-b5e6-96231b3b80d8
Merge rename fix from libcxxabi (r169402: rename class with name that clashes with GCC 4.6/4.7) 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169515 91177308-0d34-0410-b5e6-96231b3b80d8
Mark the "dwarf" version of the test expected fail as well as the dsym version.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169549 91177308-0d34-0410-b5e6-96231b3b80d8
Add examples of how to set env vars for the inferior process from lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169552 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12820334>

I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like:

memory read <addr> [<end-addr>]
memory write <addr>
breakpoint set --address <addr>
disassemble --start-address <addr> --end-address <addr>

It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169556 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12827789>

Be sure to load dSYM files when the object file is in memory only.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169560 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/8908550>

Added "--address" as an available option for "source list".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169567 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/12831670>
When using the same-device optimization for shared cache libraries, if
we have an invalid load address for __LINKEDIT, don't try to read
anything out of lldb's own address space.  Reading it out of the remote
address space will fail gracefully if we have bad addresses but reading
it out of lldb's own address space will result in a crash.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169582 91177308-0d34-0410-b5e6-96231b3b80d8
Take the Target API lock before letting the Python code start to work constructing threads, otherwise we will risk a lock-inversion deadlock between the thread list and the API mutex.

<rdar://problem/12554049>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169612 91177308-0d34-0410-b5e6-96231b3b80d8
Separate initing the stdout/stderr for running the Python Script interpreter from initing the lldb.target/frame/etc globals,
and only do the latter when it makes sense to.

<rdar://problem/12554049>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169614 91177308-0d34-0410-b5e6-96231b3b80d8