Commit Graph

5842 Commits

Author SHA1 Message Date
Daniel Malea 44a3d901c0 Test commit: clean up C++11 options in lldb (on Linux) build page
llvm-svn: 167677
2012-11-10 18:09:36 +00:00
Jason Molenda e424a9b5ca Add support for libdispatch version 4 structure layout for finding
GCD queue names of threads to
ProcessGDBRemote::GetDispatchQueueNameForThread()
May need tweaking once this version is rolled out but visual
inspection looks fine.
<rdar://problem/12333100> 

llvm-svn: 167667
2012-11-10 06:54:30 +00:00
Jason Molenda b9371a6961 Don't assume that Modules have directories. They may be in-memory-only
things like our favorite "cl_kernels" and so module_directory here
can be NULL.

llvm-svn: 167666
2012-11-10 06:52:37 +00:00
Jim Ingham f57b435598 how to do it correctly.
llvm-svn: 167656
2012-11-10 02:08:14 +00:00
Greg Clayton 644c62f28f Remove a debugging printf that was left in the code.
llvm-svn: 167637
2012-11-09 22:24:38 +00:00
Filipe Cabecinhas a4342a2bd7 Removed use of non-standard escape character '\%'
llvm-svn: 167636
2012-11-09 21:39:05 +00:00
Jason Molenda c500aea639 Mark Objective-C 2.0 status as "Not applicable" on Linux.
The objc 2 runtime doesn't run on Linux.

llvm-svn: 167606
2012-11-09 06:16:12 +00:00
Jason Molenda 1f3ea66e23 Update the status page to include Linux status information,
patch from Dan Malea, daniel.malea@intel.com.

llvm-svn: 167605
2012-11-09 06:14:39 +00:00
Jason Molenda 44de0c3ac9 Fix typeo in example help text for type filter add.
<rdar://problem/12090979> 

llvm-svn: 167601
2012-11-08 23:57:44 +00:00
Jason Molenda 28826a491c Patch from Dan Malea daniel.malea@gmail.com to add some required
flags to the Linux makefiles to get the tests to run.

llvm-svn: 167600
2012-11-08 23:50:33 +00:00
Enrico Granata efe637d440 Minor cleanups to the new ModuleList notification APIs: passing in the ModuleList as part of the callbacks, and not copying the notifier as part of copy constructing and assigning
llvm-svn: 167592
2012-11-08 19:16:03 +00:00
Enrico Granata 2ffcf43a13 Adding support for loading the scripting resource as part of a framework, lacking the dSYM bundle, or if the bundle has no Pythonic resources whatsoever
Solving an issue where "command script import" would fail to pick the file indicated by the user as a result of something with the same name being in an earlier position in sys.path

llvm-svn: 167570
2012-11-08 02:44:10 +00:00
Enrico Granata 1759848be0 <rdar://problem/12586350>
This commit does three things:
(a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions
whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress
(b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action
of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting
the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds
(c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment:
 - the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself)
 - if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine

llvm-svn: 167569
2012-11-08 02:22:02 +00:00
Jason Molenda c56bd08373 Fix a crasher in
DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule
where it assumed that a kernel had been found in memory, when that may not be
the case when we're attaching to a device early in the boot process.
<rdar://problem/12638140> 

llvm-svn: 167564
2012-11-08 00:19:28 +00:00
Greg Clayton 1cb5951a2f Added a posix_spawn based launchd plist for always using posix_spawn to launch programs.
llvm-svn: 167563
2012-11-08 00:06:59 +00:00
Greg Clayton 84afacd253 <rdar://problem/12645617>
<rdar://problem/12153915>  (partial fix)

Remove an assert and place an error message instead so we don't crash when we run into a type tag that we don't recognize. We will now emit a warning so that hopefully we can get a bug report that has example code that shows what we are missing.

Also fixed a case when trying to unique one type to another where we would confuse concrete instances of methods with their definitions and end up not correctly registering the types.

llvm-svn: 167557
2012-11-07 23:09:32 +00:00
Jim Ingham d073fe4e5b When we were calculating the max byte size of ONE instruction to handle something like
x/9i

we actually calculated the size of 9 instructions.  Then we multiplied it by the count again 
to get the total amount we should fetch, so we thought 9 x86_64 instructions took over 1K
to fetch...

<rdar://problem/12649027>

llvm-svn: 167520
2012-11-07 01:52:04 +00:00
Sean Callanan 439265aba4 Logging improvements for the Objective-C runtime.
Also fixed a bug where the Objective-C runtime
would not properly report that it found a class if
(a) it had to build the ObjCInterfaceDecl for the
class and (b) logging was enabled.

<rdar://problem/12641180>

llvm-svn: 167516
2012-11-07 01:27:50 +00:00
Greg Clayton 9eb4e03873 <rdar://problem/12647273>
Added the ability to get the full process list when using the --applist option in debugserver.

llvm-svn: 167502
2012-11-06 23:36:26 +00:00
Greg Clayton 9f078b773d Added unnamed bitfields to our bitfield test.
llvm-svn: 167473
2012-11-06 18:22:59 +00:00
Greg Clayton 6421cccff8 Make sure to check the module is valid after trying to find a shared module.
llvm-svn: 167471
2012-11-06 17:50:15 +00:00
Jim Ingham 3bfa753fa1 Add a workaround to problems with the clang debug info for
inlined subroutine ranges.

<rdar://problem/12588579>

llvm-svn: 167430
2012-11-06 01:14:52 +00:00
Greg Clayton 88bc7f35b8 <rdar://problem/12582031>
Unnamed bitfields cause struct layout problems

Synthesize unnamed bitfields when required. Most compilers don't mention unnamed bitfields in the DWARF, so we need to create them to keep clang happy with the types we create from the DWARF. We currently can't do this for ObjC since the DW_AT_bit_offset value for any direct ivars of ObjC classes as the values for these attributes are bogus. A bug has been filed on Clang to fix this, and another bug has been filed on LLDB to make sure we fix the DWARF parser once the clang fix is in by looking the the DW_AT_producer in the compile unit attributes and finding the compiler version and only enabling it for newer versions of clang.

llvm-svn: 167424
2012-11-06 00:20:41 +00:00
Filipe Cabecinhas 7c3a53c0b2 Avoid potentially disastrous mistakes when removing a file.
llvm-svn: 167391
2012-11-05 18:41:33 +00:00
Greg Clayton 23e05e4e9a Cleaned up the code signing instructions:
- make sure to delet the .cer file on the desktop
- added section that describes what to do when you re-install a new OS where 
  you still have an old code signing certificate around.

llvm-svn: 167389
2012-11-05 18:23:25 +00:00
Jason Molenda ba813dc03c Add new ArchSpec methods, IsCompatibleMatch() and IsExactMatch().
The operator== method is a synonym for IsExactMatch().  

The essential difference between these two is that IsCompatibleMatch()
will say that armv7 and armv7s are compatible and return true.
IsExactMatch() will say that armv7 and armv7s are not a match.

An armv7s cpu can run either generic armv7 binaries or armv7s binaries
(the latter being tuned for it).  When we're picking the slice of a 
universal Mach-O file to load in an armv7s Target, we need to be able to
first look for an exact cpu subtype match (armv7s == armv7s) and failing
that, looking for a slice with a compatible architecture.

Update ObjectContainerUniversalMachO::GetObjectFile to prefer an exact
match of the cpu type, falling back to a compatible match if necessary.

<rdar://problem/12593515>

llvm-svn: 167365
2012-11-04 03:20:05 +00:00
Jim Ingham a537f6ce37 Fix a little think-o. In FileSpec::operator== we were trying to figure out whether the rhs file was resolved or not by comparing
the resolved version of the rhs FileSpec's directory name with the lhs FileSpec's directory name.  We really meant to compare it
with the rhs FileSpec's directory name...

<rdar://problem/12438838>

llvm-svn: 167349
2012-11-03 02:12:46 +00:00
Greg Clayton dfdd1eb65e Make sure users know that "target variable" can read variables while running a process by changing the documentation string.
llvm-svn: 167343
2012-11-03 00:10:22 +00:00
Enrico Granata 80fcdd429f Caught two cases where we were passing a Stream* without checking for NULL
llvm-svn: 167342
2012-11-03 00:09:46 +00:00
Sean Callanan 7273e2d124 Fixed a problem where we mistook normal result
variables for guard variables because the current
class or method named contained the letters "GV".

llvm-svn: 167327
2012-11-02 22:28:08 +00:00
Greg Clayton 2346fcf60c Fixed the "--force" option for memory read.
llvm-svn: 167314
2012-11-02 21:14:58 +00:00
Sean Callanan 84dcccd14b Switched debugserver to use C++11/libc++.
<rdar://problem/12624679>

llvm-svn: 167303
2012-11-02 18:30:51 +00:00
Sean Callanan 5540094ccd Extra safeguards to ensure that we never query
the runtime if we have complete debug information
for a class.

Also made the Objective-C language runtime return
NULL when asked for the complete debug information
(i.e., information from DWARF, not information from
the runtime) if that information isn't present.  It
used to return a non-authoritative version, which
made it hard for clients to determine whether
complete debug information was available.

<rdar://problem/12608895>

llvm-svn: 167299
2012-11-02 17:09:58 +00:00
Jason Molenda e7a9168908 Set the MACOSX_DEPLOYMENT_TARGET in a few more places.
llvm-svn: 167267
2012-11-02 00:35:51 +00:00
Jason Molenda 4cbf8f3d4b Set the MACOSX_DEPLOYMENT_TARGET for Debug/Release builds
(but not BuildAndIntegration builds).

llvm-svn: 167264
2012-11-01 23:37:53 +00:00
Jason Molenda cc57a38325 Change DataExtractor::Dump() to use a series of if..else if
statements instead of a switch for the size of the floating
point types; some architectures sizeof double and sizeof long
double are the same and that's invalid in a switch.

Fix the LLDB_DISABLE_PYTHON ifdef block in FormatManager::LoadObjCFormatters
so it builds on arm again.

llvm-svn: 167263
2012-11-01 23:35:19 +00:00
Greg Clayton 2508b9b8d3 <rdar://problem/12585314>
LLDB now provides base class offsets (virtual and non virtual) to Clang's record layout. We previously were told this wasn't necessary, but it is when pragma pack gets involved.

llvm-svn: 167262
2012-11-01 23:20:02 +00:00
Greg Clayton aa0c70e38c Get rid of hack by making the actual call public. This was causing the lldb-platform to not be able to link.
llvm-svn: 167253
2012-11-01 21:35:16 +00:00
Sean Callanan 0c23368a34 Fixes to make the test suite work better when
explicitly pointed at an LLDB framework and
executable.

llvm-svn: 167250
2012-11-01 21:23:21 +00:00
Filipe Cabecinhas c281a3bf43 Makefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).
llvm-svn: 167242
2012-11-01 18:55:16 +00:00
Greg Clayton da2455bd45 Avoid a crash when trying to parse a line table in the DWARF parser.
llvm-svn: 167236
2012-11-01 17:28:37 +00:00
Jason Molenda 0b2dbe0ebe Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.

llvm-svn: 167202
2012-11-01 02:02:59 +00:00
Jim Ingham 455fa5ccc6 There seems to be some odd corner case where we shut down the ProcessGDBRemote, but we haven't managed to shut down the async thread. That causes the ProcessGDBRemote::AsyncThread to crash when it wakes up. So I changed StartAsyncThread and StopAsyncThread to be callable multiple times (only the first one does anything) so that we can just shut it down unequivocally in the ProcessGDBRemote destructor.
<rdar://problem/12602981>

llvm-svn: 167197
2012-11-01 01:15:33 +00:00
Jim Ingham 490bccd659 Switch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidpath. The former was flakey, and the whole point of libproc is to protect us from potential flakiness at that level...
<rdar://problem/12594781>

llvm-svn: 167194
2012-11-01 01:04:46 +00:00
Greg Clayton d9c2370b33 Added the plists to the debugserver project and fixed the labels for the new plists.
llvm-svn: 167183
2012-10-31 23:49:14 +00:00
Greg Clayton e11b43bc69 More launchd style plists.
llvm-svn: 167182
2012-10-31 23:43:37 +00:00
Filipe Cabecinhas 6fd25ac3e2 Use libxml2 on Mac OS X.
llvm-svn: 167179
2012-10-31 23:02:00 +00:00
Greg Clayton 48baf7a788 Resolve any bundle paths we are given when the specified executable is a bundle.
llvm-svn: 167175
2012-10-31 21:44:39 +00:00
Greg Clayton b70c2309b6 More fixes from MSVC warnings found by Carlo Kok.
llvm-svn: 167171
2012-10-31 20:56:43 +00:00
Greg Clayton 5d361d7e3a Carlo Kok was compiling with MSVC, caught some more issues.
llvm-svn: 167168
2012-10-31 20:51:31 +00:00