Commit Graph

9798 Commits

Author SHA1 Message Date
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