Commit Graph

5936 Commits

Author SHA1 Message Date
Sean Callanan 811209be11 Fixed a crash in which we examined the extension of
a file name, whether the file name had an extension
or not.

<rdar://problem/12793152>

llvm-svn: 169156
2012-12-03 21:28:37 +00:00
Greg Clayton f74c4034dd Fix clang build issues.
llvm-svn: 169140
2012-12-03 18:29:55 +00:00
Greg Clayton 2ed1c0922c <rdar://problem/12742973>
Forwarding a fix for a crasher in the demangler.

llvm-svn: 169136
2012-12-03 17:50:07 +00:00
Jason Molenda 65d57a3d2a Don't re-add kexts and the kernel each time we get a notification
that kexts were newly added.

The Darwin userland dynamic loader provides lldb with a list of 
newly-added or newly-removed binaries but in the kernel case we
only know that something has changed.  DynamicLoaderDarwinKernel
really needs to maintain its own persistent list of kexts that 
it has been notified about (most importantly, it will not detect
kext unlods) but for now we'll at least avoid re-adding an already
present kext.

<rdar://problem/12658487>, <rdar://problem/12658487> 

llvm-svn: 169082
2012-12-01 06:13:29 +00:00
Jason Molenda 420f81dc5d Bump lldb version num to lldb-178, debugserver version to debugserver-198.
llvm-svn: 169081
2012-12-01 04:50:09 +00:00
Jason Molenda dabdcc040d Read full 64 bits of kernel address when locating a
64-bit kernel in ProcessGDBRemote.
<rdar://problem/12657369>

llvm-svn: 169080
2012-12-01 04:46:58 +00:00
Sean Callanan 2abffe0530 Added support for PtrToInt to the IR
interpreter.

<rdar://problem/12657742>

llvm-svn: 169063
2012-12-01 00:09:34 +00:00
Sean Callanan 70385081c9 Added logging to the code that determines
whether the current frame is in a C++/Objective-C
class or instance method.

llvm-svn: 169062
2012-12-01 00:08:33 +00:00
Jim Ingham c5917d9a38 Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.

llvm-svn: 169032
2012-11-30 20:23:19 +00:00
Enrico Granata 69ea91b402 <rdar://problem/12676084> Dump the traceback when a Python error occurs in "command script import" and the exception is not an ImportError
llvm-svn: 169031
2012-11-30 20:15:16 +00:00
Greg Clayton 1c5f186f30 Added new options to "target create" and "target modules add".
For "target create" you can now specify "--no-dependents" to not track down and add all dependent shared libraries. This can be handy when doing manual symbolication. Also added the "--symfile" or "-s" for short so you can specify a module and a stand alone debug info file:

(lldb) target create --symfile /tmp/a.dSYM /usr/bin/a

Added the "--symfile" option to the "target modules add" for the same reason. These all help with manualy symbolication and expose functionality that was previously only available through the public API layer.

llvm-svn: 169023
2012-11-30 19:05:35 +00:00
Greg Clayton 50a24bd358 <rdar://problem/12687087>
Emit an error when using "target modules add PATH" where PATH points to a debug info only (dSYM) file.

Also added a "--uuid" option for "target modules add --uuid UUID" to locate and load a module by UUID if the host supports it.

llvm-svn: 168949
2012-11-29 22:16:27 +00:00
Han Ming Ong 929a94f026 <rdar://problem/12780259>
Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.

llvm-svn: 168948
2012-11-29 22:14:45 +00:00
Daniel Malea d01b2953fa Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!

llvm-svn: 168945
2012-11-29 21:49:15 +00:00
Greg Clayton e1e835c626 <rdar://problem/12655594>
Be sure to resolve the file path for the "target.process.python-os-plugin-path" setting.

llvm-svn: 168916
2012-11-29 18:48:47 +00:00
Greg Clayton 1eb0edcd97 <rdar://problem/12635804>
Add new rpath for LLDB: ../../Library/PrivateFrameworks

Also moved the debugserver plists into the Resources group.

llvm-svn: 168915
2012-11-29 18:40:38 +00:00
Daniel Malea c9449ad631 Match extern "C" in declaration and definition (swig template)
- Fix for building with gcc 4.6

llvm-svn: 168901
2012-11-29 16:38:44 +00:00
Greg Clayton 75a0333bf8 <rdar://problem/12445557>
Make stack frames fix up their line table entries when the target has source remappings. Also rearranged how the m_sc.target_sp was filled in so it can be used during the StackFrame::GetSymbolContext(...) function.

llvm-svn: 168845
2012-11-29 00:53:06 +00:00
Sean Callanan ea09a44ceb Don't return decorated (i.e., const or pointer)
versions of UnknownAnyTy for ObjectiveC value types.
<unknown type>* makes no sense and can cause the
parser to behave very oddly.

<rdar://problem/12518999>

llvm-svn: 168844
2012-11-29 00:50:56 +00:00
Jim Ingham 8c3f2764fb Add an example of using the target.process.extra-startup-command to turn on debugserver logging since
we always forget how to do this...

llvm-svn: 168840
2012-11-29 00:41:12 +00:00
Jim Ingham 7730b9a47a Tighten up how we acquire the underlying frame in the SBFrame methods. We were getting
the frame and then getting the run lock.  Which means that our frame could have gotten
invalidated by stopping between the time we got the frame and assured the the target was
stopped.  Now we get the run lock first, and THEN resolve the underlying frame object.

<rdar://problem/12621607>

llvm-svn: 168838
2012-11-29 00:26:19 +00:00
Daniel Malea e812109868 Rename __lambda to __lambda_node (apply r164404 from libcxxabi)
- fixes gcc 4.6 build problems
- resolves open bugzilla http://llvm.org/bugs/show_bug.cgi?id=13889

llvm-svn: 168835
2012-11-29 00:05:50 +00:00
Jason Molenda b8e5c79af1 Correct the label for the com.apple.debugserver.posix plist.
<rdar://problem/12769073> 

llvm-svn: 168834
2012-11-29 00:01:49 +00:00
Daniel Malea 16e126c70b Linux buildbot fix: detect swig tool from PATH in shell script (before searching hardcoded directories)
llvm-svn: 168831
2012-11-28 23:49:11 +00:00
Daniel Malea 9bbc8da517 Add 'class' keyword to friend definition (to fix gcc 4.6 build)
llvm-svn: 168827
2012-11-28 23:20:22 +00:00
Jim Ingham 75f27e8610 Cleanup - remove declarations of unimplemented functions.
llvm-svn: 168807
2012-11-28 20:09:03 +00:00
Sean Callanan c83e341075 If Clang is looking for an Objective-C method on
a type, and we find it in the origin for that
type, don't look anywhere else; just report it.

<rdar://problem/12675970>

llvm-svn: 168766
2012-11-28 03:23:20 +00:00
Greg Clayton e9adcab0a1 <rdar://problem/12639603>
Simplify the logging on ObjectFile::~ObjectFile() to not access an classes above the object file (like the module) so we don't crash when logging object lifetimes. The log message contains the "this" pointer value which can be matched up with the constructor log.

llvm-svn: 168754
2012-11-28 00:44:24 +00:00
Enrico Granata 75badc46e9 Fixing a silly typo in the previous patch
llvm-svn: 168748
2012-11-27 23:50:00 +00:00
Sean Callanan 948d4aba5d Fixed the debugserver Xcode project to allow
DebugClang builds of LLDB to build a properly
codesigned debugserver.  I did this by adding
a DebugClang configuration to debugserver that's
just a clone of the Debug configuration.

llvm-svn: 168746
2012-11-27 23:34:41 +00:00
Enrico Granata bd83b87d72 <rdar://problem/12754509>
Make sure that ValueObjectDynamicValue clears itself when no dynamic type information can be found
This behavior was supposed to be already happening (as per the comment lines)

llvm-svn: 168743
2012-11-27 23:28:32 +00:00
Greg Clayton 3e9031e83e <rdar://problem/12636970>
Properly detect the if unnamed bitfields are supported by clang if the major calng version is higher than 425.

llvm-svn: 168734
2012-11-27 22:18:23 +00:00
Daniel Malea 2bbf09e39e Mark expected failures on Linux (due to bugzilla #14437)
llvm-svn: 168727
2012-11-27 21:33:41 +00:00
Han Ming Ong 8594ae85d5 <rdar://problem/12759744> Provide physical memory distribution as part of profile data
Make use of unix system calls to provide physical memory usage profile data.

llvm-svn: 168720
2012-11-27 19:21:03 +00:00
Greg Clayton 3d51b9f957 <rdar://problem/12106825>
Allow the expression parser to see more than just data symbols. We now accept any symbol that has an address. We take precautions to only accept symbols by their mangled or demangled names only if the demangled name was not synthesized. If the demangled name is synthesized, then we now mark symbols accordingly and only compare against the mangled original name. 

llvm-svn: 168668
2012-11-27 01:52:16 +00:00
Jim Ingham 9732e08a4d The skipOnLinux decorator wasn't calling the test method correctly (no need to pass in the "self") resulting
in errors on MacOS X for the tests so decorated.

llvm-svn: 168662
2012-11-27 01:21:28 +00:00
Greg Clayton 37c36e486e <rdar://problem/12636970>
Detect the new fixed clang that properly supports bitfields in objc classes.

llvm-svn: 168655
2012-11-27 00:59:26 +00:00
Jim Ingham 8559a35508 The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad.  Reworked this so that it is now correct.

<rdar://problem/12501259>

llvm-svn: 168634
2012-11-26 23:52:18 +00:00
Daniel Malea b0916015ae Improvement to TestGlobalVariables fix
- use lldb settings command instead of os.environ
- use dyldPath fixture variable instead of hardcoding LD_LIBRARY_PATH
- add tear-down hook to restore environment after testcase is run

llvm-svn: 168613
2012-11-26 21:23:12 +00:00
Daniel Malea 179ff29811 Fix for TestSharedLib.py (on Linux)
- use lldb 'settings' command to help testcase find shared library
- pull up dyldPath variable from TestLoadUnload.py to fixture base class (applicable in multiple cases)

llvm-svn: 168612
2012-11-26 21:21:11 +00:00
Han Ming Ong 84145857b4 <rdar://problem/12723044> For 'process plugin packet send…', we just send it async by default
There is no good reason not to use async.

llvm-svn: 168606
2012-11-26 20:42:03 +00:00
Jim Ingham d77557d0d9 Missing “if (log)” on a log printf.
llvm-svn: 168602
2012-11-26 19:54:04 +00:00
Daniel Malea bdf0fef067 Fix TestGlobalVariables.py (on Linux)
- setting LD_LIBRARY_PATH required for the test program to run correctly

llvm-svn: 168595
2012-11-26 16:54:53 +00:00
Daniel Malea 561e218517 Skip objC test on non-darwin platforms
llvm-svn: 168531
2012-11-23 22:15:09 +00:00
Daniel Malea 662f2b8be0 Remove decorator to skip event tests
- hang resolved in r168503

llvm-svn: 168530
2012-11-23 22:10:20 +00:00
Daniel Malea 93aec0f9a9 Update test status on Linux
- add decorators @expectedFailLinux and @skipOnLinux
- skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426

Patch by Ashok Thirumurthi!

llvm-svn: 168529
2012-11-23 21:59:29 +00:00
Daniel Malea a35970a6f6 Fix Linux bug that leaves lldb in invalid state after expression evaluation times out.
- Handle EINVAL return code from ptrace(GETSIGINFO, ...): not an error, but 'group-stop' state on Linux
- propagate SIGSTOP to inferior in above case
- this commit resolves the failure in expression_command/timeout testcase

Thanks to Sean Callanan & Matt Kopec for helping debug this problem

llvm-svn: 168523
2012-11-23 18:09:58 +00:00
Daniel Malea 8b9e71e6ef Remove call to StopMonitor() from ProcessMonitor::Detach()
- StopMonitor() is called anyways from ProcessMonitor destructor later
- resolves hang in TestEvents.py

Patch by Matt Kopec!

llvm-svn: 168503
2012-11-22 18:21:05 +00:00
Daniel Malea 4bd152d8e6 Disable darwin-specific test on non-darwin platforms
llvm-svn: 168454
2012-11-21 20:17:07 +00:00
Daniel Malea b90c36868e Linux test case fixes
- missing includes in cpp test programs
- mismatched dwarf/dsym test cases
- make "com.apple.main-thread" expected string conditional on darwin platform

llvm-svn: 168452
2012-11-21 20:12:12 +00:00