[Lldb-commits] [lldb] r108009 - in /lldb/trunk: ./ include/ include/lldb/ include/lldb/API/ include/lldb/Breakpoint/ include/lldb/Core/ include/lldb/Expression/ include/lldb/Host/ include/lldb/Interpreter/ include/lldb/Target/ lib/ lldb.xcodeproj/ scripts/ source/ source/API/ source/Breakpoint/ source/Commands/ source/Core/ source/Expression/ source/Generated/ source/Host/ source/Host/linux/ source/Host/macosx/ source/Host/posix/ source/Interpreter/ source/Plugins/ source/Plugins/ABI/MacOSX-i386/ source/Plugins/ABI/Sys...

Greg Clayton gclayton at apple.com
Fri Jul 9 13:39:51 PDT 2010


Author: gclayton
Date: Fri Jul  9 15:39:50 2010
New Revision: 108009

URL: http://llvm.org/viewvc/llvm-project?rev=108009&view=rev
Log:
Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.


Added:
    lldb/trunk/Makefile
    lldb/trunk/include/Makefile
    lldb/trunk/include/lldb/Makefile
    lldb/trunk/lib/
    lldb/trunk/lib/Makefile
    lldb/trunk/scripts/generate-vers.pl   (with props)
    lldb/trunk/source/API/Makefile
    lldb/trunk/source/Breakpoint/Makefile
    lldb/trunk/source/Commands/Makefile
    lldb/trunk/source/Core/Makefile
    lldb/trunk/source/Expression/Makefile
    lldb/trunk/source/Generated/
    lldb/trunk/source/Generated/Makefile
    lldb/trunk/source/Host/Makefile
    lldb/trunk/source/Host/linux/Makefile
    lldb/trunk/source/Host/macosx/Makefile
    lldb/trunk/source/Host/posix/Makefile
    lldb/trunk/source/Interpreter/Makefile
    lldb/trunk/source/Makefile
    lldb/trunk/source/Plugins/ABI/MacOSX-i386/Makefile
    lldb/trunk/source/Plugins/ABI/SysV-x86_64/Makefile
    lldb/trunk/source/Plugins/Disassembler/llvm/Makefile
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile
    lldb/trunk/source/Plugins/Makefile
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/Makefile
    lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/Makefile
    lldb/trunk/source/Plugins/ObjectFile/ELF/Makefile
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/Makefile
    lldb/trunk/source/Plugins/Process/MacOSX-User/Makefile
    lldb/trunk/source/Plugins/Process/Utility/Makefile
    lldb/trunk/source/Plugins/Process/gdb-remote/Makefile
    lldb/trunk/source/Plugins/SymbolFile/DWARF/Makefile
    lldb/trunk/source/Plugins/SymbolFile/Symtab/Makefile
    lldb/trunk/source/Plugins/SymbolVendor/MacOSX/Makefile
    lldb/trunk/source/Symbol/Makefile
    lldb/trunk/source/Target/Makefile
    lldb/trunk/source/Utility/Makefile
    lldb/trunk/tools/Makefile
    lldb/trunk/tools/driver/Makefile
Removed:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBServer.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.h
Modified:
    lldb/trunk/include/lldb/API/SBBreakpoint.h
    lldb/trunk/include/lldb/API/SBBreakpointLocation.h
    lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h
    lldb/trunk/include/lldb/Breakpoint/BreakpointSiteList.h
    lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
    lldb/trunk/include/lldb/Breakpoint/WatchpointLocation.h
    lldb/trunk/include/lldb/Core/FileSpec.h
    lldb/trunk/include/lldb/Expression/ClangExpression.h
    lldb/trunk/include/lldb/Expression/ClangFunction.h
    lldb/trunk/include/lldb/Host/Predicate.h
    lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
    lldb/trunk/include/lldb/Target/Process.h
    lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
    lldb/trunk/include/lldb/Target/ThreadSpec.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/source/API/SBBreakpoint.cpp
    lldb/trunk/source/API/SBBreakpointLocation.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/Breakpoint/Breakpoint.cpp
    lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
    lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
    lldb/trunk/source/Breakpoint/BreakpointSite.cpp
    lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp
    lldb/trunk/source/Breakpoint/StoppointLocation.cpp
    lldb/trunk/source/Breakpoint/WatchpointLocation.cpp
    lldb/trunk/source/Commands/CommandCompletions.cpp
    lldb/trunk/source/Commands/CommandObjectAppend.cpp
    lldb/trunk/source/Commands/CommandObjectApropos.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.h
    lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/trunk/source/Commands/CommandObjectCommands.cpp
    lldb/trunk/source/Commands/CommandObjectCrossref.cpp
    lldb/trunk/source/Commands/CommandObjectHelp.cpp
    lldb/trunk/source/Commands/CommandObjectImage.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectSyntax.cpp
    lldb/trunk/source/Commands/CommandObjectSyntax.h
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Core/Address.cpp
    lldb/trunk/source/Core/AddressRange.cpp
    lldb/trunk/source/Core/AddressResolverFileLine.cpp
    lldb/trunk/source/Core/ArchSpec.cpp
    lldb/trunk/source/Core/ConstString.cpp
    lldb/trunk/source/Core/DataBufferMemoryMap.cpp
    lldb/trunk/source/Core/DataExtractor.cpp
    lldb/trunk/source/Core/Error.cpp
    lldb/trunk/source/Core/FileSpec.cpp
    lldb/trunk/source/Core/Language.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Core/Stream.cpp
    lldb/trunk/source/Core/StreamFile.cpp
    lldb/trunk/source/Core/StringList.cpp
    lldb/trunk/source/Core/Value.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/Core/ValueObjectChild.cpp
    lldb/trunk/source/Expression/ClangExpression.cpp
    lldb/trunk/source/Expression/ClangFunction.cpp
    lldb/trunk/source/Expression/ClangStmtVisitor.cpp
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Host/macosx/Host.mm
    lldb/trunk/source/Host/macosx/Symbols.cpp
    lldb/trunk/source/Interpreter/Args.cpp
    lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ObjCTrampolineHandler.h
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ThreadPlanStepThroughObjCTrampoline.h
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachException.h
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.h
    lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.cpp
    lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.h
    lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
    lldb/trunk/source/Plugins/Process/Utility/UnwindLibUnwind.h
    lldb/trunk/source/Plugins/Process/Utility/libunwind/include/libunwind.h
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/source/Symbol/Type.cpp
    lldb/trunk/source/Target/ObjCObjectPrinter.cpp
    lldb/trunk/source/Target/Process.cpp
    lldb/trunk/source/Target/ThreadPlanStepRange.cpp
    lldb/trunk/source/Target/ThreadPlanStepUntil.cpp
    lldb/trunk/source/Utility/StringExtractor.cpp
    lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp
    lldb/trunk/source/Utility/StringExtractorGDBRemote.h
    lldb/trunk/source/lldb.cpp
    lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
    lldb/trunk/tools/debugserver/source/RNBRemote.cpp
    lldb/trunk/tools/driver/Driver.cpp
    lldb/trunk/tools/driver/IOChannel.cpp
    lldb/trunk/tools/driver/IOChannel.h

Added: lldb/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/Makefile (added)
+++ lldb/trunk/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,90 @@
+##===- Makefile --------------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+# If LLDB_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef LLDB_LEVEL
+
+IS_TOP_LEVEL := 1
+LLDB_LEVEL := .
+DIRS := include source lib tools
+
+PARALLEL_DIRS :=
+endif
+
+###
+# Common Makefile code, shared by all LLDB Makefiles.
+
+# Set LLVM source root level.
+LEVEL := $(LLDB_LEVEL)/../..
+
+# Include LLVM common makefile.
+include $(LEVEL)/Makefile.common
+
+# Set common LLDB build flags.
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include 
+CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/../clang/include
+CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/../clang/include
+CPP.Flags += -I/usr/include/python2.6
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Utility
+ifeq ($(HOST_OS),Darwin)
+CPP.Flags += -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks
+endif
+ifdef LLDB_VENDOR
+CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
+endif
+
+# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
+# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
+# GCC's have false positive warnings with it on Linux (which prove a pain to
+# fix). For example:
+#   http://gcc.gnu.org/PR41874
+#   http://gcc.gnu.org/PR41838
+#
+# We can revisit this when LLVM/Clang support it.
+CXX.Flags += -fno-strict-aliasing
+
+###
+# LLDB Top Level specific stuff.
+
+ifeq ($(IS_TOP_LEVEL),1)
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+	$(Verb) if [ ! -f test/Makefile ]; then \
+	  $(MKDIR) test; \
+	  $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
+	fi
+endif
+
+test::
+	@ $(MAKE) -C test
+
+report::
+	@ $(MAKE) -C test report
+
+clean::
+	@ $(MAKE) -C test clean
+
+tags::
+	$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
+	  grep -v /lib/Headers | grep -v /test/`
+
+cscope.files:
+	find tools lib include -name '*.cpp' \
+	                    -or -name '*.def' \
+	                    -or -name '*.td' \
+	                    -or -name '*.h' > cscope.files
+
+.PHONY: test report clean cscope.files
+
+endif

Added: lldb/trunk/include/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/include/Makefile (added)
+++ lldb/trunk/include/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,13 @@
+##===- include/Makefile ------------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := lldb
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Fri Jul  9 15:39:50 2010
@@ -69,9 +69,9 @@
     IsEnabled ();
 
     void
-    SetIgnoreCount (int32_t count);
+    SetIgnoreCount (uint32_t count);
 
-    int32_t
+    uint32_t
     GetIgnoreCount () const;
 
     void

Modified: lldb/trunk/include/lldb/API/SBBreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointLocation.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpointLocation.h Fri Jul  9 15:39:50 2010
@@ -35,11 +35,11 @@
     bool
     IsEnabled ();
 
-    int32_t
+    uint32_t
     GetIgnoreCount ();
 
     void
-    SetIgnoreCount (int32_t n);
+    SetIgnoreCount (uint32_t n);
 
     void
     SetThreadID (lldb::tid_t sb_thread_id);

Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Fri Jul  9 15:39:50 2010
@@ -321,14 +321,14 @@
     ///    The number of breakpoint hits to ignore.
     //------------------------------------------------------------------
     void
-    SetIgnoreCount (int32_t count);
+    SetIgnoreCount (uint32_t count);
 
     //------------------------------------------------------------------
     /// Return the current Ignore Count.
     /// @return
     ///     The number of breakpoint hits to be ignored.
     //------------------------------------------------------------------
-    int32_t
+    uint32_t
     GetIgnoreCount () const;
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h Fri Jul  9 15:39:50 2010
@@ -37,14 +37,14 @@
     virtual
     ~BreakpointIDList ();
 
-    int
-    Size();
+    size_t
+    GetSize();
 
     BreakpointID &
-    GetBreakpointIDAtIndex (int index);
+    GetBreakpointIDAtIndex (uint32_t index);
 
     bool
-    RemoveBreakpointIDAtIndex (int index);
+    RemoveBreakpointIDAtIndex (uint32_t index);
 
     void
     Clear();
@@ -56,16 +56,16 @@
     AddBreakpointID (const char *bp_id);
 
     bool
-    FindBreakpointID (BreakpointID &bp_id, int *position);
+    FindBreakpointID (BreakpointID &bp_id, uint32_t *position);
 
     bool
-    FindBreakpointID (const char *bp_id, int *position);
+    FindBreakpointID (const char *bp_id, uint32_t *position);
 
     void
-    InsertStringArray (const char **string_array, int array_size, CommandReturnObject &result);
+    InsertStringArray (const char **string_array, uint32_t array_size, CommandReturnObject &result);
 
     static bool
-    StringContainsIDRangeExpression (const char *in_string, int *range_start_len, int *range_end_pos);
+    StringContainsIDRangeExpression (const char *in_string, uint32_t *range_start_len, uint32_t *range_end_pos);
 
     static void
     FindAndReplaceIDRanges (Args &old_args, Target *target, CommandReturnObject &result, Args &new_args);

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h Fri Jul  9 15:39:50 2010
@@ -119,7 +119,7 @@
     /// @return
     ///     The number of breakpoint hits to be ignored.
     //------------------------------------------------------------------
-    int32_t
+    uint32_t
     GetIgnoreCount ();
 
     //------------------------------------------------------------------
@@ -129,7 +129,7 @@
     ///    The number of breakpoint hits to ignore.
     //------------------------------------------------------------------
     void
-    SetIgnoreCount (int32_t n);
+    SetIgnoreCount (uint32_t n);
 
     //------------------------------------------------------------------
     /// Set the callback action invoked when the breakpoint is hit.

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h Fri Jul  9 15:39:50 2010
@@ -53,7 +53,7 @@
     ///     \b true if the breakpoint was in the list.
     //------------------------------------------------------------------
     bool
-    Remove (lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
+    Remove (lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with id \a
@@ -70,7 +70,7 @@
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    FindByIDPair (lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
+    FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with id \a
@@ -87,7 +87,7 @@
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointLocationSP
-    FindByIDPair (lldb::user_id_t break_id, lldb::user_id_t break_loc_id) const;
+    FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const;
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with index
@@ -187,10 +187,10 @@
     typedef std::vector<lldb::BreakpointLocationSP> collection;
 
     collection::iterator
-    GetIDPairIterator(lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
+    GetIDPairIterator(lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
 
     collection::const_iterator
-    GetIDPairConstIterator(lldb::user_id_t break_id, lldb::user_id_t break_loc_id) const;
+    GetIDPairConstIterator(lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const;
 
     collection m_break_loc_collection;
 

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h Fri Jul  9 15:39:50 2010
@@ -72,7 +72,7 @@
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    FindByID (lldb::user_id_t breakID);
+    FindByID (lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with id
@@ -86,7 +86,7 @@
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointLocationSP
-    FindByID (lldb::user_id_t breakID) const;
+    FindByID (lldb::break_id_t breakID) const;
 
     //------------------------------------------------------------------
     /// Returns the breakpoint location id to the breakpoint location
@@ -98,7 +98,7 @@
     /// @result
     ///     The ID of the breakpoint location, or LLDB_INVALID_BREAK_ID.
     //------------------------------------------------------------------
-    lldb::user_id_t
+    lldb::break_id_t
     FindIDByAddress (Address &addr);
 
     //------------------------------------------------------------------
@@ -183,7 +183,7 @@
     ///     \b true if the breakpoint \a breakID was in the list.
     //------------------------------------------------------------------
     bool
-    Remove (lldb::user_id_t breakID);
+    Remove (lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Enquires of the breakpoint location in this list with ID \a
@@ -200,7 +200,7 @@
     //------------------------------------------------------------------
     bool
     ShouldStop (StoppointCallbackContext *context,
-                lldb::user_id_t breakID);
+                lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Returns the number of elements in this breakpoint location list.
@@ -252,7 +252,7 @@
     /// @result
     ///     Returns breakpoint location id.
     //------------------------------------------------------------------
-    virtual lldb::user_id_t
+    virtual lldb::break_id_t
     Add (lldb::BreakpointLocationSP& bp_loc_sp);
 
     typedef std::vector<lldb::BreakpointLocationSP> collection;
@@ -269,10 +269,10 @@
     GetNextID();
 
     collection::iterator
-    GetIDIterator(lldb::user_id_t breakID);
+    GetIDIterator(lldb::break_id_t breakID);
 
     collection::const_iterator
-    GetIDConstIterator(lldb::user_id_t breakID) const;
+    GetIDConstIterator(lldb::break_id_t breakID) const;
 
     collection m_locations;
     addr_map m_address_to_location;

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h Fri Jul  9 15:39:50 2010
@@ -108,14 +108,14 @@
     SetEnabled (bool enabled);
 
     void
-    SetIgnoreCount (int32_t n);
+    SetIgnoreCount (uint32_t n);
 
     //------------------------------------------------------------------
     /// Return the current Ignore Count.
     /// @return
     ///     The number of breakpoint hits to be ignored.
     //------------------------------------------------------------------
-    int32_t
+    uint32_t
     GetIgnoreCount () const;
 
     //------------------------------------------------------------------
@@ -216,7 +216,7 @@
     lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback
     bool m_callback_is_synchronous;
     bool m_enabled;
-    int32_t m_ignore_count; // Number of times to ignore this breakpoint
+    uint32_t m_ignore_count; // Number of times to ignore this breakpoint
     std::auto_ptr<ThreadSpec> m_thread_spec_ap; // Thread for which this breakpoint will take
 
 };

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h Fri Jul  9 15:39:50 2010
@@ -243,8 +243,8 @@
     ///    \a break_loc_id is the Breakpoint Location to remove.
     //------------------------------------------------------------------
     uint32_t
-    RemoveOwner (lldb::user_id_t break_id,
-                 lldb::user_id_t break_loc_id);
+    RemoveOwner (lldb::break_id_t break_id,
+                 lldb::break_id_t break_loc_id);
 
     BreakpointSite::Type m_type;///< The type of this breakpoint site.
     uint8_t m_saved_opcode[8];  ///< The saved opcode bytes if this breakpoint site uses trap opcodes.

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointSiteList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointSiteList.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointSiteList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointSiteList.h Fri Jul  9 15:39:50 2010
@@ -50,7 +50,7 @@
     /// @return
     ///    The ID of the BreakpointSite in the list.
     //------------------------------------------------------------------
-    lldb::user_id_t
+    lldb::break_id_t
     Add (const lldb::BreakpointSiteSP& bp_site_sp);
 
     //------------------------------------------------------------------
@@ -86,7 +86,7 @@
     ///   breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointSiteSP
-    FindByID (lldb::user_id_t breakID);
+    FindByID (lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint site with id \a breakID - const version.
@@ -99,7 +99,7 @@
     ///   breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointSiteSP
-    FindByID (lldb::user_id_t breakID) const;
+    FindByID (lldb::break_id_t breakID) const;
 
     //------------------------------------------------------------------
     /// Returns the breakpoint site id to the breakpoint site at address \a addr.
@@ -110,7 +110,7 @@
     /// @result
     ///   The ID of the breakpoint site, or LLDB_INVALID_BREAK_ID.
     //------------------------------------------------------------------
-    lldb::user_id_t
+    lldb::break_id_t
     FindIDByAddress (lldb::addr_t addr);
 
     //------------------------------------------------------------------
@@ -149,7 +149,7 @@
     ///   \b true if the breakpoint site \a breakID was in the list.
     //------------------------------------------------------------------
     bool
-    Remove (lldb::user_id_t breakID);
+    Remove (lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Removes the breakpoint site at address \a addr from this list.
@@ -164,7 +164,7 @@
     RemoveByAddress (lldb::addr_t addr);
 
     void
-    SetEnabledForAll(const bool enable, const lldb::user_id_t except_id = LLDB_INVALID_BREAK_ID);
+    SetEnabledForAll(const bool enable, const lldb::break_id_t except_id = LLDB_INVALID_BREAK_ID);
 
     typedef void (*BreakpointSiteSPMapFunc) (lldb::BreakpointSiteSP &bp, void *baton);
 
@@ -182,7 +182,7 @@
     ///    \b true if we should stop, \b false otherwise.
     //------------------------------------------------------------------
     bool
-    ShouldStop (StoppointCallbackContext *context, lldb::user_id_t breakID);
+    ShouldStop (StoppointCallbackContext *context, lldb::break_id_t breakID);
 
     //------------------------------------------------------------------
     /// Returns the number of elements in the list.
@@ -197,10 +197,10 @@
     typedef std::map<lldb::addr_t, lldb::BreakpointSiteSP> collection;
 
     collection::iterator
-    GetIDIterator(lldb::user_id_t breakID);
+    GetIDIterator(lldb::break_id_t breakID);
 
     collection::const_iterator
-    GetIDConstIterator(lldb::user_id_t breakID) const;
+    GetIDConstIterator(lldb::break_id_t breakID) const;
 
     // This function exposes the m_bp_site_list.  I use the in Process because there
     // are places there where you want to iterate over the list, and it is less efficient

Modified: lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h Fri Jul  9 15:39:50 2010
@@ -82,9 +82,9 @@
     //------------------------------------------------------------------
     // Classes that inherit from StoppointLocation can see and modify these
     //------------------------------------------------------------------
-    lldb::break_id_t  m_loc_id;      // Break ID
-    lldb::addr_t      m_addr;     // The load address of this stop point. The base Stoppoint doesn't
-                            // store a full Address since that's not needed for the breakpoint sites.
+    lldb::break_id_t  m_loc_id;     // Break ID
+    lldb::addr_t      m_addr;       // The load address of this stop point. The base Stoppoint doesn't
+                                    // store a full Address since that's not needed for the breakpoint sites.
     bool        m_hw_preferred;     // 1 if this point has been requested to be set using hardware (which may fail due to lack of resources)
     uint32_t    m_hw_index;         // The hardware resource index for this breakpoint/watchpoint
     uint32_t    m_byte_size;        // The size in bytes of stop location.  e.g. the length of the trap opcode for

Modified: lldb/trunk/include/lldb/Breakpoint/WatchpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/WatchpointLocation.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/WatchpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/WatchpointLocation.h Fri Jul  9 15:39:50 2010
@@ -41,8 +41,8 @@
 
     bool        WatchpointRead () const;
     bool        WatchpointWrite () const;
-    int32_t     GetIgnoreCount () const;
-    void        SetIgnoreCount (int32_t n);
+    uint32_t    GetIgnoreCount () const;
+    void        SetIgnoreCount (uint32_t n);
     void        SetWatchpointType (uint32_t type);
     bool        BreakpointWasHit (StoppointCallbackContext *context);
     bool        SetCallback (WatchpointHitCallback callback, void *callback_baton);
@@ -54,7 +54,7 @@
                 m_watch_write:1,    // 1 if we stop when the watched data is written to
                 m_watch_was_read:1, // Set to 1 when watchpoint is hit for a read access
                 m_watch_was_written:1;  // Set to 1 when watchpoint is hit for a write access
-    int32_t     m_ignore_count;     // Number of times to ignore this breakpoint
+    uint32_t    m_ignore_count;     // Number of times to ignore this breakpoint
     WatchpointHitCallback m_callback;
     void *      m_callback_baton;   // Callback user data to pass to callback
 

Modified: lldb/trunk/include/lldb/Core/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FileSpec.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Core/FileSpec.h Fri Jul  9 15:39:50 2010
@@ -451,7 +451,7 @@
     ///     resolved path doesn't fit in dst_len, dst_len-1 characters will
     ///     be written to \a dst_path, but the actual required length will still be returned.
     //------------------------------------------------------------------
-    static int
+    static size_t
     Resolve (const char *src_path, char *dst_path, size_t dst_len);
     
     //------------------------------------------------------------------
@@ -475,7 +475,7 @@
     ///     resolved path doesn't fit in dst_len, dst_len-1 characters will
     ///     be written to \a dst_path, but the actual required length will still be returned.
     //------------------------------------------------------------------
-    static int
+    static size_t
     ResolveUsername (const char *src_path, char *dst_path, size_t dst_len);
 
 

Modified: lldb/trunk/include/lldb/Expression/ClangExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpression.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpression.h Fri Jul  9 15:39:50 2010
@@ -15,6 +15,7 @@
 #include <string>
 #include <map>
 #include <memory>
+#include <vector>
 
 // Other libraries and framework includes
 // Project includes

Modified: lldb/trunk/include/lldb/Expression/ClangFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangFunction.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangFunction.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangFunction.h Fri Jul  9 15:39:50 2010
@@ -224,10 +224,10 @@
 
    std::string m_wrapper_function_name;
    std::string m_wrapper_struct_name;
+   lldb::addr_t m_wrapper_function_addr;
+   std::list<lldb::addr_t> m_wrapper_args_addrs;
    const clang::ASTRecordLayout *m_struct_layout;
    ValueList m_arg_values;
-   lldb::addr_t m_wrapper_fun_addr;
-   std::list<lldb::addr_t> m_wrapper_args_addrs;
    
    size_t m_value_struct_size;
    size_t m_return_offset;

Modified: lldb/trunk/include/lldb/Host/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Predicate.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Predicate.h (original)
+++ lldb/trunk/include/lldb/Host/Predicate.h Fri Jul  9 15:39:50 2010
@@ -53,9 +53,9 @@
     /// constructors.
     //------------------------------------------------------------------
     Predicate () :
+        m_value(),
         m_mutex(),
-        m_condition(),
-        m_value()
+        m_condition()
     {
     }
 
@@ -69,9 +69,9 @@
     ///     The initial value for our T object.
     //------------------------------------------------------------------
     Predicate (T initial_value)  :
+        m_value(initial_value),
         m_mutex(),
-        m_condition(),
-        m_value(initial_value)
+        m_condition()
     {
     }
 

Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Fri Jul  9 15:39:50 2010
@@ -52,7 +52,7 @@
 
     struct CommonCompletionElement
     {
-        CommonCompletionTypes type;
+        uint32_t type;
         CompletionCallback callback;
     };
 

Added: lldb/trunk/include/lldb/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Makefile (added)
+++ lldb/trunk/include/lldb/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,31 @@
+LEVEL = ../../../..
+DIRS :=
+
+include $(LEVEL)/Makefile.common
+
+install-local::
+	$(Echo) Installing Clang include files
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
+	$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include/clang" ; then \
+	  cd $(PROJ_SRC_ROOT)/tools/clang/include && \
+	  for  hdr in `find clang -type f '!' '(' -name '*~' \
+	      -o -name '.#*' -o -name '*.in' -o -name '*.txt' \
+	      -o -name 'Makefile' -o -name '*.td' -o -name '*.orig' ')' -print \
+              | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
+	    instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+	    if test \! -d "$$instdir" ; then \
+	      $(EchoCmd) Making install directory $$instdir ; \
+	      $(MKDIR) $$instdir ;\
+	    fi ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+	$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang" ; then \
+	  cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
+	  for hdr in `find clang -type f '!' '(' -name 'Makefile' ')' -print \
+            | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+endif

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Fri Jul  9 15:39:50 2010
@@ -466,7 +466,7 @@
     ///     Returns an error object.
     //------------------------------------------------------------------
     virtual Error
-    WillAttach (lldb::pid_t pid) 
+    WillAttachToProcessWithID (lldb::pid_t pid) 
     {
         return Error(); 
     }
@@ -481,7 +481,7 @@
     ///     Returns an error object.
     //------------------------------------------------------------------
     virtual Error
-    WillAttach (const char *process_name, bool wait_for_launch) 
+    WillAttachToProcessWithName (const char *process_name, bool wait_for_launch) 
     { 
         return Error(); 
     }
@@ -497,7 +497,7 @@
     ///     LLDB_INVALID_PROCESS_ID if attaching fails.
     //------------------------------------------------------------------
     virtual Error
-    DoAttach (lldb::pid_t pid) = 0;
+    DoAttachToProcessWithID (lldb::pid_t pid) = 0;
 
     //------------------------------------------------------------------
     /// Attach to an existing process using a partial process name.
@@ -515,7 +515,7 @@
     ///     LLDB_INVALID_PROCESS_ID if attaching fails.
     //------------------------------------------------------------------
     virtual Error
-    DoAttach (const char *process_name, bool wait_for_launch) 
+    DoAttachToProcessWithName (const char *process_name, bool wait_for_launch) 
     {
         Error error;
         error.SetErrorString("attach by name is not supported");

Modified: lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h Fri Jul  9 15:39:50 2010
@@ -38,7 +38,7 @@
     {
         eNone = 0,
         eAvoidInlines = (1 << 0),
-        eAvoidNoDebug = (1 << 1),
+        eAvoidNoDebug = (1 << 1)
     };
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Target/ThreadSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadSpec.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadSpec.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadSpec.h Fri Jul  9 15:39:50 2010
@@ -93,7 +93,7 @@
     bool 
     IndexMatches (uint32_t index) const
     {
-        if (m_index == -1 || index == -1)
+        if (m_index == UINT32_MAX || index == UINT32_MAX)
             return true;
         else
             return index == m_index;

Added: lldb/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/lib/Makefile (added)
+++ lldb/trunk/lib/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,128 @@
+##===- source/Makefile -------------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LEVEL := ../../..
+LLDB_LEVEL := ..
+
+LIBRARYNAME = lldb
+
+#EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/../resources/lldb-framework-exports
+NO_BUILD_ARCHIVE = 1
+LINK_LIBS_IN_SHARED = 1
+SHARED_LIBRARY = 1
+
+# Include all archives in liblldb.a files
+USEDLIBS = lldbAPI.a \
+	lldbBreakpoint.a \
+	lldbCommands.a \
+	lldbCore.a \
+	lldbExpression.a \
+	lldbHostMacOSX.a \
+	lldbHostPosix.a \
+	lldbInitAndLog.a \
+	lldbInterpreter.a \
+	lldbPluginABIMacOSX_i386.a \
+	lldbPluginABISysV_x86_64.a \
+	lldbPluginDisassemblerLLVM.a \
+	lldbPluginDynamicLoaderMacOSX.a \
+	lldbPluginObjectContainerBSDArchive.a \
+	lldbPluginObjectContainerUniversalMachO.a \
+	lldbPluginObjectFileELF.a \
+	lldbPluginObjectFileMachO.a \
+	lldbPluginProcessGDBRemote.a \
+	lldbPluginSymbolFileDWARF.a \
+	lldbPluginSymbolFileSymtab.a \
+	lldbPluginSymbolVendorMacOSX.a \
+	lldbPluginUtility.a \
+	lldbSymbol.a \
+	lldbTarget.a \
+	lldbUtility.a \
+	plugin_llvmc_Base.a \
+	plugin_llvmc_Clang.a \
+	clangAnalysis.a \
+	clangAST.a \
+	clangBasic.a \
+	clangCodeGen.a \
+	clangFrontend.a \
+	clangDriver.a \
+	clangIndex.a \
+	clangLex.a \
+	clangRewrite.a \
+	clangParse.a \
+	clangSema.a \
+	CompilerDriver.a \
+	EnhancedDisassembly.a \
+	LLVMAnalysis.a \
+	LLVMArchive.a \
+	LLVMARMAsmParser.a \
+	LLVMARMAsmPrinter.a \
+	LLVMARMCodeGen.a \
+	LLVMARMDisassembler.a \
+	LLVMARMInfo.a \
+	LLVMAsmParser.a \
+	LLVMAsmPrinter.a \
+	LLVMBitReader.a \
+	LLVMBitWriter.a \
+	LLVMCodeGen.a \
+	LLVMCore.a \
+	LLVMExecutionEngine.a \
+	LLVMInstCombine.a \
+	LLVMInstrumentation.a \
+	LLVMipa.a \
+	LLVMInterpreter.a \
+	LLVMipo.a \
+	LLVMJIT.a \
+	LLVMLinker.a \
+	LLVMMC.a \
+	LLVMMCParser.a \
+	LLVMScalarOpts.a \
+	LLVMSelectionDAG.a \
+	LLVMSupport.a \
+	LLVMSystem.a \
+	LLVMTarget.a \
+	LLVMTransformUtils.a \
+	LLVMX86AsmParser.a \
+	LLVMX86AsmPrinter.a \
+	LLVMX86CodeGen.a \
+	LLVMX86Disassembler.a \
+	LLVMX86Info.a \
+	clangChecker.a
+
+include $(LEVEL)/Makefile.common
+
+LLVMLibsOptions += -Wl,-all_load -v
+
+ifeq ($(HOST_OS),Darwin)
+    # set dylib internal version number to llvmCore submission number
+    ifdef LLDB_SUBMIT_VERSION
+        LLVMLibsOptions += -Wl,-current_version \
+                           -Wl,$(LLDB_SUBMIT_VERSION).$(LLDB_SUBMIT_SUBVERSION) \
+                           -Wl,-compatibility_version -Wl,1
+    endif
+    # extra options to override libtool defaults 
+    LLVMLibsOptions += -avoid-version
+	LLVMLibsOptions += -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks
+	LLVMLibsOptions += -framework Foundation -framework CoreFoundation 
+	LLVMLibsOptions += -framework DebugSymbols -lpython2.6 -lobjc
+	LLVMLibsOptions += -Wl,-exported_symbols_list -Wl,$(LLDB_LEVEL)/resources/lldb-framework-exports 
+    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+    DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+    ifneq ($(DARWIN_VERS),8)
+       LLVMLibsOptions  += -no-undefined -Wl,-install_name \
+                           -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
+    endif
+endif
+
+ifeq ($(HOST_OS), Linux)
+    # Include everything from the .a's into the shared library.
+    LLVMLibsOptions := -Wl,--whole-archive $(LLDBLibsOptions) \
+                       -Wl,--no-whole-archive
+    # Don't allow unresolved symbols.
+    LLVMLibsOptions += -Wl,--no-undefined
+endif

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Jul  9 15:39:50 2010
@@ -2773,7 +2773,7 @@
 				);
 				PREBINDING = NO;
 				PRODUCT_NAME = LLDB;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/source $(SRCROOT)/source/Plugins/Process/Utility $(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Debug;
@@ -2826,7 +2826,7 @@
 				);
 				PREBINDING = NO;
 				PRODUCT_NAME = LLDB;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/source $(SRCROOT)/source/Plugins/Process/Utility $(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
 				VERSIONING_SYSTEM = "apple-generic";
 				ZERO_LINK = NO;
 			};
@@ -2935,7 +2935,7 @@
 				);
 				PREBINDING = NO;
 				PRODUCT_NAME = LLDB;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
+				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/source $(SRCROOT)/source/Plugins/Process/Utility $(SRCROOT)/include $(SRCROOT)/source/Host/macosx/cfcpp $(SRCROOT)/llvm/include $(SRCROOT)/llvm/tools/clang/include $(LLVM_BUILD_DIR)/llvm/include $(LLVM_BUILD_DIR)/llvm/tools/clang/include";
 				VERSIONING_SYSTEM = "apple-generic";
 				ZERO_LINK = NO;
 			};

Added: lldb/trunk/scripts/generate-vers.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/generate-vers.pl?rev=108009&view=auto
==============================================================================
--- lldb/trunk/scripts/generate-vers.pl (added)
+++ lldb/trunk/scripts/generate-vers.pl Fri Jul  9 15:39:50 2010
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+sub usage()
+{
+  print "Usage: generate-vers.pl /path/toproject.pbxproj";
+  exit(0);
+}
+
+(scalar @ARGV == 1) or usage();
+
+open $pbxproj, $ARGV[0] or die "Couldn't open ".$ARGV[0];
+
+$current_project_version = None;
+$product_name = None;
+
+while ($line = <$pbxproj>)
+{
+  chomp ($line);
+  
+  if ($current_project_version == None &&
+      $line =~ /CURRENT_PROJECT_VERSION = ([0-9]+)/)
+  {
+    $current_project_version = $1;
+  }
+  
+  if ($product_name == None &&
+      $line =~ /productName = ([^;]+)/)
+  {
+    $product_name = $1;
+  }
+}
+
+if (!$product_name || !$current_project_version)
+{
+  print "Couldn't get needed information from the .pbxproj";
+  exit(-1);
+}
+
+$uppercase_name = uc $product_name;
+$lowercase_name = lc $product_name;
+
+close $pbxproj;
+
+$file_string = " const unsigned char ".$uppercase_name."VersionString[] __attribute__ ((used)) = \"@(#)PROGRAM:".$uppercase_name."  PROJECT:".$lowercase_name."-".$current_project_version."\" \"\\n\"; const double ".$uppercase_name."VersionNumber __attribute__ ((used)) = (double)".$current_project_version.".;\n";
+
+print $file_string;

Propchange: lldb/trunk/scripts/generate-vers.pl
------------------------------------------------------------------------------
    svn:executable = *

Added: lldb/trunk/source/API/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/API/Makefile (added)
+++ lldb/trunk/source/API/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/API/Makefile ---------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbAPI
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Fri Jul  9 15:39:50 2010
@@ -235,13 +235,13 @@
 }
 
 void
-SBBreakpoint::SetIgnoreCount (int32_t count)
+SBBreakpoint::SetIgnoreCount (uint32_t count)
 {
     if (m_opaque_sp)
         m_opaque_sp->SetIgnoreCount (count);
 }
 
-int32_t
+uint32_t
 SBBreakpoint::GetIgnoreCount () const
 {
     if (m_opaque_sp)

Modified: lldb/trunk/source/API/SBBreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointLocation.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointLocation.cpp Fri Jul  9 15:39:50 2010
@@ -76,7 +76,7 @@
         return false;
 }
 
-int32_t
+uint32_t
 SBBreakpointLocation::GetIgnoreCount ()
 {
     if (m_opaque_sp)
@@ -86,7 +86,7 @@
 }
 
 void
-SBBreakpointLocation::SetIgnoreCount (int32_t n)
+SBBreakpointLocation::SetIgnoreCount (uint32_t n)
 {
     if (m_opaque_sp)
         m_opaque_sp->SetIgnoreCount (n);

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Fri Jul  9 15:39:50 2010
@@ -187,7 +187,7 @@
         const uint32_t num_variables = variable_list.GetSize();
 
         bool found = false;
-        for (int i = 0; i < num_variables && !found; ++i)
+        for (uint32_t i = 0; i < num_variables && !found; ++i)
         {
             var_sp = variable_list.GetVariableAtIndex(i);
             if (var_sp
@@ -231,7 +231,7 @@
             const uint32_t num_variables = variable_list.GetSize();
 
             bool found = false;
-            for (int i = 0; i < num_variables && !found; ++i)
+            for (uint32_t i = 0; i < num_variables && !found; ++i)
             {
                 var_sp = variable_list.GetVariableAtIndex(i);
                 if (var_sp
@@ -331,6 +331,9 @@
                         case eValueTypeVariableLocal:
                             add_variable = locals;
                             break;
+
+                        default:
+                            break;
                         }
                         if (add_variable)
                         {

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Fri Jul  9 15:39:50 2010
@@ -289,7 +289,7 @@
     {
         const BreakpointList &bp_list = m_opaque_sp->GetBreakpointList();
         size_t num_bps = bp_list.GetSize();
-        for (int i = 0; i < num_bps; ++i)
+        for (size_t i = 0; i < num_bps; ++i)
         {
             SBBreakpoint sb_breakpoint (bp_list.GetBreakpointByIndex (i));
             sb_breakpoint.GetDescription (out_file, "full");

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Fri Jul  9 15:39:50 2010
@@ -147,7 +147,10 @@
                         stop_desc = exc_desc;
                         stop_desc_len = sizeof(exc_desc); // Include the NULL byte for size
                     }
-                    break;                        
+                    break;          
+
+                default:
+                    break;
                 }
                 
                 if (stop_desc && stop_desc[0])
@@ -225,7 +228,7 @@
     {
         uint32_t num_stack_frames = m_opaque_sp->GetStackFrameCount ();
         StackFrameSP frame_sp;
-        int frame_idx = 0;
+        uint32_t frame_idx = 0;
 
         for (frame_idx = first_frame; frame_idx < first_frame + num_frames; ++frame_idx)
         {

Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Fri Jul  9 15:39:50 2010
@@ -153,12 +153,12 @@
 }
 
 void
-Breakpoint::SetIgnoreCount (int32_t n)
+Breakpoint::SetIgnoreCount (uint32_t n)
 {
     m_options.SetIgnoreCount(n);
 }
 
-int32_t
+uint32_t
 Breakpoint::GetIgnoreCount () const
 {
     return m_options.GetIgnoreCount();
@@ -255,7 +255,7 @@
                                    // them after the locations pass.  Have to do it this way because
                                    // resolving breakpoints will add new locations potentially.
 
-        for (int i = 0; i < module_list.GetSize(); i++)
+        for (size_t i = 0; i < module_list.GetSize(); i++)
         {
             bool seen = false;
             ModuleSP module_sp (module_list.GetModuleAtIndex (i));
@@ -263,9 +263,9 @@
             if (!m_filter_sp->ModulePasses (module_sp))
                 continue;
 
-            for (int i = 0; i < m_locations.GetSize(); i++)
+            for (size_t j = 0; j < m_locations.GetSize(); j++)
             {
-                BreakpointLocationSP break_loc = m_locations.GetByIndex(i);
+                BreakpointLocationSP break_loc = m_locations.GetByIndex(j);
                 const Section *section = break_loc->GetAddress().GetSection();
                 if (section == NULL || section->GetModule() == module)
                 {
@@ -300,15 +300,15 @@
         // the same?  Or do we need to do an equality on modules that is an
         // "equivalence"???
 
-        for (int i = 0; i < module_list.GetSize(); i++)
+        for (size_t i = 0; i < module_list.GetSize(); i++)
         {
             ModuleSP module_sp (module_list.GetModuleAtIndex (i));
             if (!m_filter_sp->ModulePasses (module_sp))
                 continue;
 
-            for (int i = 0; i < m_locations.GetSize(); i++)
+            for (size_t j = 0; j < m_locations.GetSize(); j++)
             {
-                BreakpointLocationSP break_loc = m_locations.GetByIndex(i);
+                BreakpointLocationSP break_loc = m_locations.GetByIndex(j);
                 const Section *section = break_loc->GetAddress().GetSection();
                 if (section)
                 {
@@ -353,8 +353,8 @@
     GetResolverDescription (s);
     GetFilterDescription (s);
 
-    const uint32_t num_locations = GetNumLocations ();
-    const uint32_t num_resolved_locations = GetNumResolvedLocations ();
+    const size_t num_locations = GetNumLocations ();
+    const size_t num_resolved_locations = GetNumResolvedLocations ();
 
     switch (level)
     {
@@ -362,9 +362,9 @@
     case lldb::eDescriptionLevelFull:
         if (num_locations > 0)
         {
-            s->Printf(", locations = %u", num_locations);
+            s->Printf(", locations = %zu", num_locations);
             if (num_resolved_locations > 0)
-                s->Printf(", resolved = %u", num_resolved_locations);
+                s->Printf(", resolved = %zu", num_resolved_locations);
         }
         else
         {
@@ -387,12 +387,15 @@
         s->Indent();
         GetOptions()->GetDescription(s, level);
         break;
+
+    default: 
+        break;
     }
 
     if (show_locations)
     {
         s->IndentMore();
-        for (int i = 0; i < GetNumLocations(); ++i)
+        for (size_t i = 0; i < num_locations; ++i)
         {
             BreakpointLocation *loc = GetLocationAtIndex(i).get();
             loc->GetDescription(s, level);

Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Fri Jul  9 15:39:50 2010
@@ -31,14 +31,14 @@
 {
 }
 
-int
-BreakpointIDList::Size()
+size_t
+BreakpointIDList::GetSize()
 {
     return m_breakpoint_ids.size();
 }
 
 BreakpointID &
-BreakpointIDList::GetBreakpointIDAtIndex (int index)
+BreakpointIDList::GetBreakpointIDAtIndex (uint32_t index)
 {
     if (index < m_breakpoint_ids.size())
         return m_breakpoint_ids[index];
@@ -47,23 +47,13 @@
 }
 
 bool
-BreakpointIDList::RemoveBreakpointIDAtIndex (int index)
+BreakpointIDList::RemoveBreakpointIDAtIndex (uint32_t index)
 {
-    bool success = false;
-    if (index < m_breakpoint_ids.size())
-    {
-        BreakpointIDArray::iterator pos;
-        int i;
+    if (index >= m_breakpoint_ids.size())
+        return false;
 
-        for (pos = m_breakpoint_ids.begin(), i = 0; i != index && pos != m_breakpoint_ids.end(); ++pos, ++i);
-        assert (i == index);
-        if (pos != m_breakpoint_ids.end())
-        {
-            m_breakpoint_ids.erase (pos);
-            success = true;
-        }
-    }
-    return success;
+    m_breakpoint_ids.erase (m_breakpoint_ids.begin() + index);
+    return true;
 }
 
 void
@@ -99,12 +89,12 @@
 }
 
 bool
-BreakpointIDList::FindBreakpointID (BreakpointID &bp_id, int *position)
+BreakpointIDList::FindBreakpointID (BreakpointID &bp_id, uint32_t *position)
 {
     bool success = false;
     BreakpointIDArray::iterator tmp_pos;
 
-    for (int i = 0; i <  m_breakpoint_ids.size(); ++i)
+    for (size_t i = 0; i < m_breakpoint_ids.size(); ++i)
     {
         BreakpointID tmp_id = m_breakpoint_ids[i];
         if (tmp_id.GetBreakpointID() == bp_id.GetBreakpointID()
@@ -120,7 +110,7 @@
 }
 
 bool
-BreakpointIDList::FindBreakpointID (const char *bp_id_str, int *position)
+BreakpointIDList::FindBreakpointID (const char *bp_id_str, uint32_t *position)
 {
     BreakpointID temp_bp_id;
     break_id_t bp_id;
@@ -136,12 +126,12 @@
 }
 
 void
-BreakpointIDList::InsertStringArray (const char **string_array, int array_size, CommandReturnObject &result)
+BreakpointIDList::InsertStringArray (const char **string_array, uint32_t array_size, CommandReturnObject &result)
 {
     if (string_array == NULL)
         return;
 
-    for (int i = 0; i < array_size; ++i)
+    for (uint32_t i = 0; i < array_size; ++i)
     {
         break_id_t bp_id;
         break_id_t loc_id;
@@ -176,24 +166,23 @@
 BreakpointIDList::FindAndReplaceIDRanges (Args &old_args, Target *target, CommandReturnObject &result,
                                           Args &new_args)
 {
-    char *range_start;
+    std::string range_start;
     const char *range_end;
     const char *current_arg;
-    int num_old_args = old_args.GetArgumentCount();
+    const size_t num_old_args = old_args.GetArgumentCount();
 
-    for (int i = 0; i < num_old_args; ++i)
+    for (size_t i = 0; i < num_old_args; ++i)
     {
         bool is_range = false;
         current_arg = old_args.GetArgumentAtIndex (i);
 
-        int range_start_len = 0;
-        int range_end_pos = 0;
+        uint32_t range_start_len = 0;
+        uint32_t range_end_pos = 0;
         if (BreakpointIDList::StringContainsIDRangeExpression (current_arg, &range_start_len, &range_end_pos))
         {
             is_range = true;
             range_start = (char *) malloc (range_start_len + 1);
-            strncpy (range_start, current_arg, range_start_len);
-            range_start[range_start_len] = '\0';
+            range_start.assign (current_arg, range_start_len);
             range_end = current_arg + range_end_pos;
         }
         else if ((i + 2 < num_old_args)
@@ -201,7 +190,7 @@
                  && BreakpointID::IsValidIDExpression (current_arg)
                  && BreakpointID::IsValidIDExpression (old_args.GetArgumentAtIndex (i+2)))
         {
-            range_start = (char *) current_arg;
+            range_start.assign (current_arg);
             range_end = old_args.GetArgumentAtIndex (i+2);
             is_range = true;
             i = i+2;
@@ -214,14 +203,14 @@
             break_id_t start_loc_id;
             break_id_t end_loc_id;
 
-            BreakpointID::ParseCanonicalReference (range_start, &start_bp_id, &start_loc_id);
+            BreakpointID::ParseCanonicalReference (range_start.c_str(), &start_bp_id, &start_loc_id);
             BreakpointID::ParseCanonicalReference (range_end, &end_bp_id, &end_loc_id);
 
             if ((start_bp_id == LLDB_INVALID_BREAK_ID)
                 || (! target->GetBreakpointByID (start_bp_id)))
             {
                 new_args.Clear();
-                result.AppendErrorWithFormat ("'%s' is not a valid breakpoint ID.\n", range_start);
+                result.AppendErrorWithFormat ("'%s' is not a valid breakpoint ID.\n", range_start.c_str());
                 result.SetStatus (eReturnStatusFailed);
                 return;
             }
@@ -239,8 +228,8 @@
             // target and find all the breakpoints that fit into this range, and add them to new_args.
 
             const BreakpointList& breakpoints = target->GetBreakpointList();
-            size_t num_breakpoints = breakpoints.GetSize();
-            for (int j = 0; j < num_breakpoints; ++j)
+            const size_t num_breakpoints = breakpoints.GetSize();
+            for (size_t j = 0; j < num_breakpoints; ++j)
             {
                 Breakpoint *breakpoint = breakpoints.GetBreakpointByIndex (j).get();
                 break_id_t cur_bp_id = breakpoint->GetID();
@@ -248,11 +237,11 @@
                 if ((cur_bp_id < start_bp_id) || (cur_bp_id > end_bp_id))
                     continue;
 
-                size_t num_locations = breakpoint->GetNumLocations();
+                const size_t num_locations = breakpoint->GetNumLocations();
 
                 if ((cur_bp_id == start_bp_id) && (start_loc_id != LLDB_INVALID_BREAK_ID))
                 {
-                    for (int k = 0; k < num_locations; ++k)
+                    for (size_t k = 0; k < num_locations; ++k)
                     {
                         BreakpointLocation * bp_loc = breakpoint->GetLocationAtIndex(k).get();
                         if (bp_loc->GetID() >= start_loc_id)
@@ -265,7 +254,7 @@
                 }
                 else if ((cur_bp_id == end_bp_id) && (end_loc_id != LLDB_INVALID_BREAK_ID))
                 {
-                    for (int k = 0; k < num_locations; ++k)
+                    for (size_t k = 0; k < num_locations; ++k)
                     {
                         BreakpointLocation * bp_loc = breakpoint->GetLocationAtIndex(k).get();
                         if (bp_loc->GetID() <= end_loc_id)
@@ -294,19 +283,14 @@
     return;
 }
 
-//bool
-//BreakpointIDList::StringContainsIDRangeExpression (const char *in_string, const char **range_start,
-//                                                     const **range_end)
 bool
-BreakpointIDList::StringContainsIDRangeExpression (const char *in_string, int *range_start_len, int *range_end_pos)
+BreakpointIDList::StringContainsIDRangeExpression (const char *in_string, uint32_t *range_start_len, uint32_t *range_end_pos)
 {
     bool is_range_expression = false;
     std::string arg_str = in_string;
     std::string::size_type idx;
     std::string::size_type start_pos = 0;
 
-    //*range_start = NULL;
-    //*range_end = NULL;
     *range_start_len = 0;
     *range_end_pos = 0;
 

Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Fri Jul  9 15:39:50 2010
@@ -137,14 +137,14 @@
     GetLocationOptions()->ClearCallback();
 }
 
-int32_t
+uint32_t
 BreakpointLocation::GetIgnoreCount ()
 {
     return GetOptionsNoCreate()->GetIgnoreCount();
 }
 
 void
-BreakpointLocation::SetIgnoreCount (int32_t n)
+BreakpointLocation::SetIgnoreCount (uint32_t n)
 {
     GetLocationOptions()->SetIgnoreCount(n);
 }

Modified: lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp Fri Jul  9 15:39:50 2010
@@ -46,7 +46,7 @@
 }
 
 bool
-BreakpointLocationCollection::Remove (lldb::user_id_t bp_id, lldb::user_id_t bp_loc_id)
+BreakpointLocationCollection::Remove (lldb::break_id_t bp_id, lldb::break_id_t bp_loc_id)
 {
     collection::iterator pos = GetIDPairIterator(bp_id, bp_loc_id);    // Predicate
     if (pos != m_break_loc_collection.end())
@@ -61,7 +61,7 @@
 class BreakpointIDPairMatches
 {
 public:
-    BreakpointIDPairMatches (lldb::user_id_t break_id, lldb::user_id_t break_loc_id) :
+    BreakpointIDPairMatches (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) :
         m_break_id(break_id),
         m_break_loc_id (break_loc_id)
     {
@@ -74,26 +74,26 @@
     }
 
 private:
-   const lldb::user_id_t m_break_id;
-   const lldb::user_id_t m_break_loc_id;
+   const lldb::break_id_t m_break_id;
+   const lldb::break_id_t m_break_loc_id;
 };
 
 BreakpointLocationCollection::collection::iterator
-BreakpointLocationCollection::GetIDPairIterator (lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
+BreakpointLocationCollection::GetIDPairIterator (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 {
     return std::find_if(m_break_loc_collection.begin(), m_break_loc_collection.end(),   // Search full range
                         BreakpointIDPairMatches(break_id, break_loc_id));               // Predicate
 }
 
 BreakpointLocationCollection::collection::const_iterator
-BreakpointLocationCollection::GetIDPairConstIterator (lldb::user_id_t break_id, lldb::user_id_t break_loc_id) const
+BreakpointLocationCollection::GetIDPairConstIterator (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const
 {
     return std::find_if(m_break_loc_collection.begin(), m_break_loc_collection.end(),   // Search full range
                         BreakpointIDPairMatches(break_id, break_loc_id));               // Predicate
 }
 
 BreakpointLocationSP
-BreakpointLocationCollection::FindByIDPair (lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
+BreakpointLocationCollection::FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 {
     BreakpointLocationSP stop_sp;
     collection::iterator pos = GetIDPairIterator(break_id, break_loc_id);
@@ -104,7 +104,7 @@
 }
 
 const BreakpointLocationSP
-BreakpointLocationCollection::FindByIDPair (lldb::user_id_t break_id, lldb::user_id_t break_loc_id) const
+BreakpointLocationCollection::FindByIDPair (lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const
 {
     BreakpointLocationSP stop_sp;
     collection::const_iterator pos = GetIDPairConstIterator(break_id, break_loc_id);
@@ -118,7 +118,7 @@
 BreakpointLocationCollection::GetByIndex (uint32_t i)
 {
     BreakpointLocationSP stop_sp;
-    if (i >= 0 && i < m_break_loc_collection.size())
+    if (i < m_break_loc_collection.size())
         stop_sp = m_break_loc_collection[i];
 
     return stop_sp;
@@ -128,7 +128,7 @@
 BreakpointLocationCollection::GetByIndex (uint32_t i) const
 {
     BreakpointLocationSP stop_sp;
-    if (i >= 0 && i < m_break_loc_collection.size())
+    if (i < m_break_loc_collection.size())
         stop_sp = m_break_loc_collection[i];
 
     return stop_sp;
@@ -139,7 +139,8 @@
 {
     bool shouldStop = false;
 
-    for (int i = 0; i < GetSize(); i++) {
+    const size_t count = GetSize();
+    for (size_t i = 0; i < count; i++) {
         bool one_result = GetByIndex(i)->ShouldStop(context);
         if (one_result)
             shouldStop = true;

Modified: lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp Fri Jul  9 15:39:50 2010
@@ -32,7 +32,7 @@
 {
 }
 
-lldb::user_id_t
+lldb::break_id_t
 BreakpointLocationList::Add (BreakpointLocationSP &bp_loc_sp)
 {
     if (bp_loc_sp)
@@ -46,7 +46,7 @@
 }
 
 bool
-BreakpointLocationList::ShouldStop (StoppointCallbackContext *context, lldb::user_id_t break_id)
+BreakpointLocationList::ShouldStop (StoppointCallbackContext *context, lldb::break_id_t break_id)
 {
     BreakpointLocationSP bp = FindByID (break_id);
     if (bp)
@@ -61,7 +61,7 @@
     return true;
 }
 
-lldb::user_id_t
+lldb::break_id_t
 BreakpointLocationList::FindIDByAddress (Address &addr)
 {
     BreakpointLocationSP bp_loc_sp = FindByAddress (addr);
@@ -73,7 +73,7 @@
 }
 
 bool
-BreakpointLocationList::Remove (lldb::user_id_t break_id)
+BreakpointLocationList::Remove (lldb::break_id_t break_id)
 {
     Mutex::Locker locker (m_mutex);
     collection::iterator pos = GetIDIterator(break_id);    // Predicate
@@ -90,7 +90,7 @@
 class BreakpointLocationIDMatches
 {
 public:
-    BreakpointLocationIDMatches (lldb::user_id_t break_id) :
+    BreakpointLocationIDMatches (lldb::break_id_t break_id) :
         m_break_id(break_id)
     {
     }
@@ -101,7 +101,7 @@
     }
 
 private:
-   const lldb::user_id_t m_break_id;
+   const lldb::break_id_t m_break_id;
 };
 
 class BreakpointLocationAddressMatches
@@ -122,7 +122,7 @@
 };
 
 BreakpointLocationList::collection::iterator
-BreakpointLocationList::GetIDIterator (lldb::user_id_t break_id)
+BreakpointLocationList::GetIDIterator (lldb::break_id_t break_id)
 {
     Mutex::Locker locker (m_mutex);
     return std::find_if (m_locations.begin(),
@@ -131,7 +131,7 @@
 }
 
 BreakpointLocationList::collection::const_iterator
-BreakpointLocationList::GetIDConstIterator (lldb::user_id_t break_id) const
+BreakpointLocationList::GetIDConstIterator (lldb::break_id_t break_id) const
 {
     Mutex::Locker locker (m_mutex);
     return std::find_if (m_locations.begin(),
@@ -140,7 +140,7 @@
 }
 
 BreakpointLocationSP
-BreakpointLocationList::FindByID (lldb::user_id_t break_id)
+BreakpointLocationList::FindByID (lldb::break_id_t break_id)
 {
     Mutex::Locker locker (m_mutex);
     BreakpointLocationSP stop_sp;
@@ -152,7 +152,7 @@
 }
 
 const BreakpointLocationSP
-BreakpointLocationList::FindByID (lldb::user_id_t break_id) const
+BreakpointLocationList::FindByID (lldb::break_id_t break_id) const
 {
     Mutex::Locker locker (m_mutex);
     BreakpointLocationSP stop_sp;
@@ -192,13 +192,6 @@
     return bp_loc_list.GetSize() - orig_size;
 }
 
-
-static int
-FindLocationByAddress (Address *addr_ptr, const BreakpointLocationSP *bp_loc_sp_ptr)
-{
-    return Address::CompareModulePointerAndOffset(*addr_ptr, (*bp_loc_sp_ptr)->GetAddress());
-}
-
 const BreakpointLocationSP
 BreakpointLocationList::FindByAddress (Address &addr) const
 {
@@ -234,7 +227,7 @@
 {
     Mutex::Locker locker (m_mutex);
     BreakpointLocationSP stop_sp;
-    if (i >= 0 && i < m_locations.size())
+    if (i < m_locations.size())
         stop_sp = m_locations[i];
 
     return stop_sp;
@@ -245,7 +238,7 @@
 {
     Mutex::Locker locker (m_mutex);
     BreakpointLocationSP stop_sp;
-    if (i >= 0 && i < m_locations.size())
+    if (i < m_locations.size())
         stop_sp = m_locations[i];
 
     return stop_sp;

Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Fri Jul  9 15:39:50 2010
@@ -32,8 +32,8 @@
 //----------------------------------------------------------------------
 BreakpointOptions::BreakpointOptions() :
     m_callback (BreakpointOptions::NullCallback),
-    m_callback_is_synchronous (false),
     m_callback_baton_sp (),
+    m_callback_is_synchronous (false),
     m_enabled (true),
     m_ignore_count (0),
     m_thread_spec_ap (NULL)
@@ -160,14 +160,14 @@
     m_enabled = enabled;
 }
 
-int32_t
+uint32_t
 BreakpointOptions::GetIgnoreCount () const
 {
     return m_ignore_count;
 }
 
 void
-BreakpointOptions::SetIgnoreCount (int32_t n)
+BreakpointOptions::SetIgnoreCount (uint32_t n)
 {
     m_ignore_count = n;
 }

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Fri Jul  9 15:39:50 2010
@@ -59,7 +59,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
 
     sc_list_size = cu->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything, sc_list);
-    for (int i = 0; i < sc_list_size; i++)
+    for (uint32_t i = 0; i < sc_list_size; i++)
     {
         SymbolContext sc;
         if (sc_list.GetContextAtIndex(i, sc))

Modified: lldb/trunk/source/Breakpoint/BreakpointSite.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSite.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSite.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSite.cpp Fri Jul  9 15:39:50 2010
@@ -40,7 +40,8 @@
 BreakpointSite::~BreakpointSite()
 {
     BreakpointLocationSP bp_loc_sp;
-    for (int i = 0; i < m_owners.GetSize(); i++)
+    const size_t owner_count = m_owners.GetSize();
+    for (size_t i = 0; i < owner_count; i++)
     {
         m_owners.GetByIndex(i)->ClearBreakpointSite();
     }
@@ -66,7 +67,8 @@
 bool
 BreakpointSite::IsBreakpointAtThisSite (lldb::break_id_t bp_id)
 {
-    for (int i = 0; i < m_owners.GetSize(); i++)
+    const size_t owner_count = m_owners.GetSize();
+    for (size_t i = 0; i < owner_count; i++)
     {
         if (m_owners.GetByIndex(i)->GetBreakpoint().GetID() == bp_id)
             return true;
@@ -158,7 +160,7 @@
 }
 
 uint32_t
-BreakpointSite::RemoveOwner (lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
+BreakpointSite::RemoveOwner (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
 {
     m_owners.Remove(break_id, break_loc_id);
     return m_owners.GetSize();

Modified: lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp Fri Jul  9 15:39:50 2010
@@ -31,7 +31,7 @@
 // Add breakpoint site to the list.  However, if the element already exists in the
 // list, then we don't add it, and return LLDB_INVALID_BREAK_ID.
 
-lldb::user_id_t
+lldb::break_id_t
 BreakpointSiteList::Add(const BreakpointSiteSP &bp)
 {
     lldb::addr_t bp_site_load_addr = bp->GetLoadAddress();
@@ -49,7 +49,7 @@
 }
 
 bool
-BreakpointSiteList::ShouldStop (StoppointCallbackContext *context, lldb::user_id_t break_id)
+BreakpointSiteList::ShouldStop (StoppointCallbackContext *context, lldb::break_id_t break_id)
 {
     BreakpointSiteSP bp = FindByID (break_id);
     if (bp)
@@ -63,7 +63,7 @@
     // doesn't exist.
     return true;
 }
-lldb::user_id_t
+lldb::break_id_t
 BreakpointSiteList::FindIDByAddress (lldb::addr_t addr)
 {
     BreakpointSiteSP bp = FindByAddress (addr);
@@ -77,7 +77,7 @@
 }
 
 bool
-BreakpointSiteList::Remove (lldb::user_id_t break_id)
+BreakpointSiteList::Remove (lldb::break_id_t break_id)
 {
     collection::iterator pos = GetIDIterator(break_id);    // Predicate
     if (pos != m_bp_site_list.end())
@@ -103,7 +103,7 @@
 class BreakpointSiteIDMatches
 {
 public:
-    BreakpointSiteIDMatches (lldb::user_id_t break_id) :
+    BreakpointSiteIDMatches (lldb::break_id_t break_id) :
         m_break_id(break_id)
     {
     }
@@ -114,25 +114,25 @@
     }
 
 private:
-   const lldb::user_id_t m_break_id;
+   const lldb::break_id_t m_break_id;
 };
 
 BreakpointSiteList::collection::iterator
-BreakpointSiteList::GetIDIterator (lldb::user_id_t break_id)
+BreakpointSiteList::GetIDIterator (lldb::break_id_t break_id)
 {
     return std::find_if(m_bp_site_list.begin(), m_bp_site_list.end(),   // Search full range
                         BreakpointSiteIDMatches(break_id));             // Predicate
 }
 
 BreakpointSiteList::collection::const_iterator
-BreakpointSiteList::GetIDConstIterator (lldb::user_id_t break_id) const
+BreakpointSiteList::GetIDConstIterator (lldb::break_id_t break_id) const
 {
     return std::find_if(m_bp_site_list.begin(), m_bp_site_list.end(),   // Search full range
                         BreakpointSiteIDMatches(break_id));             // Predicate
 }
 
 BreakpointSiteSP
-BreakpointSiteList::FindByID (lldb::user_id_t break_id)
+BreakpointSiteList::FindByID (lldb::break_id_t break_id)
 {
     BreakpointSiteSP stop_sp;
     collection::iterator pos = GetIDIterator(break_id);
@@ -143,7 +143,7 @@
 }
 
 const BreakpointSiteSP
-BreakpointSiteList::FindByID (lldb::user_id_t break_id) const
+BreakpointSiteList::FindByID (lldb::break_id_t break_id) const
 {
     BreakpointSiteSP stop_sp;
     collection::const_iterator pos = GetIDConstIterator(break_id);
@@ -210,7 +210,7 @@
 }
 
 void
-BreakpointSiteList::SetEnabledForAll (const bool enabled, const lldb::user_id_t except_id)
+BreakpointSiteList::SetEnabledForAll (const bool enabled, const lldb::break_id_t except_id)
 {
     collection::iterator end = m_bp_site_list.end();
     collection::iterator pos;

Added: lldb/trunk/source/Breakpoint/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Breakpoint/Makefile (added)
+++ lldb/trunk/source/Breakpoint/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Breakpoint/Makefile --------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbBreakpoint
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Breakpoint/StoppointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/StoppointLocation.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/StoppointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/StoppointLocation.cpp Fri Jul  9 15:39:50 2010
@@ -22,21 +22,21 @@
 //----------------------------------------------------------------------
 StoppointLocation::StoppointLocation (break_id_t bid, addr_t addr, bool hardware) :
     m_loc_id(bid),
-    m_byte_size(0),
     m_addr(addr),
-    m_hit_count(0),
     m_hw_preferred(hardware),
-    m_hw_index(LLDB_INVALID_INDEX32)
+    m_hw_index(LLDB_INVALID_INDEX32),
+    m_byte_size(0),
+    m_hit_count(0)
 {
 }
 
 StoppointLocation::StoppointLocation (break_id_t bid, addr_t addr, size_t size, bool hardware) :
     m_loc_id(bid),
-    m_byte_size(size),
     m_addr(addr),
-    m_hit_count(0),
     m_hw_preferred(hardware),
-    m_hw_index(LLDB_INVALID_INDEX32)
+    m_hw_index(LLDB_INVALID_INDEX32),
+    m_byte_size(size),
+    m_hit_count(0)
 {
 }
 

Modified: lldb/trunk/source/Breakpoint/WatchpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/WatchpointLocation.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/WatchpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/WatchpointLocation.cpp Fri Jul  9 15:39:50 2010
@@ -123,14 +123,14 @@
 {
     return m_watch_write != 0;
 }
-int32_t
+uint32_t
 WatchpointLocation::GetIgnoreCount () const
 {
     return m_ignore_count;
 }
 
 void
-WatchpointLocation::SetIgnoreCount (int32_t n)
+WatchpointLocation::SetIgnoreCount (uint32_t n)
 {
     m_ignore_count = n;
 }

Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Fri Jul  9 15:39:50 2010
@@ -161,7 +161,7 @@
             // but for completeness sake we'll resolve the user name and only put a slash
             // on the end if it exists.
             char resolved_username[PATH_MAX];
-            int resolved_username_len = FileSpec::ResolveUsername (partial_name_copy, resolved_username, 
+            size_t resolved_username_len = FileSpec::ResolveUsername (partial_name_copy, resolved_username, 
                                                           sizeof (resolved_username));
                                                           
            // Not sure how this would happen, a username longer than PATH_MAX?  Still...
@@ -238,7 +238,7 @@
     
     if (*partial_name_copy == '~')
     {
-        int resolved_username_len = FileSpec::ResolveUsername(containing_part, containing_part, sizeof (containing_part));
+        size_t resolved_username_len = FileSpec::ResolveUsername(containing_part, containing_part, sizeof (containing_part));
         // User name doesn't exist, we're not getting any further...
         if (resolved_username_len == 0 || resolved_username_len >= sizeof (containing_part))
             return matches.GetSize();
@@ -591,7 +591,7 @@
 
         SymbolContext sc;
         // Now add the functions & symbols to the list - only add if unique:
-        for (int i = 0; i < func_list.GetSize(); i++)
+        for (uint32_t i = 0; i < func_list.GetSize(); i++)
         {
             if (func_list.GetContextAtIndex(i, sc))
             {
@@ -602,7 +602,7 @@
             }
         }
 
-        for (int i = 0; i < sym_list.GetSize(); i++)
+        for (uint32_t i = 0; i < sym_list.GetSize(); i++)
         {
             if (sym_list.GetContextAtIndex(i, sc))
             {

Modified: lldb/trunk/source/Commands/CommandObjectAppend.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectAppend.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectAppend.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectAppend.cpp Fri Jul  9 15:39:50 2010
@@ -73,7 +73,7 @@
         {
             if (var->GetType() == StateVariable::eTypeString)
             {
-                for (int i = 0; i < command.GetArgumentCount(); ++i)
+                for (size_t i = 0; i < command.GetArgumentCount(); ++i)
                     var->AppendStringValue (command.GetArgumentAtIndex(i));
                 result.SetStatus (eReturnStatusSuccessFinishNoResult);
             }

Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Fri Jul  9 15:39:50 2010
@@ -69,14 +69,14 @@
                 result.AppendMessageWithFormat ("The following commands may relate to '%s':\n", search_word);
                 size_t max_len = 0;
 
-                for (int i = 0; i < commands_found.GetSize(); ++i)
+                for (size_t i = 0; i < commands_found.GetSize(); ++i)
                 {
-                    int len = strlen (commands_found.GetStringAtIndex (i));
+                    size_t len = strlen (commands_found.GetStringAtIndex (i));
                     if (len > max_len)
                         max_len = len;
                 }
 
-                for (int i = 0; i < commands_found.GetSize(); ++i)
+                for (size_t i = 0; i < commands_found.GetSize(); ++i)
                     interpreter.OutputFormattedHelpText (result.GetOutputStream(), 
                                                          commands_found.GetStringAtIndex(i),
                                                          "--", commands_help.

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Fri Jul  9 15:39:50 2010
@@ -56,11 +56,11 @@
     m_func_regexp (),
     m_modules (),
     m_load_addr(),
+    m_ignore_count (0),
     m_thread_id(LLDB_INVALID_THREAD_ID),
-    m_thread_index (-1),
+    m_thread_index (UINT32_MAX),
     m_thread_name(),
-    m_queue_name(),
-    m_ignore_count (-1)
+    m_queue_name()
 {
 }
 
@@ -190,8 +190,8 @@
             }
         case 'k':
         {
-            m_ignore_count = Args::StringToSInt32(optarg, -1, 0);
-            if (m_ignore_count == -1)
+            m_ignore_count = Args::StringToUInt32(optarg, UINT32_MAX, 0);
+            if (m_ignore_count == UINT32_MAX)
                error.SetErrorStringWithFormat ("Invalid ignore count '%s'.\n", optarg);
         }
         break;
@@ -210,8 +210,8 @@
             break;
         case 'x':
         {
-            m_thread_index = Args::StringToUInt64(optarg, -1, 0);
-            if (m_thread_id == -1)
+            m_thread_index = Args::StringToUInt32(optarg, UINT32_MAX, 0);
+            if (m_thread_id == UINT32_MAX)
                error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", optarg);
             
         }
@@ -237,9 +237,9 @@
     m_func_regexp.clear();
     m_load_addr = LLDB_INVALID_ADDRESS;
     m_modules.clear();
-    m_ignore_count = -1;
+    m_ignore_count = 0;
     m_thread_id = LLDB_INVALID_THREAD_ID;
-    m_thread_index = -1;
+    m_thread_index = UINT32_MAX;
     m_thread_name.clear();
     m_queue_name.clear();
 }
@@ -469,7 +469,7 @@
         if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID)
             bp->SetThreadID (m_options.m_thread_id);
             
-        if (m_options.m_thread_index != -1)
+        if (m_options.m_thread_index != UINT32_MAX)
             bp->GetOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
         
         if (!m_options.m_thread_name.empty())
@@ -478,7 +478,7 @@
         if (!m_options.m_queue_name.empty())
             bp->GetOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
             
-        if (m_options.m_ignore_count != -1)
+        if (m_options.m_ignore_count != 0)
             bp->GetOptions()->SetIgnoreCount(m_options.m_ignore_count);
     }
     
@@ -558,7 +558,7 @@
 
     // NOW, convert the list of breakpoint id strings in TEMP_ARGS into an actual BreakpointIDList:
 
-    valid_ids->InsertStringArray ((const char **) temp_args.GetArgumentVector(), temp_args.GetArgumentCount(), result);
+    valid_ids->InsertStringArray (temp_args.GetConstArgumentVector(), temp_args.GetArgumentCount(), result);
 
     // At this point,  all of the breakpoint ids that the user passed in have been converted to breakpoint IDs
     // and put into valid_ids.
@@ -568,7 +568,8 @@
         // Now that we've converted everything from args into a list of breakpoint ids, go through our tentative list
         // of breakpoint id's and verify that they correspond to valid/currently set breakpoints.
 
-        for (int i = 0; i < valid_ids->Size(); ++i)
+        const size_t count = valid_ids->GetSize();
+        for (size_t i = 0; i < count; ++i)
         {
             BreakpointID cur_bp_id = valid_ids->GetBreakpointIDAtIndex (i);
             Breakpoint *breakpoint = target->GetBreakpointByID (cur_bp_id.GetBreakpointID()).get();
@@ -578,9 +579,10 @@
                 if (cur_bp_id.GetLocationID() > num_locations)
                 {
                     StreamString id_str;
-                    BreakpointID::GetCanonicalReference (&id_str, cur_bp_id.GetBreakpointID(),
-                                                           cur_bp_id.GetLocationID());
-                    i = valid_ids->Size() + 1;
+                    BreakpointID::GetCanonicalReference (&id_str, 
+                                                         cur_bp_id.GetBreakpointID(),
+                                                         cur_bp_id.GetLocationID());
+                    i = valid_ids->GetSize() + 1;
                     result.AppendErrorWithFormat ("'%s' is not a currently valid breakpoint/location id.\n",
                                                  id_str.GetData());
                     result.SetStatus (eReturnStatusFailed);
@@ -588,7 +590,7 @@
             }
             else
             {
-                i = valid_ids->Size() + 1;
+                i = valid_ids->GetSize() + 1;
                 result.AppendErrorWithFormat ("'%d' is not a currently valid breakpoint id.\n", cur_bp_id.GetBreakpointID());
                 result.SetStatus (eReturnStatusFailed);
             }
@@ -731,7 +733,7 @@
     {
         // No breakpoint selected; show info about all currently set breakpoints.
         result.AppendMessage ("Current breakpoints:");
-        for (int i = 0; i < num_breakpoints; ++i)
+        for (size_t i = 0; i < num_breakpoints; ++i)
         {
             Breakpoint *breakpoint = breakpoints.GetBreakpointByIndex (i).get();
             AddBreakpointDescription (&output_stream, breakpoint, m_options.m_level);
@@ -746,7 +748,7 @@
 
         if (result.Succeeded())
         {
-            for (int i = 0; i < valid_bp_ids.Size(); ++i)
+            for (size_t i = 0; i < valid_bp_ids.GetSize(); ++i)
             {
                 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
                 Breakpoint *breakpoint = target->GetBreakpointByID (cur_bp_id.GetBreakpointID()).get();
@@ -834,7 +836,8 @@
         {
             int enable_count = 0;
             int loc_count = 0;
-            for (int i = 0; i < valid_bp_ids.Size(); ++i)
+            const size_t count = valid_bp_ids.GetSize();
+            for (size_t i = 0; i < count; ++i)
             {
                 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
 
@@ -933,7 +936,8 @@
         {
             int disable_count = 0;
             int loc_count = 0;
-            for (int i = 0; i < valid_bp_ids.Size(); ++i)
+            const size_t count = valid_bp_ids.GetSize();
+            for (size_t i = 0; i < count; ++i)
             {
                 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
 
@@ -1035,7 +1039,8 @@
         {
             int delete_count = 0;
             int disable_count = 0;
-            for (int i = 0; i < valid_bp_ids.Size(); ++i)
+            const size_t count = valid_bp_ids.GetSize();
+            for (size_t i = 0; i < count; ++i)
             {
                 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
 
@@ -1074,12 +1079,15 @@
 
 CommandObjectBreakpointModify::CommandOptions::CommandOptions() :
     Options (),
+    m_ignore_count (0),
     m_thread_id(LLDB_INVALID_THREAD_ID),
-    m_thread_index (-1),
+    m_thread_index (UINT32_MAX),
     m_thread_name(),
     m_queue_name(),
-    m_ignore_count (-1),
-    m_enable_passed (false)
+    m_enable_passed (false),
+    m_enable_value (false),
+    m_name_passed (false),
+    m_queue_passed (false)
 {
 }
 
@@ -1139,8 +1147,8 @@
             break;
         case 'k':
         {
-            m_ignore_count = Args::StringToSInt32(optarg, -1, 0);
-            if (m_ignore_count == -1)
+            m_ignore_count = Args::StringToUInt32(optarg, UINT32_MAX, 0);
+            if (m_ignore_count == UINT32_MAX)
                error.SetErrorStringWithFormat ("Invalid ignore count '%s'.\n", optarg);
         }
         break;
@@ -1167,8 +1175,8 @@
             break;
         case 'x':
         {
-            m_thread_index = Args::StringToUInt64(optarg, -1, 0);
-            if (m_thread_id == -1)
+            m_thread_index = Args::StringToUInt32 (optarg, UINT32_MAX, 0);
+            if (m_thread_id == UINT32_MAX)
                error.SetErrorStringWithFormat ("Invalid thread index string '%s'.\n", optarg);
             
         }
@@ -1186,9 +1194,9 @@
 {
     Options::ResetOptionValues();
 
-    m_ignore_count = -1;
+    m_ignore_count = 0;
     m_thread_id = LLDB_INVALID_THREAD_ID;
-    m_thread_index = -1;
+    m_thread_index = UINT32_MAX;
     m_thread_name.clear();
     m_queue_name.clear();
     m_enable_passed = false;
@@ -1249,7 +1257,8 @@
 
     if (result.Succeeded())
     {
-        for (int i = 0; i < valid_bp_ids.Size(); ++i)
+        const size_t count = valid_bp_ids.GetSize(); 
+        for (size_t i = 0; i < count; ++i)
         {
             BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
 
@@ -1264,7 +1273,7 @@
                         if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID)
                             location->SetThreadID (m_options.m_thread_id);
                             
-                        if (m_options.m_thread_index != -1)
+                        if (m_options.m_thread_index != UINT32_MAX)
                             location->GetLocationOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
                         
                         if (m_options.m_name_passed)
@@ -1273,7 +1282,7 @@
                         if (m_options.m_queue_passed)
                             location->GetLocationOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
                             
-                        if (m_options.m_ignore_count != -1)
+                        if (m_options.m_ignore_count != 0)
                             location->GetLocationOptions()->SetIgnoreCount(m_options.m_ignore_count);
                             
                         if (m_options.m_enable_passed)
@@ -1285,7 +1294,7 @@
                     if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID)
                         bp->SetThreadID (m_options.m_thread_id);
                         
-                    if (m_options.m_thread_index != -1)
+                    if (m_options.m_thread_index != UINT32_MAX)
                         bp->GetOptions()->GetThreadSpec()->SetIndex(m_options.m_thread_index);
                     
                     if (m_options.m_name_passed)
@@ -1294,7 +1303,7 @@
                     if (m_options.m_queue_passed)
                         bp->GetOptions()->GetThreadSpec()->SetQueueName(m_options.m_queue_name.c_str());
                         
-                    if (m_options.m_ignore_count != -1)
+                    if (m_options.m_ignore_count != 0)
                         bp->GetOptions()->SetIgnoreCount(m_options.m_ignore_count);
                         
                     if (m_options.m_enable_passed)

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Fri Jul  9 15:39:50 2010
@@ -104,9 +104,9 @@
         std::string m_func_name;
         uint32_t m_func_name_type_mask;
         std::string m_func_regexp;
-        lldb::addr_t m_load_addr;
         STLStringArray m_modules;
-        int32_t m_ignore_count;
+        lldb::addr_t m_load_addr;
+        uint32_t m_ignore_count;
         lldb::tid_t m_thread_id;
         uint32_t m_thread_index;
         std::string m_thread_name;
@@ -164,7 +164,7 @@
 
         // Instance variables to hold the values for command options.
 
-        int32_t m_ignore_count;
+        uint32_t m_ignore_count;
         lldb::tid_t m_thread_id;
         uint32_t m_thread_index;
         std::string m_thread_name;

Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Fri Jul  9 15:39:50 2010
@@ -244,7 +244,8 @@
 
     if (result.Succeeded())
     {
-        for (int i = 0; i < valid_bp_ids.Size(); ++i)
+        const size_t count = valid_bp_ids.GetSize();
+        for (size_t i = 0; i < count; ++i)
         {
             BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
             if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID)
@@ -441,7 +442,8 @@
 
     if (result.Succeeded())
     {
-        for (int i = 0; i < valid_bp_ids.Size(); ++i)
+        const size_t count = valid_bp_ids.GetSize();
+        for (size_t i = 0; i < count; ++i)
         {
             BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
             if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID)
@@ -526,7 +528,8 @@
 
     if (result.Succeeded())
     {
-        for (int i = 0; i < valid_bp_ids.Size(); ++i)
+        const size_t count = valid_bp_ids.GetSize();
+        for (size_t i = 0; i < count; ++i)
         {
             BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);
             if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID)

Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Fri Jul  9 15:39:50 2010
@@ -205,14 +205,14 @@
         CommandReturnObject &result
     )
     {
-        const int argc = args.GetArgumentCount();
+        const size_t argc = args.GetArgumentCount();
 
         if (argc < 2)
-          {
+        {
             result.AppendError ("'alias' requires at least two arguments");
             result.SetStatus (eReturnStatusFailed);
             return false;
-          }
+        }
 
         const std::string alias_command = args.GetArgumentAtIndex(0);
         const std::string actual_command = args.GetArgumentAtIndex(1);
@@ -236,7 +236,7 @@
              if (command_obj_sp.get())
              {
                  CommandObject *cmd_obj = command_obj_sp.get();
-                 CommandObject *sub_cmd_obj;
+                 CommandObject *sub_cmd_obj = NULL;
                  OptionArgVectorSP option_arg_vector_sp = OptionArgVectorSP (new OptionArgVector);
                  OptionArgVector *option_arg_vector = option_arg_vector_sp.get();
 
@@ -299,7 +299,7 @@
                      }
                      else
                      {
-                         for (int i = 0; i < args.GetArgumentCount(); ++i)
+                         for (size_t i = 0; i < argc; ++i)
                              option_arg_vector->push_back (OptionArgPair ("<argument>",
                                                                           std::string (args.GetArgumentAtIndex (i))));
                      }

Modified: lldb/trunk/source/Commands/CommandObjectCrossref.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCrossref.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCrossref.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCrossref.cpp Fri Jul  9 15:39:50 2010
@@ -74,7 +74,8 @@
 {
     result.AppendMessage ("This command can be called on the following types of objects:");
 
-    for (int i = 0; i < m_crossref_object_types.GetArgumentCount(); ++i)
+    const size_t count = m_crossref_object_types.GetArgumentCount();
+    for (size_t i = 0; i < count; ++i)
     {
         const char *obj_name = m_crossref_object_types.GetArgumentAtIndex(i);
         result.AppendMessageWithFormat ("    %s    (e.g.  '%s %s')\n", obj_name,

Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Fri Jul  9 15:39:50 2010
@@ -27,8 +27,8 @@
 
 CommandObjectHelp::CommandObjectHelp () :
     CommandObject ("help",
-                     "Shows a list of all debugger commands, or give details about specific commands.",
-                     "help [<cmd-name>]")
+                   "Shows a list of all debugger commands, or give details about specific commands.",
+                   "help [<cmd-name>]")
 {
 }
 
@@ -123,7 +123,8 @@
         {
             Stream &output_strm = result.GetOutputStream();
             output_strm.Printf("Help requested with ambiguous command name, possible completions:\n");
-            for (int i = 0; i < matches.GetSize(); i++)
+            const uint32_t match_count = matches.GetSize();
+            for (uint32_t i = 0; i < match_count; i++)
             {
                 output_strm.Printf("\t%s\n", matches.GetStringAtIndex(i));
             }

Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Fri Jul  9 15:39:50 2010
@@ -469,7 +469,7 @@
                               OptionElementVector &opt_element_vector,
                               int match_start_point,
                               int max_return_elements,
-                              bool word_complete,
+                              bool &word_complete,
                               StringList &matches)
     {
         // Arguments are the standard source file completer.

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Fri Jul  9 15:39:50 2010
@@ -462,11 +462,20 @@
             return false;
         }
 
-        size_t item_byte_size = m_options.m_byte_size ? m_options.m_byte_size : 1;
         StreamString buffer (Stream::eBinary,
                              process->GetAddressByteSize(),
                              process->GetByteOrder());
 
+        size_t item_byte_size = m_options.m_byte_size;
+        
+        if (m_options.m_byte_size == 0)
+        {
+            if (m_options.m_format == eFormatPointer)
+                item_byte_size = buffer.GetAddressByteSize();
+            else
+                item_byte_size = 1;
+        }
+
         lldb::addr_t addr = Args::StringToUInt64(command.GetArgumentAtIndex(0), LLDB_INVALID_ADDRESS, 0);
 
         if (addr == LLDB_INVALID_ADDRESS)
@@ -513,6 +522,8 @@
             case eFormatDefault:
             case eFormatBytes:
             case eFormatHex:
+            case eFormatPointer:
+                
                 // Decode hex bytes
                 uval64 = Args::StringToUInt64(value_str, UINT64_MAX, 16, &success);
                 if (!success)

Modified: lldb/trunk/source/Commands/CommandObjectSyntax.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSyntax.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSyntax.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSyntax.cpp Fri Jul  9 15:39:50 2010
@@ -40,62 +40,20 @@
 
 
 bool
-CommandObjectSyntax::OldExecute
+CommandObjectSyntax::Execute
 (
+    CommandInterpreter &interpreter,
     Args& command,
-    Debugger *context,
-    CommandInterpreter *interpreter,
     CommandReturnObject &result
 )
 {
-    CommandObject *cmd_obj;
-
-    if (command.GetArgumentCount() != 0)
-    {
-        cmd_obj = interpreter->GetCommandObject(command.GetArgumentAtIndex(0));
-        if (cmd_obj)
-        {
-            Stream &output_strm = result.GetOutputStream();
-            if (cmd_obj->GetOptions() != NULL)
-            {
-                output_strm.Printf ("\nSyntax: %s\n", cmd_obj->GetSyntax());
-                //cmd_obj->GetOptions()->GenerateOptionUsage (output_strm, cmd_obj);
-                output_strm.Printf ("(Try 'help %s' for more information on command options syntax.)\n",
-                                    cmd_obj->GetCommandName());
-                result.SetStatus (eReturnStatusSuccessFinishNoResult);
-            }
-            else
-            {
-                output_strm.Printf ("\nSyntax: %s\n", cmd_obj->GetSyntax());
-                result.SetStatus (eReturnStatusSuccessFinishNoResult);
-            }
-        }
-        else
-        {
-            result.AppendErrorWithFormat ("'%s' is not a known command.\n", command.GetArgumentAtIndex(0));
-            result.AppendError ("Try 'help' to see a current list of commands.");
-            result.SetStatus (eReturnStatusFailed);
-        }
-    }
-    else
-    {
-        result.AppendError ("Must call 'syntax' with a valid command.");
-        result.SetStatus (eReturnStatusFailed);
-    }
-    return result.Succeeded();
-}
-
-bool
-CommandObjectSyntax::Execute (Args &command, Debugger *context, CommandInterpreter *interpreter, 
-                              CommandReturnObject &result)
-{
     CommandObject::CommandMap::iterator pos;
     CommandObject *cmd_obj;
     const int argc = command.GetArgumentCount();
 
     if (argc > 0)
     {
-        cmd_obj = interpreter->GetCommandObject (command.GetArgumentAtIndex(0));
+        cmd_obj = interpreter.GetCommandObject (command.GetArgumentAtIndex(0));
         bool all_okay = true;
         for (int i = 1; i < argc; ++i)
         {

Modified: lldb/trunk/source/Commands/CommandObjectSyntax.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSyntax.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSyntax.h (original)
+++ lldb/trunk/source/Commands/CommandObjectSyntax.h Fri Jul  9 15:39:50 2010
@@ -30,17 +30,10 @@
 
     virtual
     ~CommandObjectSyntax ();
-
-    bool
-    OldExecute (Args& command,
-             Debugger *context,
-             CommandInterpreter *interpreter,
-             CommandReturnObject &result);
     
     virtual bool
-    Execute (Args& command,
-             Debugger *context,
-             CommandInterpreter *interpreter,
+    Execute (CommandInterpreter &interpreter,
+             Args& command,
              CommandReturnObject &result);
 
 

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Fri Jul  9 15:39:50 2010
@@ -173,7 +173,7 @@
     strm.IndentMore();
 
     StackFrameSP frame_sp;
-    int frame_idx = 0;
+    uint32_t frame_idx = 0;
 
     if (ascending)
     {

Added: lldb/trunk/source/Commands/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Commands/Makefile (added)
+++ lldb/trunk/source/Commands/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Commands/Makefile ----------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbCommands
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Fri Jul  9 15:39:50 2010
@@ -241,24 +241,28 @@
 }
 
 Address::Address () :
+    SymbolContextScope(),
     m_section (NULL),
     m_offset (LLDB_INVALID_ADDRESS)
 {
 }
 
 Address::Address (const Address& rhs) :
+    SymbolContextScope(rhs),
     m_section (rhs.m_section),
     m_offset (rhs.m_offset)
 {
 }
 
 Address::Address (const Section* section, addr_t offset) :
+    SymbolContextScope(),
     m_section (section),
     m_offset (offset)
 {
 }
 
 Address::Address (addr_t address, const SectionList * sections) :
+    SymbolContextScope(),
     m_section (NULL),
     m_offset (LLDB_INVALID_ADDRESS)
 {
@@ -430,6 +434,9 @@
     lldb_private::Address so_addr;
     switch (style)
     {
+    case DumpStyleInvalid:
+        return false;
+
     case DumpStyleSectionNameOffset:
         if (m_section != NULL)
         {
@@ -637,6 +644,9 @@
                         }
                     }
                     break;
+
+                default:
+                    break;
                 }
             }
 

Modified: lldb/trunk/source/Core/AddressRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressRange.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressRange.cpp (original)
+++ lldb/trunk/source/Core/AddressRange.cpp Fri Jul  9 15:39:50 2010
@@ -146,6 +146,9 @@
 
     switch (style)
     {
+    default:
+        break;
+
     case Address::DumpStyleSectionNameOffset:
     case Address::DumpStyleSectionPointerOffset:
         s->PutChar ('[');

Modified: lldb/trunk/source/Core/AddressResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverFileLine.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverFileLine.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverFileLine.cpp Fri Jul  9 15:39:50 2010
@@ -54,7 +54,7 @@
 
     sc_list_size = cu->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything,
                                              sc_list);
-    for (int i = 0; i < sc_list_size; i++)
+    for (uint32_t i = 0; i < sc_list_size; i++)
     {
         SymbolContext sc;
         if (sc_list.GetContextAtIndex(i, sc))

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Fri Jul  9 15:39:50 2010
@@ -239,6 +239,7 @@
 
     switch (arch_type)
     {
+    case kNumArchTypes:
     case eArchTypeInvalid:
         break;
 
@@ -334,6 +335,7 @@
 {
     switch (m_type)
     {
+    case kNumArchTypes:
     case eArchTypeInvalid:
         break;
 
@@ -990,7 +992,7 @@
     eRegNumPPC_GCC_vscr     = 110,
     eRegNumPPC_GCC_spe_acc  = 111,
     eRegNumPPC_GCC_spefscr  = 112,
-    eRegNumPPC_GCC_sfp      = 113,
+    eRegNumPPC_GCC_sfp      = 113
 };
 
 static const char * g_arm_gcc_reg_names[] = {
@@ -1605,6 +1607,7 @@
 {
     switch (m_type)
     {
+    case kNumArchTypes:
     case eArchTypeInvalid:
         break;
 
@@ -1702,6 +1705,9 @@
                 }
             }
             break;
+
+        case kNumArchTypes:
+            break;
         }
 
         const char *str = arch_name;

Modified: lldb/trunk/source/Core/ConstString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Fri Jul  9 15:39:50 2010
@@ -85,10 +85,7 @@
             Mutex::Locker locker (m_mutex);
             llvm::StringRef string_ref (cstr, cstr_len);
             llvm::StringMapEntry<uint32_t>& entry = m_string_map.GetOrCreateValue (string_ref);
-            const char *ccstr = entry.getKeyData();
-            llvm::StringMapEntry<uint32_t>&reconstituted_entry = GetStringMapEntryFromKeyData (ccstr);
-            assert (&entry == &reconstituted_entry);
-            return ccstr;
+            return entry.getKeyData();
         }
         return NULL;
     }

Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Fri Jul  9 15:39:50 2010
@@ -154,12 +154,16 @@
         {
             if ((stat.st_mode & S_IFREG) && (stat.st_size > offset))
             {
+                const size_t max_bytes_available = stat.st_size - offset;
                 if (length == SIZE_MAX)
-                    length = stat.st_size - offset;
-
-                // Cap the length if too much data was requested
-                if (length > stat.st_size - offset)
-                    length = stat.st_size - offset;
+                {
+                    length = max_bytes_available;
+                }
+                else if (length > max_bytes_available)
+                {
+                    // Cap the length if too much data was requested
+                    length = max_bytes_available;
+                }
 
                 if (length > 0)
                 {

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Fri Jul  9 15:39:50 2010
@@ -1088,7 +1088,7 @@
         int size = sizeof (uint32_t) * 8;
         const uint8_t *src = m_start + *offset_ptr;
 
-        uint8_t byte;
+        uint8_t byte = 0;
         int bytecount = 0;
 
         while (src < m_end)
@@ -1316,6 +1316,8 @@
             s->Address(GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset), sizeof (addr_t));
             break;
 
+        default:
+        case eFormatDefault:
         case eFormatHex:
             if (item_byte_size <= 8)
             {

Modified: lldb/trunk/source/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Error.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/Error.cpp (original)
+++ lldb/trunk/source/Core/Error.cpp Fri Jul  9 15:39:50 2010
@@ -334,7 +334,7 @@
         // allocated buffer above
         va_list copy_args;
         va_copy (copy_args, args);
-        int length = ::vsnprintf (buf.data(), buf.size(), format, args);
+        size_t length = ::vsnprintf (buf.data(), buf.size(), format, args);
         if (length >= buf.size())
         {
             // The error formatted string didn't fit into our buffer, resize it

Modified: lldb/trunk/source/Core/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpec.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileSpec.cpp (original)
+++ lldb/trunk/source/Core/FileSpec.cpp Fri Jul  9 15:39:50 2010
@@ -58,7 +58,7 @@
 // Returns 0 if there WAS a ~ in the path but the username couldn't be resolved.
 // Otherwise returns the number of characters copied into dst_path.  If the return
 // is >= dst_len, then the resolved path is too long...
-int
+size_t
 FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len)
 {
     char user_home[PATH_MAX];
@@ -70,7 +70,7 @@
     // If there's no ~, then just copy src_path straight to dst_path (they may be the same string...)
     if (src_path[0] != '~')
     {
-        int len = strlen (src_path);
+        size_t len = strlen (src_path);
         if (len >= dst_len)
         {
             ::bcopy (src_path, dst_path, dst_len - 1);
@@ -106,7 +106,7 @@
     // User name of "" means the current user...
     
     struct passwd *user_entry;
-    const char *home_dir;
+    const char *home_dir = NULL;
     
     if (user_name[0] == '\0')
     {
@@ -125,7 +125,7 @@
         return ::snprintf (dst_path, dst_len, "%s%s", home_dir, remainder);
 }
 
-int
+size_t
 FileSpec::Resolve (const char *src_path, char *dst_path, size_t dst_len)
 {
     if (src_path == NULL || src_path[0] == '\0')
@@ -135,7 +135,7 @@
     char unglobbed_path[PATH_MAX];
     if (src_path[0] == '~')
     {
-        int return_count = ResolveUsername(src_path, unglobbed_path, sizeof(unglobbed_path));
+        size_t return_count = ResolveUsername(src_path, unglobbed_path, sizeof(unglobbed_path));
         
         // If we couldn't find the user referred to, or the resultant path was too long,
         // then just copy over the src_path.
@@ -509,16 +509,16 @@
     {
         if (filename && filename[0])
         {
-            return snprintf (path, max_path_length, "%s/%s", dirname, filename) < max_path_length;
+            return (size_t)::snprintf (path, max_path_length, "%s/%s", dirname, filename) < max_path_length;
         }
         else
         {
-            strncpy (path, dirname, max_path_length);
+            ::strncpy (path, dirname, max_path_length);
         }
     }
     else if (filename)
     {
-        strncpy (path, filename, max_path_length);
+        ::strncpy (path, filename, max_path_length);
     }
     else
     {
@@ -660,7 +660,7 @@
                             {
                                 // Make sure we read exactly what we asked for and if we got
                                 // less, adjust the array
-                                if (bytesRead < data_heap_ap->GetByteSize())
+                                if ((size_t)bytesRead < data_heap_ap->GetByteSize())
                                     data_heap_ap->SetByteSize(bytesRead);
                                 data_sp.reset(data_heap_ap.release());
                             }

Modified: lldb/trunk/source/Core/Language.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Language.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/Language.cpp (original)
+++ lldb/trunk/source/Core/Language.cpp Fri Jul  9 15:39:50 2010
@@ -48,7 +48,7 @@
     { { "python"  , NULL          , "Python"              } }
 };
 
-static const uint32_t
+static const size_t
 g_num_languages = sizeof(g_languages)/sizeof(LanguageStrings);
 
 Language::Language(Language::Type language) :

Added: lldb/trunk/source/Core/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Core/Makefile (added)
+++ lldb/trunk/source/Core/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Core/Makefile --------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbCore
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Fri Jul  9 15:39:50 2010
@@ -154,9 +154,9 @@
         searcher.SearchCallback (*this, empty_sc, NULL, false);
     else
     {
-        size_t numModules = modules.GetSize();
+        const size_t numModules = modules.GetSize();
 
-        for (int i = 0; i < numModules; i++)
+        for (size_t i = 0; i < numModules; i++)
         {
             ModuleSP module_sp(modules.GetModuleAtIndex(i));
             if (ModulePasses(module_sp))
@@ -186,7 +186,7 @@
         if (!context.module_sp)
         {
             size_t n_modules = m_target_sp->GetImages().GetSize();
-            for (int i = 0; i < n_modules; i++)
+            for (size_t i = 0; i < n_modules; i++)
             {
                 // If this is the last level supplied, then call the callback directly,
                 // otherwise descend.
@@ -395,8 +395,8 @@
     // find the ones that match the file name.
 
     ModuleList matching_modules;
-    // const size_t num_matching_modules = m_target_sp->GetImages().FindModules(&m_module_spec, NULL, NULL, NULL, matching_modules);
-    for (int i = 0; i < m_target_sp->GetImages().GetSize (); i++)
+    const size_t num_modules = m_target_sp->GetImages().GetSize ();
+    for (size_t i = 0; i < num_modules; i++)
     {
         Module* module = m_target_sp->GetImages().GetModulePointerAtIndex(i);
         if (FileSpec::Compare (m_module_spec, module->GetFileSpec(), false) == 0)

Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Fri Jul  9 15:39:50 2010
@@ -67,12 +67,10 @@
     if (m_flags.IsSet(eBinary))
     {
         bool more = true;
-        bool negative = (sval < 0);
         while (more)
         {
             uint8_t byte = sval & 0x7fu;
             sval >>= 7;
-            assert((!negative && sval >= 0) || (negative && sval < 0));
             /* sign bit of byte is 2nd high order bit (0x40) */
             if ((sval ==  0 && !(byte & 0x40)) ||
                 (sval == -1 &&  (byte & 0x40)) )
@@ -209,7 +207,7 @@
 
     int bytes_written = 0;
     // Try and format our string into a fixed buffer first and see if it fits
-    int length = vsnprintf (str, sizeof(str), format, args);
+    size_t length = ::vsnprintf (str, sizeof(str), format, args);
     if (length < sizeof(str))
     {
         va_end (args);
@@ -479,16 +477,15 @@
     va_start (args, format);
     va_copy (args, args_copy); // Copy this so we
 
-    int i;
     char str[1024];
     int bytes_written = 0;
     // Try and format our string into a fixed buffer first and see if it fits
-    int length = vsnprintf (str, sizeof(str), format, args);
+    size_t length = ::vsnprintf (str, sizeof(str), format, args);
     if (length < sizeof(str))
     {
         // The formatted string fit into our stack based buffer, so we can just
         // append that to our packet
-        for (i=0; i<length; ++i)
+        for (size_t i=0; i<length; ++i)
             bytes_written += _PutHex8 (str[i], false);
     }
     else
@@ -499,7 +496,7 @@
         length = ::vasprintf (&str_ptr, format, args_copy);
         if (str_ptr)
         {
-            for (i=0; i<length; ++i)
+            for (size_t i=0; i<length; ++i)
                 bytes_written += _PutHex8 (str_ptr[i], false);
             ::free (str_ptr);
         }
@@ -514,7 +511,7 @@
 Stream::PutNHex8 (size_t n, uint8_t uvalue)
 {
     int bytes_written = 0;
-    for (int i=0; i<n; ++i)
+    for (size_t i=0; i<n; ++i)
         bytes_written += _PutHex8 (uvalue, m_flags.IsSet(eAddPrefix));
     return bytes_written;
 }
@@ -555,15 +552,14 @@
 
     bool add_prefix = m_flags.IsSet(eAddPrefix);
     int bytes_written = 0;
-    int byte;
     if (byte_order == eByteOrderLittle)
     {
-        for (byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
+        for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     else
     {
-        for (byte = sizeof(uvalue)-1; byte >= 0; --byte, add_prefix = false)
+        for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     return bytes_written;
@@ -577,15 +573,14 @@
 
     bool add_prefix = m_flags.IsSet(eAddPrefix);
     int bytes_written = 0;
-    int byte;
     if (byte_order == eByteOrderLittle)
     {
-        for (byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
+        for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     else
     {
-        for (byte = sizeof(uvalue)-1; byte >= 0; --byte, add_prefix = false)
+        for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     return bytes_written;
@@ -599,15 +594,14 @@
 
     bool add_prefix = m_flags.IsSet(eAddPrefix);
     int bytes_written = 0;
-    int byte;
     if (byte_order == eByteOrderLittle)
     {
-        for (byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
+        for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     else
     {
-        for (byte = sizeof(uvalue)-1; byte >= 0; --byte, add_prefix = false)
+        for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
             bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
     }
     return bytes_written;
@@ -675,17 +669,16 @@
 
     int bytes_written = 0;
     const uint8_t *src = (const uint8_t *)s;
-    int i;
     bool binary_is_clear = m_flags.IsClear (eBinary);
     m_flags.Set (eBinary);
     if (src_byte_order == dst_byte_order)
     {
-        for (i=0;i<src_len; ++i)
+        for (size_t i = 0; i < src_len; ++i)
             bytes_written += _PutHex8 (src[i], false);
     }
     else
     {
-        for (i=src_len-1;i>=0; --i)
+        for (size_t i = src_len-1; i < src_len; --i)
             bytes_written += _PutHex8 (src[i], false);
     }
     if (binary_is_clear)
@@ -705,17 +698,16 @@
 
     int bytes_written = 0;
     const uint8_t *src = (const uint8_t *)s;
-    int i;
     bool binary_is_set = m_flags.IsSet(eBinary);
     m_flags.Clear(eBinary);
     if (src_byte_order == dst_byte_order)
     {
-        for (i=0;i<src_len; ++i)
+        for (size_t i = 0; i < src_len; ++i)
             bytes_written += _PutHex8 (src[i], false);
     }
     else
     {
-        for (i=src_len-1;i>=0; --i)
+        for (size_t i = src_len-1; i < src_len; --i)
             bytes_written += _PutHex8 (src[i], false);
     }
     if (binary_is_set)

Modified: lldb/trunk/source/Core/StreamFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamFile.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamFile.cpp (original)
+++ lldb/trunk/source/Core/StreamFile.cpp Fri Jul  9 15:39:50 2010
@@ -24,32 +24,32 @@
 StreamFile::StreamFile () :
     Stream (),
     m_file (NULL),
-    m_path_name (),
-    m_close_file (false)
+    m_close_file (false),
+    m_path_name ()
 {
 }
 
 StreamFile::StreamFile(uint32_t flags, uint32_t addr_size, ByteOrder byte_order, FILE *f) :
     Stream (flags, addr_size, byte_order),
     m_file(f),
-    m_path_name (),
-    m_close_file(false)
+    m_close_file(false),
+    m_path_name ()
 {
 }
 
 StreamFile::StreamFile(FILE *f) :
     Stream (),
     m_file(f),
-    m_path_name (),
-    m_close_file(false)
+    m_close_file(false),
+    m_path_name ()
 {
 }
 
 StreamFile::StreamFile(uint32_t flags, uint32_t addr_size, ByteOrder byte_order, const char *path, const char *permissions) :
     Stream (flags, addr_size, byte_order),
     m_file (NULL),
-    m_path_name (path),
-    m_close_file(false)
+    m_close_file(false),
+    m_path_name (path)
 {
     Open(path, permissions);
 }
@@ -57,8 +57,8 @@
 StreamFile::StreamFile(const char *path, const char *permissions) :
     Stream (),
     m_file (NULL),
-    m_path_name (path),
-    m_close_file(false)
+    m_close_file(false),
+    m_path_name (path)
 {
     Open(path, permissions);
 }

Modified: lldb/trunk/source/Core/StringList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StringList.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/StringList.cpp (original)
+++ lldb/trunk/source/Core/StringList.cpp Fri Jul  9 15:39:50 2010
@@ -68,7 +68,7 @@
 {
     uint32_t len = strings.GetSize();
 
-    for (int i = 0; i < len; ++i)
+    for (uint32_t i = 0; i < len; ++i)
         m_strings.push_back (strings.GetStringAtIndex(i));
 }
 
@@ -106,7 +106,7 @@
 
     for (++pos; pos != end; ++pos)
     {
-        int new_size = strlen (m_strings[pos].c_str());
+        size_t new_size = strlen (m_strings[pos].c_str());
 
         // First trim common_prefix if it is longer than the current element:
         if (common_prefix.size() > new_size)
@@ -114,7 +114,7 @@
 
         // Then trim it at the first disparity:
 
-        for (int i = 0; i < common_prefix.size(); i++)
+        for (size_t i = 0; i < common_prefix.size(); i++)
         {
             if (m_strings[pos][i]  != common_prefix[i])
             {
@@ -189,7 +189,7 @@
     if (GetSize() == 0)
         return;
 
-    int idx = 0;
+    size_t idx = 0;
     while (idx < m_strings.size())
     {
         if (m_strings[idx].empty())            

Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Fri Jul  9 15:39:50 2010
@@ -616,7 +616,7 @@
         data.SetData(data_sp);
     }
 
-    uint8_t* dst = (uint8_t*)data.PeekData (data_offset, byte_size);
+    uint8_t* dst = const_cast<uint8_t*>(data.PeekData (data_offset, byte_size));
     if (dst != NULL)
     {
         if (address_type == eAddressTypeHost)
@@ -677,6 +677,10 @@
         case eValueTypeScalar:               // raw scalar value
             break;
 
+        case eContextTypeValue:
+            m_value.Clear();    // TODO: Sean, fill this in
+            break;
+
         default:
         case eValueTypeFileAddress:
             m_value.Clear();
@@ -757,6 +761,7 @@
     case eContextTypeDCRegisterInfo:        return "RegisterInfo *";
     case eContextTypeDCType:                return "Type *";
     case eContextTypeDCVariable:            return "Variable *";
+    case eContextTypeValue:                 return "Value"; // TODO: Sean, more description here?
     };
     return "???";
 }

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Jul  9 15:39:50 2010
@@ -516,6 +516,9 @@
                         }
                     }
                     break;
+                    
+                default:
+                    break;
                 }
             }
         }
@@ -579,7 +582,7 @@
         {
             const size_t byte_size = GetByteSize();
             const off_t byte_offset = GetByteOffset();
-            uint8_t *dst = (uint8_t *)m_data.PeekData(byte_offset, byte_size);
+            uint8_t *dst = const_cast<uint8_t *>(m_data.PeekData(byte_offset, byte_size));
             if (dst != NULL)
             {
                 // We are decoding a float into host byte order below, so make

Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Fri Jul  9 15:39:50 2010
@@ -111,9 +111,9 @@
                 const char *clang_type_name = m_type_name.AsCString();
                 if (clang_type_name)
                 {
-                    char bitfield_type_name[strlen(clang_type_name) + 32];
-                    ::snprintf (bitfield_type_name, sizeof(bitfield_type_name), "%s:%u", clang_type_name, m_bitfield_bit_size);
-                    m_type_name.SetCString(bitfield_type_name);
+                    std::vector<char> bitfield_type_name (strlen(clang_type_name) + 32, 0);
+                    ::snprintf (bitfield_type_name.data(), bitfield_type_name.size(), "%s:%u", clang_type_name, m_bitfield_bit_size);
+                    m_type_name.SetCString(bitfield_type_name.data());
                 }
             }
         }

Modified: lldb/trunk/source/Expression/ClangExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpression.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpression.cpp Fri Jul  9 15:39:50 2010
@@ -195,9 +195,12 @@
 ClangExpression::ClangExpression(const char *target_triple,
                                  ClangExpressionDeclMap *decl_map) :
     m_target_triple (),
-    m_jit_mm_ptr (NULL),
+    m_decl_map (decl_map),
+    m_clang_ap (),
     m_code_generator_ptr (NULL),
-    m_decl_map (decl_map)
+    m_jit_mm_ptr (NULL),
+    m_execution_engine (),
+    m_jitted_functions ()
 {
     if (target_triple && target_triple[0])
         m_target_triple = target_triple;

Modified: lldb/trunk/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangFunction.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangFunction.cpp (original)
+++ lldb/trunk/source/Expression/ClangFunction.cpp Fri Jul  9 15:39:50 2010
@@ -43,14 +43,19 @@
 //----------------------------------------------------------------------
 ClangFunction::ClangFunction(const char *target_triple, ClangASTContext *ast_context, void *return_qualtype, const Address& functionAddress, const ValueList &arg_value_list) :
     ClangExpression (target_triple, NULL),
-    m_function_addr (functionAddress),
     m_function_ptr (NULL),
-    m_arg_values (arg_value_list),
-    m_clang_ast_context (ast_context),
+    m_function_addr (functionAddress),
     m_function_return_qual_type(return_qualtype),
+    m_clang_ast_context (ast_context),
     m_wrapper_function_name ("__lldb_caller_function"),
     m_wrapper_struct_name ("__lldb_caller_struct"),
+    m_wrapper_function_addr (),
+    m_wrapper_args_addrs (),
+    m_struct_layout (NULL),
+    m_arg_values (arg_value_list),
+    m_value_struct_size (0),
     m_return_offset(0),
+    m_return_size (0),
     m_compiled (false),
     m_JITted (false)
 {
@@ -59,12 +64,18 @@
 ClangFunction::ClangFunction(const char *target_triple, Function &function, ClangASTContext *ast_context, const ValueList &arg_value_list) :
     ClangExpression (target_triple, NULL),
     m_function_ptr (&function),
-    m_arg_values (arg_value_list),
+    m_function_addr (),
+    m_function_return_qual_type (),
     m_clang_ast_context (ast_context),
-    m_function_return_qual_type (NULL),
     m_wrapper_function_name ("__lldb_function_caller"),
     m_wrapper_struct_name ("__lldb_caller_struct"),
-    m_return_offset(0),
+    m_wrapper_function_addr (),
+    m_wrapper_args_addrs (),
+    m_struct_layout (NULL),
+    m_arg_values (arg_value_list),
+    m_value_struct_size (0),
+    m_return_offset (0),
+    m_return_size (0),
     m_compiled (false),
     m_JITted (false)
 {
@@ -109,22 +120,24 @@
         // to pull the defined arguments out of the function, then add the types from the
         // arguments list for the variable arguments.
 
-        size_t num_args = -1;
+        uint32_t num_args = UINT32_MAX;
         bool trust_function = false;
         // GetArgumentCount returns -1 for an unprototyped function.
         if (m_function_ptr)
         {
-            num_args = m_function_ptr->GetArgumentCount();
-            if (num_args != -1)
+            int num_func_args = m_function_ptr->GetArgumentCount();
+            if (num_func_args >= 0)
                 trust_function = true;
+            else
+                num_args = num_func_args;
         }
 
-        if (num_args == -1)
+        if (num_args == UINT32_MAX)
             num_args = m_arg_values.GetSize();
 
         std::string args_buffer;  // This one stores the definition of all the args in "struct caller".
         std::string args_list_buffer;  // This one stores the argument list called from the structure.
-        for (int i = 0; i < num_args; i++)
+        for (size_t i = 0; i < num_args; i++)
         {
             const char *type_string;
             std::string type_stdstr;
@@ -157,7 +170,7 @@
             char arg_buf[32];
             args_buffer.append ("    ");
             args_buffer.append (type_string);
-            snprintf(arg_buf, 31, "arg_%d", i);
+            snprintf(arg_buf, 31, "arg_%zd", i);
             args_buffer.push_back (' ');
             args_buffer.append (arg_buf);
             args_buffer.append (";\n");
@@ -253,8 +266,8 @@
     }
 
     // Next get the call address for the function:
-    m_wrapper_fun_addr = GetFunctionAddress (m_wrapper_function_name.c_str());
-    if (m_wrapper_fun_addr == LLDB_INVALID_ADDRESS)
+    m_wrapper_function_addr = GetFunctionAddress (m_wrapper_function_name.c_str());
+    if (m_wrapper_function_addr == LLDB_INVALID_ADDRESS)
         return false;
 
     return true;
@@ -322,7 +335,7 @@
         return false;
     }
     
-    for (int i = 0; i < num_args; i++)
+    for (size_t i = 0; i < num_args; i++)
     {
         // FIXME: We should sanity check sizes.
 
@@ -366,7 +379,7 @@
 
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP);
     if (log)
-        log->Printf ("Call Address: 0x%llx Struct Address: 0x%llx.\n", m_wrapper_fun_addr, args_addr_ref);
+        log->Printf ("Call Address: 0x%llx Struct Address: 0x%llx.\n", m_wrapper_function_addr, args_addr_ref);
         
     return true;
 }
@@ -386,7 +399,7 @@
 
     // Okay, now run the function:
 
-    Address wrapper_address (NULL, m_wrapper_fun_addr);
+    Address wrapper_address (NULL, m_wrapper_function_addr);
     ThreadPlan *new_plan = new ThreadPlanCallFunction (*exc_context.thread, 
                                           wrapper_address,
                                           args_addr,

Modified: lldb/trunk/source/Expression/ClangStmtVisitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangStmtVisitor.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangStmtVisitor.cpp (original)
+++ lldb/trunk/source/Expression/ClangStmtVisitor.cpp Fri Jul  9 15:39:50 2010
@@ -37,6 +37,9 @@
 
     switch (clang_type->getTypeClass())
     {
+    default:
+        break;
+
     case clang::Type::FunctionNoProto:
     case clang::Type::FunctionProto:
         break;
@@ -135,8 +138,8 @@
     lldb_private::StreamString &strm
 ) :
     m_ast_context (ast_context),
-    m_variable_list (variable_list),
     m_decl_map (decl_map),
+    m_variable_list (variable_list),
     m_stream (strm)
 {
 }
@@ -477,22 +480,10 @@
     bool is_wide = Str->isWide();
     
     size_t new_length = byte_length + (is_wide ? 1 : 2);
+
+    std::string null_terminated_string (Str->getStrData(), byte_length);
     
-    uint8_t null_terminated_string[new_length];
-    
-    memcpy(&null_terminated_string[0], Str->getStrData(), byte_length);
-    
-    if(is_wide)
-    {
-        null_terminated_string[byte_length] = '\0';
-        null_terminated_string[byte_length + 1] = '\0';
-    }
-    else 
-    {
-        null_terminated_string[byte_length] = '\0';
-    }
-    
-    Value *val = new Value(null_terminated_string, new_length);
+    Value *val = new Value((uint8_t*)null_terminated_string.c_str(), new_length);
     val->SetContext(Value::eContextTypeOpaqueClangQualType, Str->getType().getAsOpaquePtr());
     
     uint32_t val_idx = m_variable_list.AppendValue(val);

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Fri Jul  9 15:39:50 2010
@@ -303,6 +303,9 @@
 
         switch (level)
         {
+        default:
+            break;
+
         case lldb::eDescriptionLevelBrief:
             if (offset > start_offset)
                 s->PutChar(' ');

Added: lldb/trunk/source/Expression/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Expression/Makefile (added)
+++ lldb/trunk/source/Expression/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Expression/Makefile --------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbExpression
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Generated/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Generated/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Generated/Makefile (added)
+++ lldb/trunk/source/Generated/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,19 @@
+##===- source/Generated/Makefile ---------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbGenerated
+BUILD_ARCHIVE = 1
+
+BUILT_SOURCES = LLDB_vers.c
+
+include $(LLDB_LEVEL)/Makefile
+
+LLDB_vers.c: $(PROJ_SRC_DIR)/../../scripts/generate-vers.pl $(PROJ_SRC_DIR)/../../lldb.xcodeproj/project.pbxproj
+	$(PROJ_SRC_DIR)/../../scripts/generate-vers.pl $(PROJ_SRC_DIR)/../../lldb.xcodeproj/project.pbxproj > $(PROJ_OBJ_DIR)/LLDB_vers.c

Added: lldb/trunk/source/Host/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Host/Makefile (added)
+++ lldb/trunk/source/Host/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,20 @@
+##===- source/Host/Makefile --------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+
+include $(LLDB_LEVEL)/../../Makefile.config
+
+ifeq ($(HOST_OS),Darwin)
+DIRS := macosx posix
+else
+DIRS := linux posix
+endif
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Host/linux/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Host/linux/Makefile (added)
+++ lldb/trunk/source/Host/linux/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Host/linux/Makefile --------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../..
+LIBRARYNAME := lldbHostLinux
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Fri Jul  9 15:39:50 2010
@@ -23,9 +23,9 @@
 
 #include <Foundation/Foundation.h>
 
-#include "CFCBundle.h"
-#include "CFCReleaser.h"
-#include "CFCString.h"
+#include "cfcpp/CFCBundle.h"
+#include "cfcpp/CFCReleaser.h"
+#include "cfcpp/CFCString.h"
 
 #include "lldb/Host/Host.h"
 #include "lldb/Core/ArchSpec.h"
@@ -434,7 +434,7 @@
     // Set the pthread name if possible
     if (pid == curr_pid && tid == curr_tid)
     {
-        ::pthread_setname_np (name) == 0;
+        ::pthread_setname_np (name);
     }
 #endif
     ThreadNameAccessor (false, pid, tid, name);
@@ -446,21 +446,22 @@
     static FileSpec g_program_filepsec;
     if (!g_program_filepsec)
     {
-        std::string program_fullpath;
-        program_fullpath.resize (PATH_MAX);
+        char program_fullpath[PATH_MAX];
         // If DST is NULL, then return the number of bytes needed.
-        uint32_t len = program_fullpath.size();
-        int err = _NSGetExecutablePath ((char *)program_fullpath.data(), &len);
-        if (err < 0)
-        {
-            // The path didn't fit in the buffer provided, increase its size
-            // and try again
-            program_fullpath.resize(len);
-            len = program_fullpath.size();
-            err = _NSGetExecutablePath ((char *)program_fullpath.data(), &len);
-        }
+        uint32_t len = sizeof(program_fullpath);
+        int err = _NSGetExecutablePath (program_fullpath, &len);
         if (err == 0)
-            g_program_filepsec.SetFile(program_fullpath.data());
+            g_program_filepsec.SetFile (program_fullpath);
+        else if (err == -1)
+        {
+            char *large_program_fullpath = (char *)::malloc (len + 1);
+
+            err = _NSGetExecutablePath (large_program_fullpath, &len);
+            if (err == 0)
+                g_program_filepsec.SetFile (large_program_fullpath);
+
+            ::free (large_program_fullpath);
+        }
     }
     return g_program_filepsec;
 }
@@ -505,7 +506,7 @@
 
 struct MonitorInfo
 {
-    int handle;
+    uint32_t handle;
     pthread_t thread;
     Host::MonitorChildProcessCallback callback;
     void *callback_baton;

Added: lldb/trunk/source/Host/macosx/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Host/macosx/Makefile (added)
+++ lldb/trunk/source/Host/macosx/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,16 @@
+##===- source/Host/macosx/Makefile -------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../..
+LIBRARYNAME := lldbHostMacOSX
+BUILD_ARCHIVE = 1
+
+SOURCES := $(notdir $(wildcard *.cpp *.mm))
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Fri Jul  9 15:39:50 2010
@@ -19,20 +19,23 @@
 #include <CoreFoundation/CoreFoundation.h>
 
 // Project includes
-#include "CFCReleaser.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBuffer.h"
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Core/UUID.h"
 
+#include "Host/macosx/cfcpp/CFCReleaser.h"
+
 using namespace lldb;
 using namespace lldb_private;
 
 extern "C" {
+
 CFURLRef DBGCopyFullDSYMURLForUUID (CFUUIDRef uuid, CFURLRef exec_url);
 CFDictionaryRef DBGCopyDSYMPropertyLists (CFURLRef dsym_url);
-};
+
+}
 
 static bool
 SkinnyMachOFileContainsArchAndUUID

Added: lldb/trunk/source/Host/posix/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Host/posix/Makefile (added)
+++ lldb/trunk/source/Host/posix/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Host/posix/Makefile --------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../..
+LIBRARYNAME := lldbHostPosix
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Fri Jul  9 15:39:50 2010
@@ -779,7 +779,7 @@
 
     for (++pos; pos != end; ++pos)
     {
-        int new_size = (*pos).size();
+        size_t new_size = (*pos).size();
 
         // First trim common_prefix if it is longer than the current element:
         if (common_prefix.size() > new_size)
@@ -787,7 +787,7 @@
 
         // Then trim it at the first disparity:
 
-        for (int i = 0; i < common_prefix.size(); i++)
+        for (size_t i = 0; i < common_prefix.size(); i++)
         {
             if ((*pos)[i]  != common_prefix[i])
             {
@@ -998,7 +998,7 @@
     // So we have to build another Arg and pass that to getopt_long so it doesn't
     // change the one we have.
 
-    std::vector<const char *> dummy_vec(GetArgumentVector(), GetArgumentVector() + GetArgumentCount() + 1);
+    std::vector<const char *> dummy_vec (GetArgumentVector(), GetArgumentVector() + GetArgumentCount() + 1);
 
     bool failed_once = false;
     uint32_t dash_dash_pos = -1;
@@ -1009,7 +1009,10 @@
         int parse_start = optind;
         int long_options_index = -1;
         
-        val = ::getopt_long (dummy_vec.size() - 1,(char *const *) dummy_vec.data(), sstr.GetData(), long_options,
+        val = ::getopt_long (dummy_vec.size() - 1,
+                             (char *const *) dummy_vec.data(), 
+                             sstr.GetData(), 
+                             long_options,
                              &long_options_index);
 
         if (val == -1)

Added: lldb/trunk/source/Interpreter/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Interpreter/Makefile (added)
+++ lldb/trunk/source/Interpreter/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,24 @@
+##===- source/Interpreter/Makefile  ------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbInterpreter
+BUILD_ARCHIVE = 1
+
+BUILT_SOURCES := LLDBWrapPython.cpp
+
+include $(LLDB_LEVEL)/Makefile
+
+LLDB_PYTHON_SWIG_CPP = $(PROJ_OBJ_ROOT)/$(BuildMode)/LLDBWrapPython.cpp
+LLDB_BIN_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
+PYTHON_DIR := $(LLDB_BIN_DIR)
+
+LLDBWrapPython.cpp:
+	swig -c++ -shadow -python -I"$(LLDB_LEVEL)/include" -I./. -outdir "$(LLDB_BIN_DIR)" -o LLDBWrapPython.cpp "$(LLDB_LEVEL)/scripts/lldb.swig"
+	cp embedded_interpreter.py "$(PYTHON_DIR)"

Added: lldb/trunk/source/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Makefile (added)
+++ lldb/trunk/source/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,20 @@
+##===- source/Makefile -------------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := API Breakpoint Commands Core Expression Host Interpreter Plugins Symbol Target Utility
+LIBRARYNAME := lldbInitAndLog
+BUILD_ARCHIVE = 1
+
+BUILT_SOURCES = LLDB_vers.c
+
+include $(LLDB_LEVEL)/Makefile
+
+LLDB_vers.c: $(LLDB_LEVEL)/scripts/generate-vers.pl $(LLDB_LEVEL)/lldb.xcodeproj/project.pbxproj
+	$(LLDB_LEVEL)/scripts/generate-vers.pl $(LLDB_LEVEL)/lldb.xcodeproj/project.pbxproj > LLDB_vers.c

Added: lldb/trunk/source/Plugins/ABI/MacOSX-i386/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-i386/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-i386/Makefile (added)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-i386/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/MacOSX-i386/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginABIMacOSX_i386
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/ABI/SysV-x86_64/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/Makefile (added)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/SysV-x86_64/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginABISysV_x86_64
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp Fri Jul  9 15:39:50 2010
@@ -376,8 +376,7 @@
     char triple[256];
     if (TripleForArchSpec (arch, triple, sizeof(triple)))
     {
-        EDAssemblySyntax_t syntax = SyntaxForArchSpec (arch);
-        assert(!EDGetDisassembler(&m_disassembler, triple, syntax) && "No disassembler created!");
+        assert(!EDGetDisassembler(&m_disassembler, triple, SyntaxForArchSpec (arch)) && "No disassembler created!");
     }
 }
 

Added: lldb/trunk/source/Plugins/Disassembler/llvm/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/Makefile (added)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/Disassembler/llvm/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginDisassemblerLLVM
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile (added)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/Disassembler/llvm/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginDynamicLoaderMacOSX
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ObjCTrampolineHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ObjCTrampolineHandler.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ObjCTrampolineHandler.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ObjCTrampolineHandler.h Fri Jul  9 15:39:50 2010
@@ -16,7 +16,6 @@
 #include <string>
 // Other libraries and framework includes
 // Project includes
-#include "lldb.h"
 #include "lldb/Expression/ClangExpression.h"
 #include "lldb/Expression/ClangFunction.h"
 #include "lldb/Host/Mutex.h"
@@ -128,6 +127,6 @@
     
 };
 
-};  // using namespace lldb_private
+}  // using namespace lldb_private
 
 #endif	// lldb_ObjCTrampolineHandler_h_

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ThreadPlanStepThroughObjCTrampoline.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ThreadPlanStepThroughObjCTrampoline.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ThreadPlanStepThroughObjCTrampoline.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/ThreadPlanStepThroughObjCTrampoline.h Fri Jul  9 15:39:50 2010
@@ -14,8 +14,8 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb-types.h"
-#include "lldb-enumerations.h"
+#include "lldb/lldb-types.h"
+#include "lldb/lldb-enumerations.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "ObjCTrampolineHandler.h"
 
@@ -90,5 +90,6 @@
     lldb::addr_t m_sel_ptr;
 };
 
-}; // namespace lldb_private
+} // namespace lldb_private
+
 #endif	// lldb_ThreadPlanStepThroughObjCTrampoline_h_

Added: lldb/trunk/source/Plugins/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Makefile (added)
+++ lldb/trunk/source/Plugins/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,21 @@
+##===- source/Plugins/Makefile -----------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+
+include $(LLDB_LEVEL)/../../Makefile.config
+
+
+DIRS := ABI/MacOSX-i386 ABI/SysV-x86_64 Disassembler/llvm  ObjectContainer/BSD-Archive ObjectFile/ELF  SymbolFile/DWARF SymbolFile/Symtab SymbolVendor/MacOSX
+
+ifeq ($(HOST_OS),Darwin)
+	DIRS += DynamicLoader/MacOSX-DYLD ObjectContainer/Universal-Mach-O ObjectFile/Mach-O Process/gdb-remote Process/Utility
+endif
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/Makefile (added)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/BSD-Archive/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectContainerBSDArchive
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/Makefile (added)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/Universal-Mach-O/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectContainerUniversalMachO
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/ObjectFile/ELF/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/Makefile (added)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectFile/ELF/Makefile --------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectFileELF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/ObjectFile/Mach-O/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/Makefile (added)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectFile/Mach-O/Makefile -----------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectFileMachO
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/Process/MacOSX-User/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/Makefile (added)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,17 @@
+##===- source/Plugins/Process/MacOSX-User/Makefile ---------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginProcessMacOSXUser
+BUILD_ARCHIVE = 1
+
+Source := $(wildcard $(PROJ_SRC_DIR)/source/*.cpp)
+Source += $(wildcard $(PROJ_SRC_DIR)/source/MacOSX/*.cpp)
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachException.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachException.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachException.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachException.h Fri Jul  9 15:39:50 2010
@@ -131,7 +131,7 @@
     enum
     {
         e_actionForward,    // Forward signal to inferior process
-        e_actionStop,        // Stop when this signal is received
+        e_actionStop        // Stop when this signal is received
     };
     struct Action
     {

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Fri Jul  9 15:39:50 2010
@@ -341,7 +341,7 @@
 }
 
 Error
-ProcessMacOSX::DoAttach (lldb::pid_t attach_pid)
+ProcessMacOSX::DoAttachToProcessWithID (lldb::pid_t attach_pid)
 {
     Error error;
 
@@ -493,12 +493,19 @@
 }
 
 Error
-ProcessMacOSX::WillAttach (lldb::pid_t pid)
+ProcessMacOSX::WillAttachToProcessWithID (lldb::pid_t pid)
 {
     return WillLaunchOrAttach ();
 }
 
 Error
+ProcessMacOSX::WillAttachToProcessWithName (const char *process_name, bool wait_for_launch) 
+{
+    return WillLaunchOrAttach ();
+}
+
+
+Error
 ProcessMacOSX::DoResume ()
 {
     Error error;

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.h Fri Jul  9 15:39:50 2010
@@ -22,8 +22,8 @@
 #include "lldb/Target/Thread.h"
 
 // Project includes
-#include "MachTask.h"
-#include "MachException.h"
+#include "MacOSX/MachTask.h"
+#include "MacOSX/MachException.h"
 
 typedef enum PDLaunch
 {
@@ -33,6 +33,7 @@
 #if defined (__arm__)
     eLaunchSpringBoard,
 #endif
+	kNumPDLaunchTypes
 } PDLaunchType;
 
 
@@ -99,10 +100,13 @@
     DidLaunch ();
 
     virtual lldb_private::Error
-    WillAttach (lldb::pid_t pid);
+    WillAttachToProcessWithID (lldb::pid_t pid);
 
     virtual lldb_private::Error
-    DoAttach (lldb::pid_t pid);
+    WillAttachToProcessWithName (const char *process_name, bool wait_for_launch);
+
+    virtual lldb_private::Error
+    DoAttachToProcessWithID (lldb::pid_t pid);
 
     virtual void
     DidAttach ();

Modified: lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.cpp Fri Jul  9 15:39:50 2010
@@ -166,6 +166,9 @@
             break;
         }
         break;
+
+    default:
+        break;
     }
     return false;
 }
@@ -197,9 +200,12 @@
     const RegisterInfo *reg_info = GetRegisterInfoAtIndex (reg);
     if (reg_info == NULL)
         return false;
-    unw_word_t reg_value;
+    unw_word_t reg_value = 0;
     switch (value.GetType())
     {
+    case Scalar::e_void:
+        return false;
+
     case Scalar::e_sint:        reg_value = value.SInt(); break;
     case Scalar::e_uint:        reg_value = value.UInt(); break;
     case Scalar::e_slong:       reg_value = value.SLong(); break;
@@ -294,6 +300,9 @@
         default:
             return false;
         }
+
+    default:
+        return false;
     }        
     return WriteRegisterValue (reg, value);
 }

Modified: lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/LibUnwindRegisterContext.h Fri Jul  9 15:39:50 2010
@@ -17,7 +17,7 @@
 #include "lldb/lldb-private.h"
 #include "lldb/Target/RegisterContext.h"
 
-#include "libunwind.h"
+#include "libunwind/include/libunwind.h"
 
 class LibUnwindRegisterContext : public lldb_private::RegisterContext
 {

Modified: lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp Fri Jul  9 15:39:50 2010
@@ -21,10 +21,11 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 
-#include "lldb-enumerations.h"
-#include "libunwind.h"
+#include "lldb/lldb-enumerations.h"
 #include "llvm-c/EnhancedDisassembly.h"
 
+#include "libunwind/include/libunwind.h"
+
 using namespace lldb;
 
 namespace lldb_private {
@@ -191,7 +192,15 @@
 
 
 static int 
-reg_info (lldb_private::unw_addr_space_t as, lldb_private::unw_regnum_t regnum, lldb_private::unw_regtype_t *type, char *buf, size_t buflen, void *arg)
+reg_info 
+(
+    lldb_private::unw_addr_space_t as, 
+    lldb_private::unw_regnum_t regnum, 
+    lldb_private::unw_regtype_t *type, 
+    char *buf, 
+    size_t buflen, 
+    void *arg
+)
 {
     if (arg == 0)
         return -1;

Added: lldb/trunk/source/Plugins/Process/Utility/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/Makefile (added)
+++ lldb/trunk/source/Plugins/Process/Utility/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/Utility/Makefile ---------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginUtility
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp Fri Jul  9 15:39:50 2010
@@ -18,7 +18,7 @@
 #include "lldb/Core/StreamString.h"
 #include "lldb/Target/Thread.h"
 // Project includes
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindLibUnwind.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindLibUnwind.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindLibUnwind.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindLibUnwind.h Fri Jul  9 15:39:50 2010
@@ -15,7 +15,7 @@
 #include <vector>
 
 // Other libraries and framework includes
-#include "libunwind.h"
+#include "libunwind/include/libunwind.h"
 
 // Project includes
 #include "lldb/lldb-private.h"

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/include/libunwind.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/include/libunwind.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/include/libunwind.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/include/libunwind.h Fri Jul  9 15:39:50 2010
@@ -56,7 +56,7 @@
 struct unw_addr_space
 { 
 	enum unw_as_type type; 
-	uint8_t data[]; 
+	uint8_t data[1]; 
 };
 typedef struct unw_addr_space* unw_addr_space_t;
 
@@ -345,7 +345,7 @@
 // architecture independent register numbers 
 enum {
     UNW_REG_IP = -1,        // instruction pointer
-    UNW_REG_SP = -2,        // stack pointer
+    UNW_REG_SP = -2         // stack pointer
 };
 
 
@@ -502,7 +502,7 @@
 };
 
 
-}; // namespace lldb_private
+} // namespace lldb_private
 
 
 #endif

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Fri Jul  9 15:39:50 2010
@@ -21,7 +21,7 @@
 #include "lldb/Host/TimeValue.h"
 
 // Project includes
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 #include "ProcessGDBRemote.h"
 #include "ProcessGDBRemoteLog.h"
 
@@ -78,7 +78,7 @@
     // We only need to compute the checksum if we are sending acks
     if (m_send_acks)
     {
-        for (int i = 0; i < payload_length; ++i)
+        for (size_t i = 0; i < payload_length; ++i)
             checksum += payload[i];
     }
     return checksum & 255;
@@ -365,7 +365,10 @@
         if (bytes_written == packet.GetSize())
         {
             if (m_send_acks)
-                GetAck (1) == '+';
+            {
+                if (GetAck (1) != '+')
+                    return 0;
+            }
         }
         return bytes_written;
    }

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Fri Jul  9 15:39:50 2010
@@ -26,7 +26,7 @@
 #include "lldb/Host/Mutex.h"
 #include "lldb/Host/Predicate.h"
 
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 
 class ProcessGDBRemote;
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Fri Jul  9 15:39:50 2010
@@ -17,11 +17,11 @@
 #include "lldb/Core/Scalar.h"
 #include "lldb/Core/StreamString.h"
 // Project includes
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 #include "ProcessGDBRemote.h"
 #include "ThreadGDBRemote.h"
-#include "ARM_GCC_Registers.h"
-#include "ARM_DWARF_Registers.h"
+#include "Utility/ARM_GCC_Registers.h"
+#include "Utility/ARM_DWARF_Registers.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -171,7 +171,10 @@
                 return true;
             }
             break;
-        }
+
+        default:
+            break;
+        }        
     }
     return false;
 }
@@ -219,10 +222,10 @@
                 else
                 {
                     // Get each register individually
-                    packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg, false);
+                    packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg);
                     assert (packet_len < (sizeof(packet) - 1));
                     if (gdb_comm.SendPacketAndWaitForResponse(packet, response, 1, false))
-                        if (response.GetHexBytes ((uint8_t*)m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size), reg_info->byte_size, '\xcc') == reg_info->byte_size)
+                        if (response.GetHexBytes (const_cast<uint8_t*>(m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size)), reg_info->byte_size, '\xcc') == reg_info->byte_size)
                             m_reg_valid[reg] = true;
                 }
             }
@@ -276,7 +279,7 @@
     if (reg_info)
     {
         // Grab a pointer to where we are going to put this register
-        uint8_t *dst = (uint8_t *)m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size);
+        uint8_t *dst = const_cast<uint8_t*>(m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size));
 
         if (dst == NULL)
             return false;

Removed: lldb/trunk/source/Plugins/Process/gdb-remote/GDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBServer.cpp?rev=108008&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBServer.cpp (removed)
@@ -1,1148 +0,0 @@
-//===-- GDBServer.cpp -------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <getopt.h>
-#include <netinet/in.h>
-#include <sys/select.h>
-#include <sys/sysctl.h>
-#include <string>
-#include <vector>
-#include <asl.h>
-
-#include "GDBServerLog.h"
-#include "GDBRemoteSession.h"
-
-using namespace lldb;
-
-//----------------------------------------------------------------------
-// Run loop modes which determine which run loop function will be called
-//----------------------------------------------------------------------
-typedef enum
-{
-    eDCGSRunLoopModeInvalid = 0,
-    eDCGSRunLoopModeGetStartModeFromRemoteProtocol,
-    eDCGSRunLoopModeInferiorAttaching,
-    eDCGSRunLoopModeInferiorLaunching,
-    eDCGSRunLoopModeInferiorExecuting,
-    eDCGSRunLoopModeInferiorKillOrDetach,
-    eDCGSRunLoopModeExit
-} GSRunLoopMode;
-
-typedef enum
-{
-    eLaunchFlavorDefault = 0,
-    eLaunchFlavorPosixSpawn,
-#if defined (__arm__)
-    eLaunchFlavorSpringBoard,
-#endif
-    eLaunchFlavorForkExec,
-} GSLaunchFlavor;
-
-typedef lldb::shared_ptr<GDBRemoteSession> GDBRemoteSP;
-
-typedef struct HandleBroadcastEventInfo
-{
-    TargetSP target_sp;
-    GDBRemoteSP remote_sp;
-    GSRunLoopMode mode;
-
-    Target *
-    GetTarget ()
-    {
-        return target_sp.get();
-    }
-
-    Process *
-    GetProcess()
-    {
-        if (target_sp.get())
-            return target_sp->GetProcess().get();
-        return NULL;
-    }
-
-    GDBRemoteSession *
-    GetRemote ()
-    {
-        return remote_sp.get();
-    }
-
-};
-
-
-//----------------------------------------------------------------------
-// Global Variables
-//----------------------------------------------------------------------
-static int g_lockdown_opt  = 0;
-static int g_applist_opt = 0;
-static GSLaunchFlavor g_launch_flavor = eLaunchFlavorDefault;
-int g_isatty = 0;
-
-//----------------------------------------------------------------------
-// Run Loop function prototypes
-//----------------------------------------------------------------------
-void GSRunLoopGetStartModeFromRemote (HandleBroadcastEventInfo *info);
-void GSRunLoopInferiorExecuting (HandleBroadcastEventInfo *info);
-
-
-//----------------------------------------------------------------------
-// Get our program path and arguments from the remote connection.
-// We will need to start up the remote connection without a PID, get the
-// arguments, wait for the new process to finish launching and hit its
-// entry point,  and then return the run loop mode that should come next.
-//----------------------------------------------------------------------
-void
-GSRunLoopGetStartModeFromRemote (HandleBroadcastEventInfo *info)
-{
-    std::string packet;
-
-    Target *target = info->GetTarget();
-    GDBRemoteSession *remote = info->GetRemote();
-    if (target != NULL && remote != NULL)
-    {
-        // Spin waiting to get the A packet.
-        while (1)
-        {
-            gdb_err_t err = gdb_err;
-            GDBRemoteSession::PacketEnum type;
-
-            err = remote->HandleReceivedPacket (&type);
-
-            // check if we tried to attach to a process
-            if (type == GDBRemoteSession::vattach || type == GDBRemoteSession::vattachwait)
-            {
-                if (err == gdb_success)
-                {
-                    info->mode = eDCGSRunLoopModeInferiorExecuting;
-                    return;
-                }
-                else
-                {
-                    Log::STDERR ("error: attach failed.");
-                    info->mode = eDCGSRunLoopModeExit;
-                    return;
-                }
-            }
-
-            if (err == gdb_success)
-            {
-                // If we got our arguments we are ready to launch using the arguments
-                // and any environment variables we received.
-                if (type == GDBRemoteSession::set_argv)
-                {
-                    info->mode = eDCGSRunLoopModeInferiorLaunching;
-                    return;
-                }
-            }
-            else if (err == gdb_not_connected)
-            {
-                Log::STDERR ("error: connection lost.");
-                info->mode = eDCGSRunLoopModeExit;
-                return;
-            }
-            else
-            {
-                // a catch all for any other gdb remote packets that failed
-                GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s Error getting packet.",__FUNCTION__);
-                continue;
-            }
-
-            GDBServerLog::LogIf (GS_LOG_MINIMAL, "#### %s", __FUNCTION__);
-        }
-    }
-    info->mode = eDCGSRunLoopModeExit;
-}
-
-
-//----------------------------------------------------------------------
-// This run loop mode will wait for the process to launch and hit its
-// entry point. It will currently ignore all events except for the
-// process state changed event, where it watches for the process stopped
-// or crash process state.
-//----------------------------------------------------------------------
-GSRunLoopMode
-GSRunLoopLaunchInferior (HandleBroadcastEventInfo *info)
-{
-    // The Process stuff takes a c array, the GSContext has a vector...
-    // So make up a c array.
-    Target *target = info->GetTarget();
-    GDBRemoteSession *remote = info->GetRemote();
-    Process* process = info->GetProcess();
-
-    if (process == NULL)
-        return eDCGSRunLoopModeExit;
-
-    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s Launching '%s'...", __FUNCTION__, target->GetExecutableModule()->GetFileSpec().GetFilename().AsCString());
-
-    // Our launch type hasn't been set to anything concrete, so we need to
-    // figure our how we are going to launch automatically.
-
-    GSLaunchFlavor launch_flavor = g_launch_flavor;
-    if (launch_flavor == eLaunchFlavorDefault)
-    {
-        // Our default launch method is posix spawn
-        launch_flavor = eLaunchFlavorPosixSpawn;
-
-#if defined (__arm__)
-        // Check if we have an app bundle, if so launch using SpringBoard.
-        if (strstr(inferior_argv[0], ".app"))
-        {
-            launch_flavor = eLaunchFlavorSpringBoard;
-        }
-#endif
-    }
-
-    //ctx.SetLaunchFlavor(launch_flavor);
-
-    const char *stdio_file = NULL;
-    lldb::pid_t pid = process->Launch (remote->GetARGV(), remote->GetENVP(), stdio_file, stdio_file, stdio_file);
-
-    if (pid == LLDB_INVALID_PROCESS_ID)
-    {
-        Log::STDERR ("error: process launch failed: %s", process->GetError().AsCString());
-    }
-    else
-    {
-        if (remote->IsConnected())
-        {
-            // It we are connected already, the next thing gdb will do is ask
-            // whether the launch succeeded, and if not, whether there is an
-            // error code.  So we need to fetch one packet from gdb before we wait
-            // on the stop from the target.
-            gdb_err_t err = gdb_err;
-            GDBRemoteSession::PacketEnum type;
-
-            err = remote->HandleReceivedPacket (&type);
-
-            if (err != gdb_success)
-            {
-                GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s Error getting packet.", __FUNCTION__);
-                return eDCGSRunLoopModeExit;
-            }
-            if (type != GDBRemoteSession::query_launch_success)
-            {
-                GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s Didn't get the expected qLaunchSuccess packet.", __FUNCTION__);
-            }
-        }
-    }
-
-    Listener listener("GSRunLoopLaunchInferior");
-    listener.StartListeningForEvents (process, Process::eBroadcastBitStateChanged);
-    while (process->GetID() != LLDB_INVALID_PROCESS_ID)
-    {
-        uint32_t event_mask = 0;
-        while (listener.WaitForEvent(NULL, &event_mask))
-        {
-            if (event_mask & Process::eBroadcastBitStateChanged)
-            {
-                Event event;
-                StateType event_state;
-                while ((event_state = process->GetNextEvent (&event)))
-                if (StateIsStoppedState(event_state))
-                {
-                    GDBServerLog::LogIf (GS_LOG_EVENTS, "%s process %4.4x stopped with state %s", __FUNCTION__, pid, StateAsCString(event_state));
-
-                    switch (event_state)
-                    {
-                    default:
-                    case eStateInvalid:
-                    case eStateUnloaded:
-                    case eStateAttaching:
-                    case eStateLaunching:
-                    case eStateSuspended:
-                        break;  // Ignore
-
-                    case eStateRunning:
-                    case eStateStepping:
-                        // Still waiting to stop at entry point...
-                        break;
-
-                    case eStateStopped:
-                    case eStateCrashed:
-                        return eDCGSRunLoopModeInferiorExecuting;
-
-                    case eStateDetached:
-                    case eStateExited:
-                        pid = LLDB_INVALID_PROCESS_ID;
-                        return eDCGSRunLoopModeExit;
-                    }
-                }
-
-                if (event_state = eStateInvalid)
-                    break;
-            }
-        }
-    }
-
-    return eDCGSRunLoopModeExit;
-}
-
-
-//----------------------------------------------------------------------
-// This run loop mode will wait for the process to launch and hit its
-// entry point. It will currently ignore all events except for the
-// process state changed event, where it watches for the process stopped
-// or crash process state.
-//----------------------------------------------------------------------
-GSRunLoopMode
-GSRunLoopLaunchAttaching (HandleBroadcastEventInfo *info, lldb::pid_t& pid)
-{
-    Process* process = info->GetProcess();
-
-    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s Attaching to pid %i...", __FUNCTION__, pid);
-    pid = process->Attach(pid);
-
-    if (pid == LLDB_INVALID_PROCESS_ID)
-        return eDCGSRunLoopModeExit;
-    return eDCGSRunLoopModeInferiorExecuting;
-}
-
-//----------------------------------------------------------------------
-// Watch for signals:
-// SIGINT: so we can halt our inferior. (disabled for now)
-// SIGPIPE: in case our child process dies
-//----------------------------------------------------------------------
-lldb::pid_t g_pid;
-int g_sigpipe_received = 0;
-void
-signal_handler(int signo)
-{
-    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s (%s)", __FUNCTION__, Host::GetSignalAsCString(signo));
-
-    switch (signo)
-    {
-//  case SIGINT:
-//      DNBProcessKill (g_pid, signo);
-//      break;
-
-    case SIGPIPE:
-        g_sigpipe_received = 1;
-        break;
-    }
-}
-
-// Return the new run loop mode based off of the current process state
-void
-HandleProcessStateChange (HandleBroadcastEventInfo *info, bool initialize)
-{
-    Process *process = info->GetProcess();
-    if (process == NULL)
-    {
-        info->mode = eDCGSRunLoopModeExit;
-        return;
-    }
-
-    if (process->GetID() == LLDB_INVALID_PROCESS_ID)
-    {
-        GDBServerLog::LogIf (GS_LOG_MINIMAL, "#### %s error: pid invalid, exiting...", __FUNCTION__);
-        info->mode = eDCGSRunLoopModeExit;
-        return;
-    }
-    StateType pid_state = process->GetState ();
-
-    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s (info, initialize=%i)  pid_state = %s", __FUNCTION__, (int)initialize, StateAsCString(pid_state));
-
-    switch (pid_state)
-    {
-    case eStateInvalid:
-    case eStateUnloaded:
-        // Something bad happened
-        info->mode = eDCGSRunLoopModeExit;
-        return;
-
-    case eStateAttaching:
-    case eStateLaunching:
-        info->mode = eDCGSRunLoopModeInferiorExecuting;
-        return;
-
-    case eStateSuspended:
-    case eStateCrashed:
-    case eStateStopped:
-        if (initialize == false)
-        {
-            // Compare the last stop count to our current notion of a stop count
-            // to make sure we don't notify more than once for a given stop.
-            static uint32_t g_prev_stop_id = 0;
-            uint32_t stop_id = process->GetStopID();
-            bool pid_stop_count_changed = g_prev_stop_id != stop_id;
-            if (pid_stop_count_changed)
-            {
-                info->GetRemote()->FlushSTDIO();
-
-                if (stop_id == 1)
-                {
-                    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s (&remote, initialize=%i)  pid_state = %s pid_stop_count %u (old %u)) Notify??? no, first stop...", __FUNCTION__, (int)initialize, StateAsCString (pid_state), stop_id, g_prev_stop_id);
-                }
-                else
-                {
-
-                    GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s (&remote, initialize=%i)  pid_state = %s pid_stop_count %u (old %u)) Notify??? YES!!!", __FUNCTION__, (int)initialize, StateAsCString (pid_state), stop_id, g_prev_stop_id);
-                    info->GetRemote()->NotifyThatProcessStopped ();
-                }
-            }
-            else
-            {
-                GDBServerLog::LogIf (GS_LOG_MINIMAL, "%s (&remote, initialize=%i)  pid_state = %s pid_stop_count %u (old %u)) Notify??? skipping...", __FUNCTION__, (int)initialize, StateAsCString (pid_state), stop_id, g_prev_stop_id);
-            }
-        }
-        info->mode = eDCGSRunLoopModeInferiorExecuting;
-        return;
-
-    case eStateStepping:
-    case eStateRunning:
-        info->mode = eDCGSRunLoopModeInferiorExecuting;
-        return;
-
-    case eStateExited:
-        info->GetRemote()->HandlePacket_last_signal (NULL);
-        info->mode = eDCGSRunLoopModeExit;
-        return;
-
-    }
-
-    // Catch all...
-    info->mode = eDCGSRunLoopModeExit;
-}
-
-bool
-CommunicationHandleBroadcastEvent (Broadcaster *broadcaster, uint32_t event_mask, void *baton)
-{
-    HandleBroadcastEventInfo *info = (HandleBroadcastEventInfo *)baton;
-    Process *process = info->GetProcess();
-
-    if (process == NULL)
-    {
-        info->mode = eDCGSRunLoopModeExit;
-        return true;
-    }
-
-    if (event_mask & Communication::eBroadcastBitPacketAvailable)
-    {
-        if (process->IsRunning())
-        {
-            if (info->GetRemote()->HandleAsyncPacket() == gdb_not_connected)
-                info->mode = eDCGSRunLoopModeExit;
-        }
-        else
-        {
-            if (info->GetRemote()->HandleReceivedPacket() == gdb_not_connected)
-                info->mode = eDCGSRunLoopModeExit;
-        }
-    }
-    if (event_mask & Communication::eBroadcastBitReadThreadDidExit)
-    {
-        info->mode = eDCGSRunLoopModeExit;
-    }
-    if (event_mask & Communication::eBroadcastBitDisconnected)
-    {
-        info->mode = eDCGSRunLoopModeExit;
-    }
-
-    return true;
-
-}
-
-bool
-ProcessHandleBroadcastEvent (Broadcaster *broadcaster, uint32_t event_mask, void *baton)
-{
-    HandleBroadcastEventInfo *info = (HandleBroadcastEventInfo *)baton;
-    Process *process = info->GetProcess();
-    if (process == NULL)
-    {
-        info->mode = eDCGSRunLoopModeExit;
-        return true;
-    }
-
-    if (event_mask & Process::eBroadcastBitStateChanged)
-    {
-        // Consume all available process events with no timeout
-        Event event;
-        StateType process_state;
-        while ((process_state = process->GetNextEvent (&event)) != eStateInvalid)
-        {
-            if (StateIsStoppedState(process_state))
-                info->GetRemote()->FlushSTDIO();
-            HandleProcessStateChange (info, false);
-
-            if (info->mode != eDCGSRunLoopModeInferiorExecuting)
-                break;
-        }
-    }
-    else
-    if (event_mask & (Process::eBroadcastBitSTDOUT | Process::eBroadcastBitSTDERR))
-    {
-        info->GetRemote()->FlushSTDIO();
-    }
-    return true;
-}
-
-// This function handles the case where our inferior program is stopped and
-// we are waiting for gdb remote protocol packets. When a packet occurs that
-// makes the inferior run, we need to leave this function with a new state
-// as the return code.
-void
-GSRunLoopInferiorExecuting (HandleBroadcastEventInfo *info)
-{
-    GDBServerLog::LogIf (GS_LOG_MINIMAL, "#### %s", __FUNCTION__);
-
-    // Init our mode and set 'is_running' based on the current process state
-    HandleProcessStateChange (info, true);
-
-    uint32_t desired_mask, acquired_mask;
-    Listener listener("GSRunLoopInferiorExecuting");
-
-    desired_mask =  Communication::eBroadcastBitPacketAvailable |
-                    Communication::eBroadcastBitReadThreadDidExit  |
-                    Communication::eBroadcastBitDisconnected;
-
-    acquired_mask = listener.StartListeningForEvents (&(info->GetRemote()->GetPacketComm()),
-                                      desired_mask,
-                                      CommunicationHandleBroadcastEvent,
-                                      info);
-
-    assert (acquired_mask == desired_mask);
-    desired_mask = GDBRemotePacket::eBroadcastBitPacketAvailable;
-
-    acquired_mask = listener.StartListeningForEvents (&(info->GetRemote()->GetPacketComm()),
-                                            desired_mask,
-                                            CommunicationHandleBroadcastEvent,
-                                            info);
-
-    assert (acquired_mask == desired_mask);
-
-    desired_mask =  Process::eBroadcastBitStateChanged |
-                    Process::eBroadcastBitSTDOUT |
-                    Process::eBroadcastBitSTDERR ;
-    acquired_mask = listener.StartListeningForEvents (info->GetProcess (),
-                                      desired_mask,
-                                      ProcessHandleBroadcastEvent,
-                                      info);
-
-    assert (acquired_mask == desired_mask);
-
-    Process *process = info->GetProcess();
-
-    while (process->IsAlive())
-    {
-        if (!info->GetRemote()->IsConnected())
-        {
-            info->mode = eDCGSRunLoopModeInferiorKillOrDetach;
-            break;
-        }
-
-        // We want to make sure we consume all process state changes and have
-        // whomever is notifying us to wait for us to reset the event bit before
-        // continuing.
-        //ctx.Events().SetResetAckMask (GSContext::event_proc_state_changed);
-        uint32_t event_mask = 0;
-        Broadcaster *broadcaster = listener.WaitForEvent(NULL, &event_mask);
-        if (broadcaster)
-        {
-            listener.HandleBroadcastEvent(broadcaster, event_mask);
-        }
-    }
-}
-
-
-//----------------------------------------------------------------------
-// Convenience function to set up the remote listening port
-// Returns 1 for success 0 for failure.
-//----------------------------------------------------------------------
-
-static bool
-StartListening (HandleBroadcastEventInfo *info, int listen_port)
-{
-    if (!info->GetRemote()->IsConnected())
-    {
-        Log::STDOUT ("Listening to port %i...\n", listen_port);
-        char connect_url[256];
-        snprintf(connect_url, sizeof(connect_url), "listen://%i", listen_port);
-
-        Communication &comm = info->remote_sp->GetPacketComm();
-        comm.SetConnection (new ConnectionFileDescriptor);
-
-        if (comm.Connect (connect_url))
-        {
-            if (comm.StartReadThread())
-                return true;
-
-            Log::STDERR ("Failed to start the communication read thread.\n", connect_url);
-            comm.Disconnect();
-        }
-        else
-        {
-            Log::STDERR ("Failed to connection to %s.\n", connect_url);
-        }
-        return false;
-    }
-    return true;
-}
-
-//----------------------------------------------------------------------
-// ASL Logging callback that can be registered with DNBLogSetLogDCScriptInterpreter::Type
-//----------------------------------------------------------------------
-//void
-//ASLLogDCScriptInterpreter::Type(void *baton, uint32_t flags, const char *format, va_list args)
-//{
-//    if (format == NULL)
-//      return;
-//    static aslmsg g_aslmsg = NULL;
-//    if (g_aslmsg == NULL)
-//    {
-//        g_aslmsg = ::asl_new (ASL_TYPE_MSG);
-//        char asl_key_sender[PATH_MAX];
-//        snprintf(asl_key_sender, sizeof(asl_key_sender), "com.apple.dc-gdbserver-%g", dc_gdbserverVersionNumber);
-//        ::asl_set (g_aslmsg, ASL_KEY_SENDER, asl_key_sender);
-//    }
-//
-//    int asl_level;
-//    if (flags & DNBLOG_FLAG_FATAL)        asl_level = ASL_LEVEL_CRIT;
-//    else if (flags & DNBLOG_FLAG_ERROR)   asl_level = ASL_LEVEL_ERR;
-//    else if (flags & DNBLOG_FLAG_WARNING) asl_level = ASL_LEVEL_WARNING;
-//    else if (flags & DNBLOG_FLAG_VERBOSE) asl_level = ASL_LEVEL_WARNING; //ASL_LEVEL_INFO;
-//    else                                  asl_level = ASL_LEVEL_WARNING; //ASL_LEVEL_DEBUG;
-//
-//    ::asl_vlog (NULL, g_aslmsg, asl_level, format, args);
-//}
-
-//----------------------------------------------------------------------
-// FILE based Logging callback that can be registered with
-// DNBLogSetLogDCScriptInterpreter::Type
-//----------------------------------------------------------------------
-void
-FileLogDCScriptInterpreter::Type(void *baton, uint32_t flags, const char *format, va_list args)
-{
-    if (baton == NULL || format == NULL)
-      return;
-
-    ::vfprintf ((FILE *)baton, format, args);
-    ::fprintf ((FILE *)baton, "\n");
-}
-
-//----------------------------------------------------------------------
-// option descriptors for getopt_long()
-//----------------------------------------------------------------------
-static struct option g_long_options[] =
-{
-    { "arch",       required_argument,  NULL,               'c' },
-    { "attach",     required_argument,  NULL,               'a' },
-    { "debug",      no_argument,        NULL,               'g' },
-    { "verbose",    no_argument,        NULL,               'v' },
-    { "lockdown",   no_argument,        &g_lockdown_opt,    1   },  // short option "-k"
-    { "applist",    no_argument,        &g_applist_opt,     1   },  // short option "-t"
-    { "log-file",   required_argument,  NULL,               'l' },
-    { "log-flags",  required_argument,  NULL,               'f' },
-    { "launch",     required_argument,  NULL,               'x' },  // Valid values are "auto", "posix-spawn", "fork-exec", "springboard" (arm only)
-    { "waitfor",    required_argument,  NULL,               'w' },  // Wait for a process whose namet starts with ARG
-    { "waitfor-interval", required_argument,    NULL,       'i' },  // Time in usecs to wait between sampling the pid list when waiting for a process by name
-    { "waitfor-duration", required_argument,    NULL,       'd' },  // The time in seconds to wait for a process to show up by name
-    { NULL,         0,                  NULL,               0   }
-};
-
-extern const double dc_gdbserverVersionNumber;
-int
-main (int argc, char *argv[])
-{
-    Initialize();
-    Host::ThreadCreated ("[main]");
-
-    g_isatty = ::isatty (STDIN_FILENO);
-
-//  signal (SIGINT, signal_handler);
-    signal (SIGPIPE, signal_handler);
-
-    Log *log = GDBServerLog::GetLogIfAllCategoriesSet(GS_LOG_ALL);
-    const char *this_exe_name = argv[0];
-    int i;
-    int attach_pid = LLDB_INVALID_PROCESS_ID;
-    for (i=0; i<argc; i++)
-        GDBServerLog::LogIf(GS_LOG_DEBUG, "argv[%i] = %s", i, argv[i]);
-
-    FILE* log_file = NULL;
-    uint32_t log_flags = 0;
-    // Parse our options
-    int ch;
-    int long_option_index = 0;
-    int debug = 0;
-    std::string waitfor_pid_name;           // Wait for a process that starts with this name
-    std::string attach_pid_name;
-    useconds_t waitfor_interval = 1000;     // Time in usecs between process lists polls when waiting for a process by name, default 1 msec.
-    useconds_t waitfor_duration = 0;        // Time in seconds to wait for a process by name, 0 means wait forever.
-    ArchSpec arch;
-    GSRunLoopMode start_mode = eDCGSRunLoopModeExit;
-
-    while ((ch = getopt_long(argc, argv, "a:c:d:gi:vktl:f:w:x:", g_long_options, &long_option_index)) != -1)
-    {
-//      DNBLogDebug("option: ch == %c (0x%2.2x) --%s%c%s\n",
-//                    ch, (uint8_t)ch,
-//                    g_long_options[long_option_index].name,
-//                    g_long_options[long_option_index].has_arg ? '=' : ' ',
-//                    optarg ? optarg : "");
-        switch (ch)
-        {
-        case 0:   // Any optional that auto set themselves will return 0
-            break;
-
-        case 'c':
-            arch.SetArch(optarg);
-            if (!arch.IsValid())
-            {
-                Log::STDERR ("error: invalid arch string '%s'\n", optarg);
-                exit (8);
-            }
-            break;
-
-        case 'a':
-            if (optarg && optarg[0])
-            {
-                if (isdigit(optarg[0]))
-                {
-                    char *end = NULL;
-                    attach_pid = strtoul(optarg, &end, 0);
-                    if (end == NULL || *end != '\0')
-                    {
-                        Log::STDERR ("error: invalid pid option '%s'\n", optarg);
-                        exit (4);
-                    }
-                }
-                else
-                {
-                    attach_pid_name = optarg;
-                }
-                start_mode = eDCGSRunLoopModeInferiorAttaching;
-            }
-            break;
-
-        // --waitfor=NAME
-        case 'w':
-            if (optarg && optarg[0])
-            {
-                waitfor_pid_name = optarg;
-                start_mode = eDCGSRunLoopModeInferiorAttaching;
-            }
-            break;
-
-        // --waitfor-interval=USEC
-        case 'i':
-            if (optarg && optarg[0])
-            {
-                char *end = NULL;
-                waitfor_interval = strtoul(optarg, &end, 0);
-                if (end == NULL || *end != '\0')
-                {
-                    Log::STDERR ("error: invalid waitfor-interval option value '%s'.\n", optarg);
-                    exit (6);
-                }
-            }
-            break;
-
-        // --waitfor-duration=SEC
-        case 'd':
-            if (optarg && optarg[0])
-            {
-                char *end = NULL;
-                waitfor_duration = strtoul(optarg, &end, 0);
-                if (end == NULL || *end != '\0')
-                {
-                    Log::STDERR ("error: invalid waitfor-duration option value '%s'.\n", optarg);
-                    exit (7);
-                }
-            }
-            break;
-
-        case 'x':
-            if (optarg && optarg[0])
-            {
-                if (strcasecmp(optarg, "auto") == 0)
-                    g_launch_flavor = eLaunchFlavorDefault;
-                else if (strcasestr(optarg, "posix") == optarg)
-                    g_launch_flavor = eLaunchFlavorPosixSpawn;
-                else if (strcasestr(optarg, "fork") == optarg)
-                    g_launch_flavor = eLaunchFlavorForkExec;
-#if defined (__arm__)
-                else if (strcasestr(optarg, "spring") == optarg)
-                    g_launch_flavor = eLaunchFlavorSpringBoard;
-#endif
-                else
-                {
-                    Log::STDERR ("error: invalid TYPE for the --launch=TYPE (-x TYPE) option: '%s'\n", optarg);
-                    Log::STDERR ("Valid values TYPE are:\n");
-                    Log::STDERR ("  auto    Auto-detect the best launch method to use.\n");
-                    Log::STDERR ("  posix   Launch the executable using posix_spawn.\n");
-                    Log::STDERR ("  fork    Launch the executable using fork and exec.\n");
-#if defined (__arm__)
-                    Log::STDERR ("  spring  Launch the executable through Springboard.\n");
-#endif
-                    exit (5);
-                }
-            }
-            break;
-
-        case 'l': // Set Log File
-            if (optarg && optarg[0])
-            {
-                if (strcasecmp(optarg, "stdout") == 0)
-                    log_file = stdout;
-                else if (strcasecmp(optarg, "stderr") == 0)
-                    log_file = stderr;
-                else
-                    log_file = fopen(optarg, "w+");
-
-                if (log_file == NULL)
-                {
-                    const char *errno_str = strerror(errno);
-                    Log::STDERR ("Failed to open log file '%s' for writing: errno = %i (%s)", optarg, errno, errno_str ? errno_str : "unknown error");
-                }
-            }
-            break;
-
-        case 'f': // Log Flags
-            if (optarg && optarg[0])
-                log_flags = strtoul(optarg, NULL, 0);
-            break;
-
-        case 'g':
-            debug = 1;
-            //DNBLogSetDebug(1);
-            break;
-
-        case 't':
-            g_applist_opt = 1;
-            break;
-
-        case 'k':
-            g_lockdown_opt = 1;
-            break;
-
-        case 'v':
-            //DNBLogSetVerbose(1);
-            break;
-        }
-    }
-
-    // Skip any options we consumed with getopt_long
-    argc -= optind;
-    argv += optind;
-
-    // It is ok for us to set NULL as the logfile (this will disable any logging)
-
-//    if (log_file != NULL)
-//    {
-//        DNBLogSetLogDCScriptInterpreter::Type(FileLogDCScriptInterpreter::Type, log_file);
-//        // If our log file was set, yet we have no log flags, log everything!
-//        if (log_flags == 0)
-//            log_flags = LOG_ALL | LOG_DCGS_ALL;
-//
-//        DNBLogSetLogMask (log_flags);
-//    }
-//    else
-//    {
-//        // Enable DNB logging
-//        DNBLogSetLogDCScriptInterpreter::Type(ASLLogDCScriptInterpreter::Type, NULL);
-//        DNBLogSetLogMask (log_flags);
-//
-//    }
-
-    // as long as we're dropping remotenub in as a replacement for gdbserver,
-    // explicitly note that this is not gdbserver.
-
-    Log::STDOUT ("debugserver-%g \n", dc_gdbserverVersionNumber);
-    int listen_port = -1;
-    if (g_lockdown_opt == 0 && g_applist_opt == 0)
-    {
-        // Make sure we at least have port
-        if (argc < 1)
-        {
-            Log::STDERR ("Usage: %s host:port [program-name program-arg1 program-arg2 ...]\n", this_exe_name);
-            exit (1);
-        }
-        // accept 'localhost:' prefix on port number
-
-        std::string host_str;
-        std::string port_str(argv[0]);
-
-        // We just used the host:port arg...
-        argc--;
-        argv++;
-
-        size_t port_idx = port_str.find(':');
-        if (port_idx != std::string::npos)
-        {
-            host_str.assign(port_str, 0, port_idx);
-            port_str.erase(0, port_idx + 1);
-        }
-
-        if (port_str.empty())
-        {
-            Log::STDERR ("error: no port specified\nUsage: %s host:port [program-name program-arg1 program-arg2 ...]\n", this_exe_name);
-            exit (2);
-        }
-        else if (port_str.find_first_not_of("0123456789") != std::string::npos)
-        {
-            Log::STDERR ("error: port must be an integer: %s\nUsage: %s host:port [program-name program-arg1 program-arg2 ...]\n", port_str.c_str(), this_exe_name);
-            exit (3);
-        }
-        //DNBLogDebug("host_str = '%s'  port_str = '%s'", host_str.c_str(), port_str.c_str());
-        listen_port = atoi (port_str.c_str());
-    }
-
-
-    // We must set up some communications now.
-
-    FileSpec exe_spec;
-    if (argv[0])
-        exe_spec.SetFile (argv[0]);
-
-    HandleBroadcastEventInfo info;
-    info.target_sp = TargetList::SharedList().CreateTarget(&exe_spec, &arch);
-    ProcessSP process_sp (info.target_sp->CreateProcess ());
-    info.remote_sp.reset (new GDBRemoteSession (process_sp));
-
-    info.remote_sp->SetLog (log);
-    StreamString sstr;
-    sstr.Printf("ConnectionFileDescriptor(%s)", argv[0]);
-
-    if (info.remote_sp.get() == NULL)
-    {
-        Log::STDERR ("error: failed to create a GDBRemoteSession class\n");
-        return -1;
-    }
-
-
-
-    //  If we know we're waiting to attach, we don't need any of this other info.
-    if (start_mode != eDCGSRunLoopModeInferiorAttaching)
-    {
-        if (argc == 0 || g_lockdown_opt)
-        {
-            if (g_lockdown_opt != 0)
-            {
-                // Work around for SIGPIPE crashes due to posix_spawn issue. We have to close
-                // STDOUT and STDERR, else the first time we try and do any, we get SIGPIPE and
-                // die as posix_spawn is doing bad things with our file descriptors at the moment.
-                int null = open("/dev/null", O_RDWR);
-                dup2(null, STDOUT_FILENO);
-                dup2(null, STDERR_FILENO);
-            }
-            else if (g_applist_opt != 0)
-            {
-//                // List all applications we are able to see
-//                std::string applist_plist;
-//                int err = ListApplications(applist_plist, false, false);
-//                if (err == 0)
-//                {
-//                    fputs (applist_plist.c_str(), stdout);
-//                }
-//                else
-//                {
-//                    Log::STDERR ("error: ListApplications returned error %i\n", err);
-//                }
-//                // Exit with appropriate error if we were asked to list the applications
-//                // with no other args were given (and we weren't trying to do this over
-//                // lockdown)
-//                return err;
-                return 0;
-            }
-
-            //DNBLogDebug("Get args from remote protocol...");
-            start_mode = eDCGSRunLoopModeGetStartModeFromRemoteProtocol;
-        }
-        else
-        {
-            start_mode = eDCGSRunLoopModeInferiorLaunching;
-            // Fill in the argv array in the context from the rest of our args.
-            // Skip the name of this executable and the port number
-            info.remote_sp->SetArguments (argc, argv);
-        }
-    }
-
-    if (start_mode == eDCGSRunLoopModeExit)
-      return -1;
-
-    info.mode = start_mode;
-
-    while (info.mode != eDCGSRunLoopModeExit)
-    {
-        switch (info.mode)
-        {
-        case eDCGSRunLoopModeGetStartModeFromRemoteProtocol:
- #if defined (__arm__)
-            if (g_lockdown_opt)
-            {
-                if (!info.remote_sp->GetCommunication()->IsConnected())
-                {
-                    if (info.remote_sp->GetCommunication()->ConnectToService () != gdb_success)
-                    {
-                        Log::STDERR ("Failed to get connection from a remote gdb process.\n");
-                        info.mode = eDCGSRunLoopModeExit;
-                    }
-                    else if (g_applist_opt != 0)
-                    {
-                        // List all applications we are able to see
-                        std::string applist_plist;
-                        if (ListApplications(applist_plist, false, false) == 0)
-                        {
-                            //DNBLogDebug("Task list: %s", applist_plist.c_str());
-
-                            info.remote_sp->GetCommunication()->Write(applist_plist.c_str(), applist_plist.size());
-                            // Issue a read that will never yield any data until the other side
-                            // closes the socket so this process doesn't just exit and cause the
-                            // socket to close prematurely on the other end and cause data loss.
-                            std::string buf;
-                            info.remote_sp->GetCommunication()->Read(buf);
-                        }
-                        info.remote_sp->GetCommunication()->Disconnect(false);
-                        info.mode = eDCGSRunLoopModeExit;
-                        break;
-                    }
-                    else
-                    {
-                        // Start watching for remote packets
-                        info.remote_sp->StartReadRemoteDataThread();
-                    }
-                }
-            }
-            else
-#endif
-            {
-                if (StartListening (&info, listen_port))
-                    Log::STDOUT ("Got a connection, waiting for process information for launching or attaching.\n");
-                else
-                    info.mode = eDCGSRunLoopModeExit;
-            }
-
-            if (info.mode != eDCGSRunLoopModeExit)
-                GSRunLoopGetStartModeFromRemote (&info);
-            break;
-
-        case eDCGSRunLoopModeInferiorAttaching:
-            if (!waitfor_pid_name.empty())
-            {
-                // Set our end wait time if we are using a waitfor-duration
-                // option that may have been specified
-
-                TimeValue attach_timeout_abstime;
-                if (waitfor_duration != 0)
-                {
-                    attach_timeout_abstime = TimeValue::Now();
-                    attach_timeout_abstime.OffsetWithSeconds (waitfor_duration);
-                }
-                GSLaunchFlavor launch_flavor = g_launch_flavor;
-                if (launch_flavor == eLaunchFlavorDefault)
-                {
-                    // Our default launch method is posix spawn
-                    launch_flavor = eLaunchFlavorPosixSpawn;
-
-#if defined (__arm__)
-                    // Check if we have an app bundle, if so launch using SpringBoard.
-                    if (waitfor_pid_name.find (".app") != std::string::npos)
-                    {
-                        launch_flavor = eLaunchFlavorSpringBoard;
-                    }
-#endif
-                }
-
-                //ctx.SetLaunchFlavor(launch_flavor);
-
-
-                lldb::pid_t pid = info.GetProcess()->Attach (waitfor_pid_name.c_str());
-                if (pid == LLDB_INVALID_PROCESS_ID)
-                {
-                    info.GetRemote()->GetLaunchError() = info.GetProcess()->GetError();
-                    Log::STDERR ("error: failed to attach to process named: \"%s\" %s", waitfor_pid_name.c_str(), info.GetRemote()->GetLaunchError().AsCString());
-                    info.mode = eDCGSRunLoopModeExit;
-                }
-                else
-                {
-                    info.mode = eDCGSRunLoopModeInferiorExecuting;
-                }
-            }
-            else if (attach_pid != LLDB_INVALID_PROCESS_ID)
-            {
-                Log::STDOUT ("Attaching to process %i...\n", attach_pid);
-                info.mode = GSRunLoopLaunchAttaching (&info, attach_pid);
-                if (info.mode != eDCGSRunLoopModeInferiorExecuting)
-                {
-                    const char *error_str = info.GetRemote()->GetLaunchError().AsCString();
-                    Log::STDERR ("error: failed to attach process %i: %s\n", attach_pid, error_str ? error_str : "unknown error.");
-                    info.mode = eDCGSRunLoopModeExit;
-                }
-            }
-            else if (!attach_pid_name.empty ())
-            {
-                lldb::pid_t pid = info.GetProcess()->Attach (waitfor_pid_name.c_str());
-                if (pid == LLDB_INVALID_PROCESS_ID)
-                {
-                    info.GetRemote()->GetLaunchError() = info.GetProcess()->GetError();
-                    Log::STDERR ("error: failed to attach to process named: \"%s\" %s", waitfor_pid_name.c_str(), info.GetRemote()->GetLaunchError().AsCString());
-                    info.mode = eDCGSRunLoopModeExit;
-                }
-                else
-                {
-                    info.mode = eDCGSRunLoopModeInferiorExecuting;
-                }
-            }
-            else
-            {
-                Log::STDERR ("error: asked to attach with empty name and invalid PID.");
-                info.mode = eDCGSRunLoopModeExit;
-            }
-
-            if (info.mode != eDCGSRunLoopModeExit)
-            {
-                if (StartListening (&info, listen_port))
-                    Log::STDOUT ("Got a connection, waiting for debugger instructions for process %d.\n", attach_pid);
-                else
-                    info.mode = eDCGSRunLoopModeExit;
-            }
-            break;
-
-        case eDCGSRunLoopModeInferiorLaunching:
-            info.mode = GSRunLoopLaunchInferior (&info);
-
-            if (info.mode == eDCGSRunLoopModeInferiorExecuting)
-            {
-                if (StartListening (&info, listen_port))
-                    Log::STDOUT ("Got a connection, waiting for debugger instructions for task \"%s\".\n", argv[0]);
-                else
-                    info.mode = eDCGSRunLoopModeExit;
-            }
-            else
-            {
-                Log::STDERR ("error: failed to launch process %s: %s\n", argv[0], info.GetRemote()->GetLaunchError().AsCString());
-            }
-            break;
-
-        case eDCGSRunLoopModeInferiorExecuting:
-            GSRunLoopInferiorExecuting (&info);
-            break;
-
-        case eDCGSRunLoopModeInferiorKillOrDetach:
-            {
-                Process *process = info.GetProcess();
-                if (process && process->IsAlive())
-                {
-                    process->Kill(SIGCONT);
-                    process->Kill(SIGKILL);
-                }
-            }
-            info.mode = eDCGSRunLoopModeExit;
-            break;
-
-        default:
-          info.mode = eDCGSRunLoopModeExit;
-        case eDCGSRunLoopModeExit:
-            break;
-        }
-    }
-
-    return 0;
-}

Removed: lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.cpp?rev=108008&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.cpp (removed)
@@ -1,80 +0,0 @@
-//===-- GDBServerLog.cpp ----------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//----------------------------------------------------------------------
-//
-//  GDBServerLog.cpp
-//  liblldb
-//
-//  Created by Greg Clayton on 6/19/09.
-//
-//
-//----------------------------------------------------------------------
-
-#include "GDBServerLog.h"
-
-using namespace lldb;
-
-static Log *
-LogAccessor (bool get, Log *log)
-{
-    static Log* g_log = NULL; // Leak for now as auto_ptr was being cleaned up
-                                // by global constructors before other threads
-                                // were done with it.
-    if (get)
-    {
-//      // Debug code below for enabling logging by default
-//      if (g_log == NULL)
-//      {
-//          g_log = new Log("/dev/stdout", false);
-//          g_log->GetMask().SetAllFlagBits(GS_LOG_ALL);
-//          g_log->GetOptions().Set(LLDB_LOG_OPTION_THREADSAFE | LLDB_LOG_OPTION_PREPEND_THREAD_NAME);
-//      }
-    }
-    else
-    {
-        if (g_log)
-            delete g_log;
-        g_log = log;
-    }
-
-    return g_log;
-}
-
-Log *
-GDBServerLog::GetLogIfAllCategoriesSet (uint32_t mask)
-{
-    Log *log = LogAccessor (true, NULL);
-    if (log && mask)
-    {
-        uint32_t log_mask = log->GetMask().GetAllFlagBits();
-        if ((log_mask & mask) != mask)
-            return NULL;
-    }
-    return log;
-}
-
-void
-GDBServerLog::SetLog (Log *log)
-{
-    LogAccessor (false, log);
-}
-
-
-void
-GDBServerLog::LogIf (uint32_t mask, const char *format, ...)
-{
-    Log *log = GDBServerLog::GetLogIfAllCategoriesSet (mask);
-    if (log)
-    {
-        va_list args;
-        va_start (args, format);
-        log->VAPrintf (format, args);
-        va_end (args);
-    }
-}

Removed: lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.h?rev=108008&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBServerLog.h (removed)
@@ -1,55 +0,0 @@
-//===-- GDBServerLog.h ------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//----------------------------------------------------------------------
-//
-//  GDBServerLog.h
-//  liblldb
-//
-//  Created by Greg Clayton on 6/19/09.
-//
-//
-//----------------------------------------------------------------------
-
-#ifndef liblldb_GDBServerLog_h_
-#define liblldb_GDBServerLog_h_
-
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-
-#include "lldb/Core/Log.h"
-
-// Project includes
-#define GS_LOG_VERBOSE  (1u << 0)
-#define GS_LOG_DEBUG        (1u << 1)
-#define GS_LOG_PACKETS  (1u << 2)
-#define GS_LOG_EVENTS       (1u << 3)
-#define GS_LOG_MINIMAL  (1u << 4)
-#define GS_LOG_ALL      (UINT32_MAX)
-#define GS_LOG_DEFAULT  (GS_LOG_VERBOSE     |\
-                             GS_LOG_PACKETS)
-
-namespace lldb {
-
-class GDBServerLog
-{
-public:
-    static Log *
-    GetLog (uint32_t mask = 0);
-
-    static void
-    SetLog (Log *log);
-
-    static void
-    LogIf (uint32_t mask, const char *format, ...);
-};
-
-} // namespace lldb
-
-#endif  // liblldb_GDBServerLog_h_

Added: lldb/trunk/source/Plugins/Process/gdb-remote/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/Makefile (added)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/Process/gdb-remote/Makefile -------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginProcessGDBRemote
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Jul  9 15:39:50 2010
@@ -46,12 +46,11 @@
 
 // Project includes
 #include "lldb/Host/Host.h"
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 #include "GDBRemoteRegisterContext.h"
 #include "ProcessGDBRemote.h"
 #include "ProcessGDBRemoteLog.h"
 #include "ThreadGDBRemote.h"
-#include "libunwind.h"
 #include "MacOSXLibunwindCallbacks.h"
 
 #if defined (__i386__) || defined (__x86_64__)
@@ -116,28 +115,29 @@
 ProcessGDBRemote::ProcessGDBRemote(Target& target, Listener &listener) :
     Process (target, listener),
     m_dynamic_loader_ap (),
-    m_byte_order (eByteOrderHost),
     m_flags (0),
     m_stdio_communication ("gdb-remote.stdio"),
     m_stdio_mutex (Mutex::eMutexTypeRecursive),
     m_stdout_data (),
     m_arch_spec (),
+    m_byte_order (eByteOrderHost),
     m_gdb_comm(),
     m_debugserver_pid (LLDB_INVALID_PROCESS_ID),
     m_debugserver_monitor (0),
+    m_last_stop_packet (),
     m_register_info (),
-    m_curr_tid (LLDB_INVALID_THREAD_ID),
-    m_curr_tid_run (LLDB_INVALID_THREAD_ID),
     m_async_broadcaster ("lldb.process.gdb-remote.async-broadcaster"),
     m_async_thread (LLDB_INVALID_HOST_THREAD),
+    m_curr_tid (LLDB_INVALID_THREAD_ID),
+    m_curr_tid_run (LLDB_INVALID_THREAD_ID),
     m_z0_supported (1),
     m_continue_packet(),
     m_dispatch_queue_offsets_addr (LLDB_INVALID_ADDRESS),
+    m_packet_timeout (1),
+    m_max_memory_size (512),
     m_libunwind_target_type (UNW_TARGET_UNSPECIFIED),
     m_libunwind_addr_space (NULL),
-    m_waiting_for_attach (false),
-    m_packet_timeout (1),
-    m_max_memory_size (512)
+    m_waiting_for_attach (false)
 {
 }
 
@@ -616,7 +616,7 @@
 }
 
 Error
-ProcessGDBRemote::DoAttach (lldb::pid_t attach_pid)
+ProcessGDBRemote::DoAttachToProcessWithID (lldb::pid_t attach_pid)
 {
     Error error;
     // Clear out and clean up from any current state
@@ -716,7 +716,7 @@
 }
 
 Error
-ProcessGDBRemote::DoAttach (const char *process_name, bool wait_for_launch)
+ProcessGDBRemote::DoAttachToProcessWithName (const char *process_name, bool wait_for_launch)
 {
     Error error;
     // Clear out and clean up from any current state

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Fri Jul  9 15:39:50 2010
@@ -26,9 +26,9 @@
 #include "lldb/Target/Thread.h"
 
 #include "GDBRemoteCommunication.h"
-#include "StringExtractor.h"
+#include "Utility/StringExtractor.h"
 #include "GDBRemoteRegisterContext.h"
-#include "libunwind.h"
+#include "libunwind/include/libunwind.h"
 
 class ThreadGDBRemote;
 
@@ -94,10 +94,10 @@
     WillLaunchOrAttach ();
 
     virtual lldb_private::Error
-    DoAttach (lldb::pid_t pid);
+    DoAttachToProcessWithID (lldb::pid_t pid);
     
     virtual lldb_private::Error
-    DoAttach (const char *process_name, bool wait_for_launch);
+    DoAttachToProcessWithName (const char *process_name, bool wait_for_launch);
 
     virtual void
     DidAttach ();

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Fri Jul  9 15:39:50 2010
@@ -22,7 +22,7 @@
 #include "LibUnwindRegisterContext.h"
 #include "ProcessGDBRemote.h"
 #include "ProcessGDBRemoteLog.h"
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 #include "UnwindLibUnwind.h"
 #include "UnwindMacOSXFrameBackchain.h"
 
@@ -104,6 +104,9 @@
         else
             GetGDBProcess().m_continue_packet.Printf(";s:%4.4x", GetID());
         break;
+
+    default:
+        break;
     }
     Thread::WillResume(resume_state);
     return true;
@@ -272,8 +275,7 @@
     if (m_stop_info_stop_id != m_process.GetStopID())
     {
         char packet[256];
-        const int packet_len = snprintf(packet, sizeof(packet), "qThreadStopInfo%x", GetID());
-        assert (packet_len < (sizeof(packet) - 1));
+        ::snprintf(packet, sizeof(packet), "qThreadStopInfo%x", GetID());
         StringExtractorGDBRemote stop_packet;
         if (GetGDBProcess().GetGDBRemote().SendPacketAndWaitForResponse(packet, stop_packet, 1, false))
         {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h Fri Jul  9 15:39:50 2010
@@ -14,8 +14,7 @@
 
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
-#include "MachException.h"
-#include "libunwind.h"
+#include "libunwind/include/libunwind.h"
 
 class StringExtractor;
 class ProcessGDBRemote;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri Jul  9 15:39:50 2010
@@ -153,7 +153,6 @@
 
     // Set the offset to that of the first DIE
     uint32_t offset = GetFirstDIEOffset();
-    const dw_offset_t next_cu_offset = GetNextCompileUnitOffset();
     DWARFDebugInfoEntry die;
         // Keep a flat array of the DIE for binary lookup by DIE offset
     Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
@@ -206,7 +205,7 @@
                 break;  // We are done with this compile unit!
         }
 
-        assert(offset <= next_cu_offset);
+        assert(offset <= GetNextCompileUnitOffset());
     }
     SetDIERelations();
     return m_die_array.size();

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp Fri Jul  9 15:39:50 2010
@@ -69,7 +69,7 @@
         DWARFDebugAranges::Range range;
         range.offset = set.GetCompileUnitDIEOffset();
 
-        for (uint32_t i=0; arange_desc_ptr = set.GetDescriptor(i); ++i)
+        for (uint32_t i=0; (arange_desc_ptr = set.GetDescriptor(i)) != NULL; ++i)
         {
             range.lo_pc = arange_desc_ptr->address;
             range.hi_pc = arange_desc_ptr->address + arange_desc_ptr->length;

Added: lldb/trunk/source/Plugins/SymbolFile/DWARF/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/Makefile (added)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/DWARF/Makefile ------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolFileDWARF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/SymbolFile/Symtab/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/Makefile (added)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/Symtab/Makefile -----------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolFileSymtab
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Added: lldb/trunk/source/Plugins/SymbolVendor/MacOSX/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/MacOSX/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/MacOSX/Makefile (added)
+++ lldb/trunk/source/Plugins/SymbolVendor/MacOSX/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolVendor/MacOSX/Makefile ---------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolVendorMacOSX
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jul  9 15:39:50 2010
@@ -904,12 +904,6 @@
 {
     if (class_clang_type)
     {
-        ASTContext *ast_context = getASTContext();
-        IdentifierTable *identifier_table = getIdentifierTable();
-
-        assert (ast_context != NULL);
-        assert (identifier_table != NULL);
-
         Type *clang_type = QualType::getFromOpaquePtr(class_clang_type).getTypePtr();
         if (clang_type)
         {
@@ -1157,8 +1151,6 @@
                         ++child_idx;
                     }
                 }
-                const unsigned num_fields = record_layout.getFieldCount();
-
                 // Make sure index is in range...
                 uint32_t field_idx = 0;
                 RecordDecl::field_iterator field, field_end;
@@ -1173,7 +1165,7 @@
                         // Figure out the type byte size (field_type_info.first) and
                         // alignment (field_type_info.second) from the AST context.
                         std::pair<uint64_t, unsigned> field_type_info = ast_context->getTypeInfo(field->getType());
-                        assert(field_idx < num_fields);
+                        assert(field_idx < record_layout.getFieldCount());
 
                         child_byte_size = field_type_info.first / 8;
 

Added: lldb/trunk/source/Symbol/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Symbol/Makefile (added)
+++ lldb/trunk/source/Symbol/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Symbol/Makefile ------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbSymbol
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Fri Jul  9 15:39:50 2010
@@ -393,23 +393,27 @@
         {
             uint32_t offset = data_byte_offset;
             lldb::addr_t pointer_addresss = data.GetMaxU64(&offset, data_byte_size);
-            const size_t k_max_buf_size = length ? length : 256;
-            uint8_t buf[k_max_buf_size + 1];
-            lldb_private::DataExtractor data(buf, k_max_buf_size, exe_ctx->process->GetByteOrder(), 4);
-            buf[k_max_buf_size] = '\0';
+            std::vector<uint8_t> buf;
+            if (length > 0)
+                buf.resize (length);
+            else
+                buf.resize (256);
+
+            lldb_private::DataExtractor data(buf.data(), buf.size(), exe_ctx->process->GetByteOrder(), 4);
+            buf.back() = '\0';
             size_t bytes_read;
             size_t total_cstr_len = 0;
             Error error;
-            while ((bytes_read = exe_ctx->process->ReadMemory (pointer_addresss, buf, k_max_buf_size, error)) > 0)
+            while ((bytes_read = exe_ctx->process->ReadMemory (pointer_addresss, buf.data(), buf.size(), error)) > 0)
             {
-                const size_t len = strlen((const char *)buf);
+                const size_t len = strlen((const char *)buf.data());
                 if (len == 0)
                     break;
                 if (total_cstr_len == 0)
                     s->PutCString (" \"");
                 data.Dump(s, 0, lldb::eFormatChar, 1, len, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0);
                 total_cstr_len += len;
-                if (len < k_max_buf_size)
+                if (len < buf.size())
                     break;
                 pointer_addresss += total_cstr_len;
             }
@@ -507,8 +511,6 @@
                     ++child_idx;
                 }
             }
-            const unsigned num_fields = record_layout.getFieldCount();
-
             uint32_t field_idx = 0;
             clang::RecordDecl::field_iterator field, field_end;
             for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++field_idx, ++child_idx)
@@ -529,7 +531,7 @@
                 // Figure out the type byte size (field_type_info.first) and
                 // alignment (field_type_info.second) from the AST context.
                 std::pair<uint64_t, unsigned> field_type_info = ast_context->getTypeInfo(field_type);
-                assert(field_idx < num_fields);
+                assert(field_idx < record_layout.getFieldCount());
                 // Figure out the field offset within the current struct/union/class type
                 field_bit_offset = record_layout.getFieldOffset (field_idx);
                 field_byte_offset = field_bit_offset / 8;

Added: lldb/trunk/source/Target/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Target/Makefile (added)
+++ lldb/trunk/source/Target/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Target/Makefile ------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbTarget
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Target/ObjCObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCObjectPrinter.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Target/ObjCObjectPrinter.cpp (original)
+++ lldb/trunk/source/Target/ObjCObjectPrinter.cpp Fri Jul  9 15:39:50 2010
@@ -70,30 +70,26 @@
     
     // poor man's strcpy
     
-    size_t len = 0;
-    bool keep_reading = true;
     Error error;
-    while (keep_reading)
+    std::vector<char> desc;
+    while (1)
     {
-        char byte;
-        
-        if (exe_ctx.process->ReadMemory(result_ptr + len, &byte, 1, error) != 1)
-            return false;
+        char byte = '\0';
+        if (exe_ctx.process->ReadMemory(result_ptr + desc.size(), &byte, 1, error) != 1)
+            break;
         
+        desc.push_back(byte);
+
         if (byte == '\0')
-            keep_reading = false;
-        else
-            ++len;
+            break;
     }
     
-    char desc[len + 1];
-    
-    if (exe_ctx.process->ReadMemory(result_ptr, &desc[0], len + 1, error) != len + 1)
-        return false;
-    
-    str.SetCString(desc);
-    
-    return true;
+    if (!desc.empty())
+    {
+        str.SetCString(desc.data());
+        return true;
+    }
+    return false;
 }
 
 Address *

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Fri Jul  9 15:39:50 2010
@@ -45,15 +45,11 @@
     }
     else
     {
-        for (uint32_t idx = 0; create_callback = PluginManager::GetProcessCreateCallbackAtIndex(idx); ++idx)
+        for (uint32_t idx = 0; (create_callback = PluginManager::GetProcessCreateCallbackAtIndex(idx)) != NULL; ++idx)
         {
-            create_callback = PluginManager::GetProcessCreateCallbackAtIndex (idx);
-            if (create_callback)
-            {
-                std::auto_ptr<Process> debugger_ap(create_callback(target, listener));
-                if (debugger_ap->CanDebug(target))
-                    return debugger_ap.release();
-            }
+            std::auto_ptr<Process> debugger_ap(create_callback(target, listener));
+            if (debugger_ap->CanDebug(target))
+                return debugger_ap.release();
         }
     }
     return NULL;
@@ -702,7 +698,8 @@
         if (break_op_size > 0)
         {
             // Clear a software breakoint instruction
-            uint8_t curr_break_op[break_op_size];
+            uint8_t curr_break_op[8];
+            assert (sizeof(curr_break_op) < break_op_size);
             bool break_op_found = false;
 
             // Read the breakpoint opcode
@@ -731,7 +728,8 @@
 
                 if (verify)
                 {
-                    uint8_t verify_opcode[break_op_size];
+                    uint8_t verify_opcode[8];
+                    assert (sizeof(verify_opcode) < break_op_size);
                     // Verify that our original opcode made it back to the inferior
                     if (DoReadMemory (bp_addr, verify_opcode, break_op_size, error) == break_op_size)
                     {
@@ -840,9 +838,9 @@
 
     BreakpointSiteList::collection::const_iterator pos;
     size_t bytes_written = 0;
-    addr_t intersect_addr;
-    size_t intersect_size;
-    size_t opcode_offset;
+    addr_t intersect_addr = 0;
+    size_t intersect_size = 0;
+    size_t opcode_offset = 0;
     const uint8_t *ubuf = (const uint8_t *)buf;
 
     for (pos = iter; pos != end; ++pos)
@@ -1069,10 +1067,10 @@
     m_target_triple.Clear();
     m_abi_sp.reset();
 
-    Error error(WillAttach (attach_pid));
+    Error error (WillAttachToProcessWithID(attach_pid));
     if (error.Success())
     {
-        error = DoAttach (attach_pid);
+        error = DoAttachToProcessWithID (attach_pid);
         if (error.Success())
         {
             error = CompleteAttach();
@@ -1099,11 +1097,11 @@
     m_target_triple.Clear();
     m_abi_sp.reset();
 
-    Error error (WillAttach (process_name, wait_for_launch));
+    Error error (WillAttachToProcessWithName(process_name, wait_for_launch));
     if (error.Success())
     {
         StartPrivateStateThread();
-        error = DoAttach (process_name, wait_for_launch);
+        error = DoAttachToProcessWithName (process_name, wait_for_launch);
         if (error.Fail())
         {
             if (GetID() != LLDB_INVALID_PROCESS_ID)
@@ -1629,8 +1627,8 @@
     EventData (),
     m_process_sp (),
     m_state (eStateInvalid),
-    m_update_state (false),
-    m_restarted (false)
+    m_restarted (false),
+    m_update_state (false)
 {
 }
 
@@ -1638,8 +1636,8 @@
     EventData (),
     m_process_sp (process_sp),
     m_state (state),
-    m_update_state (false),
-    m_restarted (false)
+    m_restarted (false),
+    m_update_state (false)
 {
 }
 

Modified: lldb/trunk/source/Target/ThreadPlanStepRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepRange.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepRange.cpp Fri Jul  9 15:39:50 2010
@@ -34,12 +34,12 @@
 
 ThreadPlanStepRange::ThreadPlanStepRange (ThreadPlanKind kind, const char *name, Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others) :
     ThreadPlan (ThreadPlan::eKindGeneric, name, thread, eVoteNoOpinion, eVoteNoOpinion),
-    m_address_range (range),
     m_addr_context (addr_context),
+    m_address_range (range),
     m_stop_others (stop_others),
     m_stack_depth (0),
-    m_no_more_plans (false),
     m_stack_id (),
+    m_no_more_plans (false),
     m_first_run_event (true)
 {
     m_stack_depth = m_thread.GetStackFrameCount();

Modified: lldb/trunk/source/Target/ThreadPlanStepUntil.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepUntil.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepUntil.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepUntil.cpp Fri Jul  9 15:39:50 2010
@@ -39,13 +39,15 @@
     bool stop_others
 ) :
     ThreadPlan (ThreadPlan::eKindStepUntil, "Step until", thread, eVoteNoOpinion, eVoteNoOpinion),
+    m_stack_depth (0),
     m_step_from_insn (LLDB_INVALID_ADDRESS),
-    m_return_addr (LLDB_INVALID_ADDRESS),
     m_return_bp_id(LLDB_INVALID_BREAK_ID),
+    m_return_addr (LLDB_INVALID_ADDRESS),
     m_stepped_out(false),
     m_should_stop(false),
-    m_explains_stop(false),
     m_ran_analyze (false),
+    m_explains_stop(false),
+    m_until_points(),
     m_stop_others (stop_others)
 {
 

Added: lldb/trunk/source/Utility/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/source/Utility/Makefile (added)
+++ lldb/trunk/source/Utility/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,14 @@
+##===- source/Utility/Makefile -----------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbUtility
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/source/Utility/StringExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.cpp (original)
+++ lldb/trunk/source/Utility/StringExtractor.cpp Fri Jul  9 15:39:50 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StringExtractor.h"
+#include "Utility/StringExtractor.h"
 
 // C Includes
 // C++ Includes

Modified: lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp (original)
+++ lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp Fri Jul  9 15:39:50 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StringExtractorGDBRemote.h"
+#include "Utility/StringExtractorGDBRemote.h"
 
 // C Includes
 // C++ Includes

Modified: lldb/trunk/source/Utility/StringExtractorGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractorGDBRemote.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractorGDBRemote.h (original)
+++ lldb/trunk/source/Utility/StringExtractorGDBRemote.h Fri Jul  9 15:39:50 2010
@@ -15,7 +15,7 @@
 #include <string>
 // Other libraries and framework includes
 // Project includes
-#include "StringExtractor.h"
+#include "Utility/StringExtractor.h"
 
 class StringExtractorGDBRemote : public StringExtractor
 {

Modified: lldb/trunk/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Fri Jul  9 15:39:50 2010
@@ -68,7 +68,7 @@
         ObjectContainerUniversalMachO::Initialize();
         ObjectFileMachO::Initialize();
         ProcessGDBRemote::Initialize();
-        ProcessMacOSX::Initialize();
+//      ProcessMacOSX::Initialize();
 #endif
     }
 }
@@ -96,7 +96,7 @@
     ObjectContainerUniversalMachO::Terminate();
     ObjectFileMachO::Terminate();
     ProcessGDBRemote::Terminate();
-    ProcessMacOSX::Terminate();
+//  ProcessMacOSX::Terminate();
 #endif
 }
 

Added: lldb/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/tools/Makefile (added)
+++ lldb/trunk/tools/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,13 @@
+##===- source/Makefile -------------------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := driver
+
+include $(LLDB_LEVEL)/Makefile

Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Fri Jul  9 15:39:50 2010
@@ -512,7 +512,7 @@
 				PREBINDING = NO;
 				PRODUCT_NAME = debugserver;
 				STRIP_INSTALLED_PRODUCT = YES;
-				USER_HEADER_SEARCH_PATHS = "./source $(DERIVED_SOURCES_DIR)";
+				USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR)";
 				ZERO_LINK = NO;
 			};
 			name = BuildAndIntegration;
@@ -543,7 +543,7 @@
 				OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)";
 				PREBINDING = NO;
 				PRODUCT_NAME = debugserver;
-				USER_HEADER_SEARCH_PATHS = "./source $(DERIVED_SOURCES_DIR)";
+				USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR)";
 				ZERO_LINK = NO;
 			};
 			name = Debug;
@@ -573,7 +573,7 @@
 				OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)";
 				PREBINDING = NO;
 				PRODUCT_NAME = debugserver;
-				USER_HEADER_SEARCH_PATHS = "./source $(DERIVED_SOURCES_DIR)";
+				USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR)";
 				ZERO_LINK = NO;
 			};
 			name = Release;

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri Jul  9 15:39:50 2010
@@ -25,7 +25,7 @@
 #include "RNBContext.h"
 #include "RNBServices.h"
 #include "RNBSocket.h"
-#include "StringExtractor.h"
+#include "Utility/StringExtractor.h"
 
 #include <iomanip>
 #include <sstream>

Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Fri Jul  9 15:39:50 2010
@@ -110,18 +110,18 @@
     }
 }
 
-// This function takes INDENT, which tells how many spaces to output at the front of each line; SPACES, which is
-// a string that is output_max_columns long, containing spaces; and TEXT, which is the text that is to be output.
-// It outputs the text, on multiple lines if necessary, to RESULT, with INDENT spaces at the front of each line.  It
-// breaks lines on spaces, tabs or newlines, shortening the line if necessary to not break in the middle of a word.
-// It assumes that each output line should contain a maximum of OUTPUT_MAX_COLUMNS characters.
+// This function takes INDENT, which tells how many spaces to output at the front
+// of each line; TEXT, which is the text that is to be output. It outputs the 
+// text, on multiple lines if necessary, to RESULT, with INDENT spaces at the 
+// front of each line.  It breaks lines on spaces, tabs or newlines, shortening 
+// the line if necessary to not break in the middle of a word. It assumes that 
+// each output line should contain a maximum of OUTPUT_MAX_COLUMNS characters.
 
 void
-OutputFormattedUsageText (FILE *out, int indent, char *spaces, const char *text, int output_max_columns)
+OutputFormattedUsageText (FILE *out, int indent, const char *text, int output_max_columns)
 {
     int len = strlen (text);
     std::string text_string (text);
-    std::string spaces_string (spaces);
 
     // Force indentation to be reasonable.
     if (indent >= output_max_columns)
@@ -131,7 +131,7 @@
 
     if (len + indent < output_max_columns)
         // Output as a single line
-        fprintf (out, "%s%s\n", spaces_string.substr (0, indent).c_str(), text);
+        fprintf (out, "%*s%s\n", indent, "", text);
     else
     {
         // We need to break it up into multiple lines.
@@ -159,7 +159,7 @@
               }
               sub_len = end - start;
               std::string substring = text_string.substr (start, sub_len);
-              fprintf (out, "%s%s\n", spaces_string.substr(0, indent).c_str(), substring.c_str());
+              fprintf (out, "%*s%s\n", indent, "", substring.c_str());
               start = end + 1;
         }
     }
@@ -171,15 +171,7 @@
     uint32_t screen_width = 80;
     uint32_t indent_level = 0;
     const char *name = "lldb";
-    char spaces[screen_width+1];
-    uint32_t i;
     
-    for (i = 0; i < screen_width; ++i)
-      spaces[i] = ' ';
-    spaces[i] = '\n';
-
-    std::string spaces_string (spaces);
-
     fprintf (out, "\nUsage:\n\n");
 
     indent_level += 2;
@@ -202,7 +194,7 @@
         }
         else
         {
-            for (int j = 0; j < LLDB_MAX_NUM_OPTION_SETS; j++)
+            for (uint32_t j = 0; j < LLDB_MAX_NUM_OPTION_SETS; j++)
             {
                 if (this_usage_mask & 1 << j)
                 {
@@ -221,7 +213,7 @@
         
         if (opt_set > 0)
             fprintf (out, "\n");
-        fprintf (out, "%s%s", spaces_string.substr(0, indent_level).c_str(), name);
+        fprintf (out, "%*s%s", indent_level, "", name);
         
         for (uint32_t i = 0; i < num_options; ++i)
         {
@@ -271,16 +263,16 @@
         if (pos == options_seen.end())
         {
             options_seen.insert (option_table[i].short_option);
-            fprintf (out, "%s-%c ", spaces_string.substr(0, indent_level).c_str(), option_table[i].short_option);
+            fprintf (out, "%*s-%c ", indent_level, "", option_table[i].short_option);
             if (option_table[i].argument_name != NULL)
                 fprintf (out, "%s", option_table[i].argument_name);
             fprintf (out, "\n");
-            fprintf (out, "%s--%s ", spaces_string.substr(0, indent_level).c_str(), option_table[i].long_option);
+            fprintf (out, "%*s--%s ", indent_level, "", option_table[i].long_option);
             if (option_table[i].argument_name != NULL)
                 fprintf (out, "%s", option_table[i].argument_name);
             fprintf (out, "\n");
             indent_level += 5;
-            OutputFormattedUsageText (out, indent_level, spaces, option_table[i].usage_text, screen_width);
+            OutputFormattedUsageText (out, indent_level, option_table[i].usage_text, screen_width);
             indent_level -= 5;
             fprintf (out, "\n");
         }
@@ -288,12 +280,12 @@
 
     indent_level -= 5;
 
-    fprintf (out, "\n%s('%s <filename>' also works, to specify the file to be debugged.)\n\n",
-             spaces_string.substr(0, indent_level).c_str(), name);
+    fprintf (out, "\n%*s('%s <filename>' also works, to specify the file to be debugged.)\n\n",
+             indent_level, "", name);
 }
 
 void
-BuildGetOptTable (lldb::OptionDefinition *expanded_option_table, struct option **getopt_table, int num_options)
+BuildGetOptTable (lldb::OptionDefinition *expanded_option_table, struct option **getopt_table, uint32_t num_options)
 {
     if (num_options == 0)
         return;
@@ -303,19 +295,19 @@
     std::bitset<256> option_seen;
 
     for (i = 0, j = 0; i < num_options; ++i)
-      {
+    {
         char short_opt = expanded_option_table[i].short_option;
-
+        
         if (option_seen.test(short_opt) == false)
-          {
+        {
             (*getopt_table)[j].name    = expanded_option_table[i].long_option;
             (*getopt_table)[j].has_arg = expanded_option_table[i].option_has_arg;
             (*getopt_table)[j].flag    = NULL;
             (*getopt_table)[j].val     = expanded_option_table[i].short_option;
             option_seen.set(short_opt);
             ++j;
-          }
-      }
+        }
+    }
 
     (*getopt_table)[j].name    = NULL;
     (*getopt_table)[j].has_arg = 0;
@@ -327,11 +319,12 @@
 Driver::OptionData::OptionData () :
     m_filename(),
     m_script_lang (lldb::eScriptLanguageDefault),
+    m_crash_log (),
     m_source_command_files (),
     m_debug_mode (false),
+    m_print_version (false),
     m_print_help (false),
-    m_print_version (false)
-
+    m_seen_options()
 {
 }
 
@@ -414,9 +407,10 @@
     SBError error;
     std::string option_string;
     struct option *long_options = NULL;
-    int num_options;
+    uint32_t num_options;
 
-    for (num_options = 0; g_options[num_options].long_option != NULL; ++num_options);
+    for (num_options = 0; g_options[num_options].long_option != NULL; ++num_options)
+        /* Do Nothing. */;
 
     if (num_options == 0)
     {
@@ -468,7 +462,7 @@
     while (1)
     {
         int long_options_index = -1;
-        val = ::getopt_long (argc, (char * const *) argv, option_string.c_str(), long_options, &long_options_index);
+        val = ::getopt_long (argc, const_cast<char **>(argv), option_string.c_str(), long_options, &long_options_index);
 
         if (val == -1)
             break;
@@ -787,7 +781,7 @@
 
         const char *command_string = SBEvent::GetCStringFromEvent(event);
         if (command_string == NULL)
-            command_string == "";
+            command_string = "";
         SBCommandReturnObject result;
         if (m_debugger.GetCommandInterpreter().HandleCommand (command_string, result, true) != lldb::eReturnStatusQuit)
         {

Modified: lldb/trunk/tools/driver/IOChannel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.cpp?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.cpp (original)
+++ lldb/trunk/tools/driver/IOChannel.cpp Fri Jul  9 15:39:50 2010
@@ -68,7 +68,7 @@
 
     const LineInfo *line_info  = el_line(m_edit_line);
     SBStringList completions;
-    size_t page_size = 40;
+    int page_size = 40;
 
     int num_completions = m_driver->GetDebugger().GetCommandInterpreter().HandleCompletion (line_info->buffer,
                                                                                             line_info->cursor,
@@ -161,9 +161,12 @@
     m_read_thread_should_exit (false),
     m_out_file (out),
     m_err_file (err),
+    m_command_queue (),
+    m_completion_key ("\t"),
     m_edit_line (::el_init (SBHostOS::GetProgramFileSpec().GetFileName(), in, out, err)),
     m_history (history_init()),
-    m_completion_key ("\t")
+    m_history_event(),
+    m_getting_command (false)
 {
     assert (m_edit_line);
     ::el_set (m_edit_line, EL_PROMPT, el_prompt);
@@ -211,7 +214,7 @@
     {
         char history_path[PATH_MAX];
         ::snprintf (history_path, sizeof(history_path), "~/.%s-history", SBHostOS::GetProgramFileSpec().GetFileName());
-        if (SBFileSpec::ResolvePath (history_path, history_path, sizeof(history_path)) < sizeof(history_path) - 1)
+        if ((size_t)SBFileSpec::ResolvePath (history_path, history_path, sizeof(history_path)) < sizeof(history_path) - 1)
         {
             const char *path_ptr = history_path;
             if (save)

Modified: lldb/trunk/tools/driver/IOChannel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.h?rev=108009&r1=108008&r2=108009&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.h (original)
+++ lldb/trunk/tools/driver/IOChannel.h Fri Jul  9 15:39:50 2010
@@ -86,7 +86,8 @@
     const char *
     GetPrompt ();
 
-    static unsigned char ElCompletionFn (EditLine *e, int ch);
+    static unsigned char 
+    ElCompletionFn (EditLine *e, int ch);
 
     bool
     IsGettingCommand () const;
@@ -105,9 +106,12 @@
     History *m_history;
     HistEvent m_history_event;
     bool m_getting_command;
+
     void
     HistorySaveLoad (bool save);
-    unsigned char HandleCompletion (EditLine *e, int ch);
+
+    unsigned char
+    HandleCompletion (EditLine *e, int ch);
 };
 
 #endif  // lldb_IOChannel_h_

Added: lldb/trunk/tools/driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Makefile?rev=108009&view=auto
==============================================================================
--- lldb/trunk/tools/driver/Makefile (added)
+++ lldb/trunk/tools/driver/Makefile Fri Jul  9 15:39:50 2010
@@ -0,0 +1,25 @@
+##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LLDB_LEVEL := ../..
+
+TOOLNAME = lldb
+
+LD.Flags += -ledit -llldb -llldbUtility
+
+# # Include this here so we can get the configuration of the targets that have
+# # been configured for construction. We have to do this early so we can set up
+# # LINK_COMPONENTS before including Makefile.rules
+include $(LLDB_LEVEL)/../../Makefile.config
+
+ifeq ($(HOST_OS),Darwin)
+	LD.Flags += -Wl,-rpath, at loader_path/../lib/
+	LD.Flags += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,lldb-Info.plist
+endif
+
+include $(LLDB_LEVEL)/Makefile





More information about the lldb-commits mailing list