[Lldb-commits] [lldb] r155646 - in /lldb/branches/lldb-platform-work: ./ examples/darwin/heap_find/ examples/darwin/heap_find/heap/ examples/python/ examples/summaries/cocoa/ examples/synthetic/ include/lldb/Interpreter/ include/lldb/Symbol/ lldb.xcodeproj/ resources/ scripts/Python/ source/ source/Commands/ source/Core/ source/Expression/ source/Host/macosx/launcherXPCService/ source/Interpreter/ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/ source/Plugins/Process/gdb-remote/ source/Plugins/SymbolFile/DWARF/ s...
Johnny Chen
johnny.chen at apple.com
Thu Apr 26 11:11:47 PDT 2012
Author: johnny
Date: Thu Apr 26 13:11:46 2012
New Revision: 155646
URL: http://llvm.org/viewvc/llvm-project?rev=155646&view=rev
Log:
Merge lots of changes from ToT trunk:
svn merge -r 155505:155644 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .
Added:
lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/
- copied from r155644, lldb/trunk/examples/darwin/heap_find/heap/
lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile
- copied unchanged from r155644, lldb/trunk/examples/darwin/heap_find/heap/Makefile
lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp
- copied unchanged from r155644, lldb/trunk/examples/darwin/heap_find/heap/heap_find.cpp
lldb/branches/lldb-platform-work/test/lang/objc/objc++/
- copied from r155644, lldb/trunk/test/lang/objc/objc++/
lldb/branches/lldb-platform-work/test/lang/objc/objc++/Makefile
- copied unchanged from r155644, lldb/trunk/test/lang/objc/objc++/Makefile
lldb/branches/lldb-platform-work/test/lang/objc/objc++/TestObjCXX.py
- copied unchanged from r155644, lldb/trunk/test/lang/objc/objc++/TestObjCXX.py
lldb/branches/lldb-platform-work/test/lang/objc/objc++/main.mm
- copied unchanged from r155644, lldb/trunk/test/lang/objc/objc++/main.mm
Removed:
lldb/branches/lldb-platform-work/examples/darwin/heap_find/Makefile
lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap_find.cpp
lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_lldb.py
Modified:
lldb/branches/lldb-platform-work/ (props changed)
lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py
lldb/branches/lldb-platform-work/examples/python/crashlog.py
lldb/branches/lldb-platform-work/examples/python/symbolication.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBitVector.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/Class.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSException.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSSet.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/cache.py
lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py
lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py
lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py
lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h
lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h
lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj
lldb/branches/lldb-platform-work/resources/LLDB-Info.plist
lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh
lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp
lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp
lldb/branches/lldb-platform-work/source/Core/Timer.cpp
lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp
lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist
lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist
lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp
lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp
lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp
lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
lldb/branches/lldb-platform-work/source/Symbol/Function.cpp
lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp
lldb/branches/lldb-platform-work/source/Target/Target.cpp
lldb/branches/lldb-platform-work/source/lldb-log.cpp
lldb/branches/lldb-platform-work/test/dotest.py
lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py
lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py
lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py
lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py
lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py
lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py
lldb/branches/lldb-platform-work/tools/debugserver/source/DNBRegisterInfo.cpp
lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp
lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h
lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp
Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr 26 13:11:46 2012
@@ -1 +1 @@
-/lldb/trunk:154224-155505
+/lldb/trunk:154224-155644
Removed: lldb/branches/lldb-platform-work/examples/darwin/heap_find/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/Makefile?rev=155645&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/Makefile (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/Makefile (removed)
@@ -1,7 +0,0 @@
-LEVEL = ../../../test/make
-
-DYLIB_NAME := heap
-DYLIB_ONLY := YES
-DYLIB_CXX_SOURCES := heap_find.cpp
-
-include $(LEVEL)/Makefile.rules
Modified: lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py Thu Apr 26 13:11:46 2012
@@ -1,35 +1,50 @@
#!/usr/bin/python
#----------------------------------------------------------------------
-# Be sure to add the python path that points to the LLDB shared library.
+# This module is designed to live inside the "lldb" python package
+# in the "lldb.macosx" package. To use this in the embedded python
+# interpreter using "lldb" just import it:
#
-# # To use this in the embedded python interpreter using "lldb" just
-# import it with the full path using the "command script import"
-# command
-# (lldb) command script import /path/to/heap.py
-#
-# For the shells csh, tcsh:
-# ( setenv PYTHONPATH /path/to/LLDB.framework/Resources/Python ; ./heap.py )
-#
-# For the shells sh, bash:
-# PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./heap.py
+# (lldb) script import lldb.macosx.heap
#----------------------------------------------------------------------
import lldb
import commands
import optparse
import os
+import os.path
import shlex
-import symbolication # from lldb/examples/python/symbolication.py
+import string
+import tempfile
+import lldb.utils.symbolication
+
+g_libheap_dylib_dir = None
+g_libheap_dylib_dict = dict()
def load_dylib():
if lldb.target:
- python_module_directory = os.path.dirname(__file__)
- libheap_dylib_path = python_module_directory + '/libheap.dylib'
- if not os.path.exists(libheap_dylib_path):
- make_command = '(cd "%s" ; make)' % python_module_directory
- print make_command
- print commands.getoutput(make_command)
+ global g_libheap_dylib_dir
+ global g_libheap_dylib_dict
+ triple = lldb.target.triple
+ if triple in g_libheap_dylib_dict:
+ libheap_dylib_path = g_libheap_dylib_dict[triple]
+ else:
+ if not g_libheap_dylib_dir:
+ g_libheap_dylib_dir = tempfile.gettempdir() + '/lldb-dylibs'
+ triple_dir = g_libheap_dylib_dir + '/' + triple + '/' + __name__
+ if not os.path.exists(triple_dir):
+ os.makedirs(triple_dir)
+ libheap_dylib_path = triple_dir + '/libheap.dylib'
+ g_libheap_dylib_dict[triple] = libheap_dylib_path
+ heap_code_directory = os.path.dirname(__file__) + '/heap'
+ heap_source_file = heap_code_directory + '/heap_find.cpp'
+ # Check if the dylib doesn't exist, or if "heap_find.cpp" is newer than the dylib
+ if not os.path.exists(libheap_dylib_path) or os.stat(heap_source_file).st_mtime > os.stat(libheap_dylib_path).st_mtime:
+ # Remake the dylib
+ make_command = '(cd "%s" ; make EXE="%s" ARCH=%s)' % (heap_code_directory, libheap_dylib_path, string.split(triple, '-')[0])
+ # print make_command
+ make_output = commands.getoutput(make_command)
+ # print make_output
if os.path.exists(libheap_dylib_path):
libheap_dylib_spec = lldb.SBFileSpec(libheap_dylib_path)
if lldb.target.FindModule(libheap_dylib_spec):
@@ -76,7 +91,7 @@
default_memory_format = "Y" # 'Y' is "bytes with ASCII" format
#memory_chunk_size = 1
if options.type == 'pointer':
- expr = 'find_pointer_in_heap((void *)%s)' % arg_str
+ expr = 'find_pointer_in_heap((void *)%s)' % (arg_str)
arg_str_description = 'malloc block containing pointer %s' % arg_str
default_memory_format = "A" # 'A' is "address" format
#memory_chunk_size = lldb.process.GetAddressByteSize()
@@ -172,7 +187,7 @@
lldb.debugger.GetCommandInterpreter().HandleCommand(memory_command, cmd_result)
print cmd_result.GetOutput()
if options.stack:
- symbolicator = symbolication.Symbolicator()
+ symbolicator = lldb.utils.symbolication.Symbolicator()
symbolicator.target = lldb.target
expr_str = "g_stack_frames_count = sizeof(g_stack_frames)/sizeof(uint64_t); (int)__mach_stack_logging_get_frames((unsigned)mach_task_self(), 0x%xull, g_stack_frames, g_stack_frames_count, &g_stack_frames_count)" % (malloc_addr)
#print expr_str
@@ -284,13 +299,15 @@
else:
print 'error: no c string arguments were given to search for'
-def __lldb_init_module (debugger, dict):
- # This initializer is being run from LLDB in the embedded command interpreter
- # Add any commands contained in this module to LLDB
- debugger.HandleCommand('command script add -f heap.ptr_refs ptr_refs')
- debugger.HandleCommand('command script add -f heap.cstr_refs cstr_refs')
- debugger.HandleCommand('command script add -f heap.malloc_info malloc_info')
- print '"ptr_refs", "cstr_refs", and "malloc_info" commands have been installed, use the "--help" options on these commands for detailed help.'
+if __name__ == '__main__':
+ lldb.debugger = lldb.SBDebugger.Create()
+
+# This initializer is being run from LLDB in the embedded command interpreter
+# Add any commands contained in this module to LLDB
+lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.ptr_refs ptr_refs')
+lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.cstr_refs cstr_refs')
+lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.malloc_info malloc_info')
+print '"ptr_refs", "cstr_refs", and "malloc_info" commands have been installed, use the "--help" options on these commands for detailed help.'
Removed: lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap_find.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap_find.cpp?rev=155645&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap_find.cpp (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap_find.cpp (removed)
@@ -1,332 +0,0 @@
-//===-- head_find.c ---------------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file compiles into a dylib and can be used on darwin to find data that
-// is contained in active malloc blocks. To use this make the project, then
-// load the shared library in a debug session while you are stopped:
-//
-// (lldb) process load /path/to/libheap.dylib
-//
-// Now you can use the "find_pointer_in_heap" and "find_cstring_in_heap"
-// functions in the expression parser.
-//
-// This will grep everything in all active allocation blocks and print and
-// malloc blocks that contain the pointer 0x112233000000:
-//
-// (lldb) expression find_pointer_in_heap (0x112233000000)
-//
-// This will grep everything in all active allocation blocks and print and
-// malloc blocks that contain the C string "hello" (as a substring, no
-// NULL termination included):
-//
-// (lldb) expression find_cstring_in_heap ("hello")
-//
-// The results will be printed to the STDOUT of the inferior program. The
-// return value of the "find_pointer_in_heap" function is the number of
-// pointer references that were found. A quick example shows
-//
-// (lldb) expr find_pointer_in_heap(0x0000000104000410)
-// (uint32_t) $5 = 0x00000002
-// 0x104000740: 0x0000000104000410 found in malloc block 0x104000730 + 16 (malloc_size = 48)
-// 0x100820060: 0x0000000104000410 found in malloc block 0x100820000 + 96 (malloc_size = 4096)
-//
-// From the above output we see that 0x104000410 was found in the malloc block
-// at 0x104000730 and 0x100820000. If we want to see what these blocks are, we
-// can display the memory for this block using the "address" ("A" for short)
-// format. The address format shows pointers, and if those pointers point to
-// objects that have symbols or know data contents, it will display information
-// about the pointers:
-//
-// (lldb) memory read --format address --count 1 0x104000730
-// 0x104000730: 0x0000000100002460 (void *)0x0000000100002488: MyString
-//
-// We can see that the first block is a "MyString" object that contains our
-// pointer value at offset 16.
-//
-// Looking at the next pointers, are a bit more tricky:
-// (lldb) memory read -fA 0x100820000 -c1
-// 0x100820000: 0x4f545541a1a1a1a1
-// (lldb) memory read 0x100820000
-// 0x100820000: a1 a1 a1 a1 41 55 54 4f 52 45 4c 45 41 53 45 21 ....AUTORELEASE!
-// 0x100820010: 78 00 82 00 01 00 00 00 60 f9 e8 75 ff 7f 00 00 x.......`..u....
-//
-// This is an objective C auto release pool object that contains our pointer.
-// C++ classes will show up if they are virtual as something like:
-// (lldb) memory read --format address --count 1 0x104008000
-// 0x104008000: 0x109008000 vtable for lldb_private::Process
-//
-// This is a clue that the 0x104008000 is a "lldb_private::Process *".
-//===----------------------------------------------------------------------===//
-
-#include <assert.h>
-#include <ctype.h>
-#include <mach/mach.h>
-#include <malloc/malloc.h>
-#include <stack_logging.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <vector>
-
-#define MAX_FRAMES 1024
-typedef void range_callback_t (task_t task, void *baton, unsigned type, uint64_t ptr_addr, uint64_t ptr_size);
-typedef void zone_callback_t (void *info, const malloc_zone_t *zone);
-
-struct range_callback_info_t
-{
- zone_callback_t *zone_callback;
- range_callback_t *range_callback;
- void *baton;
-};
-
-enum data_type_t
-{
- eDataTypeAddress,
- eDataTypeContainsData
-};
-
-struct aligned_data_t
-{
- const uint8_t *buffer;
- uint32_t size;
- uint32_t align;
-};
-
-struct range_contains_data_callback_info_t
-{
- data_type_t type;
- const void *lookup_addr;
- union
- {
- uintptr_t addr;
- aligned_data_t data;
- };
- uint32_t match_count;
- bool done;
-};
-
-struct malloc_match
-{
- void *addr;
- intptr_t size;
- intptr_t offset;
-};
-
-std::vector<malloc_match> g_matches;
-const void *g_lookup_addr = 0;
-mach_vm_address_t g_stack_frames[MAX_FRAMES];
-uint32_t g_stack_frames_count = 0;
-
-//----------------------------------------------------------------------
-// task_peek
-//
-// Reads memory from this tasks address space. This callback is needed
-// by the code that iterates through all of the malloc blocks to read
-// the memory in this process.
-//----------------------------------------------------------------------
-static kern_return_t
-task_peek (task_t task, vm_address_t remote_address, vm_size_t size, void **local_memory)
-{
- *local_memory = (void*) remote_address;
- return KERN_SUCCESS;
-}
-
-
-static const void
-foreach_zone_in_this_process (range_callback_info_t *info)
-{
- if (info == NULL || info->zone_callback == NULL)
- return;
-
- vm_address_t *zones = NULL;
- unsigned int num_zones = 0;
-
- kern_return_t err = malloc_get_all_zones (0, task_peek, &zones, &num_zones);
- if (KERN_SUCCESS == err)
- {
- for (unsigned int i=0; i<num_zones; ++i)
- {
- info->zone_callback (info, (const malloc_zone_t *)zones[i]);
- }
- }
-}
-
-//----------------------------------------------------------------------
-// dump_malloc_block_callback
-//
-// A simple callback that will dump each malloc block and all available
-// info from the enumeration callback perpective.
-//----------------------------------------------------------------------
-static void
-dump_malloc_block_callback (task_t task, void *baton, unsigned type, uint64_t ptr_addr, uint64_t ptr_size)
-{
- printf ("task = 0x%4.4x: baton = %p, type = %u, ptr_addr = 0x%llx + 0x%llu\n", task, baton, type, ptr_addr, ptr_size);
-}
-
-static void
-ranges_callback (task_t task, void *baton, unsigned type, vm_range_t *ptrs, unsigned count)
-{
- range_callback_info_t *info = (range_callback_info_t *)baton;
- while(count--) {
- info->range_callback (task, info->baton, type, ptrs->address, ptrs->size);
- ptrs++;
- }
-}
-
-static void
-enumerate_range_in_zone (void *baton, const malloc_zone_t *zone)
-{
- range_callback_info_t *info = (range_callback_info_t *)baton;
-
- if (zone && zone->introspect)
- zone->introspect->enumerator (mach_task_self(),
- info,
- MALLOC_PTR_IN_USE_RANGE_TYPE,
- (vm_address_t)zone,
- task_peek,
- ranges_callback);
-}
-
-static void
-range_info_callback (task_t task, void *baton, unsigned type, uint64_t ptr_addr, uint64_t ptr_size)
-{
- const uint64_t end_addr = ptr_addr + ptr_size;
-
- range_contains_data_callback_info_t *info = (range_contains_data_callback_info_t *)baton;
- switch (info->type)
- {
- case eDataTypeAddress:
- if (ptr_addr <= info->addr && info->addr < end_addr)
- {
- ++info->match_count;
- malloc_match match = { (void *)ptr_addr, ptr_size, info->addr - ptr_addr };
- g_matches.push_back(match);
- }
- break;
-
- case eDataTypeContainsData:
- {
- const uint32_t size = info->data.size;
- if (size < ptr_size) // Make sure this block can contain this data
- {
- uint8_t *ptr_data = NULL;
- if (task_peek (task, ptr_addr, ptr_size, (void **)&ptr_data) == KERN_SUCCESS)
- {
- const void *buffer = info->data.buffer;
- assert (ptr_data);
- const uint32_t align = info->data.align;
- for (uint64_t addr = ptr_addr;
- addr < end_addr && ((end_addr - addr) >= size);
- addr += align, ptr_data += align)
- {
- if (memcmp (buffer, ptr_data, size) == 0)
- {
- ++info->match_count;
- malloc_match match = { (void *)ptr_addr, ptr_size, addr - ptr_addr };
- g_matches.push_back(match);
- }
- }
- }
- else
- {
- printf ("0x%llx: error: couldn't read %llu bytes\n", ptr_addr, ptr_size);
- }
- }
- }
- break;
- }
-}
-
-//----------------------------------------------------------------------
-// find_pointer_in_heap
-//
-// Finds a pointer value inside one or more currently valid malloc
-// blocks.
-//----------------------------------------------------------------------
-malloc_match *
-find_pointer_in_heap (const void * addr)
-{
- g_matches.clear();
- // Setup "info" to look for a malloc block that contains data
- // that is the a pointer
- range_contains_data_callback_info_t data_info;
- data_info.type = eDataTypeContainsData; // Check each block for data
- g_lookup_addr = addr;
- data_info.data.buffer = (uint8_t *)&addr; // What data? The pointer value passed in
- data_info.data.size = sizeof(addr); // How many bytes? The byte size of a pointer
- data_info.data.align = sizeof(addr); // Align to a pointer byte size
- data_info.match_count = 0; // Initialize the match count to zero
- data_info.done = false; // Set done to false so searching doesn't stop
- range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
- foreach_zone_in_this_process (&info);
- if (g_matches.empty())
- return NULL;
- malloc_match match = { NULL, 0, 0 };
- g_matches.push_back(match);
- return g_matches.data();
-}
-
-
-//----------------------------------------------------------------------
-// find_cstring_in_heap
-//
-// Finds a C string inside one or more currently valid malloc blocks.
-//----------------------------------------------------------------------
-malloc_match *
-find_cstring_in_heap (const char *s)
-{
- g_matches.clear();
- if (s == NULL || s[0] == '\0')
- {
- printf ("error: invalid argument (empty cstring)\n");
- return NULL;
- }
- // Setup "info" to look for a malloc block that contains data
- // that is the C string passed in aligned on a 1 byte boundary
- range_contains_data_callback_info_t data_info;
- data_info.type = eDataTypeContainsData; // Check each block for data
- g_lookup_addr = s; // If an expression was used, then fill in the resolved address we are looking up
- data_info.data.buffer = (uint8_t *)s; // What data? The C string passed in
- data_info.data.size = strlen(s); // How many bytes? The length of the C string
- data_info.data.align = 1; // Data doesn't need to be aligned, so set the alignment to 1
- data_info.match_count = 0; // Initialize the match count to zero
- data_info.done = false; // Set done to false so searching doesn't stop
- range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
- foreach_zone_in_this_process (&info);
- if (g_matches.empty())
- return NULL;
- malloc_match match = { NULL, 0, 0 };
- g_matches.push_back(match);
- return g_matches.data();
-}
-
-//----------------------------------------------------------------------
-// find_block_for_address
-//
-// Find the malloc block that whose address range contains "addr".
-//----------------------------------------------------------------------
-malloc_match *
-find_block_for_address (const void *addr)
-{
- g_matches.clear();
- // Setup "info" to look for a malloc block that contains data
- // that is the C string passed in aligned on a 1 byte boundary
- range_contains_data_callback_info_t data_info;
- g_lookup_addr = addr; // If an expression was used, then fill in the resolved address we are looking up
- data_info.type = eDataTypeAddress; // Check each block to see if the block contains the address passed in
- data_info.addr = (uintptr_t)addr; // What data? The C string passed in
- data_info.match_count = 0; // Initialize the match count to zero
- data_info.done = false; // Set done to false so searching doesn't stop
- range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
- foreach_zone_in_this_process (&info);
- if (g_matches.empty())
- return NULL;
- malloc_match match = { NULL, 0, 0 };
- g_matches.push_back(match);
- return g_matches.data();
-}
Modified: lldb/branches/lldb-platform-work/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/crashlog.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/crashlog.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/crashlog.py Thu Apr 26 13:11:46 2012
@@ -37,7 +37,7 @@
import sys
import time
import uuid
-import symbolication
+import lldb.utils.symbolication
PARSE_MODE_NORMAL = 0
PARSE_MODE_THREAD = 1
@@ -45,7 +45,7 @@
PARSE_MODE_THREGS = 3
PARSE_MODE_SYSTEM = 4
-class CrashLog(symbolication.Symbolicator):
+class CrashLog(lldb.utils.symbolication.Symbolicator):
"""Class that does parses darwin crash logs"""
thread_state_regex = re.compile('^Thread ([0-9]+) crashed with')
thread_regex = re.compile('^Thread ([0-9]+)([^:]*):(.*)')
@@ -97,7 +97,7 @@
else:
return "[%3u] 0x%16.16x" % (self.index, self.pc)
- class DarwinImage(symbolication.Image):
+ class DarwinImage(lldb.utils.symbolication.Image):
"""Class that represents a binary images in a darwin crash log"""
dsymForUUIDBinary = os.path.expanduser('~rc/bin/dsymForUUID')
if not os.path.exists(dsymForUUIDBinary):
@@ -106,8 +106,8 @@
dwarfdump_uuid_regex = re.compile('UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*')
def __init__(self, text_addr_lo, text_addr_hi, identifier, version, uuid, path):
- symbolication.Image.__init__(self, path, uuid);
- self.add_section (symbolication.Section(text_addr_lo, text_addr_hi, "__TEXT"))
+ lldb.utils.symbolication.Image.__init__(self, path, uuid);
+ self.add_section (lldb.utils.symbolication.Section(text_addr_lo, text_addr_hi, "__TEXT"))
self.identifier = identifier
self.version = version
@@ -115,7 +115,7 @@
if self.resolved_path:
# Don't load a module twice...
return True
- print 'Locating %s %s...' % (self.uuid, self.path),
+ print 'Getting symbols for %s %s...' % (self.uuid, self.path),
if os.path.exists(self.dsymForUUIDBinary):
dsym_for_uuid_command = '%s %s' % (self.dsymForUUIDBinary, self.uuid)
s = commands.getoutput(dsym_for_uuid_command)
@@ -147,10 +147,10 @@
return False
if (self.resolved_path and os.path.exists(self.resolved_path)) or (self.path and os.path.exists(self.path)):
print 'ok'
- if self.resolved_path:
- print ' exe = "%s"' % self.resolved_path
- if self.symfile:
- print ' dsym = "%s"' % self.symfile
+ # if self.resolved_path:
+ # print ' exe = "%s"' % self.resolved_path
+ # if self.symfile:
+ # print ' dsym = "%s"' % self.symfile
return True
return False
@@ -158,7 +158,7 @@
def __init__(self, path):
"""CrashLog constructor that take a path to a darwin crash log file"""
- symbolication.Symbolicator.__init__(self);
+ lldb.utils.symbolication.Symbolicator.__init__(self);
self.path = os.path.expanduser(path);
self.info_lines = list()
self.system_profile = list()
@@ -313,7 +313,7 @@
def create_target(self):
#print 'crashlog.create_target()...'
- target = symbolication.Symbolicator.create_target(self)
+ target = lldb.utils.symbolication.Symbolicator.create_target(self)
if target:
return target
# We weren't able to open the main executable as, but we can still symbolicate
@@ -424,7 +424,7 @@
if err:
print err
else:
- print 'loaded %s' % image
+ #print 'loaded %s' % image
loaded_images.append(image)
for thread in crash_log.threads:
@@ -446,11 +446,11 @@
instructions = symbolicated_frame_address.get_instructions()
if instructions:
print
- symbolication.disassemble_instructions (target,
- instructions,
- frame.pc,
- options.disassemble_before,
- options.disassemble_after, frame.index > 0)
+ lldb.utils.symbolication.disassemble_instructions (target,
+ instructions,
+ frame.pc,
+ options.disassemble_before,
+ options.disassemble_after, frame.index > 0)
print
symbolicated_frame_address_idx += 1
else:
@@ -467,6 +467,6 @@
lldb.debugger = lldb.SBDebugger.Create()
SymbolicateCrashLog (sys.argv[1:])
elif lldb.debugger:
- lldb.debugger.HandleCommand('command script add -f crashlog.Symbolicate crashlog')
+ lldb.debugger.HandleCommand('command script add -f lldb.macosx.crashlog.Symbolicate crashlog')
print '"crashlog" command installed, type "crashlog --help" for detailed help'
Modified: lldb/branches/lldb-platform-work/examples/python/symbolication.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/symbolication.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/symbolication.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/symbolication.py Thu Apr 26 13:11:46 2012
@@ -288,7 +288,6 @@
if not self.module:
self.locate_module_and_debug_symbols ()
resolved_path = self.get_resolved_path()
- print 'target.AddModule (path="%s", arch="%s", uuid=%s, symfile="%s")' % (resolved_path, self.arch, self.uuid, self.symfile)
self.module = target.AddModule (resolved_path, self.arch, self.uuid)#, self.symfile)
if not self.module:
return 'error: unable to get module for (%s) "%s"' % (self.arch, self.get_resolved_path())
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# synthetic children provider for NSArray
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -27,16 +27,16 @@
pass
def __init__(self, valobj, dict, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
num_children_vo = self.valobj.CreateValueFromExpression("count","(int)[" + stream.GetData() + " count]");
@@ -53,7 +53,7 @@
pass
def __init__(self, valobj, dict, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.ulong):
@@ -61,11 +61,11 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.sys_params.cfruntime_size,
self.sys_params.types_cache.ulong)
@@ -76,7 +76,7 @@
pass
def __init__(self, valobj, dict, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.long):
@@ -84,12 +84,12 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# skip the isa pointer and get at the size
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
count = self.valobj.CreateChildAtOffset("count",
self.sys_params.pointer_size,
self.sys_params.types_cache.long);
@@ -100,7 +100,7 @@
pass
def __init__(self, valobj, dict, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.long):
@@ -108,12 +108,12 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# skip the isa pointer and get at the size
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
count = self.valobj.CreateChildAtOffset("count",
self.sys_params.pointer_size,
self.sys_params.types_cache.long);
@@ -127,7 +127,7 @@
pass
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.adjust_for_architecture()
self.error = False
@@ -135,13 +135,13 @@
self.invalid = (self.wrapper == None)
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.wrapper == None:
return 0;
return self.wrapper.num_children()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.wrapper == None:
return
self.wrapper.update()
@@ -149,13 +149,13 @@
# this code acts as our defense against NULL and unitialized
# NSArray pointers, which makes it much longer than it would be otherwise
def make_wrapper(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.valobj.GetValueAsUnsigned() == 0:
self.error = True
- return objc_runtime.InvalidPointer_Description(True)
+ return lldb.runtime.objc.objc_runtime.InvalidPointer_Description(True)
else:
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(self.valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(self.valobj,statistics)
if wrapper:
self.error = True
return wrapper
@@ -179,7 +179,7 @@
return wrapper;
def CFArray_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = NSArray_SynthProvider(valobj,dict);
if provider.invalid == False:
if provider.error == True:
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for CFBag
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -37,21 +37,21 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# 12 bytes on i386
# 20 bytes on x64
# most probably 2 pointers and 4 bytes of data
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.sys_params.is_64_bit:
return 20
else:
return 12
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
size = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -63,17 +63,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
num_children_vo = self.valobj.CreateValueFromExpression("count","(int)CFBagGetCount(" + stream.GetData() + " )")
@@ -83,9 +83,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -112,10 +112,10 @@
return wrapper;
def CFBag_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.length();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for CFBinaryHeap
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -37,18 +37,18 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# 8 bytes on i386
# 16 bytes on x64
# most probably 2 pointers
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 2 * self.sys_params.pointer_size
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
size = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -60,17 +60,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
num_children_vo = self.valobj.CreateValueFromExpression("count","(int)CFBinaryHeapGetCount(" + stream.GetData() + " )");
@@ -80,9 +80,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -108,10 +108,10 @@
return wrapper;
def CFBinaryHeap_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.length();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBitVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBitVector.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBitVector.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBitVector.py Thu Apr 26 13:11:46 2012
@@ -8,30 +8,30 @@
# summary provider for CF(Mutable)BitVector
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
# first define some utility functions
def byte_index(abs_pos):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return abs_pos/8
def bit_index(abs_pos):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return abs_pos & 7
def get_bit(byte,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if index < 0 or index > 7:
return None
return (byte >> (7-index)) & 1
def grab_array_item_data(pointer,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return pointer.GetPointeeData(index,1)
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -42,12 +42,12 @@
# obey the interface specification for synthetic children providers
class CFBitVectorKnown_SummaryProvider:
def adjust_for_architecture(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.uiint_size = self.sys_params.types_cache.NSUInteger.GetByteSize()
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -60,7 +60,7 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we skip the CFRuntimeBase
@@ -69,7 +69,7 @@
# that wraps the individual bits
def contents(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
count_vo = self.valobj.CreateChildAtOffset("count",self.sys_params.cfruntime_size,
self.sys_params.types_cache.NSUInteger)
count = count_vo.GetValueAsUnsigned(0)
@@ -109,24 +109,24 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def contents(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return '<unable to summarize this CFBitVector>'
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -156,10 +156,10 @@
return wrapper;
def CFBitVector_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.contents();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for NSDictionary
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -37,7 +37,7 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# empirically determined on both 32 and 64bit desktop Mac OS X
@@ -45,14 +45,14 @@
# the description of __CFDictionary is not readily available so most
# of this is guesswork, plain and simple
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.sys_params.is_64_bit:
return 20
else:
return 12
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -64,7 +64,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -75,16 +75,16 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we just need to skip the ISA and the count immediately follows
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -104,7 +104,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -115,7 +115,7 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we just need to skip the ISA and the count immediately follows
@@ -123,7 +123,7 @@
return self.sys_params.pointer_size
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -143,17 +143,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
num_children_vo = self.valobj.CreateValueFromExpression("count","(int)[" + stream.GetData() + " count]");
@@ -163,9 +163,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -188,10 +188,10 @@
return wrapper;
def CFDictionary_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.num_children();
@@ -206,10 +206,10 @@
return 'Summary Unavailable'
def CFDictionary_SummaryProvider2 (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.num_children();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# synthetic children and summary provider for CFString
# (and related NSString class)
import lldb
-import objc_runtime
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.Logger
def CFString_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = CFStringSynthProvider(valobj,dict);
if provider.invalid == False:
try:
@@ -29,7 +29,7 @@
return ''
def CFAttributedString_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = valobj.GetTarget().GetProcess().GetAddressByteSize()
pointee = valobj.GetValueAsUnsigned(0)
summary = '<variable is not NSAttributedString>'
@@ -54,19 +54,19 @@
class CFStringSynthProvider:
def __init__(self,valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.update()
# children other than "content" are for debugging only and must not be used in production code
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.invalid:
return 0;
return 6;
def read_unicode(self, pointer):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
process = self.valobj.GetTarget().GetProcess()
error = lldb.SBError()
pystr = u''
@@ -94,7 +94,7 @@
# handle the special case strings
# only use the custom code for the tested LP64 case
def handle_special(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_64_bit == False:
# for 32bit targets, use safe ObjC code
return self.handle_unicode_string_safe()
@@ -112,7 +112,7 @@
"(char*)\"" + self.valobj.GetObjectDescription() + "\"");
def handle_unicode_string(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# step 1: find offset
if self.inline:
pointer = self.valobj.GetValueAsUnsigned(0) + self.size_of_cfruntime_base();
@@ -138,14 +138,14 @@
return pystr.encode('utf-8')
def handle_inline_explicit(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = 3*self.pointer_size
offset = offset + self.valobj.GetValueAsUnsigned(0)
return self.valobj.CreateValueFromExpression("content",
"(char*)(" + str(offset) + ")")
def handle_mutable_string(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = 2 * self.pointer_size
data = self.valobj.CreateChildAtOffset("content",
offset, self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar).GetPointerType());
@@ -154,7 +154,7 @@
return self.valobj.CreateValueFromExpression("content", "(char*)(" + str(data_value) + ")")
def handle_UTF8_inline(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = self.valobj.GetValueAsUnsigned(0) + self.size_of_cfruntime_base();
if self.explicit == False:
offset = offset + 1;
@@ -162,13 +162,13 @@
offset, self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar)).AddressOf();
def handle_UTF8_not_inline(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = self.size_of_cfruntime_base();
return self.valobj.CreateChildAtOffset("content",
offset,self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar).GetPointerType());
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Querying for child [" + str(index) + "]"
if index == 0:
return self.valobj.CreateValueFromExpression("mutable",
@@ -215,7 +215,7 @@
return self.handle_UTF8_not_inline();
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Querying for child ['" + str(name) + "']"
if name == "content":
return self.num_children() - 1;
@@ -235,7 +235,7 @@
# to get its size we add up sizeof(pointer)+4
# and then add 4 more bytes if we are on a 64bit system
def size_of_cfruntime_base(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.pointer_size+4+(4 if self.is_64_bit else 0)
# the info bits are part of the CFRuntimeBase structure
@@ -244,14 +244,14 @@
# on big-endian this means going to byte 3, if we are on
# little endian (OSX & iOS), this means reading byte 0
def offset_of_info_bits(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
offset = self.pointer_size
if self.is_little == False:
offset = offset + 3;
return offset;
def read_info_bits(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
cfinfo = self.valobj.CreateChildAtOffset("cfinfo",
self.offset_of_info_bits(),
self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar));
@@ -267,18 +267,18 @@
# calculating internal flag bits of the CFString object
# this stuff is defined and discussed in CFString.c
def is_mutable(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return (self.info_bits & 1) == 1;
def is_inline(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return (self.info_bits & 0x60) == 0;
# this flag's name is ambiguous, it turns out
# we must skip a length byte to get at the data
# when this flag is False
def has_explicit_length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return (self.info_bits & (1 | 4)) != 4;
# probably a subclass of NSString. obtained this from [str pathExtension]
@@ -286,17 +286,17 @@
# in the long run using the isa value might be safer as a way to identify this
# instead of reading the info_bits
def is_special_case(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.info_bits == 0;
def is_unicode(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return (self.info_bits & 0x10) == 0x10;
# preparing ourselves to read into memory
# by adjusting architecture-specific info
def adjust_for_architecture(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
self.is_64_bit = self.pointer_size == 8
self.is_little = self.valobj.GetTarget().GetProcess().GetByteOrder() == lldb.eByteOrderLittle
@@ -304,7 +304,7 @@
# reading info bits out of the CFString and computing
# useful values to get at the real data
def compute_flags(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.info_bits = self.read_info_bits();
if self.info_bits == None:
return;
@@ -315,6 +315,6 @@
self.special = self.is_special_case();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
self.compute_flags();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/Class.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/Class.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/Class.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/Class.py Thu Apr 26 13:11:46 2012
@@ -6,12 +6,12 @@
License. See LICENSE.TXT for details.
"""
import lldb
-import objc_runtime
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.Logger
def Class_Summary(valobj,dict):
- logger = Logger.Logger()
- runtime = objc_runtime.ObjCRuntime.runtime_from_isa(valobj)
+ logger = lldb.formatters.Logger.Logger()
+ runtime =lldb.runtime.objc.objc_runtime.ObjCRuntime.runtime_from_isa(valobj)
if runtime == None or not runtime.is_valid():
return '<error: unknown Class>'
class_data = runtime.read_class_data()
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py Thu Apr 26 13:11:46 2012
@@ -8,12 +8,12 @@
# summary provider for NSBundle
import lldb
import ctypes
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import NSURL
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -27,7 +27,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSString):
@@ -35,18 +35,18 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we need to skip the ISA, plus four other values
# that are luckily each a pointer in size
# which makes our computation trivial :-)
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 5 * self.sys_params.pointer_size
def url_text(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
text = self.valobj.CreateChildAtOffset("text",
self.offset(),
@@ -65,17 +65,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def url_text(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
expr = "(NSString*)[" + stream.GetData() + " bundlePath]"
@@ -86,9 +86,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -107,10 +107,10 @@
return wrapper;
def NSBundle_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.url_text();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for NSData
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSConcreteData_SummaryProvider __init__"
self.valobj = valobj;
self.sys_params = params
@@ -49,7 +49,7 @@
return 2 * self.sys_params.pointer_size
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSConcreteData_SummaryProvider length"
size = self.valobj.CreateChildAtOffset("count",
self.offset(),
@@ -64,7 +64,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSDataUnknown_SummaryProvider __init__"
self.valobj = valobj;
self.sys_params = params
@@ -74,7 +74,7 @@
self.adjust_for_architecture();
def length(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSDataUnknown_SummaryProvider length"
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
@@ -90,9 +90,9 @@
def GetSummary_Impl(valobj):
global statistics
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSData GetSummary_Impl"
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
logger >> "got a wrapper summary - using it"
return wrapper
@@ -110,7 +110,7 @@
return wrapper;
def NSData_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSData_SummaryProvider"
provider = GetSummary_Impl(valobj);
logger >> "found a summary provider, it is: " + str(provider)
@@ -133,12 +133,12 @@
return 'Summary Unavailable'
def NSData_SummaryProvider2 (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "NSData_SummaryProvider2"
provider = GetSummary_Impl(valobj);
logger >> "found a summary provider, it is: " + str(provider)
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.length();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py Thu Apr 26 13:11:46 2012
@@ -8,15 +8,15 @@
# summary provider for NSDate
import lldb
import ctypes
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import struct
import time
import datetime
import CFString
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -29,13 +29,13 @@
osx_epoch = datetime.date(2001,1,1).timetuple()
def mkgmtime(t):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return time.mktime(t)-time.timezone
osx_epoch = mkgmtime(osx_epoch)
def osx_to_python_time(osx):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if python_epoch <= 2001:
return osx + osx_epoch
else:
@@ -43,12 +43,12 @@
# represent a struct_time as a string in the format used by Xcode
def xcode_format_time(X):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return time.strftime('%Y-%m-%d %H:%M:%S %Z',X)
# represent a count-since-epoch as a string in the format used by Xcode
def xcode_format_count(X):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return xcode_format_time(time.localtime(X))
# despite the similary to synthetic children providers, these classes are not
@@ -59,7 +59,7 @@
pass
def __init__(self, valobj, info_bits, data, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
@@ -68,11 +68,11 @@
self.data = ((data << 8) | (info_bits << 4))
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# the value of the date-time object is wrapped into the pointer value
# unfortunately, it is made as a time-delta after Jan 1 2001 midnight GMT
# while all Python knows about is the "epoch", which is a platform-dependent
@@ -86,7 +86,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.double):
@@ -94,15 +94,15 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
value = self.valobj.CreateChildAtOffset("value",
self.offset(),
self.sys_params.types_cache.double)
@@ -114,7 +114,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.double):
@@ -122,15 +122,15 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 2*self.sys_params.pointer_size
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
value = self.valobj.CreateChildAtOffset("value",
self.offset(),
self.sys_params.types_cache.double)
@@ -142,7 +142,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.voidptr):
@@ -150,15 +150,15 @@
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def timezone(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
tz_string = self.valobj.CreateChildAtOffset("tz_name",
self.offset(),
self.sys_params.types_cache.voidptr)
@@ -169,16 +169,16 @@
pass
def __init__(self, valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
expr = "(NSString*)[" + stream.GetData() + " description]"
@@ -188,9 +188,9 @@
return '<variable is not NSDate>'
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -211,16 +211,16 @@
wrapper = NSTimeZoneClass_SummaryProvider(valobj, class_data.sys_params)
statistics.metric_hit('code_notrun',valobj)
else:
- wrapper = NSUnknownDate_SummaryProvider(valobj, class_data.sys_params)
+ wrapper = NSUnknownDate_SummaryProvider(valobj)
statistics.metric_hit('unknown_class',valobj.GetName() + " seen as " + name_string)
return wrapper;
def NSDate_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.value();
@@ -232,10 +232,10 @@
return 'Summary Unavailable'
def NSTimeZone_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.timezone();
@@ -249,7 +249,7 @@
def CFAbsoluteTime_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
value_double = struct.unpack('d', struct.pack('Q', valobj.GetValueAsUnsigned(0)))[0]
return xcode_format_count(osx_to_python_time(value_double))
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSException.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSException.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSException.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSException.py Thu Apr 26 13:11:46 2012
@@ -6,13 +6,13 @@
License. See LICENSE.TXT for details.
"""
# summary provider for class NSException
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import CFString
import lldb
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -23,7 +23,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.id):
@@ -31,18 +31,18 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def offset_name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def offset_reason(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 2*self.sys_params.pointer_size
def description(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
name_ptr = self.valobj.CreateChildAtOffset("name",
self.offset_name(),
self.sys_params.types_cache.id)
@@ -56,17 +56,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def description(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
name_vo = self.valobj.CreateValueFromExpression("name","(NSString*)[" + stream.GetData() + " name]");
@@ -77,9 +77,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -95,10 +95,10 @@
return wrapper;
def NSException_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.description();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for NS(Mutable)IndexSet
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -37,7 +37,7 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# NS(Mutable)IndexSet works in one of two modes: when having a compact block of data (e.g. a Range)
@@ -48,7 +48,7 @@
# is set, then we are in mode 1, using that area to store flags, otherwise, the read pointer is the
# location to go look for count in mode 2
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
mode_chooser_vo = self.valobj.CreateChildAtOffset("mode_chooser",
2*self.sys_params.pointer_size,
self.sys_params.types_cache.NSUInteger)
@@ -78,17 +78,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
expr = "(int)[" + stream.GetData() + " count]"
@@ -99,9 +99,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -118,10 +118,10 @@
def NSIndexSet_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.count();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py Thu Apr 26 13:11:46 2012
@@ -8,11 +8,11 @@
# summary provider for NSData
import lldb
import ctypes
-import objc_runtime
-import metrics
-import Logger
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -26,7 +26,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -37,21 +37,21 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# one pointer is the ISA
# then we have one other internal pointer, plus
# 4 bytes worth of flags. hence, these values
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.sys_params.is_64_bit:
return 20
else:
return 12
def port(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
vport = self.valobj.CreateChildAtOffset("port",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -63,17 +63,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def port(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
num_children_vo = self.valobj.CreateValueFromExpression("port","(int)[" + stream.GetData() + " machPort]")
@@ -83,9 +83,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -101,10 +101,10 @@
return wrapper;
def NSMachPort_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.port();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py Thu Apr 26 13:11:46 2012
@@ -6,13 +6,13 @@
License. See LICENSE.TXT for details.
"""
# summary provider for class NSNotification
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import CFString
import lldb
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -23,7 +23,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.id):
@@ -31,16 +31,16 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# skip the ISA and go to the name pointer
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
string_ptr = self.valobj.CreateChildAtOffset("name",
self.offset(),
self.sys_params.types_cache.id)
@@ -52,17 +52,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
name_vo = self.valobj.CreateValueFromExpression("name","(NSString*)[" + stream.GetData() + " name]")
@@ -72,9 +72,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -90,10 +90,10 @@
return wrapper;
def NSNotification_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.name();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py Thu Apr 26 13:11:46 2012
@@ -8,12 +8,12 @@
# summary provider for NSNumber
import lldb
import ctypes
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import struct
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -27,7 +27,7 @@
pass
def __init__(self, valobj, info_bits, data, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.info_bits = info_bits
@@ -35,11 +35,11 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# in spite of the plenty of types made available by the public NSNumber API
# only a bunch of these are actually used in the internal implementation
# unfortunately, the original type information appears to be lost
@@ -61,7 +61,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.char):
@@ -87,11 +87,11 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
# we need to skip the ISA, then the next byte tells us what to read
# we then skip one other full pointer worth of data and then fetch the contents
@@ -165,17 +165,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
expr = "(NSString*)[" + stream.GetData() + " stringValue]"
@@ -185,9 +185,9 @@
return '<variable is not NSNumber>'
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -209,10 +209,10 @@
def NSNumber_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.value();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSSet.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSSet.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSSet.py Thu Apr 26 13:11:46 2012
@@ -8,12 +8,12 @@
# summary provider for NSSet
import lldb
import ctypes
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import CFBag
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -27,7 +27,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -38,21 +38,21 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# one pointer is the ISA
# then we have one other internal pointer, plus
# 4 bytes worth of flags. hence, these values
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.sys_params.is_64_bit:
return 20
else:
return 12
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
vcount = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -64,17 +64,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
expr = "(int)[" + stream.GetData() + " count]"
@@ -88,7 +88,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -99,16 +99,16 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we just need to skip the ISA and the count immediately follows
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -129,7 +129,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSUInteger):
@@ -140,16 +140,16 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# we just need to skip the ISA and the count immediately follows
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
num_children_vo = self.valobj.CreateChildAtOffset("count",
self.offset(),
self.sys_params.types_cache.NSUInteger)
@@ -161,7 +161,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not (self.sys_params.types_cache.voidptr):
@@ -169,16 +169,16 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# an NSCountedSet is implemented using a CFBag whose pointer just follows the ISA
def offset(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.sys_params.pointer_size
def count(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
cfbag_vo = self.valobj.CreateChildAtOffset("bag_impl",
self.offset(),
self.sys_params.types_cache.voidptr)
@@ -186,9 +186,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -214,7 +214,7 @@
def NSSet_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
try:
@@ -231,10 +231,10 @@
return 'Summary Unavailable'
def NSSet_SummaryProvider2 (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.count();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py Thu Apr 26 13:11:46 2012
@@ -8,12 +8,12 @@
# summary provider for NSURL
import lldb
import ctypes
-import objc_runtime
-import metrics
+import lldb.runtime.objc.objc_runtime
+import lldb.formatters.metrics
import CFString
-import Logger
+import lldb.formatters.Logger
-statistics = metrics.Metrics()
+statistics = lldb.formatters.metrics.Metrics()
statistics.add_metric('invalid_isa')
statistics.add_metric('invalid_pointer')
statistics.add_metric('unknown_class')
@@ -27,7 +27,7 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
if not(self.sys_params.types_cache.NSString):
@@ -37,7 +37,7 @@
self.update();
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
# one pointer is the ISA
@@ -45,14 +45,14 @@
# (which are also present on a 32-bit system)
# plus another pointer, and then the real data
def offset_text(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 24 if self.sys_params.is_64_bit else 16
def offset_base(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.offset_text()+self.sys_params.pointer_size
def url_text(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
text = self.valobj.CreateChildAtOffset("text",
self.offset_text(),
self.sys_params.types_cache.NSString)
@@ -77,17 +77,17 @@
pass
def __init__(self, valobj, params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.sys_params = params
self.update()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture();
def url_text(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
stream = lldb.SBStream()
self.valobj.GetExpressionPath(stream)
url_text_vo = self.valobj.CreateValueFromExpression("url","(NSString*)[" + stream.GetData() + " description]")
@@ -97,9 +97,9 @@
def GetSummary_Impl(valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global statistics
- class_data,wrapper = objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
+ class_data,wrapper =lldb.runtime.objc.objc_runtime.Utilities.prepare_class_detection(valobj,statistics)
if wrapper:
return wrapper
@@ -115,10 +115,10 @@
return wrapper;
def NSURL_SummaryProvider (valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
provider = GetSummary_Impl(valobj);
if provider != None:
- if isinstance(provider,objc_runtime.SpecialSituation_Description):
+ if isinstance(provider,lldb.runtime.objc.objc_runtime.SpecialSituation_Description):
return provider.message()
try:
summary = provider.url_text();
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/cache.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/cache.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/cache.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/cache.py Thu Apr 26 13:11:46 2012
@@ -5,12 +5,12 @@
This file is distributed under the University of Illinois Open Source
License. See LICENSE.TXT for details.
"""
-import metrics
+import lldb.formatters.metrics
class Cache:
def __init__(self):
self.data = {}
- self.statistics = metrics.Metrics()
+ self.statistics = lldb.formatters.metrics.Metrics()
self.statistics.add_metric('hit')
self.statistics.add_metric('miss')
Removed: lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_lldb.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_lldb.py?rev=155645&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_lldb.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_lldb.py (removed)
@@ -1,133 +0,0 @@
-"""
-Objective-C runtime wrapper for use by LLDB Python formatters
-This is an old and deprecated version of the wrapper
-The new code, to which everyone should convert, is in objc_runtime.py
-
-part of The LLVM Compiler Infrastructure
-This file is distributed under the University of Illinois Open Source
-License. See LICENSE.TXT for details.
-"""
-import lldb
-
-class ObjCRuntime:
-
- def __init__(self,valobj = None):
- self.valobj = valobj;
- self.adjust_for_architecture()
-
- def adjust_for_architecture(self):
- self.is_64_bit = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
- self.is_little = (self.valobj.GetTarget().GetProcess().GetByteOrder() == lldb.eByteOrderLittle)
- self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
- self.addr_type = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
- self.addr_ptr_type = self.addr_type.GetPointerType()
-
- def is_tagged(self):
- if valobj is None:
- return None
- ptr_value = self.valobj.GetPointerValue()
- if (ptr_value % 2) == 1:
- return True
- else:
- return False
-
- def read_ascii(self, pointer):
- process = self.valobj.GetTarget().GetProcess()
- error = lldb.SBError()
- pystr = ''
- # cannot do the read at once because there is no length byte
- while True:
- content = process.ReadMemory(pointer, 1, error)
- new_bytes = bytearray(content)
- b0 = new_bytes[0]
- pointer = pointer + 1
- if b0 == 0:
- break
- pystr = pystr + chr(b0)
- return pystr
-
- def read_isa(self):
- # read ISA pointer
- isa_pointer = self.valobj.CreateChildAtOffset("cfisa",
- 0,
- self.addr_ptr_type)
- if isa_pointer == None or isa_pointer.IsValid() == False:
- return None;
- if isa_pointer.GetValue() == None:
- return None;
- isa = int(isa_pointer.GetValue(), 0)
- if isa == 0 or isa == None:
- return None;
- return isa
-
-
- def get_parent_class(self, isa = None):
- if isa is None:
- isa = self.read_isa()
- if isa is None:
- return None
- # read superclass pointer
- rw_pointer = isa + self.pointer_size
- rw_object = self.valobj.CreateValueFromAddress("parent_isa",
- rw_pointer,
- self.addr_type)
- if rw_object == None or rw_object.IsValid() == False:
- return None;
- if rw_object.GetValue() == None:
- return None;
- rw = int(rw_object.GetValue(), 0)
- if rw == 0 or rw == None:
- return None;
- return rw
-
- def get_class_name(self, isa = None):
- if isa is None:
- isa = self.read_isa()
- if isa is None:
- return None
- # read rw pointer
- rw_pointer = isa + 4 * self.pointer_size
- rw_object = self.valobj.CreateValueFromAddress("rw",
- rw_pointer,
- self.addr_type)
- if rw_object == None or rw_object.IsValid() == False:
- return None;
- if rw_object.GetValue() == None:
- return None;
- rw = int(rw_object.GetValue(), 0)
- if rw == 0 or rw == None:
- return None;
-
- # read data pointer
- data_pointer = rw + 8
- data_object = self.valobj.CreateValueFromAddress("data",
- data_pointer,
- self.addr_type)
- if data_object == None or data_object.IsValid() == False:
- return None;
- if data_object.GetValue() == None:
- return None;
- data = int(data_object.GetValue(), 0)
- if data == 0 or data == None:
- return None;
-
- # read ro pointer
- ro_pointer = data + 12 + self.pointer_size
- if self.is_64_bit:
- ro_pointer += 4
- ro_object = self.valobj.CreateValueFromAddress("ro",
- ro_pointer,
- self.addr_type)
- if ro_object == None or ro_object.IsValid() == False:
- return None;
- if ro_object.GetValue() == None:
- return None;
- name_pointer = int(ro_object.GetValue(), 0)
- if name_pointer == 0 or name_pointer == None:
- return None;
-
- # now read the actual name and compare it to known stuff
- name_string = self.read_ascii(name_pointer)
- if (name_string.startswith("NSKVONotify")):
- return self.get_class_name(self.get_parent_class())
- return name_string
Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py Thu Apr 26 13:11:46 2012
@@ -6,15 +6,15 @@
License. See LICENSE.TXT for details.
"""
import lldb
-import cache
-import attrib_fromdict
+import lldb.formatters.cache
+import lldb.formatters.attrib_fromdict
import functools
-import Logger
+import lldb.formatters.Logger
class Utilities:
@staticmethod
def read_ascii(process, pointer,max_len=128):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
error = lldb.SBError()
content = None
try:
@@ -27,7 +27,7 @@
@staticmethod
def is_valid_pointer(pointer, pointer_size, allow_tagged=False, allow_NULL=False):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if pointer == None:
return False
if pointer == 0:
@@ -40,14 +40,14 @@
# so if any pointer has bits 47 thru 63 high we know that this is not a valid isa
@staticmethod
def is_allowed_pointer(pointer):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if pointer == None:
return False
return ((pointer & 0xFFFF800000000000) == 0)
@staticmethod
def read_child_of(valobj,offset,type):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
child = valobj.CreateChildAtOffset("childUNK",offset,type)
if child == None or child.IsValid() == False:
return None;
@@ -55,7 +55,7 @@
@staticmethod
def is_valid_identifier(name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if name is None:
return None
if len(name) == 0:
@@ -70,7 +70,7 @@
@staticmethod
def check_is_osx_lion(target):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# assume the only thing that has a Foundation.framework is a Mac
# assume anything < Lion does not even exist
mod = target.module['Foundation']
@@ -86,7 +86,7 @@
# returns a class_data and a wrapper (or None, if the runtime alone can't decide on a wrapper)
@staticmethod
def prepare_class_detection(valobj,statistics):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
class_data = ObjCRuntime(valobj)
if class_data.is_valid() == False:
statistics.metric_hit('invalid_pointer',valobj)
@@ -108,7 +108,7 @@
class RoT_Data:
def __init__(self,rot_pointer,params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if (Utilities.is_valid_pointer(rot_pointer.GetValueAsUnsigned(),params.pointer_size, allow_tagged=False)):
self.sys_params = params
self.valobj = rot_pointer
@@ -137,7 +137,7 @@
# pass
def __str__(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return \
"instanceSize = " + hex(self.instance_size()) + "\n" + \
"namePointer = " + hex(self.namePointer) + " --> " + self.name
@@ -146,7 +146,7 @@
return self.valid
def instance_size(self,align=False):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid() == False:
return None
if self.instanceSize == None:
@@ -162,7 +162,7 @@
class RwT_Data:
def __init__(self,rwt_pointer,params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if (Utilities.is_valid_pointer(rwt_pointer.GetValueAsUnsigned(),params.pointer_size, allow_tagged=False)):
self.sys_params = params
self.valobj = rwt_pointer
@@ -179,26 +179,26 @@
# perform sanity checks on the contents of this class_rw_t
def check_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valid = True
if not(Utilities.is_valid_pointer(self.roPointer,self.sys_params.pointer_size,allow_tagged=False)):
logger >> "Marking as invalid - ropointer is invalid"
self.valid = False
def __str__(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return \
"roPointer = " + hex(self.roPointer)
def is_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.valid:
return self.data.is_valid()
return False
class Class_Data_V2:
def __init__(self,isa_pointer,params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if (isa_pointer != None) and (Utilities.is_valid_pointer(isa_pointer.GetValueAsUnsigned(),params.pointer_size, allow_tagged=False)):
self.sys_params = params
self.valobj = isa_pointer
@@ -214,7 +214,7 @@
# this call tries to minimize the amount of data fetched- as soon as we have "proven"
# that we have an invalid object, we stop reading
def check_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valid = True
self.isaPointer = Utilities.read_child_of(self.valobj,0,self.sys_params.types_cache.addr_ptr_type)
@@ -272,7 +272,7 @@
# internally to implement the feature - this method will have no clue that a class
# has been KVO'ed unless the standard implementation technique is used
def is_kvo(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
if self.class_name().startswith("NSKVONotifying_"):
return True
@@ -283,12 +283,12 @@
# which is __NSCFType (the versions without __ also exists and we are matching to it
# just to be on the safe side)
def is_cftype(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
return self.class_name() == '__NSCFType' or self.class_name() == 'NSCFType'
def get_superclass(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
parent_isa_pointer = self.valobj.CreateChildAtOffset("parent_isa",
self.sys_params.pointer_size,
@@ -298,20 +298,20 @@
return None
def class_name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
return self.data.data.name
else:
return None
def is_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.valid:
return self.data.is_valid()
return False
def __str__(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 'isaPointer = ' + hex(self.isaPointer) + "\n" + \
"superclassIsaPointer = " + hex(self.superclassIsaPointer) + "\n" + \
"cachePointer = " + hex(self.cachePointer) + "\n" + \
@@ -322,7 +322,7 @@
return False
def instance_size(self,align=False):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid() == False:
return None
return self.rwt.rot.instance_size(align)
@@ -330,7 +330,7 @@
# runtime v1 is much less intricate than v2 and stores relevant information directly in the class_t object
class Class_Data_V1:
def __init__(self,isa_pointer,params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if (isa_pointer != None) and (Utilities.is_valid_pointer(isa_pointer.GetValueAsUnsigned(),params.pointer_size, allow_tagged=False)):
self.valid = True
self.sys_params = params
@@ -347,7 +347,7 @@
# perform sanity checks on the contents of this class_t
def check_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valid = True
self.isaPointer = Utilities.read_child_of(self.valobj,0,self.sys_params.types_cache.addr_ptr_type)
@@ -372,7 +372,7 @@
# internally to implement the feature - this method will have no clue that a class
# has been KVO'ed unless the standard implementation technique is used
def is_kvo(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
if self.class_name().startswith("NSKVONotifying_"):
return True
@@ -383,12 +383,12 @@
# which is __NSCFType (the versions without __ also exists and we are matching to it
# just to be on the safe side)
def is_cftype(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
return self.class_name() == '__NSCFType' or self.class_name() == 'NSCFType'
def get_superclass(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
parent_isa_pointer = self.valobj.CreateChildAtOffset("parent_isa",
self.sys_params.pointer_size,
@@ -398,7 +398,7 @@
return None
def class_name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
return self.name
else:
@@ -408,7 +408,7 @@
return self.valid
def __str__(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return 'isaPointer = ' + hex(self.isaPointer) + "\n" + \
"superclassIsaPointer = " + hex(self.superclassIsaPointer) + "\n" + \
"namePointer = " + hex(self.namePointer) + " --> " + self.name + \
@@ -418,7 +418,7 @@
return False
def instance_size(self,align=False):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid() == False:
return None
if self.instanceSize == None:
@@ -448,7 +448,7 @@
class TaggedClass_Data:
def __init__(self,pointer,params):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global TaggedClass_Values_Lion,TaggedClass_Values_NMOS
self.valid = True
self.name = None
@@ -476,7 +476,7 @@
return self.valid
def class_name(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid():
return self.name
else:
@@ -506,7 +506,7 @@
# it seems reasonable to say that a tagged pointer is the size of a pointer
def instance_size(self,align=False):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.is_valid() == False:
return None
return self.sys_params.pointer_size
@@ -557,19 +557,19 @@
(self.release == other.release) and \
(self.build_string == other.build_string)
-runtime_version = cache.Cache()
-os_version = cache.Cache()
-types_caches = cache.Cache()
-isa_caches = cache.Cache()
+runtime_version = lldb.formatters.cache.Cache()
+os_version = lldb.formatters.cache.Cache()
+types_caches = lldb.formatters.cache.Cache()
+isa_caches = lldb.formatters.cache.Cache()
class SystemParameters:
def __init__(self,valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.adjust_for_architecture(valobj)
self.adjust_for_process(valobj)
def adjust_for_process(self, valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global runtime_version
global os_version
global types_caches
@@ -593,7 +593,7 @@
if types_caches.look_for_key(self.pid):
self.types_cache = types_caches.get_value(self.pid)
else:
- self.types_cache = attrib_fromdict.AttributesDictionary(allow_reset=False)
+ self.types_cache = lldb.formatters.attrib_fromdict.AttributesDictionary(allow_reset=False)
self.types_cache.addr_type = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
self.types_cache.addr_ptr_type = self.types_cache.addr_type.GetPointerType()
self.types_cache.uint32_t = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
@@ -602,7 +602,7 @@
if isa_caches.look_for_key(self.pid):
self.isa_cache = isa_caches.get_value(self.pid)
else:
- self.isa_cache = cache.Cache()
+ self.isa_cache = lldb.formatters.cache.Cache()
isa_caches.add_item(self.pid,self.isa_cache)
def adjust_for_architecture(self,valobj):
@@ -628,7 +628,7 @@
# of a well-known section only present in v1
@staticmethod
def runtime_version(process):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if process.IsValid() == False:
logger >> "No process - bailing out"
return None
@@ -658,13 +658,13 @@
@staticmethod
def runtime_from_isa(isa):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
runtime = ObjCRuntime(isa)
runtime.isa = isa
return runtime
def __init__(self,valobj):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj
self.adjust_for_architecture()
self.sys_params = SystemParameters(self.valobj)
@@ -676,14 +676,14 @@
# an ObjC pointer can either be tagged or must be aligned
def is_tagged(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.valobj is None:
return False
return (Utilities.is_valid_pointer(self.unsigned_value,self.sys_params.pointer_size, allow_tagged=True) and \
not(Utilities.is_valid_pointer(self.unsigned_value,self.sys_params.pointer_size, allow_tagged=False)))
def is_valid(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.valobj is None:
return False
if self.valobj.IsInScope() == False:
@@ -694,7 +694,7 @@
return self.unsigned_value == 0
def read_isa(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.isa_value != None:
logger >> "using cached isa"
return self.isa_value
@@ -711,7 +711,7 @@
return isa_pointer
def read_class_data(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global isa_cache
if self.is_tagged():
# tagged pointers only exist in ObjC v2
Modified: lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py (original)
+++ lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py Thu Apr 26 13:11:46 2012
@@ -1,5 +1,5 @@
import re
-import Logger
+import lldb.formatters.Logger
# C++ STL formatters for LLDB
# These formatters are based upon the version of the GNU libstdc++
@@ -10,28 +10,28 @@
class StdListSynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj
self.count = None
logger >> "Providing synthetic children for a map named " + str(valobj.GetName())
def next_node(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetChildMemberWithName('_M_next')
def is_valid(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.value(self.next_node(node)) != self.node_address
def value(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetValueAsUnsigned()
# Floyd's cyle-finding algorithm
# try to detect if this list has a loop
def has_loop(self):
global _list_uses_loop_detector
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if _list_uses_loop_detector == False:
logger >> "Asked not to use loop detection"
return False
@@ -49,7 +49,7 @@
def num_children(self):
global _list_capping_size
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.count == None:
self.count = self.num_children_impl()
if self.count > _list_capping_size:
@@ -57,7 +57,7 @@
return self.count
def num_children_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
global _list_capping_size
try:
next_val = self.next.GetValueAsUnsigned(0)
@@ -83,14 +83,14 @@
return 0;
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Fetching child " + str(index)
if index < 0:
return None;
@@ -107,7 +107,7 @@
return None
def extract_type(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
list_type = self.valobj.GetType().GetUnqualifiedType()
if list_type.IsReferenceType():
list_type = list_type.GetDereferencedType()
@@ -118,7 +118,7 @@
return data_type
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# preemptively setting this to None - we might end up changing our mind later
self.count = None
try:
@@ -135,25 +135,25 @@
class StdVectorSynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.count = None
self.valobj = valobj
logger >> "Providing synthetic children for a map named " + str(valobj.GetName())
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.count == None:
self.count = self.num_children_impl()
return self.count
def is_valid_pointer(ptr,process):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
error = lldb.SBError()
process.ReadMemory(ptr,1,error)
return False if error.Fail() else True
def num_children_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
start_val = self.start.GetValueAsUnsigned(0)
finish_val = self.finish.GetValueAsUnsigned(0)
@@ -188,14 +188,14 @@
return 0;
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Retrieving child " + str(index)
if index < 0:
return None;
@@ -208,7 +208,7 @@
return None
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# preemptively setting this to None - we might end up changing our mind later
self.count = None
try:
@@ -230,7 +230,7 @@
class StdMapSynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.count = None
logger >> "Providing synthetic children for a map named " + str(valobj.GetName())
@@ -243,7 +243,7 @@
# to replace the longer versions of std::string with the shorter one in order to be able
# to find the type name
def fixup_class_name(self, class_name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if class_name == 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >':
return 'std::basic_string<char>',True
if class_name == 'basic_string<char, std::char_traits<char>, std::allocator<char> >':
@@ -255,7 +255,7 @@
return class_name,False
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
# preemptively setting this to None - we might end up changing our mind later
self.count = None
try:
@@ -313,7 +313,7 @@
def num_children(self):
global _map_capping_size
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.count == None:
self.count = self.num_children_impl()
if self.count > _map_capping_size:
@@ -321,7 +321,7 @@
return self.count
def num_children_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
root_ptr_val = self.node_ptr_value(self.Mroot)
if root_ptr_val == 0:
@@ -333,14 +333,14 @@
return 0;
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Being asked to fetch child[" + str(index) + "]"
if index < 0:
return None
@@ -362,24 +362,24 @@
# utility functions
def node_ptr_value(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetValueAsUnsigned(0)
def right(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetChildMemberWithName("_M_right");
def left(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetChildMemberWithName("_M_left");
def parent(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetChildMemberWithName("_M_parent");
# from libstdc++ implementation of iterator for rbtree
def increment_node(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
max_steps = self.num_children()
if self.node_ptr_value(self.right(node)) != 0:
x = self.right(node);
Modified: lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py (original)
+++ lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py Thu Apr 26 13:11:46 2012
@@ -1,5 +1,5 @@
import lldb
-import Logger
+import lldb.formatters.Logger
# libcxx STL formatters for LLDB
# These formatters are based upon the implementation of libc++ that
@@ -28,7 +28,7 @@
# no external significance - we access them by index since this saves a name lookup that would add
# no information for readers of the code, but when possible try to use meaningful variable names
def stdstring_SummaryProvider(valobj,dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
r = valobj.GetChildAtIndex(0)
B = r.GetChildAtIndex(0)
first = B.GetChildAtIndex(0)
@@ -57,11 +57,11 @@
class stdvector_SynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
def num_children(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
start_val = self.start.GetValueAsUnsigned(0)
finish_val = self.finish.GetValueAsUnsigned(0)
@@ -89,14 +89,14 @@
return 0;
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Retrieving child " + str(index)
if index < 0:
return None;
@@ -109,7 +109,7 @@
return None
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
self.start = self.valobj.GetChildMemberWithName('__begin_')
self.finish = self.valobj.GetChildMemberWithName('__end_')
@@ -129,27 +129,27 @@
class stdlist_entry:
def __init__(self,entry):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.entry = entry
def _next_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return stdlist_entry(self.entry.GetChildMemberWithName('__next_'))
def _prev_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return stdlist_entry(self.entry.GetChildMemberWithName('__prev_'))
def _value_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.entry.GetValueAsUnsigned(0)
def _isnull_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self._value_impl() == 0
def _sbvalue_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.entry
next = property(_next_impl,None)
@@ -160,21 +160,21 @@
class stdlist_iterator:
def increment_node(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if node.is_null:
return None
return node.next
def __init__(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.node = stdlist_entry(node) # we convert the SBValue to an internal node object on entry
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.node.sbvalue # and return the SBValue back on exit
def next(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
node = self.increment_node(self.node)
if node != None and node.sbvalue.IsValid() and not(node.is_null):
self.node = node
@@ -183,7 +183,7 @@
return None
def advance(self,N):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if N < 0:
return None
if N == 0:
@@ -198,22 +198,22 @@
class stdlist_SynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj
def next_node(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetChildMemberWithName('__next_')
def value(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return node.GetValueAsUnsigned()
# Floyd's cyle-finding algorithm
# try to detect if this list has a loop
def has_loop(self):
global _list_uses_loop_detector
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if _list_uses_loop_detector == False:
logger >> "Asked not to use loop detection"
return False
@@ -231,7 +231,7 @@
def num_children(self):
global _list_capping_size
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.count == None:
self.count = self.num_children_impl()
if self.count > _list_capping_size:
@@ -240,7 +240,7 @@
def num_children_impl(self):
global _list_capping_size
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
next_val = self.head.GetValueAsUnsigned(0)
prev_val = self.tail.GetValueAsUnsigned(0)
@@ -265,14 +265,14 @@
return 0;
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Fetching child " + str(index)
if index < 0:
return None;
@@ -290,7 +290,7 @@
return None
def extract_type(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
list_type = self.valobj.GetType().GetUnqualifiedType()
if list_type.IsReferenceType():
list_type = list_type.GetDereferencedType()
@@ -301,7 +301,7 @@
return data_type
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.count = None
try:
impl = self.valobj.GetChildMemberWithName('__end_')
@@ -321,31 +321,31 @@
# a tree node - this class makes the syntax in the actual iterator nicer to read and maintain
class stdmap_iterator_node:
def _left_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return stdmap_iterator_node(self.node.GetChildMemberWithName("__left_"))
def _right_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return stdmap_iterator_node(self.node.GetChildMemberWithName("__right_"))
def _parent_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return stdmap_iterator_node(self.node.GetChildMemberWithName("__parent_"))
def _value_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.node.GetValueAsUnsigned(0)
def _sbvalue_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.node
def _null_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.value == 0
def __init__(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.node = node
left = property(_left_impl,None)
@@ -359,7 +359,7 @@
class stdmap_iterator:
def tree_min(self,x):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
steps = 0
if x.is_null:
return None
@@ -372,7 +372,7 @@
return x
def tree_max(self,x):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if x.is_null:
return None
while (not x.right.is_null):
@@ -380,13 +380,13 @@
return x
def tree_is_left_child(self,x):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if x.is_null:
return None
return True if x.value == x.parent.left.value else False
def increment_node(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if node.is_null:
return None
if not node.right.is_null:
@@ -401,16 +401,16 @@
return node.parent
def __init__(self,node,max_count=0):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.node = stdmap_iterator_node(node) # we convert the SBValue to an internal node object on entry
self.max_count = max_count
def value(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
return self.node.sbvalue # and return the SBValue back on exit
def next(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
node = self.increment_node(self.node)
if node != None and node.sbvalue.IsValid() and not(node.is_null):
self.node = node
@@ -419,7 +419,7 @@
return None
def advance(self,N):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if N < 0:
return None
if N == 0:
@@ -435,12 +435,12 @@
class stdmap_SynthProvider:
def __init__(self, valobj, dict):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.valobj = valobj;
self.pointer_size = self.valobj.GetProcess().GetAddressByteSize()
def update(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
self.count = None
try:
# we will set this to True if we find out that discovering a node in the map takes more steps than the overall size of the RB tree
@@ -458,7 +458,7 @@
def num_children(self):
global _map_capping_size
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.count == None:
self.count = self.num_children_impl()
if self.count > _map_capping_size:
@@ -466,14 +466,14 @@
return self.count
def num_children_impl(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return self.valobj.GetChildMemberWithName('__tree_').GetChildMemberWithName('__pair3_').GetChildMemberWithName('__first_').GetValueAsUnsigned()
except:
return 0;
def get_data_type(self):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.data_type == None or self.data_size == None:
if self.num_children() == 0:
return False
@@ -491,7 +491,7 @@
return True
def get_value_offset(self,node):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
if self.skip_size == None:
node_type = node.GetType()
fields_count = node_type.GetNumberOfFields()
@@ -503,14 +503,14 @@
return (self.skip_size != None)
def get_child_index(self,name):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self,index):
- logger = Logger.Logger()
+ logger = lldb.formatters.Logger.Logger()
logger >> "Retrieving child " + str(index)
if index < 0:
return None
Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h Thu Apr 26 13:11:46 2012
@@ -125,10 +125,10 @@
SetCommandString (const char *command, size_t len);
bool
- GetCommandString (std::string &command);
+ GetCommandString (std::string &command) const;
bool
- GetQuotedCommandString (std::string &command);
+ GetQuotedCommandString (std::string &command) const;
//------------------------------------------------------------------
/// Gets the number of arguments left in this command object.
Modified: lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h Thu Apr 26 13:11:46 2012
@@ -22,23 +22,24 @@
public PluginInterface
{
public:
+ //------------------------------------------------------------------
+ // Symbol file ability bits.
+ //
+ // Each symbol file can claim to support one or more symbol file
+ // abilities. These get returned from SymbolFile::GetAbilities().
+ // These help us to determine which plug-in will be best to load
+ // the debug information found in files.
+ //------------------------------------------------------------------
enum Abilities
{
- Labels = (1 << 0),
- AddressAcceleratorTable = (1 << 1),
- FunctionAcceleratorTable = (1 << 2),
- TypeAcceleratorTable = (1 << 3),
- MacroInformation = (1 << 4),
- CallFrameInformation = (1 << 5),
- RuntimeTypes = (1 << 6),
- CompileUnits = (1 << 7),
- LineTables = (1 << 8),
- LineColumns = (1 << 9),
- Functions = (1 << 10),
- Blocks = (1 << 11),
- GlobalVariables = (1 << 12),
- LocalVariables = (1 << 13),
- VariableTypes = (1 << 14)
+ CompileUnits = (1u << 0),
+ LineTables = (1u << 1),
+ Functions = (1u << 2),
+ Blocks = (1u << 3),
+ GlobalVariables = (1u << 4),
+ LocalVariables = (1u << 5),
+ VariableTypes = (1u << 6),
+ kAllAbilities =((1u << 7) - 1u)
};
static SymbolFile *
Modified: lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj Thu Apr 26 13:11:46 2012
@@ -4219,9 +4219,9 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
CLANG_OBJC_RUNTIME = NO;
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 143;
+ DYLIB_CURRENT_VERSION = 144;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4281,10 +4281,10 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
CLANG_OBJC_RUNTIME = NO;
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 143;
+ DYLIB_CURRENT_VERSION = 144;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4396,8 +4396,8 @@
2689FFD513353D7A00698AC0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 143;
- DYLIB_CURRENT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
+ DYLIB_CURRENT_VERSION = 144;
EXECUTABLE_EXTENSION = a;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4425,8 +4425,8 @@
2689FFD613353D7A00698AC0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 143;
- DYLIB_CURRENT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
+ DYLIB_CURRENT_VERSION = 144;
EXECUTABLE_EXTENSION = a;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4454,8 +4454,8 @@
2689FFD713353D7A00698AC0 /* BuildAndIntegration */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 143;
- DYLIB_CURRENT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
+ DYLIB_CURRENT_VERSION = 144;
EXECUTABLE_EXTENSION = a;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4541,7 +4541,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4581,10 +4581,10 @@
CLANG_LINK_OBJC_RUNTIME = NO;
CLANG_OBJC_RUNTIME = NO;
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
DEAD_CODE_STRIPPING = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 143;
+ DYLIB_CURRENT_VERSION = 144;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -4885,7 +4885,7 @@
26F5C26C10F3D9A5009D5894 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4915,7 +4915,7 @@
26F5C26D10F3D9A5009D5894 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 143;
+ CURRENT_PROJECT_VERSION = 144;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
Modified: lldb/branches/lldb-platform-work/resources/LLDB-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/resources/LLDB-Info.plist?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/resources/LLDB-Info.plist (original)
+++ lldb/branches/lldb-platform-work/resources/LLDB-Info.plist Thu Apr 26 13:11:46 2012
@@ -17,7 +17,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>143</string>
+ <string>144</string>
<key>CFBundleName</key>
<string>${EXECUTABLE_NAME}</string>
</dict>
Modified: lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh (original)
+++ lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh Thu Apr 26 13:11:46 2012
@@ -75,13 +75,13 @@
# Make the Python directory in the framework if it doesn't already exist
- framework_python_dir="${TARGET_DIR}/LLDB.framework/Resources/Python"
+ framework_python_dir="${TARGET_DIR}/LLDB.framework/Resources/Python/lldb"
else
# We are on a non-Darwin system, so use the PYTHON_INSTALL_DIR argument,
# and append the python version directory to the end of it. Depending on
# the system other stuff may need to be put here as well.
- framework_python_dir="${PYTHON_INSTALL_DIR}/python${PYTHON_VERSION}"
+ framework_python_dir="${PYTHON_INSTALL_DIR}/python${PYTHON_VERSION}/lldb"
fi
#
@@ -94,25 +94,30 @@
echo "Python files will be put in ${framework_python_dir}"
fi
-if [ ! -d "${framework_python_dir}" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Making directory ${framework_python_dir}"
+python_dirs="${framework_python_dir}"
+
+for python_dir in $python_dirs
+do
+ if [ ! -d "${python_dir}" ]
+ then
+ if [ $Debug == 1 ]
+ then
+ echo "Making directory ${python_dir}"
+ fi
+ mkdir -p "${python_dir}"
+ else
+ if [ $Debug == 1 ]
+ then
+ echo "${python_dir} already exists."
+ fi
fi
- mkdir -p "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
+
+ if [ ! -d "${python_dir}" ]
then
- echo "${framework_python_dir} already exists."
+ echo "Error: Unable to find or create ${python_dir}" >&2
+ exit 1
fi
-fi
-
-if [ ! -d "${framework_python_dir}" ]
-then
- echo "Error: Unable to find or create ${framework_python_dir}" >&2
- exit 1
-fi
+done
# Make the symlink that the script bridge for Python will need in the
# Python framework directory
@@ -126,10 +131,10 @@
if [ ${OS_NAME} == "Darwin" ]
then
cd "${framework_python_dir}"
- ln -s "../../LLDB" _lldb.so
+ ln -s "../../../LLDB" _lldb.so
else
cd "${TARGET_DIR}"
- ln -s "./LLDB" _lldb.so
+ ln -s "../LLDB" _lldb.so
fi
else
if [ $Debug == 1 ]
@@ -138,415 +143,121 @@
fi
fi
-# Copy the python module (lldb.py) that was generated by SWIG
-# over to the framework Python directory
-if [ -f "${CONFIG_BUILD_DIR}/lldb.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying lldb.py to ${framework_python_dir}"
- fi
- cp "${CONFIG_BUILD_DIR}/lldb.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${CONFIG_BUILD_DIR}/lldb.py"
- fi
-fi
-
-# Copy the embedded interpreter script over to the framework Python directory
-if [ -f "${SRC_ROOT}/source/Interpreter/embedded_interpreter.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying embedded_interpreter.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/source/Interpreter/embedded_interpreter.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/source/Interpreter/embedded_interpreter.py"
- fi
-fi
-
-# Copy the C++ STL formatters over to the framework Python directory
-if [ -f "${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying gnu_libstdcpp.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/synthetic/libcxx.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying libcxx.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/synthetic/libcxx.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/synthetic/libcxx.py"
- fi
-fi
-
-# Copy the ObjC formatters over to the framework Python directory
-if [ -f "${SRC_ROOT}/examples/summaries/objc.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying objc.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/objc.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/objc.py"
- fi
-fi
-
-# Copy the Cocoa formatters over to the framework Python directory
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFArray.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFArray.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFArray.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFArray.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFDictionary.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFDictionary.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFDictionary.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFDictionary.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFString.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFString.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFString.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFString.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSData.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSData.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSData.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSData.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSMachPort.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSMachPort.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSMachPort.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSMachPort.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSSet.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSSet.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSSet.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSSet.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSNotification.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSNotification.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSNotification.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSNotification.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSException.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSException.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSException.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSException.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFBag.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFBag.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFBag.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFBag.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFBinaryHeap.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFBinaryHeap.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFBinaryHeap.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFBinaryHeap.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSURL.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSURL.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSURL.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSURL.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSBundle.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSBundle.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSBundle.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSBundle.py"
- fi
-fi
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSNumber.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSNumber.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSNumber.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSNumber.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSDate.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSDate.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSDate.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSDate.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/NSIndexSet.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying NSIndexSet.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/NSIndexSet.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/NSIndexSet.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/CFBitVector.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying CFBitVector.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/CFBitVector.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/CFBitVector.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/Selector.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying Selector.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/Selector.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/Selector.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/Class.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying Class.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/Class.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/Class.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/cache.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying cache.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/cache.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/cache.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/metrics.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying metrics.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/metrics.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/metrics.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying attrib_fromdict.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/Logger.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying Logger.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/Logger.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/Logger.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/objc_lldb.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying objc_lldb.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/objc_lldb.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/objc_lldb.py"
- fi
-fi
-
-if [ -f "${SRC_ROOT}/examples/summaries/cocoa/objc_runtime.py" ]
-then
- if [ $Debug == 1 ]
- then
- echo "Copying objc_runtime.py to ${framework_python_dir}"
- fi
- cp "${SRC_ROOT}/examples/summaries/cocoa/objc_runtime.py" "${framework_python_dir}"
-else
- if [ $Debug == 1 ]
- then
- echo "Unable to find ${SRC_ROOT}/examples/summaries/cocoa/objc_runtime.py"
+function create_python_package {
+ package_dir="${framework_python_dir}$1"
+ package_files="$2"
+ package_name=`echo $1 | tr '/' '.'`
+ package_name="lldb${package_name}"
+
+ if [ ! -d "${package_dir}" ]
+ then
+ mkdir -p "${package_dir}"
+ fi
+
+ for package_file in $package_files
+ do
+ if [ -f "${package_file}" ]
+ then
+ cp "${package_file}" "${package_dir}"
+ package_file_basename=$(basename "${package_file}")
+ fi
+ done
+
+
+ # Create a packate init file if there wasn't one
+ package_init_file="${package_dir}/__init__.py"
+ if [ ! -f "${package_init_file}" ]
+ then
+ echo -n "__all__ = [" > "${package_init_file}"
+ python_module_separator=""
+ for package_file in $package_files
+ do
+ if [ -f "${package_file}" ]
+ then
+ package_file_basename=$(basename "${package_file}")
+ echo -n "${python_module_separator}\"${package_file_basename%.*}\"" >> "${package_init_file}"
+ python_module_separator=", "
+ fi
+ done
+ echo "]" >> "${package_init_file}"
+ echo "for x in __all__:" >> "${package_init_file}"
+ echo " __import__('${package_name}.'+x)" >> "${package_init_file}"
+ fi
+
+
+}
+
+# Copy the lldb.py file into the lldb package directory and rename to __init_.py
+cp "${CONFIG_BUILD_DIR}/lldb.py" "${framework_python_dir}/__init__.py"
+
+# lldb
+package_files="${SRC_ROOT}/source/Interpreter/embedded_interpreter.py"
+create_python_package "" "${package_files}"
+
+# lldb/formatters/cpp
+package_files="${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py
+${SRC_ROOT}/examples/synthetic/libcxx.py"
+create_python_package "/formatters/cpp" "${package_files}"
+
+# lldb/formatters/objc
+package_files="${SRC_ROOT}/examples/summaries/cocoa/Selector.py
+${SRC_ROOT}/examples/summaries/objc.py
+${SRC_ROOT}/examples/summaries/cocoa/Class.py
+${SRC_ROOT}/examples/summaries/cocoa/CFArray.py
+${SRC_ROOT}/examples/summaries/cocoa/CFBag.py
+${SRC_ROOT}/examples/summaries/cocoa/CFBinaryHeap.py
+${SRC_ROOT}/examples/summaries/cocoa/CFBitVector.py
+${SRC_ROOT}/examples/summaries/cocoa/CFDictionary.py
+${SRC_ROOT}/examples/summaries/cocoa/CFString.py
+${SRC_ROOT}/examples/summaries/cocoa/NSBundle.py
+${SRC_ROOT}/examples/summaries/cocoa/NSData.py
+${SRC_ROOT}/examples/summaries/cocoa/NSDate.py
+${SRC_ROOT}/examples/summaries/cocoa/NSException.py
+${SRC_ROOT}/examples/summaries/cocoa/NSIndexSet.py
+${SRC_ROOT}/examples/summaries/cocoa/NSMachPort.py
+${SRC_ROOT}/examples/summaries/cocoa/NSNotification.py
+${SRC_ROOT}/examples/summaries/cocoa/NSNumber.py
+${SRC_ROOT}/examples/summaries/cocoa/NSSet.py
+${SRC_ROOT}/examples/summaries/cocoa/NSURL.py"
+create_python_package "/formatters/objc" "${package_files}"
+
+
+# make an empty __init__.py in lldb/runtime
+# this is required for Python to recognize lldb.runtime as a valid package
+# (and hence, lldb.runtime.objc as a valid contained package)
+create_python_package "/runtime" ""
+
+# lldb/runtime/objc
+package_files="${SRC_ROOT}/examples/summaries/cocoa/objc_runtime.py"
+create_python_package "/runtime/objc" "${package_files}"
+
+# lldb/formatters
+# having these files copied here ensures that lldb/formatters is a valid package itself
+package_files="${SRC_ROOT}/examples/summaries/cocoa/cache.py
+${SRC_ROOT}/examples/summaries/cocoa/metrics.py
+${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py
+${SRC_ROOT}/examples/summaries/cocoa/Logger.py"
+create_python_package "/formatters" "${package_files}"
+
+# lldb/utils
+package_files="${SRC_ROOT}/examples/python/symbolication.py"
+create_python_package "/utils" "${package_files}"
+
+if [ ${OS_NAME} == "Darwin" ]
+then
+ # lldb/macosx
+ package_files="${SRC_ROOT}/examples/python/crashlog.py
+ ${SRC_ROOT}/examples/darwin/heap_find/heap.py"
+ create_python_package "/macosx" "${package_files}"
+
+ # Copy files needed by lldb/macosx/heap.py to build libheap.dylib
+ heap_dir="${framework_python_dir}/macosx/heap"
+ if [ ! -d "${heap_dir}" ]
+ then
+ mkdir -p "${heap_dir}"
+ cp "${SRC_ROOT}/examples/darwin/heap_find/heap/heap_find.cpp" "${heap_dir}"
+ cp "${SRC_ROOT}/examples/darwin/heap_find/heap/Makefile" "${heap_dir}"
fi
fi
Modified: lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp Thu Apr 26 13:11:46 2012
@@ -184,27 +184,38 @@
back and check your syntax. \n\
\n\
\n\
-Special information about PYTHON breakpoint commands \n\
----------------------------------------------------- \n\
- \n\
-You may enter either one line of Python or multiple lines of Python \n\
-(including defining whole functions, if desired). If you enter a \n\
-single line of Python, that will be passed to the Python interpreter \n\
-'as is' when the breakpoint gets hit. If you enter function \n\
-definitions, they will be passed to the Python interpreter as soon as \n\
-you finish entering the breakpoint command, and they can be called \n\
-later (don't forget to add calls to them, if you want them called when \n\
-the breakpoint is hit). If you enter multiple lines of Python that \n\
-are not function definitions, they will be collected into a new, \n\
-automatically generated Python function, and a call to the newly \n\
-generated function will be attached to the breakpoint. Important \n\
-Note: Because loose Python code gets collected into functions, if you \n\
-want to access global variables in the 'loose' code, you need to \n\
-specify that they are global, using the 'global' keyword. Be sure to \n\
-use correct Python syntax, including indentation, when entering Python \n\
-breakpoint commands. \nAs a third option, you can pass the name of an already \
-existing Python function and that function will be attached to the breakpoint. \n\
- \n\
+Special information about PYTHON breakpoint commands \n\
+---------------------------------------------------- \n\
+ \n\
+You may enter either one line of Python or multiple lines of Python \n\
+(including defining whole functions, if desired). If you enter a \n\
+single line of Python, that will be passed to the Python interpreter \n\
+'as is' when the breakpoint gets hit. If you enter function \n\
+definitions, they will be passed to the Python interpreter as soon as \n\
+you finish entering the breakpoint command, and they can be called \n\
+later (don't forget to add calls to them, if you want them called when \n\
+the breakpoint is hit). If you enter multiple lines of Python that \n\
+are not function definitions, they will be collected into a new, \n\
+automatically generated Python function, and a call to the newly \n\
+generated function will be attached to the breakpoint. \n\
+ \n\
+This auto-generated function is passed in two arguments: \n\
+ \n\
+ frame: an SBFrame object representing the frame which hit the breakpoint. \n\
+ From the frame you can get back to the thread and process. \n\
+ bp_loc: the number of the breakpoint location that was hit. \n\
+ This is useful since one breakpoint can have many locations. \n\
+ \n\
+Important Note: Because loose Python code gets collected into functions, \n\
+if you want to access global variables in the 'loose' code, you need to \n\
+specify that they are global, using the 'global' keyword. Be sure to \n\
+use correct Python syntax, including indentation, when entering Python \n\
+breakpoint commands. \n\
+ \n\
+As a third option, you can pass the name of an already existing Python function \n\
+and that function will be attached to the breakpoint. It will get passed the \n\
+frame and bp_loc arguments mentioned above. \n\
+ \n\
Example Python one-line breakpoint command: \n\
\n\
(lldb) breakpoint command add -s python 1 \n\
Modified: lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp Thu Apr 26 13:11:46 2012
@@ -207,6 +207,10 @@
}
}
}
+ if (error.GetError() == ENOMEM)
+ {
+ error.SetErrorStringWithFormat("could not allocate %lld bytes of memory to mmap in file", (uint64_t) length);
+ }
}
else
{
Modified: lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp Thu Apr 26 13:11:46 2012
@@ -597,13 +597,13 @@
#endif
EnableCategory(m_objc_category_name,CategoryMap::Last);
- //EnableCategory(m_corefoundation_category_name,CategoryMap::Last);
- //EnableCategory(m_appkit_category_name,CategoryMap::Last);
- //EnableCategory(m_coreservices_category_name,CategoryMap::Last);
- //EnableCategory(m_coregraphics_category_name,CategoryMap::Last);
+ EnableCategory(m_corefoundation_category_name,CategoryMap::Last);
+ EnableCategory(m_appkit_category_name,CategoryMap::Last);
+ EnableCategory(m_coreservices_category_name,CategoryMap::Last);
+ EnableCategory(m_coregraphics_category_name,CategoryMap::Last);
EnableCategory(m_gnu_cpp_category_name,CategoryMap::Last);
EnableCategory(m_libcxx_category_name,CategoryMap::Last);
- //EnableCategory(m_vectortypes_category_name,CategoryMap::Last);
+ EnableCategory(m_vectortypes_category_name,CategoryMap::Last);
EnableCategory(m_system_category_name,CategoryMap::Last);
}
@@ -641,13 +641,13 @@
gnu_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::vector<.+>(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "gnu_libstdcpp.StdVectorSynthProvider")));
+ "lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider")));
gnu_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::map<.+> >(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "gnu_libstdcpp.StdMapSynthProvider")));
+ "lldb.formatters.cpp.gnu_libstdcpp.StdMapSynthProvider")));
gnu_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::list<.+>(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "gnu_libstdcpp.StdListSynthProvider")));
+ "lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider")));
stl_summary_flags.SetDontShowChildren(false);
gnu_category_sp->GetRegexSummaryNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::vector<.+>(( )?&)?$")),
@@ -675,8 +675,8 @@
.SetHideItemNames(false);
#ifndef LLDB_DISABLE_PYTHON
- std::string code(" libcxx.stdstring_SummaryProvider(valobj,dict)");
- lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "libcxx.stdstring_SummaryProvider",code.c_str()));
+ std::string code(" lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,dict)");
+ lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "lldb.formatters.cpp.libcxx.stdstring_SummaryProvider",code.c_str()));
TypeCategoryImpl::SharedPointer libcxx_category_sp = GetCategory(m_libcxx_category_name);
@@ -690,13 +690,13 @@
libcxx_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::__1::vector<.+>(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "libcxx.stdvector_SynthProvider")));
+ "lldb.formatters.cpp.libcxx.stdvector_SynthProvider")));
libcxx_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::__1::list<.+>(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "libcxx.stdlist_SynthProvider")));
+ "lldb.formatters.cpp.libcxx.stdlist_SynthProvider")));
libcxx_category_sp->GetRegexSyntheticNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::__1::map<.+> >(( )?&)?$")),
SyntheticChildrenSP(new TypeSyntheticImpl(stl_synth_flags,
- "libcxx.stdmap_SynthProvider")));
+ "lldb.formatters.cpp.libcxx.stdmap_SynthProvider")));
stl_summary_flags.SetDontShowChildren(false);
libcxx_category_sp->GetRegexSummaryNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::__1::vector<.+>(( )?&)?")),
@@ -784,7 +784,7 @@
.SetHideItemNames(false);
lldb::TypeSummaryImplSP ObjC_BOOL_summary(new ScriptSummaryFormat(objc_flags,
- "objc.BOOL_SummaryProvider",
+ "lldb.formatters.objc.objc.BOOL_SummaryProvider",
""));
TypeCategoryImpl::SharedPointer objc_category_sp = GetCategory(m_objc_category_name);
objc_category_sp->GetSummaryNavigator()->Add(ConstString("BOOL"),
@@ -792,11 +792,11 @@
// we need to skip pointers here since we are special casing a SEL* when retrieving its value
objc_flags.SetSkipPointers(true);
- AddScriptSummary(objc_category_sp, "Selector.SEL_Summary", ConstString("SEL"), objc_flags);
- AddScriptSummary(objc_category_sp, "Selector.SEL_Summary", ConstString("struct objc_selector"), objc_flags);
- AddScriptSummary(objc_category_sp, "Selector.SEL_Summary", ConstString("objc_selector"), objc_flags);
- AddScriptSummary(objc_category_sp, "Selector.SELPointer_Summary", ConstString("objc_selector *"), objc_flags);
- AddScriptSummary(objc_category_sp, "Class.Class_Summary", ConstString("Class"), objc_flags);
+ AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("SEL"), objc_flags);
+ AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("struct objc_selector"), objc_flags);
+ AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("objc_selector"), objc_flags);
+ AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SELPointer_Summary", ConstString("objc_selector *"), objc_flags);
+ AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Class.Class_Summary", ConstString("Class"), objc_flags);
objc_flags.SetSkipPointers(false);
TypeCategoryImpl::SharedPointer corefoundation_category_sp = GetCategory(m_corefoundation_category_name);
@@ -887,94 +887,94 @@
.SetShowMembersOneLiner(false)
.SetHideItemNames(false);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("NSArray"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("__NSArrayI"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("__NSArrayM"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("__NSCFArray"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("CFArrayRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFArray.CFArray_SummaryProvider", ConstString("CFMutableArrayRef"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "CFBag.CFBag_SummaryProvider", ConstString("CFBagRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBag.CFBag_SummaryProvider", ConstString("__CFBag"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBag.CFBag_SummaryProvider", ConstString("const struct __CFBag"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBag.CFBag_SummaryProvider", ConstString("CFMutableBagRef"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "CFBinaryHeap.CFBinaryHeap_SummaryProvider", ConstString("CFBinaryHeapRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBinaryHeap.CFBinaryHeap_SummaryProvider", ConstString("__CFBinaryHeap"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider", ConstString("NSDictionary"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider2", ConstString("CFDictionaryRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider2", ConstString("CFMutableDictionaryRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSCFDictionary"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSDictionaryI"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSDictionaryM"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("NSString"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("CFStringRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("CFMutableStringRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFAttributedString_SummaryProvider", ConstString("NSAttributedString"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("__NSCFConstantString"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("__NSCFString"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("NSCFConstantString"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFString.CFString_SummaryProvider", ConstString("NSCFString"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSBundle.NSBundle_SummaryProvider", ConstString("NSBundle"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider", ConstString("NSData"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider2", ConstString("CFDataRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider2", ConstString("CFMutableDataRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider", ConstString("NSConcreteData"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider", ConstString("NSConcreteMutableData"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSData.NSData_SummaryProvider", ConstString("__NSCFData"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSException.NSException_SummaryProvider", ConstString("NSException"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSMachPort.NSMachPort_SummaryProvider", ConstString("NSMachPort"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSNotification.NSNotification_SummaryProvider", ConstString("NSNotification"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSNotification.NSNotification_SummaryProvider", ConstString("NSConcreteNotification"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSNumber.NSNumber_SummaryProvider", ConstString("NSNumber"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSNumber.NSNumber_SummaryProvider", ConstString("__NSCFBoolean"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSNumber.NSNumber_SummaryProvider", ConstString("__NSCFNumber"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSNumber.NSNumber_SummaryProvider", ConstString("NSCFBoolean"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSNumber.NSNumber_SummaryProvider", ConstString("NSCFNumber"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider", ConstString("NSSet"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider2", ConstString("CFSetRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider2", ConstString("CFMutableSetRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider", ConstString("__NSCFSet"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider", ConstString("__NSSetI"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider", ConstString("__NSSetM"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSSet.NSSet_SummaryProvider", ConstString("NSCountedSet"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSURL.NSURL_SummaryProvider", ConstString("NSURL"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSURL.NSURL_SummaryProvider", ConstString("CFURLRef"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSDate.NSDate_SummaryProvider", ConstString("NSDate"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSDate.NSDate_SummaryProvider", ConstString("__NSDate"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSDate.NSDate_SummaryProvider", ConstString("__NSTaggedDate"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSDate.NSDate_SummaryProvider", ConstString("NSCalendarDate"), appkit_flags);
-
- AddScriptSummary(appkit_category_sp, "NSDate.NSTimeZone_SummaryProvider", ConstString("NSTimeZone"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSDate.NSTimeZone_SummaryProvider", ConstString("CFTimeZoneRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSDate.NSTimeZone_SummaryProvider", ConstString("__NSTimeZone"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("NSArray"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("__NSArrayI"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("__NSArrayM"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("__NSCFArray"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("CFArrayRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFArray.CFArray_SummaryProvider", ConstString("CFMutableArrayRef"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBag.CFBag_SummaryProvider", ConstString("CFBagRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBag.CFBag_SummaryProvider", ConstString("__CFBag"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBag.CFBag_SummaryProvider", ConstString("const struct __CFBag"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBag.CFBag_SummaryProvider", ConstString("CFMutableBagRef"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBinaryHeap.CFBinaryHeap_SummaryProvider", ConstString("CFBinaryHeapRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBinaryHeap.CFBinaryHeap_SummaryProvider", ConstString("__CFBinaryHeap"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider", ConstString("NSDictionary"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider2", ConstString("CFDictionaryRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider2", ConstString("CFMutableDictionaryRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSCFDictionary"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSDictionaryI"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFDictionary.CFDictionary_SummaryProvider", ConstString("__NSDictionaryM"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("NSString"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("CFStringRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("CFMutableStringRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFAttributedString_SummaryProvider", ConstString("NSAttributedString"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("__NSCFConstantString"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("__NSCFString"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("NSCFConstantString"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFString.CFString_SummaryProvider", ConstString("NSCFString"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSBundle.NSBundle_SummaryProvider", ConstString("NSBundle"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider", ConstString("NSData"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider2", ConstString("CFDataRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider2", ConstString("CFMutableDataRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider", ConstString("NSConcreteData"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider", ConstString("NSConcreteMutableData"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSData.NSData_SummaryProvider", ConstString("__NSCFData"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSException.NSException_SummaryProvider", ConstString("NSException"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSMachPort.NSMachPort_SummaryProvider", ConstString("NSMachPort"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNotification.NSNotification_SummaryProvider", ConstString("NSNotification"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNotification.NSNotification_SummaryProvider", ConstString("NSConcreteNotification"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNumber.NSNumber_SummaryProvider", ConstString("NSNumber"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNumber.NSNumber_SummaryProvider", ConstString("__NSCFBoolean"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNumber.NSNumber_SummaryProvider", ConstString("__NSCFNumber"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNumber.NSNumber_SummaryProvider", ConstString("NSCFBoolean"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSNumber.NSNumber_SummaryProvider", ConstString("NSCFNumber"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider", ConstString("NSSet"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider2", ConstString("CFSetRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider2", ConstString("CFMutableSetRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider", ConstString("__NSCFSet"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider", ConstString("__NSSetI"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider", ConstString("__NSSetM"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSSet.NSSet_SummaryProvider", ConstString("NSCountedSet"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSURL.NSURL_SummaryProvider", ConstString("NSURL"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSURL.NSURL_SummaryProvider", ConstString("CFURLRef"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSDate_SummaryProvider", ConstString("NSDate"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSDate_SummaryProvider", ConstString("__NSDate"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSDate_SummaryProvider", ConstString("__NSTaggedDate"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSDate_SummaryProvider", ConstString("NSCalendarDate"), appkit_flags);
+
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSTimeZone_SummaryProvider", ConstString("NSTimeZone"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSTimeZone_SummaryProvider", ConstString("CFTimeZoneRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.NSTimeZone_SummaryProvider", ConstString("__NSTimeZone"), appkit_flags);
// CFAbsoluteTime is actually a double rather than a pointer to an object
// we do not care about the numeric value, since it is probably meaningless to users
appkit_flags.SetDontShowValue(true);
- AddScriptSummary(appkit_category_sp, "NSDate.CFAbsoluteTime_SummaryProvider", ConstString("CFAbsoluteTime"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSDate.CFAbsoluteTime_SummaryProvider", ConstString("CFAbsoluteTime"), appkit_flags);
appkit_flags.SetDontShowValue(false);
- AddScriptSummary(appkit_category_sp, "NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSIndexSet"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSMutableIndexSet"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSIndexSet"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSMutableIndexSet"), appkit_flags);
AddSummary(appkit_category_sp, "@\"${var.month%d}/${var.day%d}/${var.year%d} ${var.hour%d}:${var.minute%d}:${var.second}\"", ConstString("CFGregorianDate"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBitVector.CFBitVector_SummaryProvider", ConstString("CFBitVectorRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBitVector.CFBitVector_SummaryProvider", ConstString("CFMutableBitVectorRef"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBitVector.CFBitVector_SummaryProvider", ConstString("__CFBitVector"), appkit_flags);
- AddScriptSummary(appkit_category_sp, "CFBitVector.CFBitVector_SummaryProvider", ConstString("__CFMutableBitVector"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBitVector.CFBitVector_SummaryProvider", ConstString("CFBitVectorRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBitVector.CFBitVector_SummaryProvider", ConstString("CFMutableBitVectorRef"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBitVector.CFBitVector_SummaryProvider", ConstString("__CFBitVector"), appkit_flags);
+ AddScriptSummary(appkit_category_sp, "lldb.formatters.objc.CFBitVector.CFBitVector_SummaryProvider", ConstString("__CFMutableBitVector"), appkit_flags);
TypeCategoryImpl::SharedPointer vectors_category_sp = GetCategory(m_vectortypes_category_name);
Modified: lldb/branches/lldb-platform-work/source/Core/Timer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Core/Timer.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Core/Timer.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Core/Timer.cpp Thu Apr 26 13:11:46 2012
@@ -116,12 +116,10 @@
if (m_total_start.IsValid())
{
TimeValue stop_time = TimeValue::Now();
- bool notify = false;
if (m_total_start.IsValid())
{
m_total_ticks += (stop_time - m_total_start);
m_total_start.Clear();
- notify = true;
}
if (m_timer_start.IsValid())
{
Modified: lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp Thu Apr 26 13:11:46 2012
@@ -76,8 +76,15 @@
switch (clang_decl_name.getNameKind()) {
// Normal identifiers.
case DeclarationName::Identifier:
- if (clang_decl_name.getAsIdentifierInfo()->getBuiltinID() != 0)
- return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
+ {
+ clang::IdentifierInfo *identifier_info = clang_decl_name.getAsIdentifierInfo();
+
+ if (!identifier_info ||
+ identifier_info->getBuiltinID() != 0)
+ {
+ return SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
+ }
+ }
break;
// Operator names. Not important for now.
Modified: lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist (original)
+++ lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist Thu Apr 26 13:11:46 2012
@@ -25,7 +25,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>143</string>
+ <string>144</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 Apple Inc. All rights reserved.</string>
<key>XPCService</key>
Modified: lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist (original)
+++ lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist Thu Apr 26 13:11:46 2012
@@ -25,7 +25,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>143</string>
+ <string>144</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 Apple Inc. All rights reserved.</string>
<key>XPCService</key>
Modified: lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp Thu Apr 26 13:11:46 2012
@@ -114,7 +114,7 @@
}
bool
-Args::GetCommandString (std::string &command)
+Args::GetCommandString (std::string &command) const
{
command.clear();
int argc = GetArgumentCount();
@@ -128,7 +128,7 @@
}
bool
-Args::GetQuotedCommandString (std::string &command)
+Args::GetQuotedCommandString (std::string &command) const
{
command.clear ();
size_t argc = GetArgumentCount ();
Modified: lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp Thu Apr 26 13:11:46 2012
@@ -296,13 +296,14 @@
int old_count = Debugger::TestDebuggerRefCount();
- run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb, gnu_libstdcpp, libcxx, objc, Logger')", m_dictionary_name.c_str());
+ run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb')", m_dictionary_name.c_str());
PyRun_SimpleString (run_string.GetData());
// WARNING: temporary code that loads Cocoa formatters - this should be done on a per-platform basis rather than loading the whole set
// and letting the individual formatter classes exploit APIs to check whether they can/cannot do their task
run_string.Clear();
- run_string.Printf ("run_one_line (%s, 'import CFString, CFArray, CFDictionary, NSData, NSMachPort, NSSet, NSNotification, NSException, CFBag, CFBinaryHeap, NSURL, NSBundle, NSNumber, NSDate, NSIndexSet, Selector, Class, CFBitVector')", m_dictionary_name.c_str());
+ //run_string.Printf ("run_one_line (%s, 'from lldb.formatters import *; from lldb.formatters.objc import *; from lldb.formatters.cpp import *')", m_dictionary_name.c_str());
+ run_string.Printf ("run_one_line (%s, 'import lldb.runtime.objc, lldb.formatters, lldb.formatters.objc, lldb.formatters.cpp')", m_dictionary_name.c_str());
PyRun_SimpleString (run_string.GetData());
int new_count = Debugger::TestDebuggerRefCount();
@@ -533,7 +534,7 @@
if (script_interpreter_dict != NULL)
{
PyObject *pfunc = (PyObject*)m_run_one_line;
- PyObject *pmod = PyImport_AddModule ("embedded_interpreter");
+ PyObject *pmod = PyImport_AddModule ("lldb.embedded_interpreter");
if (pmod != NULL)
{
PyObject *pmod_dict = PyModule_GetDict (pmod);
@@ -1961,13 +1962,7 @@
}
}
- PyRun_SimpleString ("sys.dont_write_bytecode = 1");
-
- PyRun_SimpleString ("import embedded_interpreter");
-
- PyRun_SimpleString ("from embedded_interpreter import run_python_interpreter");
- PyRun_SimpleString ("from embedded_interpreter import run_one_line");
- PyRun_SimpleString ("from termios import *");
+ PyRun_SimpleString ("sys.dont_write_bytecode = 1; import lldb.embedded_interpreter; from lldb.embedded_interpreter import run_python_interpreter; from lldb.embedded_interpreter import run_one_line; from termios import *");
stdin_tty_state.Restore();
}
Modified: lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp Thu Apr 26 13:11:46 2012
@@ -61,7 +61,12 @@
SymbolFile *symbol_file = image->GetSymbolVendor()->GetSymbolFile();
- if (!symbol_file || !(symbol_file->GetAbilities() & SymbolFile::RuntimeTypes))
+ // Don't use a symbol file if it actually has types. We are specifically
+ // looking for something in runtime information, not from debug information,
+ // as the data in debug information will get parsed by the debug info
+ // symbol files. So we veto any symbol file that has actual variable
+ // type parsing abilities.
+ if (symbol_file == NULL || (symbol_file->GetAbilities() & SymbolFile::VariableTypes))
continue;
const bool inferior_append = true;
Modified: lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Thu Apr 26 13:11:46 2012
@@ -362,16 +362,12 @@
ProcessSP process_sp (m_thread.GetProcess());
if (thread_suffix_supported || static_cast<ProcessGDBRemote *>(process_sp.get())->GetGDBRemote().SetCurrentThread(m_thread.GetID()))
{
- uint32_t offset, end_offset;
StreamString packet;
StringExtractorGDBRemote response;
if (m_read_all_at_once)
{
// Set all registers in one packet
packet.PutChar ('G');
- offset = 0;
- end_offset = m_reg_data.GetByteSize();
-
packet.PutBytesAsRawHex8 (m_reg_data.GetDataStart(),
m_reg_data.GetByteSize(),
lldb::endian::InlHostByteOrder(),
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Apr 26 13:11:46 2012
@@ -508,21 +508,6 @@
if (debug_line_file_size > 0)
abilities |= LineTables;
-
- if (debug_aranges_file_size > 0)
- abilities |= AddressAcceleratorTable;
-
- if (debug_pubnames_file_size > 0)
- abilities |= FunctionAcceleratorTable;
-
- if (debug_pubtypes_file_size > 0)
- abilities |= TypeAcceleratorTable;
-
- if (debug_macinfo_file_size > 0)
- abilities |= MacroInformation;
-
- if (debug_frame_file_size > 0)
- abilities |= CallFrameInformation;
}
return abilities;
}
@@ -5247,7 +5232,8 @@
is_forward_declaration = true;
}
- if (class_language == eLanguageTypeObjC)
+ if (class_language == eLanguageTypeObjC ||
+ class_language == eLanguageTypeObjC_plus_plus)
{
if (!is_complete_objc_class && Supports_DW_AT_APPLE_objc_complete_type(dwarf_cu))
{
@@ -5444,7 +5430,8 @@
// declaration context for a contained class or type without the need
// to complete that type..
- if (class_language != eLanguageTypeObjC)
+ if (class_language != eLanguageTypeObjC &&
+ class_language != eLanguageTypeObjC_plus_plus)
ast.StartTagDeclarationDefinition (clang_type);
// Leave this as a forward declaration until we need
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Thu Apr 26 13:11:46 2012
@@ -106,7 +106,6 @@
if (symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, Symtab::eDebugNo, Symtab::eVisibilityAny, m_code_indexes))
{
symtab->SortSymbolIndexesByValue(m_code_indexes, true);
- abilities |= Labels;
}
if (symtab->AppendSymbolIndexesWithType(eSymbolTypeData, m_data_indexes))
@@ -118,7 +117,6 @@
lldb_private::Symtab::IndexCollection objc_class_indexes;
if (symtab->AppendSymbolIndexesWithType (eSymbolTypeObjCClass, objc_class_indexes))
{
- abilities |= RuntimeTypes;
symtab->AppendSymbolNamesToMap (objc_class_indexes,
true,
true,
@@ -150,14 +148,7 @@
// If we don't have any source file symbols we will just have one compile unit for
// the entire object file
-// if (m_source_indexes.empty())
-// {
-// const FileSpec &obj_file_spec = m_obj_file->GetFileSpec();
-// if (obj_file_spec)
-// cu_sp.reset(new CompileUnit(m_obj_file->GetModule(), NULL, obj_file_spec, 0, eLanguageTypeUnknown));
-//
-// }
- /* else */ if (idx < m_source_indexes.size())
+ if (idx < m_source_indexes.size())
{
const Symbol *cu_symbol = m_obj_file->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]);
if (cu_symbol)
Modified: lldb/branches/lldb-platform-work/source/Symbol/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Symbol/Function.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Symbol/Function.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Symbol/Function.cpp Thu Apr 26 13:11:46 2012
@@ -555,17 +555,50 @@
LineTable* line_table = m_comp_unit->GetLineTable ();
if (line_table)
{
- LineEntry line_entry;
- if (line_table->FindLineEntryByAddress(GetAddressRange().GetBaseAddress(), line_entry))
+ LineEntry first_line_entry;
+ uint32_t first_line_entry_idx = UINT32_MAX;
+ if (line_table->FindLineEntryByAddress(GetAddressRange().GetBaseAddress(), first_line_entry, &first_line_entry_idx))
{
- // We need to take the delta of the end of the first line entry
- // as a file address and the start file address of the function
- // in case the first line entry doesn't start at the beginning
- // of the function.
+ // Make sure the first line entry isn't already the end of the prologue
+ addr_t prologue_end_file_addr = LLDB_INVALID_ADDRESS;
+ if (first_line_entry.is_prologue_end)
+ {
+ prologue_end_file_addr = first_line_entry.range.GetBaseAddress().GetFileAddress();
+ }
+ else
+ {
+ // Check the first few instructions and look for one that has
+ // is_prologue_end set to true.
+ const uint32_t last_line_entry_idx = first_line_entry_idx + 6;
+ LineEntry line_entry;
+ for (uint32_t idx = first_line_entry_idx + 1; idx < last_line_entry_idx; ++idx)
+ {
+ if (line_table->GetLineEntryAtIndex (idx, line_entry))
+ {
+ if (line_entry.is_prologue_end)
+ {
+ prologue_end_file_addr = line_entry.range.GetBaseAddress().GetFileAddress();
+ break;
+ }
+ }
+ }
+ }
+
+ // If we didn't find the end of the prologue in the line tables,
+ // then just use the end address of the first line table entry
+ if (prologue_end_file_addr == LLDB_INVALID_ADDRESS)
+ {
+ prologue_end_file_addr = first_line_entry.range.GetBaseAddress().GetFileAddress() + first_line_entry.range.GetByteSize();
+ }
const addr_t func_start_file_addr = m_range.GetBaseAddress().GetFileAddress();
- const addr_t line_entry_end_file_addr = line_entry.range.GetBaseAddress().GetFileAddress() + line_entry.range.GetByteSize();
- if (line_entry_end_file_addr > func_start_file_addr)
- m_prologue_byte_size = line_entry_end_file_addr - func_start_file_addr;
+ const addr_t func_end_file_addr = func_start_file_addr + m_range.GetByteSize();
+
+ // Verify that this prologue end file address in the function's
+ // address range just to be sure
+ if (func_start_file_addr < prologue_end_file_addr && prologue_end_file_addr < func_end_file_addr)
+ {
+ m_prologue_byte_size = prologue_end_file_addr - func_start_file_addr;
+ }
}
}
}
Modified: lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp Thu Apr 26 13:11:46 2012
@@ -27,9 +27,6 @@
// TODO: Load any plug-ins in the appropriate plug-in search paths and
// iterate over all of them to find the best one for the job.
- //----------------------------------------------------------------------
- // We currently only have one debug symbol parser...
- //----------------------------------------------------------------------
uint32_t best_symfile_abilities = 0;
SymbolFileCreateInstance create_callback;
@@ -39,11 +36,15 @@
if (curr_symfile_ap.get())
{
- uint32_t sym_file_abilities = curr_symfile_ap->GetAbilities();
+ const uint32_t sym_file_abilities = curr_symfile_ap->GetAbilities();
if (sym_file_abilities > best_symfile_abilities)
{
best_symfile_abilities = sym_file_abilities;
best_symfile_ap = curr_symfile_ap;
+ // If any symbol file parser has all of the abilities, then
+ // we should just stop looking.
+ if ((kAllAbilities & sym_file_abilities) == kAllAbilities)
+ break;
}
}
}
Modified: lldb/branches/lldb-platform-work/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Target/Target.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Target/Target.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Target/Target.cpp Thu Apr 26 13:11:46 2012
@@ -1064,6 +1064,11 @@
SectionSP section_sp (addr.GetSection());
if (section_sp)
{
+ // If the contents of this section are encrypted, the on-disk file is unusuable. Read only from live memory.
+ if (section_sp->IsEncrypted())
+ {
+ return 0;
+ }
ModuleSP module_sp (section_sp->GetModule());
if (module_sp)
{
Modified: lldb/branches/lldb-platform-work/source/lldb-log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/lldb-log.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/lldb-log.cpp (original)
+++ lldb/branches/lldb-platform-work/source/lldb-log.cpp Thu Apr 26 13:11:46 2012
@@ -174,7 +174,6 @@
if (log)
{
- bool got_unknown_category = false;
for (size_t i=0; categories[i] != NULL; ++i)
{
const char *arg = categories[i];
@@ -205,12 +204,8 @@
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
- if (got_unknown_category == false)
- {
- got_unknown_category = true;
- ListLogCategories (feedback_strm);
- return log;
- }
+ ListLogCategories (feedback_strm);
+ return log;
}
}
Modified: lldb/branches/lldb-platform-work/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/dotest.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/dotest.py (original)
+++ lldb/branches/lldb-platform-work/test/dotest.py Thu Apr 26 13:11:46 2012
@@ -841,17 +841,17 @@
baiPath2 = os.path.join(base, *(xcode4_build_dir + bai + python_resource_dir))
lldbPath = None
- if os.path.isfile(os.path.join(dbgPath, 'lldb.py')):
+ if os.path.isfile(os.path.join(dbgPath, 'lldb/__init__.py')):
lldbPath = dbgPath
- elif os.path.isfile(os.path.join(dbgPath2, 'lldb.py')):
+ elif os.path.isfile(os.path.join(dbgPath2, 'lldb/__init__.py')):
lldbPath = dbgPath2
- elif os.path.isfile(os.path.join(relPath, 'lldb.py')):
+ elif os.path.isfile(os.path.join(relPath, 'lldb/__init__.py')):
lldbPath = relPath
- elif os.path.isfile(os.path.join(relPath2, 'lldb.py')):
+ elif os.path.isfile(os.path.join(relPath2, 'lldb/__init__.py')):
lldbPath = relPath2
- elif os.path.isfile(os.path.join(baiPath, 'lldb.py')):
+ elif os.path.isfile(os.path.join(baiPath, 'lldb/__init__.py')):
lldbPath = baiPath
- elif os.path.isfile(os.path.join(baiPath2, 'lldb.py')):
+ elif os.path.isfile(os.path.join(baiPath2, 'lldb/__init__.py')):
lldbPath = baiPath2
if not lldbPath:
Modified: lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py (original)
+++ lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py Thu Apr 26 13:11:46 2012
@@ -37,7 +37,7 @@
self.runCmd("next", RUN_SUCCEEDED)
self.runCmd("next", RUN_SUCCEEDED)
- self.runCmd("command script import s11588.py")
+ self.runCmd("command script import --allow-reload s11588.py")
self.runCmd("type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
self.expect("print *((StgClosure*)(r14-1))",
Modified: lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py Thu Apr 26 13:11:46 2012
@@ -84,7 +84,7 @@
self.expect("help targetname",
substrs = ['Run Python function welcome.target_name_imp',
- 'This command takes \'raw\' input',
+ 'This command takes','\'raw\' input',
'quote stuff'])
self.expect("longwait",
Modified: lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py Thu Apr 26 13:11:46 2012
@@ -33,10 +33,10 @@
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- self.runCmd("command script import ./foo/foo.py")
- self.runCmd("command script import ./foo/foo2.py")
- self.runCmd("command script import ./foo/bar/foobar.py")
- self.runCmd("command script import ./bar/bar.py")
+ self.runCmd("command script import ./foo/foo.py --allow-reload")
+ self.runCmd("command script import ./foo/foo2.py --allow-reload")
+ self.runCmd("command script import ./foo/bar/foobar.py --allow-reload")
+ self.runCmd("command script import ./bar/bar.py --allow-reload")
self.expect("command script import ./nosuchfile.py",
error=True, startstr='error: module importing failed')
Modified: lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Thu Apr 26 13:11:46 2012
@@ -127,17 +127,11 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- self.runCmd("type category enable AppKit")
-
self.expect('frame variable italian', substrs = ['L\'Italia è una Repubblica democratica, fondata sul lavoro. La sovranità appartiene al popolo, che la esercita nelle forme e nei limiti della Costituzione.'])
self.expect('frame variable french', substrs = ['Que veut cette horde d\'esclaves, De traîtres, de rois conjurés?'])
self.expect('frame variable german', substrs = ['Ãber-Ich und aus den Ansprüchen der sozialen Umwelt'])
@@ -165,11 +159,6 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
-
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
@@ -227,16 +216,11 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
# Now enable AppKit and check we are displaying Cocoa classes correctly
- self.runCmd("type category enable AppKit")
self.expect('frame variable num1 num2 num3 num4 num5 num6 num7 num8_Y num8_N num9',
substrs = ['(NSNumber *) num1 = ',' (int)5',
'(NSNumber *) num2 = ',' (float)3.1',
@@ -359,8 +343,6 @@
'@"Europe/Rome"',
'@"Europe/Paris"'])
-
- self.runCmd('type category list')
self.runCmd('type summary list')
self.expect('frame variable myclass',
substrs = ['(Class) myclass = NSValue'])
@@ -396,17 +378,10 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- # Now enable AppKit
- self.runCmd("type category enable AppKit")
-
# check that the formatters are able to deal safely and correctly
# with ValueObjects that the expression parser returns
self.expect('expression ((id)@"Hello")', matching=False,
@@ -449,10 +424,6 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
self.runCmd('log timers disable', check=False)
@@ -460,10 +431,6 @@
self.addTearDownHook(cleanup)
# check formatters for common Objective-C types
- self.runCmd('type category enable CoreFoundation')
- self.runCmd('type category enable CoreGraphics')
- self.runCmd('type category enable CoreServices')
- self.runCmd("type category enable AppKit")
self.runCmd("log timers enable")
self.expect("frame variable",
substrs = ['(CFGregorianUnits) cf_greg_units = 1 years, 3 months, 5 days, 12 hours, 5 minutes 7 seconds',
@@ -514,18 +481,10 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
-
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- # check formatters for common Objective-C types
- self.runCmd('type category enable AppKit')
-
# as long as KVO is implemented by subclassing, this test should succeed
# we should be able to dynamically figure out that the KVO implementor class
# is a subclass of Molecule, and use the appropriate summary for it
Modified: lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py Thu Apr 26 13:11:46 2012
@@ -51,13 +51,10 @@
# clean slate for the next test case.
def cleanup():
self.runCmd('type summary clear', check=False)
- self.runCmd('type category disable VectorTypes', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- self.runCmd('type category enable VectorTypes')
-
self.expect('frame variable',
substrs = ['(vFloat) valueFL = (1, 0, 4, 0)',
'(int16_t [8]) valueI16 = (1, 0, 4, 0, 0, 1, 0, 4)',
Modified: lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py Thu Apr 26 13:11:46 2012
@@ -54,16 +54,11 @@
self.runCmd('type format clear', check=False)
self.runCmd('type summary clear', check=False)
self.runCmd('type synth clear', check=False)
- self.runCmd('type category disable CoreFoundation', check=False)
- self.runCmd('type category disable CoreGraphics', check=False)
- self.runCmd('type category disable CoreServices', check=False)
- self.runCmd('type category disable AppKit', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- # Now enable AppKit and check we are displaying Cocoa classes correctly
- self.runCmd("type category enable AppKit")
+ # Now check that we are displaying Cocoa classes correctly
self.expect('frame variable key',
substrs = ['@"1 object"'])
self.expect('frame variable key', matching=False,
Modified: lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py (original)
+++ lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py Thu Apr 26 13:11:46 2012
@@ -49,10 +49,10 @@
self.runCmd("run", RUN_SUCCEEDED)
# check that each type is correctly bound to its list of children
- self.expect("frame variable cf_greg_date", substrs = ['year','month','day','hour','minute','second'])
- self.expect("frame variable cf_range", substrs = ['location','length'])
+ self.expect("frame variable cf_greg_date --raw", substrs = ['year','month','day','hour','minute','second'])
+ self.expect("frame variable cf_range --raw", substrs = ['location','length'])
# check that printing both does not somehow confuse LLDB
- self.expect("frame variable", substrs = ['year','month','day','hour','minute','second','location','length'])
+ self.expect("frame variable --raw", substrs = ['year','month','day','hour','minute','second','location','length'])
if __name__ == '__main__':
import atexit
Modified: lldb/branches/lldb-platform-work/tools/debugserver/source/DNBRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/tools/debugserver/source/DNBRegisterInfo.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/tools/debugserver/source/DNBRegisterInfo.cpp (original)
+++ lldb/branches/lldb-platform-work/tools/debugserver/source/DNBRegisterInfo.cpp Thu Apr 26 13:11:46 2012
@@ -119,7 +119,7 @@
if (pos < end)
pos += snprintf(pos, end - pos, "%d", (int32_t)value.v_sint8[i]);
}
- strncat(str, " }", sizeof(str));
+ strlcat(str, " }", sizeof(str));
break;
default:
@@ -201,7 +201,7 @@
}
break;
}
- strncat(str, " }", sizeof(str));
+ strlcat(str, " }", sizeof(str));
}
else
{
Modified: lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp (original)
+++ lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp Thu Apr 26 13:11:46 2012
@@ -335,7 +335,7 @@
MachProcess::Kill (const struct timespec *timeout_abstime)
{
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill ()");
- nub_state_t state = DoSIGSTOP(true);
+ nub_state_t state = DoSIGSTOP(true, false, NULL);
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill() DoSIGSTOP() state = %s", DNBStateAsString(state));
errno = 0;
::ptrace (PT_KILL, m_pid, 0, 0);
@@ -373,7 +373,7 @@
}
nub_state_t
-MachProcess::DoSIGSTOP (bool clear_bps_and_wps, uint32_t *thread_idx_ptr)
+MachProcess::DoSIGSTOP (bool clear_bps_and_wps, bool allow_running, uint32_t *thread_idx_ptr)
{
nub_state_t state = GetState();
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::DoSIGSTOP() state = %s", DNBStateAsString (state));
@@ -398,7 +398,11 @@
// No threads were stopped with a SIGSTOP, we need to run and halt the
// process with a signal
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::DoSIGSTOP() state = %s -- resuming process", DNBStateAsString (state));
- m_thread_actions = DNBThreadResumeActions (eStateRunning, 0);
+ if (allow_running)
+ m_thread_actions = DNBThreadResumeActions (eStateRunning, 0);
+ else
+ m_thread_actions = DNBThreadResumeActions (eStateSuspended, 0);
+
PrivateResume ();
// Reset the event that says we were indeed running
@@ -432,7 +436,7 @@
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Detach()");
uint32_t thread_idx = UINT32_MAX;
- nub_state_t state = DoSIGSTOP(true, &thread_idx);
+ nub_state_t state = DoSIGSTOP(true, true, &thread_idx);
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Detach() DoSIGSTOP() returned %s", DNBStateAsString(state));
{
Modified: lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h (original)
+++ lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h Thu Apr 26 13:11:46 2012
@@ -248,7 +248,7 @@
nub_size_t RemoveTrapsFromBuffer (nub_addr_t addr, nub_size_t size, uint8_t *buf) const;
uint32_t Flags () const { return m_flags; }
- nub_state_t DoSIGSTOP (bool clear_bps_and_wps, uint32_t *thread_idx_ptr = NULL);
+ nub_state_t DoSIGSTOP (bool clear_bps_and_wps, bool allow_running, uint32_t *thread_idx_ptr);
pid_t m_pid; // Process ID of child process
cpu_type_t m_cpu_type; // The CPU type of this process
Modified: lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp?rev=155646&r1=155645&r2=155646&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp (original)
+++ lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp Thu Apr 26 13:11:46 2012
@@ -424,7 +424,6 @@
err = ::mach_port_deallocate (task_self, exception_port);
if (DNBLogCheckLogBit(LOG_TASK) || err.Fail())
err.LogThreaded("::mach_port_deallocate ( task = 0x%4.4x, name = 0x%4.4x )", task_self, exception_port);
- exception_port = NULL;
return err.Error();
}
More information about the lldb-commits
mailing list