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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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