From sabre at nondot.org Tue Jun 8 22:55:24 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 09 Jun 2010 03:55:24 -0000 Subject: [Lldb-commits] [lldb] r105679 - /lldb/trunk/LICENSE.TXT Message-ID: <20100609035524.74C162A6C12E@llvm.org> Author: lattner Date: Tue Jun 8 22:55:24 2010 New Revision: 105679 URL: http://llvm.org/viewvc/llvm-project?rev=105679&view=rev Log: test commit Modified: lldb/trunk/LICENSE.TXT Modified: lldb/trunk/LICENSE.TXT URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/LICENSE.TXT?rev=105679&r1=105678&r2=105679&view=diff ============================================================================== --- lldb/trunk/LICENSE.TXT (original) +++ lldb/trunk/LICENSE.TXT Tue Jun 8 22:55:24 2010 @@ -35,3 +35,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + From eli.friedman at gmail.com Tue Jun 8 23:54:01 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 04:54:01 -0000 Subject: [Lldb-commits] [lldb] r105681 - /lldb/trunk/llvm.zip Message-ID: <20100609045401.826DB2A6C12E@llvm.org> Author: efriedma Date: Tue Jun 8 23:54:01 2010 New Revision: 105681 URL: http://llvm.org/viewvc/llvm-project?rev=105681&view=rev Log: Remove a 41MB file from the repository; if anyone really wants this, they can download it through viewvc. Removed: lldb/trunk/llvm.zip Removed: lldb/trunk/llvm.zip URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=105680&view=auto ============================================================================== Binary file - no diff available. From clattner at apple.com Wed Jun 9 00:31:46 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 8 Jun 2010 22:31:46 -0700 Subject: [Lldb-commits] [lldb] r105681 - /lldb/trunk/llvm.zip In-Reply-To: <20100609045401.826DB2A6C12E@llvm.org> References: <20100609045401.826DB2A6C12E@llvm.org> Message-ID: On Jun 8, 2010, at 9:54 PM, Eli Friedman wrote: > Author: efriedma > Date: Tue Jun 8 23:54:01 2010 > New Revision: 105681 > > URL: http://llvm.org/viewvc/llvm-project?rev=105681&view=rev > Log: > Remove a 41MB file from the repository; if anyone really wants this, they can > download it through viewvc. Hi Eli, This almost certainly breaks the Xcode build. I'm eager to get rid of this .zip file as well, but can we do it without breaking xcode somehow? -Chris From eli.friedman at gmail.com Wed Jun 9 00:47:39 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 05:47:39 -0000 Subject: [Lldb-commits] [lldb] r105685 - /lldb/trunk/llvm.zip Message-ID: <20100609054739.B13FF2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 00:47:39 2010 New Revision: 105685 URL: http://llvm.org/viewvc/llvm-project?rev=105685&view=rev Log: Revert previous commit; apparently, the zip file is actually necessary for the build. I'll continue the discussion on lldb-dev. Added: lldb/trunk/llvm.zip (with props) Added: lldb/trunk/llvm.zip URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=105685&view=auto ============================================================================== Binary file - no diff available. Propchange: lldb/trunk/llvm.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From eli.friedman at gmail.com Wed Jun 9 01:46:09 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 06:46:09 -0000 Subject: [Lldb-commits] [lldb] r105688 - in /lldb/trunk/include/lldb: ./ API/ Message-ID: <20100609064609.EE5BA2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 01:46:09 2010 New Revision: 105688 URL: http://llvm.org/viewvc/llvm-project?rev=105688&view=rev Log: Fix include lines to use more conventional paths, part 1. Modified: lldb/trunk/include/lldb/API/LLDB.h lldb/trunk/include/lldb/API/SBAddress.h lldb/trunk/include/lldb/API/SBBlock.h lldb/trunk/include/lldb/API/SBBreakpoint.h lldb/trunk/include/lldb/API/SBBreakpointLocation.h lldb/trunk/include/lldb/API/SBBroadcaster.h lldb/trunk/include/lldb/API/SBCommandContext.h lldb/trunk/include/lldb/API/SBCommandInterpreter.h lldb/trunk/include/lldb/API/SBCommandReturnObject.h lldb/trunk/include/lldb/API/SBCommunication.h lldb/trunk/include/lldb/API/SBCompileUnit.h lldb/trunk/include/lldb/API/SBDebugger.h lldb/trunk/include/lldb/API/SBDefines.h lldb/trunk/include/lldb/API/SBError.h lldb/trunk/include/lldb/API/SBEvent.h lldb/trunk/include/lldb/API/SBFileSpec.h lldb/trunk/include/lldb/API/SBFrame.h lldb/trunk/include/lldb/API/SBFunction.h lldb/trunk/include/lldb/API/SBHostOS.h lldb/trunk/include/lldb/API/SBInputReader.h lldb/trunk/include/lldb/API/SBInstruction.h lldb/trunk/include/lldb/API/SBInstructionList.h lldb/trunk/include/lldb/API/SBLineEntry.h lldb/trunk/include/lldb/API/SBListener.h lldb/trunk/include/lldb/API/SBModule.h lldb/trunk/include/lldb/API/SBProcess.h lldb/trunk/include/lldb/API/SBSourceManager.h lldb/trunk/include/lldb/API/SBStringList.h lldb/trunk/include/lldb/API/SBSymbol.h lldb/trunk/include/lldb/API/SBSymbolContext.h lldb/trunk/include/lldb/API/SBTarget.h lldb/trunk/include/lldb/API/SBThread.h lldb/trunk/include/lldb/API/SBType.h lldb/trunk/include/lldb/API/SBValue.h lldb/trunk/include/lldb/API/SBValueList.h lldb/trunk/include/lldb/lldb-defines.h lldb/trunk/include/lldb/lldb-forward-rtti.h lldb/trunk/include/lldb/lldb-include.h lldb/trunk/include/lldb/lldb-types.h Modified: lldb/trunk/include/lldb/API/LLDB.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/LLDB.h (original) +++ lldb/trunk/include/lldb/API/LLDB.h Wed Jun 9 01:46:09 2010 @@ -14,36 +14,36 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBAddress.h" +#include "lldb/API/SBBlock.h" +#include "lldb/API/SBBreakpoint.h" +#include "lldb/API/SBBreakpointLocation.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBCommandContext.h" +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBCommunication.h" +#include "lldb/API/SBCompileUnit.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBFunction.h" +#include "lldb/API/SBHostOS.h" +#include "lldb/API/SBInputReader.h" +#include "lldb/API/SBLineEntry.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBModule.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBSymbol.h" +#include "lldb/API/SBSymbolContext.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBType.h" +#include "lldb/API/SBValue.h" +#include "lldb/API/SBValueList.h" #endif // LLDB_LLDB_h_ Modified: lldb/trunk/include/lldb/API/SBAddress.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBAddress.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBAddress.h (original) +++ lldb/trunk/include/lldb/API/SBAddress.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBAddress_h_ #define LLDB_SBAddress_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBBlock.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBlock.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBBlock.h (original) +++ lldb/trunk/include/lldb/API/SBBlock.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBBlock_h_ #define LLDB_SBBlock_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBBreakpoint.h (original) +++ lldb/trunk/include/lldb/API/SBBreakpoint.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBBreakpoint_h_ #define LLDB_SBBreakpoint_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBBreakpointLocation.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointLocation.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBBreakpointLocation.h (original) +++ lldb/trunk/include/lldb/API/SBBreakpointLocation.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_SBBreakpointLocation_h_ #define LLDB_SBBreakpointLocation_h_ -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBBreakpoint.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBBroadcaster.h (original) +++ lldb/trunk/include/lldb/API/SBBroadcaster.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBBroadcaster_h_ #define LLDB_SBBroadcaster_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBCommandContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandContext.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBCommandContext.h (original) +++ lldb/trunk/include/lldb/API/SBCommandContext.h Wed Jun 9 01:46:09 2010 @@ -11,7 +11,7 @@ #define LLDB_SBCommandContext_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original) +++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBCommandInterpreter_h_ #define LLDB_SBCommandInterpreter_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original) +++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBCommandReturnObject_h_ #define LLDB_SBCommandReturnObject_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBCommunication.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommunication.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBCommunication.h (original) +++ lldb/trunk/include/lldb/API/SBCommunication.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_SBCommunication_h_ #define LLDB_SBCommunication_h_ -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBError.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBCompileUnit.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCompileUnit.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBCompileUnit.h (original) +++ lldb/trunk/include/lldb/API/SBCompileUnit.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_SBCompileUnit_h_ #define LLDB_SBCompileUnit_h_ -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBFileSpec.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBDebugger.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBDebugger.h (original) +++ lldb/trunk/include/lldb/API/SBDebugger.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBDebugger_h_ #define LLDB_SBDebugger_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBDefines.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBDefines.h (original) +++ lldb/trunk/include/lldb/API/SBDefines.h Wed Jun 9 01:46:09 2010 @@ -15,11 +15,11 @@ // Other libraries and framework includes // Project includes -#include -#include -#include -#include -#include +#include "lldb/lldb-defines.h" +#include "lldb/lldb-enumerations.h" +#include "lldb/lldb-forward.h" +#include "lldb/lldb-forward-rtti.h" +#include "lldb/lldb-types.h" // Forward Declarations Modified: lldb/trunk/include/lldb/API/SBError.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBError.h (original) +++ lldb/trunk/include/lldb/API/SBError.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBError_h_ #define LLDB_SBError_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBEvent.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBEvent.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBEvent.h (original) +++ lldb/trunk/include/lldb/API/SBEvent.h Wed Jun 9 01:46:09 2010 @@ -12,7 +12,7 @@ #include -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBFileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFileSpec.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBFileSpec.h (original) +++ lldb/trunk/include/lldb/API/SBFileSpec.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBFileSpec_h_ #define LLDB_SBFileSpec_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBFrame.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBFrame.h (original) +++ lldb/trunk/include/lldb/API/SBFrame.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_SBFrame_h_ #define LLDB_SBFrame_h_ -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBValueList.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBFunction.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFunction.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBFunction.h (original) +++ lldb/trunk/include/lldb/API/SBFunction.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBFunction_h_ #define LLDB_SBFunction_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBHostOS.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBHostOS.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBHostOS.h (original) +++ lldb/trunk/include/lldb/API/SBHostOS.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_SBHostOS_h_ #define LLDB_SBHostOS_h_ -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBFileSpec.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBInputReader.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInputReader.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBInputReader.h (original) +++ lldb/trunk/include/lldb/API/SBInputReader.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBInputReader_h_ #define LLDB_SBInputReader_h_ -#include +#include "lldb/API/SBDefines.h" #include Modified: lldb/trunk/include/lldb/API/SBInstruction.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstruction.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBInstruction.h (original) +++ lldb/trunk/include/lldb/API/SBInstruction.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBInstruction_h_ #define LLDB_SBInstruction_h_ -#include +#include "lldb/API/SBDefines.h" // There's a lot to be fixed here, but need to wait for underlying insn implementation // to be revised & settle down first. Modified: lldb/trunk/include/lldb/API/SBInstructionList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstructionList.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBInstructionList.h (original) +++ lldb/trunk/include/lldb/API/SBInstructionList.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBInstructionList_h_ #define LLDB_SBInstructionList_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBLineEntry.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBLineEntry.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBLineEntry.h (original) +++ lldb/trunk/include/lldb/API/SBLineEntry.h Wed Jun 9 01:46:09 2010 @@ -10,9 +10,9 @@ #ifndef LLDB_SBLineEntry_h_ #define LLDB_SBLineEntry_h_ -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBAddress.h" +#include "lldb/API/SBFileSpec.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBListener.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBListener.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBListener.h (original) +++ lldb/trunk/include/lldb/API/SBListener.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBListener_h_ #define LLDB_SBListener_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBModule.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModule.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBModule.h (original) +++ lldb/trunk/include/lldb/API/SBModule.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBModule_h_ #define LLDB_SBModule_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBProcess.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBProcess.h (original) +++ lldb/trunk/include/lldb/API/SBProcess.h Wed Jun 9 01:46:09 2010 @@ -10,9 +10,9 @@ #ifndef LLDB_SBProcess_h_ #define LLDB_SBProcess_h_ -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBTarget.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBSourceManager.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSourceManager.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBSourceManager.h (original) +++ lldb/trunk/include/lldb/API/SBSourceManager.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBSourceManager_h_ #define LLDB_SBSourceManager_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBStringList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStringList.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBStringList.h (original) +++ lldb/trunk/include/lldb/API/SBStringList.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,7 @@ #ifndef LLDB_SBStringList_h_ #define LLDB_SBStringList_h_ - -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBSymbol.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBSymbol.h (original) +++ lldb/trunk/include/lldb/API/SBSymbol.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBSymbol_h_ #define LLDB_SBSymbol_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBSymbolContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContext.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBSymbolContext.h (original) +++ lldb/trunk/include/lldb/API/SBSymbolContext.h Wed Jun 9 01:46:09 2010 @@ -10,13 +10,13 @@ #ifndef LLDB_SBSymbolContext_h_ #define LLDB_SBSymbolContext_h_ -#include -#include -#include -#include -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBBlock.h" +#include "lldb/API/SBCompileUnit.h" +#include "lldb/API/SBFunction.h" +#include "lldb/API/SBLineEntry.h" +#include "lldb/API/SBModule.h" +#include "lldb/API/SBSymbol.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBTarget.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBTarget.h (original) +++ lldb/trunk/include/lldb/API/SBTarget.h Wed Jun 9 01:46:09 2010 @@ -10,9 +10,9 @@ #ifndef LLDB_SBTarget_h_ #define LLDB_SBTarget_h_ -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBFileSpec.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBThread.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBThread.h (original) +++ lldb/trunk/include/lldb/API/SBThread.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBThread_h_ #define LLDB_SBThread_h_ -#include +#include "lldb/API/SBDefines.h> namespace lldb { Modified: lldb/trunk/include/lldb/API/SBType.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBType.h (original) +++ lldb/trunk/include/lldb/API/SBType.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBType_h_ #define LLDB_SBType_h_ -#include +#include "lldb/API/SBDefines.h" namespace lldb { Modified: lldb/trunk/include/lldb/API/SBValue.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBValue.h (original) +++ lldb/trunk/include/lldb/API/SBValue.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBValue_h_ #define LLDB_SBValue_h_ -#include +#include "lldb/API/SBDefines.h" class lldb_private::Variable; class lldb_private::ValueObject; Modified: lldb/trunk/include/lldb/API/SBValueList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBValueList.h (original) +++ lldb/trunk/include/lldb/API/SBValueList.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBValueList_h_ #define LLDB_SBValueList_h_ -#include +#include "lldb/API/SBDefines.h" class lldb_private::ValueObjectList; Modified: lldb/trunk/include/lldb/lldb-defines.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-defines.h (original) +++ lldb/trunk/include/lldb/lldb-defines.h Wed Jun 9 01:46:09 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_defines_h_ #define LLDB_defines_h_ -#include +#include "lldb/lldb-types.h" #if !defined(UINT32_MAX) #define UINT32_MAX 4294967295U Modified: lldb/trunk/include/lldb/lldb-forward-rtti.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-forward-rtti.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-forward-rtti.h (original) +++ lldb/trunk/include/lldb/lldb-forward-rtti.h Wed Jun 9 01:46:09 2010 @@ -19,8 +19,8 @@ // lldb-include.h file. //---------------------------------------------------------------------- -#include -#include +#include "lldb/lldb-types.h" +#include "lldb/lldb-forward.h" //---------------------------------------------------------------------- // lldb forward declarations Modified: lldb/trunk/include/lldb/lldb-include.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-include.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-include.h (original) +++ lldb/trunk/include/lldb/lldb-include.h Wed Jun 9 01:46:09 2010 @@ -10,10 +10,10 @@ #ifndef LLDB_include_h_ #define LLDB_include_h_ -#include -#include -#include -#include -#include +#include "lldb/lldb-defines.h" +#include "lldb/lldb-enumerations.h" +#include "lldb/lldb-forward.h" +#include "lldb/lldb-forward-rtti.h" +#include "lldb/lldb-types.h" #endif // LLDB_include_h_ Modified: lldb/trunk/include/lldb/lldb-types.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=105688&r1=105687&r2=105688&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-types.h (original) +++ lldb/trunk/include/lldb/lldb-types.h Wed Jun 9 01:46:09 2010 @@ -10,8 +10,8 @@ #ifndef LLDB_types_h_ #define LLDB_types_h_ -#include -#include +#include "lldb/lldb-enumerations.h" +#include "lldb/lldb-forward.h" //---------------------------------------------------------------------- //---------------------------------------------------------------------- From eli.friedman at gmail.com Wed Jun 9 01:50:29 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 06:50:29 -0000 Subject: [Lldb-commits] [lldb] r105689 - /lldb/trunk/tools/driver/Driver.h Message-ID: <20100609065029.817C52A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 01:50:29 2010 New Revision: 105689 URL: http://llvm.org/viewvc/llvm-project?rev=105689&view=rev Log: And part two of two of fixing includes; somehow I thought the problem was more widespread than it was. Modified: lldb/trunk/tools/driver/Driver.h Modified: lldb/trunk/tools/driver/Driver.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.h?rev=105689&r1=105688&r2=105689&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.h (original) +++ lldb/trunk/tools/driver/Driver.h Wed Jun 9 01:50:29 2010 @@ -17,10 +17,10 @@ #include #include -#include -#include -#include -#include +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBInputReader.h" class IOChannel; From eli.friedman at gmail.com Wed Jun 9 01:55:49 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 06:55:49 -0000 Subject: [Lldb-commits] [lldb] r105691 - /lldb/trunk/include/lldb/lldb-enumerations.h Message-ID: <20100609065549.1FC4B2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 01:55:48 2010 New Revision: 105691 URL: http://llvm.org/viewvc/llvm-project?rev=105691&view=rev Log: Minor warning fixes. Modified: lldb/trunk/include/lldb/lldb-enumerations.h Modified: lldb/trunk/include/lldb/lldb-enumerations.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105691&r1=105690&r2=105691&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-enumerations.h (original) +++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Jun 9 01:55:48 2010 @@ -130,7 +130,7 @@ eFormatVectorOfUInt64, eFormatVectorOfFloat32, eFormatVectorOfFloat64, - eFormatVectorOfUInt128, + eFormatVectorOfUInt128 } Format; @@ -189,7 +189,7 @@ { eVoteNo = -1, eVoteNoOpinion = 0, - eVoteYes = 1, + eVoteYes = 1 } Vote; //---------------------------------------------------------------------- @@ -289,7 +289,7 @@ eInputReaderGranularityByte, eInputReaderGranularityWord, eInputReaderGranularityLine, - eInputReaderGranularityAll, + eInputReaderGranularityAll } InputReaderGranularity; //------------------------------------------------------------------ @@ -319,7 +319,7 @@ ePermissionsWritable = (1 << 0), ePermissionsReadable = (1 << 1), ePermissionsExecutable = (1 << 2) -}; +} Permissions; typedef enum SectionType { @@ -349,7 +349,7 @@ eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off eInputReaderDeactivate, // another reader was pushed on the stack eInputReaderGotToken, // reader got one of its tokens (granularity) - eInputReaderDone, // reader was just popped off the stack and is done + eInputReaderDone // reader was just popped off the stack and is done } InputReaderAction; } // namespace lldb From friesen at apple.com Wed Jun 9 01:55:11 2010 From: friesen at apple.com (Christopher Friesen) Date: Wed, 09 Jun 2010 06:55:11 -0000 Subject: [Lldb-commits] [lldb] r105690 - /lldb/trunk/include/lldb/API/SBThread.h Message-ID: <20100609065511.784752A6C12E@llvm.org> Author: cfriesen Date: Wed Jun 9 01:55:11 2010 New Revision: 105690 URL: http://llvm.org/viewvc/llvm-project?rev=105690&view=rev Log: missed a greater than to quote conversion Modified: lldb/trunk/include/lldb/API/SBThread.h Modified: lldb/trunk/include/lldb/API/SBThread.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=105690&r1=105689&r2=105690&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBThread.h (original) +++ lldb/trunk/include/lldb/API/SBThread.h Wed Jun 9 01:55:11 2010 @@ -10,7 +10,7 @@ #ifndef LLDB_SBThread_h_ #define LLDB_SBThread_h_ -#include "lldb/API/SBDefines.h> +#include "lldb/API/SBDefines.h" namespace lldb { From friesen at apple.com Wed Jun 9 02:06:05 2010 From: friesen at apple.com (Christopher Friesen) Date: Wed, 09 Jun 2010 07:06:05 -0000 Subject: [Lldb-commits] [lldb] r105692 - /lldb/trunk/lldb.xcodeproj/project.pbxproj Message-ID: <20100609070605.7619A2A6C12E@llvm.org> Author: cfriesen Date: Wed Jun 9 02:06:05 2010 New Revision: 105692 URL: http://llvm.org/viewvc/llvm-project?rev=105692&view=rev Log: fixing headers search paths so lldb-tool will build with these new changes Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105692&r1=105691&r2=105692&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 9 02:06:05 2010 @@ -2925,6 +2925,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = 4.2; + HEADER_SEARCH_PATHS = "${PROJECT_DIR}/include/**"; INFOPLIST_FILE = "lldb-Info.plist"; INSTALL_PATH = /Developer/usr/bin; LIBRARY_SEARCH_PATHS = "$(inherited)"; From echristo at apple.com Wed Jun 9 02:08:04 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 9 Jun 2010 00:08:04 -0700 Subject: [Lldb-commits] [lldb] r105692 - /lldb/trunk/lldb.xcodeproj/project.pbxproj In-Reply-To: <20100609070605.7619A2A6C12E@llvm.org> References: <20100609070605.7619A2A6C12E@llvm.org> Message-ID: <96308FCA-63DD-46DF-9B5E-8CBAF9C0D68B@apple.com> On Jun 9, 2010, at 12:06 AM, Christopher Friesen wrote: > Author: cfriesen > Date: Wed Jun 9 02:06:05 2010 > New Revision: 105692 > > URL: http://llvm.org/viewvc/llvm-project?rev=105692&view=rev > Log: > fixing headers search paths so lldb-tool will build with these new changes Yay! Thanks Chris! -eric From jmolenda at apple.com Wed Jun 9 02:10:17 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 07:10:17 -0000 Subject: [Lldb-commits] [lldb] r105693 - /lldb/trunk/docs/code_signing.txt Message-ID: <20100609071017.E4C282A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 02:10:17 2010 New Revision: 105693 URL: http://llvm.org/viewvc/llvm-project?rev=105693&view=rev Log: Remove underscore named version of this file. Removed: lldb/trunk/docs/code_signing.txt Removed: lldb/trunk/docs/code_signing.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/code_signing.txt?rev=105692&view=auto ============================================================================== --- lldb/trunk/docs/code_signing.txt (original) +++ lldb/trunk/docs/code_signing.txt (removed) @@ -1,47 +0,0 @@ -On MacOSX lldb needs to be code signed. The Debug and Release builds -are set to code sign using a code signing certificate named -lldb_codesign. - -If you don't have one yet you will need to: -- Launch /Applications/Utilities/Keychain Access.app - -- In Keychain Access select the "login" keychain in the "Keychains" - list in the upper left hand corner of the window. - -- Select the following menu item: - - Keychain Access->Certificate Assistant->Create a Certificate... - -- Set the following settings - - Name = lldb_codesign - Identity Type = Self Signed Root - Certificate Type = Code Signing - -- Click Continue -- Click Continue -- Click Done -- Click on the "My Certificates" -- Double click on your new lldb_codesign certificate -- Turn down the "Trust" disclosure triangle - - Change: - When using this certificate: Always Trust - -- Enter your login password to confirm and make it trusted - -The next steps are necessary on SnowLeopard, but are probably because of a bug -how Keychain Access makes certificates (the steps above used to be enougnk -in Leopard.) - -- Option-drag the new lldb_codesign certificate from the login keychain to - the System keychain in the Keychains pane of the main Keychain Access window - to make a copy of this certificate in the System keychain. You'll have to - authorize a few more times, set it to be "Always trusted" when asked. -- Switch to the System keychain, and drag the copy of lldb_codesign you just - made there onto the desktop. -- Switch to Terminal, and run the following: - -sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/lldb_codesign.cer - -That should do it. From friesen at apple.com Wed Jun 9 02:13:13 2010 From: friesen at apple.com (Christopher Friesen) Date: Wed, 09 Jun 2010 07:13:13 -0000 Subject: [Lldb-commits] [lldb] r105694 - /lldb/trunk/lldb.xcodeproj/project.pbxproj Message-ID: <20100609071313.653B82A6C12C@llvm.org> Author: cfriesen Date: Wed Jun 9 02:13:13 2010 New Revision: 105694 URL: http://llvm.org/viewvc/llvm-project?rev=105694&view=rev Log: Narrow down the header search path to the public API Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105694&r1=105693&r2=105694&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 9 02:13:13 2010 @@ -2925,7 +2925,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = 4.2; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/include/**"; + HEADER_SEARCH_PATHS = "${PROJECT_DIR}/include/lldb/API/**"; INFOPLIST_FILE = "lldb-Info.plist"; INSTALL_PATH = /Developer/usr/bin; LIBRARY_SEARCH_PATHS = "$(inherited)"; From eli.friedman at gmail.com Wed Jun 9 02:14:21 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 07:14:21 -0000 Subject: [Lldb-commits] [lldb] r105695 - in /lldb/trunk/include/lldb: Core/FileSpec.h Core/STLUtils.h Core/Stream.h Symbol/Block.h Message-ID: <20100609071421.A1B902A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 02:14:21 2010 New Revision: 105695 URL: http://llvm.org/viewvc/llvm-project?rev=105695&view=rev Log: More random error/warning fixes. Modified: lldb/trunk/include/lldb/Core/FileSpec.h lldb/trunk/include/lldb/Core/STLUtils.h lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/include/lldb/Symbol/Block.h Modified: lldb/trunk/include/lldb/Core/FileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FileSpec.h?rev=105695&r1=105694&r2=105695&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/FileSpec.h (original) +++ lldb/trunk/include/lldb/Core/FileSpec.h Wed Jun 9 02:14:21 2010 @@ -37,8 +37,8 @@ eFileTypePipe, eFileTypeRegular, eFileTypeSocket, - eFileTypeSymbolicLink, - }; + eFileTypeSymbolicLink + } FileType; FileSpec(); @@ -351,7 +351,7 @@ /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return @@ -360,7 +360,7 @@ /// pointer must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - MemoryMapFileContents (off_t offset = 0, size_t length = SIZE_T_MAX) const; + MemoryMapFileContents (off_t offset = 0, size_t length = SIZE_MAX) const; //------------------------------------------------------------------ /// Read part of, or the entire contents of, a file into a heap based data buffer. @@ -381,7 +381,7 @@ /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return @@ -390,7 +390,7 @@ /// pointer must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - ReadFileContents (off_t offset = 0, size_t length = SIZE_T_MAX) const; + ReadFileContents (off_t offset = 0, size_t length = SIZE_MAX) const; //------------------------------------------------------------------ /// Change the file specificed with a new path. Modified: lldb/trunk/include/lldb/Core/STLUtils.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/STLUtils.h?rev=105695&r1=105694&r2=105695&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/STLUtils.h (original) +++ lldb/trunk/include/lldb/Core/STLUtils.h Wed Jun 9 02:14:21 2010 @@ -11,7 +11,7 @@ #define liblldb_STLUtils_h_ #if defined(__cplusplus) -#include +#include "llvm/ADT/StringExtras.h" #include #include @@ -66,7 +66,7 @@ { size_t operator()( const std::string& x ) const { - return __gnu_cxx::hash()( x.c_str() ); + return llvm::HashString(x); } }; Modified: lldb/trunk/include/lldb/Core/Stream.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=105695&r1=105694&r2=105695&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Stream.h (original) +++ lldb/trunk/include/lldb/Core/Stream.h Wed Jun 9 02:14:21 2010 @@ -13,6 +13,7 @@ #include "lldb/lldb-private.h" #include "lldb/Core/Flags.h" +#include namespace lldb_private { @@ -31,7 +32,7 @@ eVerbose = (1 << 0), ///< If set, verbose logging is enabled eDebug = (1 << 1), ///< If set, debug logging is enabled eAddPrefix = (1 << 2), ///< Add number prefixes for binary, octal and hex when eBinary is clear - eBinary = (1 << 3), ///< Get and put data as binary instead of as the default string mode. + eBinary = (1 << 3) ///< Get and put data as binary instead of as the default string mode. }; //------------------------------------------------------------------ Modified: lldb/trunk/include/lldb/Symbol/Block.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=105695&r1=105694&r2=105695&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/Block.h (original) +++ lldb/trunk/include/lldb/Symbol/Block.h Wed Jun 9 02:14:21 2010 @@ -49,7 +49,7 @@ /// Enumeration values for special and invalid Block User ID /// values. //------------------------------------------------------------------ - typedef enum + enum { RootID = LLDB_INVALID_UID - 1, ///< The Block UID for the root block InvalidID = LLDB_INVALID_UID ///< Invalid Block UID. From jmolenda at apple.com Wed Jun 9 02:19:15 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 07:19:15 -0000 Subject: [Lldb-commits] [lldb] r105696 - /lldb/trunk/docs/code-signing.txt Message-ID: <20100609071915.48B012A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 02:19:15 2010 New Revision: 105696 URL: http://llvm.org/viewvc/llvm-project?rev=105696&view=rev Log: typeo fix. Modified: lldb/trunk/docs/code-signing.txt Modified: lldb/trunk/docs/code-signing.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/code-signing.txt?rev=105696&r1=105695&r2=105696&view=diff ============================================================================== --- lldb/trunk/docs/code-signing.txt (original) +++ lldb/trunk/docs/code-signing.txt Wed Jun 9 02:19:15 2010 @@ -31,7 +31,7 @@ - Enter your login password to confirm and make it trusted The next steps are necessary on SnowLeopard, but are probably because of a bug -how Keychain Access makes certificates (the steps above used to be enougnk +how Keychain Access makes certificates (the steps above used to be enougn in Leopard.) - Option-drag the new lldb_codesign certificate from the login keychain to From echristo at apple.com Wed Jun 9 02:20:27 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 09 Jun 2010 07:20:27 -0000 Subject: [Lldb-commits] [lldb] r105697 - /lldb/trunk/INSTALL.txt Message-ID: <20100609072027.D158A2A6C12E@llvm.org> Author: echristo Date: Wed Jun 9 02:20:27 2010 New Revision: 105697 URL: http://llvm.org/viewvc/llvm-project?rev=105697&view=rev Log: Add a quick readme on building lldb. This points to the code signing documentation for now and mentions that it only supports xcode at the moment. Added: lldb/trunk/INSTALL.txt Added: lldb/trunk/INSTALL.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/INSTALL.txt?rev=105697&view=auto ============================================================================== --- lldb/trunk/INSTALL.txt (added) +++ lldb/trunk/INSTALL.txt Wed Jun 9 02:20:27 2010 @@ -0,0 +1,9 @@ +LLDB Installation Instructions +============================== + +Note that LLDB currently only builds out of the box on Darwin with Xcode, but +patches to improve portability are definitely welcome. + +In addition to using Xcode you'll need to enable code signing on your system +to either build lldb or debug using lldb. Please see the code signing +documentation in docs/code-signing.txt for more detailed directions. From eli.friedman at gmail.com Wed Jun 9 02:22:31 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 07:22:31 -0000 Subject: [Lldb-commits] [lldb] r105698 - in /lldb/trunk/include/lldb: API/SBDebugger.h API/SBProcess.h Core/Language.h Core/Scalar.h Host/Mutex.h Symbol/CompileUnit.h Symbol/Function.h Target/Process.h Message-ID: <20100609072231.1DB1C2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 02:22:30 2010 New Revision: 105698 URL: http://llvm.org/viewvc/llvm-project?rev=105698&view=rev Log: And a few more warning/error fixes. Modified: lldb/trunk/include/lldb/API/SBDebugger.h lldb/trunk/include/lldb/API/SBProcess.h lldb/trunk/include/lldb/Core/Language.h lldb/trunk/include/lldb/Core/Scalar.h lldb/trunk/include/lldb/Host/Mutex.h lldb/trunk/include/lldb/Symbol/CompileUnit.h lldb/trunk/include/lldb/Symbol/Function.h lldb/trunk/include/lldb/Target/Process.h Modified: lldb/trunk/include/lldb/API/SBDebugger.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBDebugger.h (original) +++ lldb/trunk/include/lldb/API/SBDebugger.h Wed Jun 9 02:22:30 2010 @@ -11,6 +11,7 @@ #define LLDB_SBDebugger_h_ #include "lldb/API/SBDefines.h" +#include namespace lldb { Modified: lldb/trunk/include/lldb/API/SBProcess.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBProcess.h (original) +++ lldb/trunk/include/lldb/API/SBProcess.h Wed Jun 9 02:22:30 2010 @@ -29,7 +29,7 @@ eBroadcastBitStateChanged = (1 << 0), eBroadcastBitInterrupt = (1 << 1), eBroadcastBitSTDOUT = (1 << 2), - eBroadcastBitSTDERR = (1 << 3), + eBroadcastBitSTDERR = (1 << 3) }; SBProcess (); Modified: lldb/trunk/include/lldb/Core/Language.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Language.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Language.h (original) +++ lldb/trunk/include/lldb/Core/Language.h Wed Jun 9 02:22:30 2010 @@ -55,7 +55,7 @@ ObjC_plus_plus = 0x0011, ///< Objective-C++. UPC = 0x0012, ///< Unified Parallel C. D = 0x0013, ///< D. - Python = 0x0014, ///< Python. + Python = 0x0014 ///< Python. } Type; //------------------------------------------------------------------ Modified: lldb/trunk/include/lldb/Core/Scalar.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Scalar.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Scalar.h (original) +++ lldb/trunk/include/lldb/Core/Scalar.h Wed Jun 9 02:22:30 2010 @@ -230,7 +230,7 @@ } protected: - typedef union ValueData + union ValueData { int sint; unsigned int uint; Modified: lldb/trunk/include/lldb/Host/Mutex.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Mutex.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Host/Mutex.h (original) +++ lldb/trunk/include/lldb/Host/Mutex.h Wed Jun 9 02:22:30 2010 @@ -26,7 +26,7 @@ enum Type { eMutexTypeNormal, ///< Mutex that can't recursively entered by the same thread - eMutexTypeRecursive, ///< Mutex can be recursively entered by the same thread + eMutexTypeRecursive ///< Mutex can be recursively entered by the same thread }; //------------------------------------------------------------------ Modified: lldb/trunk/include/lldb/Symbol/CompileUnit.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompileUnit.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/CompileUnit.h (original) +++ lldb/trunk/include/lldb/Symbol/CompileUnit.h Wed Jun 9 02:22:30 2010 @@ -384,7 +384,7 @@ flagsParsedAllFunctions = (1 << 0), ///< Have we already parsed all our functions flagsParsedVariables = (1 << 1), ///< Have we already parsed globals and statics? flagsParsedSupportFiles = (1 << 2), ///< Have we already parsed the support files for this compile unit? - flagsParsedLineTable = (1 << 3), ///< Have we parsed the line table already? + flagsParsedLineTable = (1 << 3) ///< Have we parsed the line table already? }; DISALLOW_COPY_AND_ASSIGN (CompileUnit); Modified: lldb/trunk/include/lldb/Symbol/Function.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Function.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/Function.h (original) +++ lldb/trunk/include/lldb/Symbol/Function.h Wed Jun 9 02:22:30 2010 @@ -562,7 +562,7 @@ enum { - flagsCalculatedPrologueSize = (1 << 0), ///< Have we already tried to calculate the prologue size? + flagsCalculatedPrologueSize = (1 << 0) ///< Have we already tried to calculate the prologue size? }; Modified: lldb/trunk/include/lldb/Target/Process.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=105698&r1=105697&r2=105698&view=diff ============================================================================== --- lldb/trunk/include/lldb/Target/Process.h (original) +++ lldb/trunk/include/lldb/Target/Process.h Wed Jun 9 02:22:30 2010 @@ -53,7 +53,7 @@ eBroadcastBitStateChanged = (1 << 0), eBroadcastBitInterrupt = (1 << 1), eBroadcastBitSTDOUT = (1 << 2), - eBroadcastBitSTDERR = (1 << 3), + eBroadcastBitSTDERR = (1 << 3) }; enum From jmolenda at apple.com Wed Jun 9 02:29:26 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 07:29:26 -0000 Subject: [Lldb-commits] [lldb] r105700 - /lldb/trunk/INSTALL.txt Message-ID: <20100609072926.B509A2A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 02:29:26 2010 New Revision: 105700 URL: http://llvm.org/viewvc/llvm-project?rev=105700&view=rev Log: You'll need to be running Mac OS X to get lldb to build right now. Modified: lldb/trunk/INSTALL.txt Modified: lldb/trunk/INSTALL.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/INSTALL.txt?rev=105700&r1=105699&r2=105700&view=diff ============================================================================== --- lldb/trunk/INSTALL.txt (original) +++ lldb/trunk/INSTALL.txt Wed Jun 9 02:29:26 2010 @@ -1,7 +1,7 @@ LLDB Installation Instructions ============================== -Note that LLDB currently only builds out of the box on Darwin with Xcode, but +Note that LLDB currently only builds out of the box on Mac OS X with Xcode, but patches to improve portability are definitely welcome. In addition to using Xcode you'll need to enable code signing on your system From echristo at apple.com Wed Jun 9 02:32:16 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 09 Jun 2010 07:32:16 -0000 Subject: [Lldb-commits] [lldb] r105701 - /lldb/trunk/www/index.html Message-ID: <20100609073216.DDF722A6C12F@llvm.org> Author: echristo Date: Wed Jun 9 02:32:16 2010 New Revision: 105701 URL: http://llvm.org/viewvc/llvm-project?rev=105701&view=rev Log: Use correct name for the OS here too. Modified: lldb/trunk/www/index.html Modified: lldb/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/index.html?rev=105701&r1=105700&r2=105701&view=diff ============================================================================== --- lldb/trunk/www/index.html (original) +++ lldb/trunk/www/index.html Wed Jun 9 02:32:16 2010 @@ -182,7 +182,7 @@
  • svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
  • -

    Note that LLDB currently only builds out of the box on Darwin with +

    Note that LLDB currently only builds out of the box on Mac OS X with Xcode, but patches to improve portability are definitely welcome.

    Discussions about LLDB should go to the Author: efriedma Date: Wed Jun 9 02:37:52 2010 New Revision: 105702 URL: http://llvm.org/viewvc/llvm-project?rev=105702&view=rev Log: Fix a bunch more include lines. Modified: lldb/trunk/source/API/SBBroadcaster.cpp lldb/trunk/source/API/SBCommandContext.cpp lldb/trunk/source/API/SBCommandInterpreter.cpp lldb/trunk/source/API/SBCommandReturnObject.cpp lldb/trunk/source/API/SBDebugger.cpp Modified: lldb/trunk/source/API/SBBroadcaster.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=105702&r1=105701&r2=105702&view=diff ============================================================================== --- lldb/trunk/source/API/SBBroadcaster.cpp (original) +++ lldb/trunk/source/API/SBBroadcaster.cpp Wed Jun 9 02:37:52 2010 @@ -10,9 +10,9 @@ #include "lldb/Core/Broadcaster.h" #include "lldb/lldb-forward-rtti.h" -#include "SBBroadcaster.h" -#include "SBListener.h" -#include "SBEvent.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBEvent.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBCommandContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandContext.cpp?rev=105702&r1=105701&r2=105702&view=diff ============================================================================== --- lldb/trunk/source/API/SBCommandContext.cpp (original) +++ lldb/trunk/source/API/SBCommandContext.cpp Wed Jun 9 02:37:52 2010 @@ -10,7 +10,7 @@ #include "lldb/Interpreter/CommandContext.h" #include "lldb/Interpreter/CommandReturnObject.h" -#include "SBCommandContext.h" +#include "lldb/API/SBCommandContext.h" using namespace lldb; Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=105702&r1=105701&r2=105702&view=diff ============================================================================== --- lldb/trunk/source/API/SBCommandInterpreter.cpp (original) +++ lldb/trunk/source/API/SBCommandInterpreter.cpp Wed Jun 9 02:37:52 2010 @@ -15,16 +15,16 @@ #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Target/Target.h" -#include "SBBroadcaster.h" -#include "SBDebugger.h" -#include "SBCommandReturnObject.h" -#include "SBCommandContext.h" -#include "SBSourceManager.h" -#include "SBCommandInterpreter.h" -#include "SBProcess.h" -#include "SBTarget.h" -#include "SBListener.h" -#include "SBStringList.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBCommandContext.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBStringList.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBCommandReturnObject.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandReturnObject.cpp?rev=105702&r1=105701&r2=105702&view=diff ============================================================================== --- lldb/trunk/source/API/SBCommandReturnObject.cpp (original) +++ lldb/trunk/source/API/SBCommandReturnObject.cpp Wed Jun 9 02:37:52 2010 @@ -9,7 +9,7 @@ #include "lldb/Interpreter/CommandReturnObject.h" -#include "SBCommandReturnObject.h" +#include "lldb/API/SBCommandReturnObject.h" using namespace lldb; Modified: lldb/trunk/source/API/SBDebugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=105702&r1=105701&r2=105702&view=diff ============================================================================== --- lldb/trunk/source/API/SBDebugger.cpp (original) +++ lldb/trunk/source/API/SBDebugger.cpp Wed Jun 9 02:37:52 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBDebugger.h" +#include "lldb/API/SBDebugger.h" #include "lldb/lldb-include.h" #include "lldb/Core/Args.h" @@ -16,17 +16,17 @@ #include "lldb/Target/Process.h" #include "lldb/Target/TargetList.h" -#include "SBListener.h" -#include "SBBroadcaster.h" -#include "SBCommandInterpreter.h" -#include "SBCommandReturnObject.h" -#include "SBEvent.h" -#include "SBFrame.h" -#include "SBTarget.h" -#include "SBProcess.h" -#include "SBThread.h" -#include "SBSourceManager.h" -#include "SBInputReader.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBInputReader.h" using namespace lldb; using namespace lldb_private; From jmolenda at apple.com Wed Jun 9 02:44:25 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 07:44:25 -0000 Subject: [Lldb-commits] [lldb] r105703 - /lldb/trunk/lldb.xcodeproj/project.pbxproj Message-ID: <20100609074425.5824D2A6C12F@llvm.org> Author: jmolenda Date: Wed Jun 9 02:44:25 2010 New Revision: 105703 URL: http://llvm.org/viewvc/llvm-project?rev=105703&view=rev Log: update the USER_HEADER_SEARCH_PATHS for one of the variants. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105703&r1=105702&r2=105703&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 9 02:44:25 2010 @@ -2939,7 +2939,7 @@ ); PREBINDING = NO; PRODUCT_NAME = lldb; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include/lldb/Utility"; + 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"; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; From eli.friedman at gmail.com Wed Jun 9 02:44:38 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 07:44:38 -0000 Subject: [Lldb-commits] [lldb] r105704 - in /lldb/trunk/source/API: SBError.cpp SBEvent.cpp SBFrame.cpp SBListener.cpp SBProcess.cpp SBSourceManager.cpp SBTarget.cpp SBThread.cpp SBValue.cpp Message-ID: <20100609074438.2F7EB2A6C12F@llvm.org> Author: efriedma Date: Wed Jun 9 02:44:37 2010 New Revision: 105704 URL: http://llvm.org/viewvc/llvm-project?rev=105704&view=rev Log: And some more include line fixes. Modified: lldb/trunk/source/API/SBError.cpp lldb/trunk/source/API/SBEvent.cpp lldb/trunk/source/API/SBFrame.cpp lldb/trunk/source/API/SBListener.cpp lldb/trunk/source/API/SBProcess.cpp lldb/trunk/source/API/SBSourceManager.cpp lldb/trunk/source/API/SBTarget.cpp lldb/trunk/source/API/SBThread.cpp lldb/trunk/source/API/SBValue.cpp Modified: lldb/trunk/source/API/SBError.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBError.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBError.cpp (original) +++ lldb/trunk/source/API/SBError.cpp Wed Jun 9 02:44:37 2010 @@ -9,6 +9,7 @@ #include "lldb/API/SBError.h" #include "lldb/Core/Error.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBEvent.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBEvent.cpp (original) +++ lldb/trunk/source/API/SBEvent.cpp Wed Jun 9 02:44:37 2010 @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#include "SBEvent.h" -#include "SBBroadcaster.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBBroadcaster.h" #include "lldb/Core/Event.h" #include "lldb/Core/Stream.h" Modified: lldb/trunk/source/API/SBFrame.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBFrame.cpp (original) +++ lldb/trunk/source/API/SBFrame.cpp Wed Jun 9 02:44:37 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBFrame.h" +#include "lldb/API/SBFrame.h" #include #include @@ -31,11 +31,11 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Thread.h" -#include "SBDebugger.h" -#include "SBValue.h" -#include "SBAddress.h" -#include "SBSymbolContext.h" -#include "SBThread.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBValue.h" +#include "lldb/API/SBAddress.h" +#include "lldb/API/SBSymbolContext.h" +#include "lldb/API/SBThread.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBListener.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBListener.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBListener.cpp (original) +++ lldb/trunk/source/API/SBListener.cpp Wed Jun 9 02:44:37 2010 @@ -11,9 +11,9 @@ #include "lldb/lldb-forward-rtti.h" #include "lldb/Host/TimeValue.h" -#include "SBListener.h" -#include "SBEvent.h" -#include "SBBroadcaster.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBBroadcaster.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBProcess.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBProcess.cpp (original) +++ lldb/trunk/source/API/SBProcess.cpp Wed Jun 9 02:44:37 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBProcess.h" +#include "lldb/API/SBProcess.h" #include "lldb/lldb-defines.h" #include "lldb/lldb-types.h" @@ -24,12 +24,12 @@ // Project includes -#include "SBBroadcaster.h" -#include "SBDebugger.h" -#include "SBCommandReturnObject.h" -#include "SBEvent.h" -#include "SBThread.h" -#include "SBStringList.h" +#include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBStringList.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBSourceManager.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSourceManager.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBSourceManager.cpp (original) +++ lldb/trunk/source/API/SBSourceManager.cpp Wed Jun 9 02:44:37 2010 @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// -#include "SBSourceManager.h" +#include "lldb/API/SBSourceManager.h" #include "lldb/API/SBFileSpec.h" #include "lldb/Core/Stream.h" Modified: lldb/trunk/source/API/SBTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBTarget.cpp (original) +++ lldb/trunk/source/API/SBTarget.cpp Wed Jun 9 02:44:37 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBTarget.h" +#include "lldb/API/SBTarget.h" #include "lldb/lldb-include.h" @@ -35,10 +35,10 @@ #include "lldb/Interpreter/CommandReturnObject.h" #include "../source/Commands/CommandObjectBreakpoint.h" -#include "SBDebugger.h" -#include "SBProcess.h" -#include "SBListener.h" -#include "SBBreakpoint.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBBreakpoint.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBThread.cpp (original) +++ lldb/trunk/source/API/SBThread.cpp Wed Jun 9 02:44:37 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBThread.h" +#include "lldb/API/SBThread.h" #include "lldb/API/SBSymbolContext.h" #include "lldb/API/SBFileSpec.h" @@ -26,11 +26,11 @@ #include "lldb/Target/ThreadPlanStepInRange.h" -#include "SBAddress.h" -#include "SBFrame.h" -#include "SBSourceManager.h" -#include "SBDebugger.h" -#include "SBProcess.h" +#include "lldb/API/SBAddress.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBProcess.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/API/SBValue.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=105704&r1=105703&r2=105704&view=diff ============================================================================== --- lldb/trunk/source/API/SBValue.cpp (original) +++ lldb/trunk/source/API/SBValue.cpp Wed Jun 9 02:44:37 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "SBValue.h" +#include "lldb/API/SBValue.h" #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Module.h" @@ -23,11 +23,11 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Thread.h" -#include "SBProcess.h" -#include "SBTarget.h" -#include "SBThread.h" -#include "SBFrame.h" -#include "SBDebugger.h" +#include "lldb/API/SBProcess.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBFrame.h" +#include "lldb/API/SBDebugger.h" using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 02:47:44 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 07:47:44 -0000 Subject: [Lldb-commits] [lldb] r105705 - /lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp Message-ID: <20100609074744.0ECCD2A6C12F@llvm.org> Author: efriedma Date: Wed Jun 9 02:47:43 2010 New Revision: 105705 URL: http://llvm.org/viewvc/llvm-project?rev=105705&view=rev Log: Add missing include. Modified: lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp Modified: lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp?rev=105705&r1=105704&r2=105705&view=diff ============================================================================== --- lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp Wed Jun 9 02:47:43 2010 @@ -14,6 +14,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Stream.h" +#include using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 02:57:51 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 07:57:51 -0000 Subject: [Lldb-commits] [lldb] r105706 - in /lldb/trunk/source/Commands: CommandObjectArgs.cpp CommandObjectBreakpoint.h CommandObjectQuit.cpp CommandObjectTranslate.cpp Message-ID: <20100609075752.0A1B72A6C12F@llvm.org> Author: efriedma Date: Wed Jun 9 02:57:51 2010 New Revision: 105706 URL: http://llvm.org/viewvc/llvm-project?rev=105706&view=rev Log: More minor build fixes. Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.h lldb/trunk/source/Commands/CommandObjectQuit.cpp lldb/trunk/source/Commands/CommandObjectTranslate.cpp Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=105706&r1=105705&r2=105706&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Wed Jun 9 02:57:51 2010 @@ -173,7 +173,7 @@ void *type; char *int_pos; - if ((int_pos = strstr (arg_type_cstr, "int"))) + if ((int_pos = strstr (const_cast(arg_type_cstr), "int"))) { Encoding encoding = eEncodingSint; Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=105706&r1=105705&r2=105706&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original) +++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Wed Jun 9 02:57:51 2010 @@ -57,7 +57,7 @@ eSetTypeFileAndLine, eSetTypeAddress, eSetTypeFunctionName, - eSetTypeFunctionRegexp, + eSetTypeFunctionRegexp } BreakpointSetType; CommandObjectBreakpointSet (); Modified: lldb/trunk/source/Commands/CommandObjectQuit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.cpp?rev=105706&r1=105705&r2=105706&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectQuit.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectQuit.cpp Wed Jun 9 02:57:51 2010 @@ -13,8 +13,8 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "CommandInterpreter.h" -#include "CommandReturnObject.h" +#include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/CommandReturnObject.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Commands/CommandObjectTranslate.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTranslate.cpp?rev=105706&r1=105705&r2=105706&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectTranslate.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectTranslate.cpp Wed Jun 9 02:57:51 2010 @@ -59,7 +59,7 @@ } else { - result.AppendErrroWithFormat + result.AppendErrorWithFormat ("'%s' is not a known command.\nTry 'help' to see a current list of commands.\n", command.GetArgumentAtIndex(0)); result.SetStatus (eReturnStatusFailed); From friesen at apple.com Wed Jun 9 02:57:59 2010 From: friesen at apple.com (Christopher Friesen) Date: Wed, 09 Jun 2010 07:57:59 -0000 Subject: [Lldb-commits] [lldb] r105707 - /lldb/trunk/lldb.xcodeproj/project.pbxproj Message-ID: <20100609075759.B437A2A6C12F@llvm.org> Author: cfriesen Date: Wed Jun 9 02:57:59 2010 New Revision: 105707 URL: http://llvm.org/viewvc/llvm-project?rev=105707&view=rev Log: OK, we should only point to PROJECT_DIR/include for the header search paths since the includes specify lldb/API/etc. This is temporary until the final install location is decided upon for the headers. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105707&r1=105706&r2=105707&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 9 02:57:59 2010 @@ -2925,7 +2925,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = 4.2; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/include/lldb/API/**"; + HEADER_SEARCH_PATHS = "${PROJECT_DIR}/include"; INFOPLIST_FILE = "lldb-Info.plist"; INSTALL_PATH = /Developer/usr/bin; LIBRARY_SEARCH_PATHS = "$(inherited)"; From eli.friedman at gmail.com Wed Jun 9 03:46:23 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 08:46:23 -0000 Subject: [Lldb-commits] [lldb] r105711 - in /lldb/trunk: include/lldb/API/SBDebugger.h include/lldb/Core/Stream.h source/API/SBError.cpp Message-ID: <20100609084623.D8AFC2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 03:46:23 2010 New Revision: 105711 URL: http://llvm.org/viewvc/llvm-project?rev=105711&view=rev Log: Per surrounding style, use stdarg.h instead of cstdio, etc. Modified: lldb/trunk/include/lldb/API/SBDebugger.h lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/source/API/SBError.cpp Modified: lldb/trunk/include/lldb/API/SBDebugger.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=105711&r1=105710&r2=105711&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBDebugger.h (original) +++ lldb/trunk/include/lldb/API/SBDebugger.h Wed Jun 9 03:46:23 2010 @@ -11,7 +11,7 @@ #define LLDB_SBDebugger_h_ #include "lldb/API/SBDefines.h" -#include +#include namespace lldb { Modified: lldb/trunk/include/lldb/Core/Stream.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=105711&r1=105710&r2=105711&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Stream.h (original) +++ lldb/trunk/include/lldb/Core/Stream.h Wed Jun 9 03:46:23 2010 @@ -13,7 +13,7 @@ #include "lldb/lldb-private.h" #include "lldb/Core/Flags.h" -#include +#include namespace lldb_private { Modified: lldb/trunk/source/API/SBError.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBError.cpp?rev=105711&r1=105710&r2=105711&view=diff ============================================================================== --- lldb/trunk/source/API/SBError.cpp (original) +++ lldb/trunk/source/API/SBError.cpp Wed Jun 9 03:46:23 2010 @@ -9,7 +9,7 @@ #include "lldb/API/SBError.h" #include "lldb/Core/Error.h" -#include +#include using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 03:50:27 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 08:50:27 -0000 Subject: [Lldb-commits] [lldb] r105712 - in /lldb/trunk/source/Core: Communication.cpp Event.cpp FileSpecList.cpp Listener.cpp Mangled.cpp RegularExpression.cpp State.cpp Stream.cpp StreamFile.cpp StreamString.cpp Timer.cpp UUID.cpp VMRange.cpp ValueObject.cpp ValueObjectVariable.cpp Message-ID: <20100609085027.A9CC62A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 03:50:27 2010 New Revision: 105712 URL: http://llvm.org/viewvc/llvm-project?rev=105712&view=rev Log: Add missing includes. Modified: lldb/trunk/source/Core/Communication.cpp lldb/trunk/source/Core/Event.cpp lldb/trunk/source/Core/FileSpecList.cpp lldb/trunk/source/Core/Listener.cpp lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Core/RegularExpression.cpp lldb/trunk/source/Core/State.cpp lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Core/StreamFile.cpp lldb/trunk/source/Core/StreamString.cpp lldb/trunk/source/Core/Timer.cpp lldb/trunk/source/Core/UUID.cpp lldb/trunk/source/Core/VMRange.cpp lldb/trunk/source/Core/ValueObject.cpp lldb/trunk/source/Core/ValueObjectVariable.cpp Modified: lldb/trunk/source/Core/Communication.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Communication.cpp (original) +++ lldb/trunk/source/Core/Communication.cpp Wed Jun 9 03:50:27 2010 @@ -17,6 +17,7 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Timer.h" #include "lldb/Core/Event.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/Event.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Event.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Event.cpp (original) +++ lldb/trunk/source/Core/Event.cpp Wed Jun 9 03:50:27 2010 @@ -18,6 +18,7 @@ #include "lldb/Core/State.h" #include "lldb/Core/Stream.h" #include "lldb/Target/Process.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/FileSpecList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpecList.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/FileSpecList.cpp (original) +++ lldb/trunk/source/Core/FileSpecList.cpp Wed Jun 9 03:50:27 2010 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/FileSpecList.h" #include "lldb/Core/Stream.h" +#include using namespace lldb_private; using namespace std; Modified: lldb/trunk/source/Core/Listener.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Listener.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Listener.cpp (original) +++ lldb/trunk/source/Core/Listener.cpp Wed Jun 9 03:50:27 2010 @@ -19,6 +19,7 @@ #include "lldb/Core/Event.h" #include "lldb/Host/TimeValue.h" #include "lldb/lldb-private-log.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/Mangled.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Mangled.cpp (original) +++ lldb/trunk/source/Core/Mangled.cpp Wed Jun 9 03:50:27 2010 @@ -13,6 +13,8 @@ #include "lldb/Core/Mangled.h" #include "lldb/Core/Stream.h" #include "lldb/Core/Timer.h" +#include +#include using namespace lldb_private; Modified: lldb/trunk/source/Core/RegularExpression.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegularExpression.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/RegularExpression.cpp (original) +++ lldb/trunk/source/Core/RegularExpression.cpp Wed Jun 9 03:50:27 2010 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/RegularExpression.h" +#include using namespace lldb_private; Modified: lldb/trunk/source/Core/State.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/State.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/State.cpp (original) +++ lldb/trunk/source/Core/State.cpp Wed Jun 9 03:50:27 2010 @@ -12,6 +12,7 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/State.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/Stream.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Stream.cpp (original) +++ lldb/trunk/source/Core/Stream.cpp Wed Jun 9 03:50:27 2010 @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/Stream.h" +#include +#include +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/StreamFile.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamFile.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/StreamFile.cpp (original) +++ lldb/trunk/source/Core/StreamFile.cpp Wed Jun 9 03:50:27 2010 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/StreamFile.h" +#include // C Includes // C++ Includes Modified: lldb/trunk/source/Core/StreamString.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamString.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/StreamString.cpp (original) +++ lldb/trunk/source/Core/StreamString.cpp Wed Jun 9 03:50:27 2010 @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/StreamString.h" -//#include +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/Timer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Timer.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/Timer.cpp (original) +++ lldb/trunk/source/Core/Timer.cpp Wed Jun 9 03:50:27 2010 @@ -10,10 +10,13 @@ #include #include +#include #include "lldb/Core/Stream.h" #include "lldb/Host/Mutex.h" +#include + using namespace lldb_private; #define TIMER_INDENT_AMOUNT 2 @@ -232,4 +235,4 @@ const double timer_nsec = sorted_iterators[i]->second; s->Printf("%.9f sec for %s\n", timer_nsec / 1000000000.0, sorted_iterators[i]->first); } -} \ No newline at end of file +} Modified: lldb/trunk/source/Core/UUID.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UUID.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/UUID.cpp (original) +++ lldb/trunk/source/Core/UUID.cpp Wed Jun 9 03:50:27 2010 @@ -13,6 +13,9 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Stream.h" +#include +#include +#include using namespace lldb_private; Modified: lldb/trunk/source/Core/VMRange.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/VMRange.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/VMRange.cpp (original) +++ lldb/trunk/source/Core/VMRange.cpp Wed Jun 9 03:50:27 2010 @@ -11,6 +11,7 @@ #include "lldb/Core/Stream.h" #include "lldb/Core/VMRange.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/ValueObject.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/ValueObject.cpp (original) +++ lldb/trunk/source/Core/ValueObject.cpp Wed Jun 9 03:50:27 2010 @@ -12,7 +12,6 @@ // C Includes // C++ Includes // Other libraries and framework includes -#include "clang/AST/Type.h" #include "llvm/Support/raw_ostream.h" // Project includes @@ -27,6 +26,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Thread.h" +#include using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=105712&r1=105711&r2=105712&view=diff ============================================================================== --- lldb/trunk/source/Core/ValueObjectVariable.cpp (original) +++ lldb/trunk/source/Core/ValueObjectVariable.cpp Wed Jun 9 03:50:27 2010 @@ -29,8 +29,6 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" -#include "clang/AST/Type.h" - using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 03:53:28 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 08:53:28 -0000 Subject: [Lldb-commits] [lldb] r105713 - in /lldb/trunk/include/lldb: API/SBValue.h API/SBValueList.h Core/DataBufferMemoryMap.h Core/Value.h Expression/ClangFunction.h Interpreter/CommandCompletions.h Symbol/LineTable.h Message-ID: <20100609085328.739A12A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 03:53:28 2010 New Revision: 105713 URL: http://llvm.org/viewvc/llvm-project?rev=105713&view=rev Log: Misc warning/error fixes. Modified: lldb/trunk/include/lldb/API/SBValue.h lldb/trunk/include/lldb/API/SBValueList.h lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h lldb/trunk/include/lldb/Core/Value.h lldb/trunk/include/lldb/Expression/ClangFunction.h lldb/trunk/include/lldb/Interpreter/CommandCompletions.h lldb/trunk/include/lldb/Symbol/LineTable.h Modified: lldb/trunk/include/lldb/API/SBValue.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBValue.h (original) +++ lldb/trunk/include/lldb/API/SBValue.h Wed Jun 9 03:53:28 2010 @@ -12,10 +12,6 @@ #include "lldb/API/SBDefines.h" -class lldb_private::Variable; -class lldb_private::ValueObject; -class lldb_private::ExecutionContext; - namespace lldb { class SBValue Modified: lldb/trunk/include/lldb/API/SBValueList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/API/SBValueList.h (original) +++ lldb/trunk/include/lldb/API/SBValueList.h Wed Jun 9 03:53:28 2010 @@ -12,8 +12,6 @@ #include "lldb/API/SBDefines.h" -class lldb_private::ValueObjectList; - namespace lldb { class SBValueList Modified: lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h (original) +++ lldb/trunk/include/lldb/Core/DataBufferMemoryMap.h Wed Jun 9 03:53:28 2010 @@ -87,7 +87,7 @@ /// Memory map all or part of a file. /// /// Memory map \a length bytes from \a file starting \a offset - /// bytes into the file. If \a length is set to \c SIZE_T_MAX, + /// bytes into the file. If \a length is set to \c SIZE_MAX, /// then map as many bytes as possible. /// /// @param[in] file @@ -99,7 +99,7 @@ /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return @@ -108,14 +108,14 @@ size_t MemoryMapFromFileSpec (const FileSpec* file, off_t offset = 0, - size_t length = SIZE_T_MAX); + size_t length = SIZE_MAX); //------------------------------------------------------------------ /// Memory map all or part of a file. /// /// Memory map \a length bytes from an opened file descriptor \a fd /// starting \a offset bytes into the file. If \a length is set to - /// \c SIZE_T_MAX, then map as many bytes as possible. + /// \c SIZE_MAX, then map as many bytes as possible. /// /// @param[in] fd /// The posix file descriptor for an already opened file @@ -127,14 +127,14 @@ /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return /// The number of bytes mapped starting from the \a offset. //------------------------------------------------------------------ size_t - MemoryMapFromFileDescriptor (int fd, off_t offset = 0, size_t length = SIZE_T_MAX); + MemoryMapFromFileDescriptor (int fd, off_t offset = 0, size_t length = SIZE_MAX); protected: //------------------------------------------------------------------ Modified: lldb/trunk/include/lldb/Core/Value.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Value.h (original) +++ lldb/trunk/include/lldb/Core/Value.h Wed Jun 9 03:53:28 2010 @@ -36,7 +36,7 @@ eValueTypeScalar, // raw scalar value eValueTypeFileAddress, // file address value eValueTypeLoadAddress, // load address value - eValueTypeHostAddress, // host address value (for memory in the process that is using liblldb) + eValueTypeHostAddress // host address value (for memory in the process that is using liblldb) }; enum ContextType // Type that describes Value::m_context Modified: lldb/trunk/include/lldb/Expression/ClangFunction.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangFunction.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/Expression/ClangFunction.h (original) +++ lldb/trunk/include/lldb/Expression/ClangFunction.h Wed Jun 9 03:53:28 2010 @@ -16,7 +16,6 @@ #include // Other libraries and framework includes // Project includes -#include "lldb/lldb.h" #include "lldb/Core/ClangForward.h" #include "lldb/Core/Address.h" #include "lldb/Core/Value.h" @@ -39,7 +38,7 @@ { public: - typedef enum ExecutionResults + enum ExecutionResults { eExecutionSetupError, eExecutionCompleted, @@ -237,5 +236,5 @@ bool m_JITted; }; -}; // Namespace lldb_private +} // Namespace lldb_private #endif // lldb_ClangFunction_h_ Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Wed Jun 9 03:53:28 2010 @@ -236,5 +236,5 @@ }; -}; // namespace lldb_private +} // namespace lldb_private #endif // lldb_CommandCompletions_h_ Modified: lldb/trunk/include/lldb/Symbol/LineTable.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/LineTable.h?rev=105713&r1=105712&r2=105713&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/LineTable.h (original) +++ lldb/trunk/include/lldb/Symbol/LineTable.h Wed Jun 9 03:53:28 2010 @@ -264,7 +264,7 @@ // rhs and lhs reversed on purpose below. SCALAR_COMPARE (rhs.is_terminal_entry, lhs.is_terminal_entry); SCALAR_COMPARE (lhs.file_idx, rhs.file_idx); - #undef SCALAR_COMPARE; + #undef SCALAR_COMPARE return 0; } @@ -273,7 +273,7 @@ { public: LessThanBinaryPredicate(LineTable *line_table); - bool operator() (const LineTable::Entry& a, const LineTable::Entry& a) const; + bool operator() (const LineTable::Entry&, const LineTable::Entry&) const; protected: LineTable *m_line_table; }; From eli.friedman at gmail.com Wed Jun 9 03:57:38 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 08:57:38 -0000 Subject: [Lldb-commits] [lldb] r105714 - in /lldb/trunk/include/lldb: Core/Log.h Core/Mangled.h Core/RegularExpression.h Core/Section.h Core/UUID.h Target/ThreadPlan.h Message-ID: <20100609085738.89FB12A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 03:57:38 2010 New Revision: 105714 URL: http://llvm.org/viewvc/llvm-project?rev=105714&view=rev Log: More warning/error fixes. Modified: lldb/trunk/include/lldb/Core/Log.h lldb/trunk/include/lldb/Core/Mangled.h lldb/trunk/include/lldb/Core/RegularExpression.h lldb/trunk/include/lldb/Core/Section.h lldb/trunk/include/lldb/Core/UUID.h lldb/trunk/include/lldb/Target/ThreadPlan.h Modified: lldb/trunk/include/lldb/Core/Log.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Log.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Log.h (original) +++ lldb/trunk/include/lldb/Core/Log.h Wed Jun 9 03:57:38 2010 @@ -15,7 +15,6 @@ #include #include #include -#include #include // C++ Includes @@ -67,7 +66,7 @@ Stream *feedback_strm); typedef void (*ListCategoriesCallback) (Stream *strm); - typedef struct Callbacks + struct Callbacks { DisableCallback disable; EnableCallback enable; Modified: lldb/trunk/include/lldb/Core/Mangled.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Mangled.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Mangled.h (original) +++ lldb/trunk/include/lldb/Core/Mangled.h Wed Jun 9 03:57:38 2010 @@ -49,7 +49,7 @@ eParamsBeg, ///< The start of a method's parameters (the open parenthesis) eParamsEnd, ///< The end of a method's parameters (the open parenthesis) eQualifier, ///< A language qualifier - eError, ///< The token failed to parse + eError ///< The token failed to parse }; //------------------------------------------------------------------ Modified: lldb/trunk/include/lldb/Core/RegularExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegularExpression.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/RegularExpression.h (original) +++ lldb/trunk/include/lldb/Core/RegularExpression.h Wed Jun 9 03:57:38 2010 @@ -12,6 +12,7 @@ #if defined(__cplusplus) #include +#include #include #include Modified: lldb/trunk/include/lldb/Core/Section.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Section.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Section.h (original) +++ lldb/trunk/include/lldb/Core/Section.h Wed Jun 9 03:57:38 2010 @@ -17,6 +17,7 @@ #include "lldb/Core/ConstString.h" #include "lldb/Core/UserID.h" #include "lldb/Core/VMRange.h" +#include namespace lldb_private { Modified: lldb/trunk/include/lldb/Core/UUID.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/UUID.h (original) +++ lldb/trunk/include/lldb/Core/UUID.h Wed Jun 9 03:57:38 2010 @@ -17,6 +17,8 @@ #include "lldb/lldb-private.h" +struct uuid_t; + namespace lldb_private { class UUID Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=105714&r1=105713&r2=105714&view=diff ============================================================================== --- lldb/trunk/include/lldb/Target/ThreadPlan.h (original) +++ lldb/trunk/include/lldb/Target/ThreadPlan.h Wed Jun 9 03:57:38 2010 @@ -163,7 +163,7 @@ // by hand as part of expression evaluation. To suppress the running event return eVoteNo from ShouldReportStop, // to force a running event to be reported return eVoteYes, in general though you should return eVoteNoOpinion // which will allow the ThreadList to figure out the right thing to do. -// The run_vote argument to the constructor works like stop_vote, and is a way for a plan to instruct a sub-plan\ +// The run_vote argument to the constructor works like stop_vote, and is a way for a plan to instruct a sub-plan // on how to respond to ShouldReportStop. // //------------------------------------------------------------------ From eli.friedman at gmail.com Wed Jun 9 04:19:14 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 09:19:14 -0000 Subject: [Lldb-commits] [lldb] r105715 - in /lldb/trunk/include/lldb/Expression: ClangExpression.h RecordingMemoryManager.h Message-ID: <20100609091914.16E142A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 04:19:13 2010 New Revision: 105715 URL: http://llvm.org/viewvc/llvm-project?rev=105715&view=rev Log: A couple more minor error/warning fixes. Modified: lldb/trunk/include/lldb/Expression/ClangExpression.h lldb/trunk/include/lldb/Expression/RecordingMemoryManager.h Modified: lldb/trunk/include/lldb/Expression/ClangExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpression.h?rev=105715&r1=105714&r2=105715&view=diff ============================================================================== --- lldb/trunk/include/lldb/Expression/ClangExpression.h (original) +++ lldb/trunk/include/lldb/Expression/ClangExpression.h Wed Jun 9 04:19:13 2010 @@ -14,6 +14,7 @@ // C++ Includes #include #include +#include // Other libraries and framework includes // Project includes Modified: lldb/trunk/include/lldb/Expression/RecordingMemoryManager.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/RecordingMemoryManager.h?rev=105715&r1=105714&r2=105715&view=diff ============================================================================== --- lldb/trunk/include/lldb/Expression/RecordingMemoryManager.h (original) +++ lldb/trunk/include/lldb/Expression/RecordingMemoryManager.h Wed Jun 9 04:19:13 2010 @@ -150,5 +150,5 @@ }; -}; // namespace lldb_private +} // namespace lldb_private #endif // lldb_RecordingMemoryManager_h_ From jmolenda at apple.com Wed Jun 9 04:27:53 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 09:27:53 -0000 Subject: [Lldb-commits] [lldb] r105717 - /lldb/trunk/www/index.html Message-ID: <20100609092753.8B0332A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 04:27:53 2010 New Revision: 105717 URL: http://llvm.org/viewvc/llvm-project?rev=105717&view=rev Log: I declare "x86-64" to be the official formatting for this page. Modified: lldb/trunk/www/index.html Modified: lldb/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/index.html?rev=105717&r1=105716&r2=105717&view=diff ============================================================================== --- lldb/trunk/www/index.html (original) +++ lldb/trunk/www/index.html Wed Jun 9 04:27:53 2010 @@ -101,14 +101,14 @@

  • Disassembly plug-ins for each architecture. Support currently includes an LLVM disassembler for i386, - x86_64, & ARM/Thumb.
  • + x86-64, & ARM/Thumb.
  • Debugger plug-ins implement the host and target specific functions required to debug.
  • SWIG-generated script bridging allows Python to access and control the public API of the debugger library.
  • A remote protocol server, debugserver, implements Mac OS X debugging on - i386 and x86_64.
  • + i386 and x86-64.
  • A command line debugger - the lldb executable itself.
  • A framework API to the library.
  • @@ -122,7 +122,7 @@
  • Machine Architectures:
      -
    • Mac OS X i386 and X86-64
    • +
    • Mac OS X i386 and x86-64
  • @@ -143,8 +143,8 @@
  • Symbol reading and object file introspection
  • Script bridging
  • Thread inspection and stepping
  • -
  • Disassembly of i386, x86_64, & ARM/Thumb machine code, and - backtracing on i386 & x86_64
  • +
  • Disassembly of i386, x86-64, & ARM/Thumb machine code, and + backtracing on i386 & x86-64
  • The basic command line prompt system, shared library tracking, source listings.
  • From eli.friedman at gmail.com Wed Jun 9 04:32:42 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 09:32:42 -0000 Subject: [Lldb-commits] [lldb] r105718 - in /lldb/trunk/source: Symbol/LineTable.cpp Target/ObjCObjectPrinter.cpp Target/PathMappingList.cpp Message-ID: <20100609093243.017E72A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 04:32:42 2010 New Revision: 105718 URL: http://llvm.org/viewvc/llvm-project?rev=105718&view=rev Log: Minor warning/error fixes. Modified: lldb/trunk/source/Symbol/LineTable.cpp lldb/trunk/source/Target/ObjCObjectPrinter.cpp lldb/trunk/source/Target/PathMappingList.cpp Modified: lldb/trunk/source/Symbol/LineTable.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/LineTable.cpp?rev=105718&r1=105717&r2=105718&view=diff ============================================================================== --- lldb/trunk/source/Symbol/LineTable.cpp (original) +++ lldb/trunk/source/Symbol/LineTable.cpp Wed Jun 9 04:32:42 2010 @@ -12,6 +12,7 @@ #include "lldb/Core/Stream.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/LineTable.h" +#include using namespace lldb; using namespace lldb_private; @@ -133,13 +134,13 @@ LT_COMPARE (b.is_terminal_entry, a.is_terminal_entry); LT_COMPARE (a.file_idx, b.file_idx); return false; - #undef LT_COMPARE; + #undef LT_COMPARE } const Section *a_section = m_line_table->GetSectionForEntryIndex (a.sect_idx); const Section *b_section = m_line_table->GetSectionForEntryIndex (b.sect_idx); return Section::Compare(*a_section, *b_section) < 0; -}; +} Section * Modified: lldb/trunk/source/Target/ObjCObjectPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCObjectPrinter.cpp?rev=105718&r1=105717&r2=105718&view=diff ============================================================================== --- lldb/trunk/source/Target/ObjCObjectPrinter.cpp (original) +++ lldb/trunk/source/Target/ObjCObjectPrinter.cpp Wed Jun 9 04:32:42 2010 @@ -17,7 +17,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" -#include "ObjCObjectPrinter.h" +#include "lldb/Target/ObjCObjectPrinter.h" using namespace lldb; using namespace lldb_private; Modified: lldb/trunk/source/Target/PathMappingList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/PathMappingList.cpp?rev=105718&r1=105717&r2=105718&view=diff ============================================================================== --- lldb/trunk/source/Target/PathMappingList.cpp (original) +++ lldb/trunk/source/Target/PathMappingList.cpp Wed Jun 9 04:32:42 2010 @@ -13,7 +13,8 @@ #include "lldb/Core/Error.h" #include "lldb/Core/Stream.h" // Project includes -#include "PathMappingList.h" +#include "lldb/Target/PathMappingList.h" +#include using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 04:38:08 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 09:38:08 -0000 Subject: [Lldb-commits] [lldb] r105719 - in /lldb/trunk/source/Utility: PseudoTerminal.cpp StringExtractor.h Message-ID: <20100609093808.DD9522A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 04:38:08 2010 New Revision: 105719 URL: http://llvm.org/viewvc/llvm-project?rev=105719&view=rev Log: Add a couple missing includes. Modified: lldb/trunk/source/Utility/PseudoTerminal.cpp lldb/trunk/source/Utility/StringExtractor.h Modified: lldb/trunk/source/Utility/PseudoTerminal.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/PseudoTerminal.cpp?rev=105719&r1=105718&r2=105719&view=diff ============================================================================== --- lldb/trunk/source/Utility/PseudoTerminal.cpp (original) +++ lldb/trunk/source/Utility/PseudoTerminal.cpp Wed Jun 9 04:38:08 2010 @@ -12,6 +12,7 @@ #include #include #include +#include #include using namespace lldb_utility; Modified: lldb/trunk/source/Utility/StringExtractor.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.h?rev=105719&r1=105718&r2=105719&view=diff ============================================================================== --- lldb/trunk/source/Utility/StringExtractor.h (original) +++ lldb/trunk/source/Utility/StringExtractor.h Wed Jun 9 04:38:08 2010 @@ -13,6 +13,7 @@ // C Includes // C++ Includes #include +#include // Other libraries and framework includes // Project includes From eli.friedman at gmail.com Wed Jun 9 04:50:17 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 09:50:17 -0000 Subject: [Lldb-commits] [lldb] r105720 - in /lldb/trunk/tools/driver: Driver.cpp Driver.h IOChannel.cpp Message-ID: <20100609095018.0517E2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 04:50:17 2010 New Revision: 105720 URL: http://llvm.org/viewvc/llvm-project?rev=105720&view=rev Log: Misc minor warning/error fixes. Modified: lldb/trunk/tools/driver/Driver.cpp lldb/trunk/tools/driver/Driver.h lldb/trunk/tools/driver/IOChannel.cpp Modified: lldb/trunk/tools/driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=105720&r1=105719&r2=105720&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.cpp (original) +++ lldb/trunk/tools/driver/Driver.cpp Wed Jun 9 04:50:17 2010 @@ -14,21 +14,24 @@ #include #include #include +#include +#include +#include #include #include "IOChannel.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBCommandReturnObject.h" +#include "lldb/API/SBCommunication.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBHostOS.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBTarget.h" +#include "lldb/API/SBThread.h" +#include "lldb/API/SBProcess.h" using namespace lldb; Modified: lldb/trunk/tools/driver/Driver.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.h?rev=105720&r1=105719&r2=105720&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.h (original) +++ lldb/trunk/tools/driver/Driver.h Wed Jun 9 04:50:17 2010 @@ -153,4 +153,4 @@ ReadyForCommand (); }; -#endif lldb_Driver_h_ +#endif // lldb_Driver_h_ Modified: lldb/trunk/tools/driver/IOChannel.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.cpp?rev=105720&r1=105719&r2=105720&view=diff ============================================================================== --- lldb/trunk/tools/driver/IOChannel.cpp (original) +++ lldb/trunk/tools/driver/IOChannel.cpp Wed Jun 9 04:50:17 2010 @@ -11,14 +11,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBEvent.h" +#include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBHostOS.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBStringList.h" using namespace lldb; From eli.friedman at gmail.com Wed Jun 9 04:53:11 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 09:53:11 -0000 Subject: [Lldb-commits] [lldb] r105721 - in /lldb/trunk: include/lldb/Core/ValueObjectChild.h include/lldb/Symbol/ClangASTContext.h source/Core/DataBufferMemoryMap.cpp Message-ID: <20100609095311.7E6E92A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 04:53:11 2010 New Revision: 105721 URL: http://llvm.org/viewvc/llvm-project?rev=105721&view=rev Log: A few more minor fixes. Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/source/Core/DataBufferMemoryMap.cpp Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=105721&r1=105720&r2=105721&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original) +++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Wed Jun 9 04:53:11 2010 @@ -13,7 +13,6 @@ // C Includes // C++ Includes // Other libraries and framework includes -#include "clang/AST/Type.h" // Project includes #include "lldb/Core/ValueObject.h" Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=105721&r1=105720&r2=105721&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Wed Jun 9 04:53:11 2010 @@ -14,6 +14,8 @@ // C++ Includes #include #include +#include +#include // Other libraries and framework includes // Project includes Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=105721&r1=105720&r2=105721&view=diff ============================================================================== --- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original) +++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Wed Jun 9 04:53:11 2010 @@ -97,7 +97,7 @@ //---------------------------------------------------------------------- // Memory map "length" bytes from "file" starting "offset" -// bytes into the file. If "length" is set to SIZE_T_MAX, then +// bytes into the file. If "length" is set to SIZE_MAX, then // map as many bytes as possible. // // Returns the number of bytes mapped starting from the requested @@ -137,7 +137,7 @@ // containing valid data from a call to stat(). // // Memory map FILE_LENGTH bytes in FILE starting FILE_OFFSET bytes into -// the file. If FILE_LENGTH is set to SIZE_T_MAX, then map as many bytes +// the file. If FILE_LENGTH is set to SIZE_MAX, then map as many bytes // as possible. // // RETURNS @@ -154,7 +154,7 @@ { if ((stat.st_mode & S_IFREG) && (stat.st_size > offset)) { - if (length == SIZE_T_MAX) + if (length == SIZE_MAX) length = stat.st_size - offset; // Cap the length if too much data was requested From eli.friedman at gmail.com Wed Jun 9 05:16:08 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 10:16:08 -0000 Subject: [Lldb-commits] [lldb] r105723 - /lldb/trunk/source/Core/Language.cpp Message-ID: <20100609101608.0AE882A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 05:16:07 2010 New Revision: 105723 URL: http://llvm.org/viewvc/llvm-project?rev=105723&view=rev Log: A few more warning/error fixes. Modified: lldb/trunk/source/Core/Language.cpp Modified: lldb/trunk/source/Core/Language.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Language.cpp?rev=105723&r1=105722&r2=105723&view=diff ============================================================================== --- lldb/trunk/source/Core/Language.cpp (original) +++ lldb/trunk/source/Core/Language.cpp Wed Jun 9 05:16:07 2010 @@ -10,13 +10,14 @@ #include "lldb/lldb-private.h" #include "lldb/Core/Language.h" #include "lldb/Core/Stream.h" +#include using namespace lldb; using namespace lldb_private; #define ENUM_TO_DCSTREAM(x) case x: s->PutCString(#x); return -typedef struct LanguageStrings +struct LanguageStrings { const char * names[3]; }; @@ -24,27 +25,27 @@ static LanguageStrings g_languages[] = { - { "unknown" , NULL , NULL }, - { "c89" , NULL , "ISO C:1989" }, - { NULL , NULL , "K&R C" }, - { "ada83" , "Ada83" , "ISO Ada:1983" }, - { "c++" , "cxx" , "ISO C++:1998" }, - { "cobol74" , "Cobol74" , "ISO Cobol:1974" }, - { "cobol" , "Cobol85" , "ISO Cobol:1985." }, - { "f77" , "Fortran77" , "ISO Fortran 77." }, - { "f90" , "Fortran90" , "ISO Fortran 90" }, - { "pascal" , "Pascal83" , "ISO Pascal:1983" }, - { "modula2" , "Modula2" , "ISO Modula-2:1996" }, - { "java" , NULL , "Java" }, - { "c" , "C99" , "ISO C:1999" }, - { "ada" , "Ada95" , "ISO Ada:1995" }, - { "f95" , "Fortran95" , "ISO Fortran 95" }, - { "PLI" , NULL , "ANSI PL/I:1976" }, - { "objc" , NULL , "Objective-C" }, - { "objc++" , NULL , "Objective-C++" }, - { "upc" , NULL , "Unified Parallel C" }, - { "d" , NULL , "D" }, - { "python" , NULL , "Python" } + { { "unknown" , NULL , NULL } }, + { { "c89" , NULL , "ISO C:1989" } }, + { { NULL , NULL , "K&R C" } }, + { { "ada83" , "Ada83" , "ISO Ada:1983" } }, + { { "c++" , "cxx" , "ISO C++:1998" } }, + { { "cobol74" , "Cobol74" , "ISO Cobol:1974" } }, + { { "cobol" , "Cobol85" , "ISO Cobol:1985." } }, + { { "f77" , "Fortran77" , "ISO Fortran 77." } }, + { { "f90" , "Fortran90" , "ISO Fortran 90" } }, + { { "pascal" , "Pascal83" , "ISO Pascal:1983" } }, + { { "modula2" , "Modula2" , "ISO Modula-2:1996" } }, + { { "java" , NULL , "Java" } }, + { { "c" , "C99" , "ISO C:1999" } }, + { { "ada" , "Ada95" , "ISO Ada:1995" } }, + { { "f95" , "Fortran95" , "ISO Fortran 95" } }, + { { "PLI" , NULL , "ANSI PL/I:1976" } }, + { { "objc" , NULL , "Objective-C" } }, + { { "objc++" , NULL , "Objective-C++" } }, + { { "upc" , NULL , "Unified Parallel C" } }, + { { "d" , NULL , "D" } }, + { { "python" , NULL , "Python" } } }; static const uint32_t From eli.friedman at gmail.com Wed Jun 9 05:59:23 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 10:59:23 -0000 Subject: [Lldb-commits] [lldb] r105724 - /lldb/trunk/source/Core/Args.cpp Message-ID: <20100609105923.42E3D2A6C12F@llvm.org> Author: efriedma Date: Wed Jun 9 05:59:23 2010 New Revision: 105724 URL: http://llvm.org/viewvc/llvm-project?rev=105724&view=rev Log: Remove unused class. Modified: lldb/trunk/source/Core/Args.cpp Modified: lldb/trunk/source/Core/Args.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Args.cpp?rev=105724&r1=105723&r2=105724&view=diff ============================================================================== --- lldb/trunk/source/Core/Args.cpp (original) +++ lldb/trunk/source/Core/Args.cpp Wed Jun 9 05:59:23 2010 @@ -9,8 +9,7 @@ // C Includes #include -#include - +#include // C++ Includes // Other libraries and framework includes // Project includes @@ -21,93 +20,6 @@ #include "lldb/Core/Options.h" #include "lldb/Interpreter/CommandReturnObject.h" -namespace lldb_private { - -class Tokenizer -{ -public: - Tokenizer (const char *separator_chars = NULL) : - m_tokenizer(NULL) - { - m_tokenizer = ::tok_init (separator_chars); - } - - ~Tokenizer () - { - if (m_tokenizer) - { - ::tok_end (m_tokenizer); - m_tokenizer = NULL; - } - } - - void - Reset () - { - assert (m_tokenizer); - ::tok_reset (m_tokenizer); - } - - int - TokenizeLineInfo (const ::LineInfo *line_info) - { - assert (m_tokenizer); - return ::tok_line (m_tokenizer, - line_info, - &m_argc, - &m_argv, - &m_cursor_arg_index, - &m_cursor_arg_offset); - } - - int - TokenizeCString (const char *cstr) - { - assert (m_tokenizer); - m_cursor_arg_index = -1; - m_cursor_arg_offset = -1; - return ::tok_str (m_tokenizer, - cstr, - &m_argc, - &m_argv); - } - - - int - GetArgCount () const - { - return m_argc; - } - - const char ** - GetArgVector () const - { - return m_argv; - } - - int - GetCursoreArgIndex () const - { - return m_cursor_arg_index; - } - - int - GetCursoreArgOffset () const - { - return m_cursor_arg_offset; - } - - -protected: - struct tokenizer* m_tokenizer; - const char **m_argv; - int m_argc; - int m_cursor_arg_index; - int m_cursor_arg_offset; -}; - -} // namespace lldb_private - using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 06:08:03 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 9 Jun 2010 04:08:03 -0700 Subject: [Lldb-commits] Request for moving PseudoTerminal.h Message-ID: Hi all, Could someone move PseudoTerminal.h to include/lldb/Utility/PseudoTerminal.h (or somewhere else public)? I'd do it myself, but I don't want to break the XCode build. -Eli From joe at alacatialabs.com Wed Jun 9 11:32:26 2010 From: joe at alacatialabs.com (Joseph Ranieri) Date: Wed, 9 Jun 2010 09:32:26 -0700 Subject: [Lldb-commits] Patch for embedded Python exit() Message-ID: Attached is a patch that makes the embedded Python interpreter handle the 'exit' method correctly. I have applied the fix to the Python script embedded in ScriptInterpreterPython.cpp and embedded_interpreter.py, but I am not sure if anything actually uses the standalone version. 'exit' behaves like 'quit', which was already handled, and will close the stdout file handle if called. This would result in the following workflow generating an endless stream of exceptions: (lldb) script >>> exit() (lldb) script >>> Traceback (most recent call last): File "embedded_interpreter.py", line 25, in interact self.read_py_command() File "embedded_interpreter.py", line 77, in read_py_command line = self.my_raw_input(prompt) File "embedded_interpreter.py", line 58, in my_raw_input line = sys.stdin.readline() ValueError: I/O operation on closed file >>> Traceback (most recent call last): File "embedded_interpreter.py", line 25, in interact self.read_py_command() File "embedded_interpreter.py", line 77, in read_py_command line = self.my_raw_input(prompt) File "embedded_interpreter.py", line 58, in my_raw_input line = sys.stdin.readline() ValueError: I/O operation on closed file -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/lldb-commits/attachments/20100609/25295a54/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: python_exit.diff Type: application/octet-stream Size: 1383 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/lldb-commits/attachments/20100609/25295a54/attachment.obj From joe at alacatialabs.com Wed Jun 9 11:40:14 2010 From: joe at alacatialabs.com (Joseph Ranieri) Date: Wed, 9 Jun 2010 09:40:14 -0700 Subject: [Lldb-commits] [lldb] r105714 - in /lldb/trunk/include/lldb: Core/Log.h Core/Mangled.h Core/RegularExpression.h Core/Section.h Core/UUID.h Target/ThreadPlan.h In-Reply-To: <20100609085738.89FB12A6C12E@llvm.org> References: <20100609085738.89FB12A6C12E@llvm.org> Message-ID: > Modified: lldb/trunk/include/lldb/Core/UUID.h > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=105714&r1=105713&r2=105714&view=diff > ============================================================================== > --- lldb/trunk/include/lldb/Core/UUID.h (original) > +++ lldb/trunk/include/lldb/Core/UUID.h Wed Jun 9 03:57:38 2010 > @@ -17,6 +17,8 @@ > > #include "lldb/lldb-private.h" > > +struct uuid_t; > + > namespace lldb_private { > > class UUID This change seems to have broken the Mac OS X build by redefining uuid_t as a struct, where it was previously defined in unistd.h as: #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) #ifndef _UUID_T #define _UUID_T typedef __darwin_uuid_t uuid_t; #endif /* _UUID_T */ #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ This is a bit ugly, but perhaps it could be wrapped in #ifndef _UUID_T? -- Joe Ranieri From eli.friedman at gmail.com Wed Jun 9 12:25:16 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 17:25:16 -0000 Subject: [Lldb-commits] [lldb] r105729 - /lldb/trunk/include/lldb/Core/UUID.h Message-ID: <20100609172516.A98982A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 12:25:16 2010 New Revision: 105729 URL: http://llvm.org/viewvc/llvm-project?rev=105729&view=rev Log: Revert this fix for now, since it breaks the build. Modified: lldb/trunk/include/lldb/Core/UUID.h Modified: lldb/trunk/include/lldb/Core/UUID.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=105729&r1=105728&r2=105729&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/UUID.h (original) +++ lldb/trunk/include/lldb/Core/UUID.h Wed Jun 9 12:25:16 2010 @@ -17,8 +17,6 @@ #include "lldb/lldb-private.h" -struct uuid_t; - namespace lldb_private { class UUID From jason at molenda.com Wed Jun 9 13:18:50 2010 From: jason at molenda.com (Jason Molenda) Date: Wed, 9 Jun 2010 11:18:50 -0700 Subject: [Lldb-commits] [lldb] r105714 - in /lldb/trunk/include/lldb: Core/Log.h Core/Mangled.h Core/RegularExpression.h Core/Section.h Core/UUID.h Target/ThreadPlan.h In-Reply-To: References: <20100609085738.89FB12A6C12E@llvm.org> Message-ID: <41A10321-C20B-4D5C-B461-2C42E91409B9@molenda.com> On Jun 9, 2010, at 9:40 AM, Joseph Ranieri wrote: >> Modified: lldb/trunk/include/lldb/Core/UUID.h >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=105714&r1=105713&r2=105714&view=diff >> ============================================================================== >> --- lldb/trunk/include/lldb/Core/UUID.h (original) >> +++ lldb/trunk/include/lldb/Core/UUID.h Wed Jun 9 03:57:38 2010 >> @@ -17,6 +17,8 @@ >> >> #include "lldb/lldb-private.h" >> >> +struct uuid_t; >> + >> namespace lldb_private { >> >> class UUID > > This change seems to have broken the Mac OS X build by redefining > uuid_t as a struct, where it was previously defined in unistd.h as: > > #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) > #ifndef _UUID_T > #define _UUID_T > typedef __darwin_uuid_t uuid_t; > #endif /* _UUID_T */ > #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ > > This is a bit ugly, but perhaps it could be wrapped in #ifndef _UUID_T? This is one of those cases where porting from Mac OS X to anything else may hit some hiccups. The uuid_t definition itself is nothing special, uint8_t [16], but the use of them is probably going to be specific to the Mac. On our platform we tag every binary the linker creates with a 128 bit number. We keep the DWARF debug information in a separate file (it isn't processed by ld) and the same 128 bit number as the binary is encoded in the DWARF. We use these UUIDs to locate the separate DWARF file (the "dSYM"), to tie together matching versions of binary and debug information, and to uniquely identify a binary regardless of file pathnames. It's a handy little system but I don't think other platforms have anything equivalent - we may have code that assumes that UUIDs are always present which needs to be refactored. J From eli.friedman at gmail.com Wed Jun 9 13:23:21 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 18:23:21 -0000 Subject: [Lldb-commits] [lldb] r105736 - /lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Message-ID: <20100609182321.A4F1D2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 13:23:21 2010 New Revision: 105736 URL: http://llvm.org/viewvc/llvm-project?rev=105736&view=rev Log: Add necessary includes. Remove unnecessary assignments to sin_len. Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=105736&r1=105735&r2=105736&view=diff ============================================================================== --- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original) +++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Wed Jun 9 13:23:21 2010 @@ -18,6 +18,8 @@ #include #include #include +#include +#include // C++ Includes // Other libraries and framework includes @@ -419,7 +421,6 @@ struct sockaddr_in sa; ::memset (&sa, 0, sizeof sa); - sa.sin_len = sizeof sa; sa.sin_family = AF_INET; sa.sin_port = htons (listen_port_num); sa.sin_addr.s_addr = htonl (INADDR_ANY); @@ -512,7 +513,6 @@ struct sockaddr_in sa; ::bzero (&sa, sizeof (sa)); - sa.sin_len = sizeof sa; sa.sin_family = AF_INET; sa.sin_port = htons (port); From eli.friedman at gmail.com Wed Jun 9 13:31:39 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 18:31:39 -0000 Subject: [Lldb-commits] [lldb] r105737 - in /lldb/trunk: include/lldb/Interpreter/ScriptInterpreterPython.h source/Interpreter/ScriptInterpreterPython.cpp Message-ID: <20100609183139.108282A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 13:31:38 2010 New Revision: 105737 URL: http://llvm.org/viewvc/llvm-project?rev=105737&view=rev Log: Don't include Python.h in the shared header. Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=105737&r1=105736&r2=105737&view=diff ============================================================================== --- lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h (original) +++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h Wed Jun 9 13:31:38 2010 @@ -14,8 +14,6 @@ #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/Core/InputReader.h" -#include - namespace lldb_private { class ScriptInterpreterPython : public ScriptInterpreter @@ -75,7 +73,7 @@ const char *bytes, size_t bytes_len); - PyObject *m_compiled_module; + void *m_compiled_module; struct termios m_termios; bool m_termios_valid; }; Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=105737&r1=105736&r2=105737&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original) +++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Jun 9 13:31:38 2010 @@ -179,7 +179,7 @@ PyObject *compiled_module = Py_CompileString (embedded_interpreter_string, "embedded_interpreter.py", Py_file_input); - m_compiled_module = compiled_module; + m_compiled_module = static_cast(compiled_module); init_lldb (); @@ -196,7 +196,9 @@ const char *pty_slave_name = GetScriptInterpreterPtyName (); FILE *out_fh = Debugger::GetSharedInstance().GetOutputFileHandle(); - PyObject *pmod = PyImport_ExecCodeModule((char *)"embedded_interpreter", m_compiled_module); + PyObject *pmod = PyImport_ExecCodeModule( + const_cast("embedded_interpreter"), + static_cast(m_compiled_module)); if (pmod != NULL) { PyRun_SimpleString ("ConsoleDict = locals()"); From eli.friedman at gmail.com Wed Jun 9 14:11:31 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 19:11:31 -0000 Subject: [Lldb-commits] [lldb] r105743 - in /lldb/trunk/tools/driver: Driver.cpp IOChannel.cpp Message-ID: <20100609191131.1970F2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 14:11:30 2010 New Revision: 105743 URL: http://llvm.org/viewvc/llvm-project?rev=105743&view=rev Log: Add a few more missing includes. Modified: lldb/trunk/tools/driver/Driver.cpp lldb/trunk/tools/driver/IOChannel.cpp Modified: lldb/trunk/tools/driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=105743&r1=105742&r2=105743&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.cpp (original) +++ lldb/trunk/tools/driver/Driver.cpp Wed Jun 9 14:11:30 2010 @@ -17,6 +17,7 @@ #include #include #include +#include #include Modified: lldb/trunk/tools/driver/IOChannel.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.cpp?rev=105743&r1=105742&r2=105743&view=diff ============================================================================== --- lldb/trunk/tools/driver/IOChannel.cpp (original) +++ lldb/trunk/tools/driver/IOChannel.cpp Wed Jun 9 14:11:30 2010 @@ -20,6 +20,9 @@ #include "lldb/API/SBListener.h" #include "lldb/API/SBStringList.h" +#include +#include + using namespace lldb; typedef std::map PromptMap; From eli.friedman at gmail.com Wed Jun 9 14:26:51 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 19:26:51 -0000 Subject: [Lldb-commits] [lldb] r105746 - /lldb/trunk/include/lldb/lldb-enumerations.h Message-ID: <20100609192651.EAA9B2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 14:26:51 2010 New Revision: 105746 URL: http://llvm.org/viewvc/llvm-project?rev=105746&view=rev Log: Use portable endianness routine from LLVM. Modified: lldb/trunk/include/lldb/lldb-enumerations.h Modified: lldb/trunk/include/lldb/lldb-enumerations.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105746&r1=105745&r2=105746&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-enumerations.h (original) +++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Jun 9 14:26:51 2010 @@ -10,6 +10,8 @@ #ifndef LLDB_enumerations_h_ #define LLDB_enumerations_h_ +#include "llvm/System/Host.h" + namespace lldb { //---------------------------------------------------------------------- @@ -71,18 +73,18 @@ eByteOrderInvalid = 0, eByteOrderLittle = 1234, eByteOrderBig = 4321, - eByteOrderPDP = 3412, -#if defined (__LITTLE_ENDIAN__) - eByteOrderHost = eByteOrderLittle -#elif defined (__BIG_ENDIAN__) - eByteOrderHost = eByteOrderBig -#elif defined (__PDP_ENDIAN__) - eByteOrderHost = eByteOrderPDP -#else -#error unable to detect endianness -#endif + eByteOrderPDP = 3412 } ByteOrder; +inline ByteOrder getHostByteOrder() { + if (llvm::sys::isLittleEndianHost()) + return eByteOrderLittle; + return eByteOrderBig; +} + +// FIXME: Replace uses of eByteOrderHost with getHostByteOrder()! +const ByteOrder eByteOrderHost = getHostByteOrder(); + //---------------------------------------------------------------------- // Register encoding definitions //---------------------------------------------------------------------- From gclayton at apple.com Wed Jun 9 14:36:54 2010 From: gclayton at apple.com (Greg Clayton) Date: Wed, 09 Jun 2010 19:36:54 -0000 Subject: [Lldb-commits] [lldb] r105748 - /lldb/trunk/source/Core/UUID.cpp Message-ID: <20100609193654.B5B2D2A6C12E@llvm.org> Author: gclayton Date: Wed Jun 9 14:36:54 2010 New Revision: 105748 URL: http://llvm.org/viewvc/llvm-project?rev=105748&view=rev Log: For header includes we are currently trying to adopt some aspects of the Google C++ coding guidelines where includes are done as: 1 - the header file for the current source file 2 - C includes 3 - C++ includes 4 - external project includes 5 - current project includes Modified: lldb/trunk/source/Core/UUID.cpp Modified: lldb/trunk/source/Core/UUID.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UUID.cpp?rev=105748&r1=105747&r2=105748&view=diff ============================================================================== --- lldb/trunk/source/Core/UUID.cpp (original) +++ lldb/trunk/source/Core/UUID.cpp Wed Jun 9 14:36:54 2010 @@ -9,13 +9,14 @@ #include "lldb/Core/UUID.h" // C Includes +#include +#include +#include + // C++ Includes // Other libraries and framework includes // Project includes #include "lldb/Core/Stream.h" -#include -#include -#include using namespace lldb_private; From ctice at apple.com Wed Jun 9 15:18:32 2010 From: ctice at apple.com (Caroline Tice) Date: Wed, 9 Jun 2010 13:18:32 -0700 Subject: [Lldb-commits] Patch for embedded Python exit() In-Reply-To: References: Message-ID: Eventually, hopefully, we will use the standalone embedded_interpreter.py file; the difficulty we were working around at the moment was figuring out where/how to reliably put it on our systems to ensure it was really there when users "installed" the lldb framework library. To work around that problem temporarily, we made a copy of the entire file as a string in ScriptInterpteterPython.cpp. We should definitely keep the two in sync. Your patch looks good, and I will commit it for you later today. Thanks! -- Caroline Tice ctice at apple.com On Jun 9, 2010, at 9:32 AM, Joseph Ranieri wrote: > Attached is a patch that makes the embedded Python interpreter handle the 'exit' method correctly. I have applied the fix to the Python script embedded in ScriptInterpreterPython.cpp and embedded_interpreter.py, but I am not sure if anything actually uses the standalone version. > > 'exit' behaves like 'quit', which was already handled, and will close the stdout file handle if called. This would result in the following workflow generating an endless stream of exceptions: > (lldb) script > >>> exit() > (lldb) script > >>> Traceback (most recent call last): > File "embedded_interpreter.py", line 25, in interact > self.read_py_command() > File "embedded_interpreter.py", line 77, in read_py_command > line = self.my_raw_input(prompt) > File "embedded_interpreter.py", line 58, in my_raw_input > line = sys.stdin.readline() > ValueError: I/O operation on closed file > >>> Traceback (most recent call last): > File "embedded_interpreter.py", line 25, in interact > self.read_py_command() > File "embedded_interpreter.py", line 77, in read_py_command > line = self.my_raw_input(prompt) > File "embedded_interpreter.py", line 58, in my_raw_input > line = sys.stdin.readline() > ValueError: I/O operation on closed file > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits From ctice at apple.com Wed Jun 9 15:29:13 2010 From: ctice at apple.com (Caroline Tice) Date: Wed, 9 Jun 2010 13:29:13 -0700 Subject: [Lldb-commits] [lldb] r105724 - /lldb/trunk/source/Core/Args.cpp In-Reply-To: <20100609105923.42E3D2A6C12F@llvm.org> References: <20100609105923.42E3D2A6C12F@llvm.org> Message-ID: Hi Eli, I'm very glad you are so interested in LLDB and taking such an active part to help us in our development. About removing dead code: I don't think this particular case is a problem, but LLDB is still in fairly early development. Sometimes there is dead code that really is dead and probably should be removed, but other times there might be seemingly dead code that was really put there as a reminder of something to write or hook up in the future. Please don't remove seemingly dead code for now. Thanks! -- Caroline Tice ctice at apple.com On Jun 9, 2010, at 3:59 AM, Eli Friedman wrote: > Author: efriedma > Date: Wed Jun 9 05:59:23 2010 > New Revision: 105724 > > URL: http://llvm.org/viewvc/llvm-project?rev=105724&view=rev > Log: > Remove unused class. > > > Modified: > lldb/trunk/source/Core/Args.cpp > > Modified: lldb/trunk/source/Core/Args.cpp > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Args.cpp?rev=105724&r1=105723&r2=105724&view=diff > ============================================================================== > --- lldb/trunk/source/Core/Args.cpp (original) > +++ lldb/trunk/source/Core/Args.cpp Wed Jun 9 05:59:23 2010 > @@ -9,8 +9,7 @@ > > // C Includes > #include > -#include > - > +#include > // C++ Includes > // Other libraries and framework includes > // Project includes > @@ -21,93 +20,6 @@ > #include "lldb/Core/Options.h" > #include "lldb/Interpreter/CommandReturnObject.h" > > -namespace lldb_private { > - > -class Tokenizer > -{ > -public: > - Tokenizer (const char *separator_chars = NULL) : > - m_tokenizer(NULL) > - { > - m_tokenizer = ::tok_init (separator_chars); > - } > - > - ~Tokenizer () > - { > - if (m_tokenizer) > - { > - ::tok_end (m_tokenizer); > - m_tokenizer = NULL; > - } > - } > - > - void > - Reset () > - { > - assert (m_tokenizer); > - ::tok_reset (m_tokenizer); > - } > - > - int > - TokenizeLineInfo (const ::LineInfo *line_info) > - { > - assert (m_tokenizer); > - return ::tok_line (m_tokenizer, > - line_info, > - &m_argc, > - &m_argv, > - &m_cursor_arg_index, > - &m_cursor_arg_offset); > - } > - > - int > - TokenizeCString (const char *cstr) > - { > - assert (m_tokenizer); > - m_cursor_arg_index = -1; > - m_cursor_arg_offset = -1; > - return ::tok_str (m_tokenizer, > - cstr, > - &m_argc, > - &m_argv); > - } > - > - > - int > - GetArgCount () const > - { > - return m_argc; > - } > - > - const char ** > - GetArgVector () const > - { > - return m_argv; > - } > - > - int > - GetCursoreArgIndex () const > - { > - return m_cursor_arg_index; > - } > - > - int > - GetCursoreArgOffset () const > - { > - return m_cursor_arg_offset; > - } > - > - > -protected: > - struct tokenizer* m_tokenizer; > - const char **m_argv; > - int m_argc; > - int m_cursor_arg_index; > - int m_cursor_arg_offset; > -}; > - > -} // namespace lldb_private > - > using namespace lldb; > using namespace lldb_private; > > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/lldb-commits/attachments/20100609/52aa79b8/attachment-0001.html From eli.friedman at gmail.com Wed Jun 9 15:38:24 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 9 Jun 2010 13:38:24 -0700 Subject: [Lldb-commits] [lldb] r105724 - /lldb/trunk/source/Core/Args.cpp In-Reply-To: References: <20100609105923.42E3D2A6C12F@llvm.org> Message-ID: On Wed, Jun 9, 2010 at 1:29 PM, Caroline Tice wrote: > Hi Eli, > > I'm very glad you are so interested in LLDB and taking such an active part > to help us in our > development. ?About removing dead code: ?I don't think this particular case > is a problem, but LLDB is > still in fairly early development. ?Sometimes there is dead code that really > is dead and probably > should be removed, but other times there might be seemingly dead code that > was really put there > as a reminder of something to write or hook up in the future. ?Please don't > remove seemingly dead > code for now. ?Thanks! Okay, I'll try to be more careful about that in the future. -Eli > -- Caroline Tice > ctice at apple.com > On Jun 9, 2010, at 3:59 AM, Eli Friedman wrote: > > Author: efriedma > Date: Wed Jun ?9 05:59:23 2010 > New Revision: 105724 > > URL: http://llvm.org/viewvc/llvm-project?rev=105724&view=rev > Log: > Remove unused class. > > > Modified: > ???lldb/trunk/source/Core/Args.cpp > > Modified: lldb/trunk/source/Core/Args.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Args.cpp?rev=105724&r1=105723&r2=105724&view=diff > ============================================================================== > --- lldb/trunk/source/Core/Args.cpp (original) > +++ lldb/trunk/source/Core/Args.cpp Wed Jun ?9 05:59:23 2010 > @@ -9,8 +9,7 @@ > > // C Includes > #include > -#include > - > +#include > // C++ Includes > // Other libraries and framework includes > // Project includes > @@ -21,93 +20,6 @@ > #include "lldb/Core/Options.h" > #include "lldb/Interpreter/CommandReturnObject.h" > > -namespace lldb_private { > - > -class Tokenizer > -{ > -public: > - ???Tokenizer (const char *separator_chars = NULL) : > - ???????m_tokenizer(NULL) > - ???{ > - ???????m_tokenizer = ::tok_init (separator_chars); > - ???} > - > - ???~Tokenizer () > - ???{ > - ???????if (m_tokenizer) > - ???????{ > - ???????????::tok_end (m_tokenizer); > - ???????????m_tokenizer = NULL; > - ???????} > - ???} > - > - ???void > - ???Reset () > - ???{ > - ???????assert (m_tokenizer); > - ???????::tok_reset (m_tokenizer); > - ???} > - > - ???int > - ???TokenizeLineInfo (const ::LineInfo *line_info) > - ???{ > - ???????assert (m_tokenizer); > - ???????return ::tok_line (m_tokenizer, > - ??????????????????????????line_info, > - ??????????????????????????&m_argc, > - ??????????????????????????&m_argv, > - ??????????????????????????&m_cursor_arg_index, > - ??????????????????????????&m_cursor_arg_offset); > - ???} > - > - ???int > - ???TokenizeCString (const char *cstr) > - ???{ > - ???????assert (m_tokenizer); > - ???????m_cursor_arg_index = -1; > - ???????m_cursor_arg_offset = -1; > - ???????return ::tok_str (m_tokenizer, > - ?????????????????????????cstr, > - ?????????????????????????&m_argc, > - ?????????????????????????&m_argv); > - ???} > - > - > - ???int > - ???GetArgCount () const > - ???{ > - ???????return m_argc; > - ???} > - > - ???const char ** > - ???GetArgVector () const > - ???{ > - ???????return m_argv; > - ???} > - > - ???int > - ???GetCursoreArgIndex () const > - ???{ > - ???????return m_cursor_arg_index; > - ???} > - > - ???int > - ???GetCursoreArgOffset () const > - ???{ > - ???????return m_cursor_arg_offset; > - ???} > - > - > -protected: > - ???struct tokenizer* m_tokenizer; > - ???const char **m_argv; > - ???int m_argc; > - ???int m_cursor_arg_index; > - ???int m_cursor_arg_offset; > -}; > - > -} // namespace lldb_private > - > using namespace lldb; > using namespace lldb_private; > > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits > > From eli.friedman at gmail.com Wed Jun 9 15:52:14 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 9 Jun 2010 13:52:14 -0700 Subject: [Lldb-commits] Request for moving PseudoTerminal.h In-Reply-To: References: Message-ID: On Wed, Jun 9, 2010 at 4:08 AM, Eli Friedman wrote: > Hi all, > > Could someone move PseudoTerminal.h to > include/lldb/Utility/PseudoTerminal.h (or somewhere else public)? ?I'd > do it myself, but I don't want to break the XCode build. Oh, and also, can someone move source/Symbol/SymbolVendor.mm to source/Symbol/SymbolVendor.cpp? -Eli From jmolenda at apple.com Wed Jun 9 16:28:42 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 21:28:42 -0000 Subject: [Lldb-commits] [lldb] r105753 - in /lldb/trunk: include/lldb/Interpreter/ScriptInterpreter.h include/lldb/Utility/ include/lldb/Utility/PseudoTerminal.h source/Interpreter/ScriptInterpreter.cpp source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp source/Utility/PseudoTerminal.cpp source/Utility/PseudoTerminal.h tools/driver/Driver.h Message-ID: <20100609212842.F02792A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 16:28:42 2010 New Revision: 105753 URL: http://llvm.org/viewvc/llvm-project?rev=105753&view=rev Log: Move source/Utility/PseudoTerminal.h into include/lldb/Utility. The top of the header file seems to indicate that this was intended to be over at include/lldb/Core but we should be in line with the .cpp file's location so it's include/lldb/Utility for now. Added: lldb/trunk/include/lldb/Utility/ lldb/trunk/include/lldb/Utility/PseudoTerminal.h - copied unchanged from r105750, lldb/trunk/source/Utility/PseudoTerminal.h Removed: lldb/trunk/source/Utility/PseudoTerminal.h Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h lldb/trunk/source/Interpreter/ScriptInterpreter.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Utility/PseudoTerminal.cpp lldb/trunk/tools/driver/Driver.h Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Wed Jun 9 16:28:42 2010 @@ -12,7 +12,7 @@ #include "lldb/lldb-private.h" #include "lldb/Core/Broadcaster.h" -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" namespace lldb_private { Modified: lldb/trunk/source/Interpreter/ScriptInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreter.cpp?rev=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/ScriptInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/ScriptInterpreter.cpp Wed Jun 9 16:28:42 2010 @@ -17,8 +17,7 @@ #include "lldb/Core/Stream.h" #include "lldb/Core/StringList.h" #include "lldb/Interpreter/CommandReturnObject.h" - -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" using namespace lldb; using namespace lldb_private; 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=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Wed Jun 9 16:28:42 2010 @@ -37,7 +37,7 @@ #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/Target.h" #include "lldb/Target/TargetList.h" -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" #if defined (__arm__) 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=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Jun 9 16:28:42 2010 @@ -42,7 +42,7 @@ #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/Target.h" #include "lldb/Target/TargetList.h" -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" // Project includes #include "lldb/Host/Host.h" Modified: lldb/trunk/source/Utility/PseudoTerminal.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/PseudoTerminal.cpp?rev=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/source/Utility/PseudoTerminal.cpp (original) +++ lldb/trunk/source/Utility/PseudoTerminal.cpp Wed Jun 9 16:28:42 2010 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" #include #include Removed: lldb/trunk/source/Utility/PseudoTerminal.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/PseudoTerminal.h?rev=105752&view=auto ============================================================================== --- lldb/trunk/source/Utility/PseudoTerminal.h (original) +++ lldb/trunk/source/Utility/PseudoTerminal.h (removed) @@ -1,267 +0,0 @@ -//===-- PseudoTerminal.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef liblldb_PseudoTerminal_h_ -#define liblldb_PseudoTerminal_h_ -#if defined(__cplusplus) - - -#include -#include -#include - -#include "lldb/lldb-defines.h" - -namespace lldb_utility { - -//---------------------------------------------------------------------- -/// @class PseudoTerminal PseudoTerminal.h "lldb/Core/PseudoTerminal.h" -/// @brief A pseudo terminal helper class. -/// -/// The pseudo terminal class abtracts the use of pseudo terminals on -/// the host system. -//---------------------------------------------------------------------- -class PseudoTerminal -{ -public: - enum - { - invalid_fd = -1, ///< Invalid file descriptor value - }; - - //------------------------------------------------------------------ - /// Default constructor - /// - /// Constructs this object with invalid master and slave file - /// descriptors. - //------------------------------------------------------------------ - PseudoTerminal (); - - //------------------------------------------------------------------ - /// Destructor - /// - /// The destructor will close the master and slave file descriptors - /// if they are valid and ownwership has not been released using - /// one of: - /// @li PseudoTerminal::ReleaseMasterFileDescriptor() - /// @li PseudoTerminal::ReleaseSaveFileDescriptor() - //------------------------------------------------------------------ - ~PseudoTerminal (); - - //------------------------------------------------------------------ - /// Close the master file descriptor if it is valid. - //------------------------------------------------------------------ - void - CloseMasterFileDescriptor (); - - //------------------------------------------------------------------ - /// Close the slave file descriptor if it is valid. - //------------------------------------------------------------------ - void - CloseSlaveFileDescriptor (); - - //------------------------------------------------------------------ - /// Fork a child process that uses pseudo terminals for its stdio. - /// - /// In the parent process, a call to this function results in a pid - /// being returned. If the pid is valid, the master file descriptor - /// can be used for read/write access to stdio of the child process. - /// - /// In the child process the stdin/stdout/stderr will already be - /// routed to the slave pseudo terminal and the master file - /// descriptor will be closed as it is no longer needed by the child - /// process. - /// - /// This class will close the file descriptors for the master/slave - /// when the destructor is called. The file handles can be released - /// using either: - /// @li PseudoTerminal::ReleaseMasterFileDescriptor() - /// @li PseudoTerminal::ReleaseSaveFileDescriptor() - /// - /// @param[out] error - /// An pointer to an error that can describe any errors that - /// occur. This can be NULL if no error status is desired. - /// - /// @return - /// @li \b Parent process: a child process ID that is greater - /// than zero, or -1 if the fork fails. - /// @li \b Child process: zero. - //------------------------------------------------------------------ - pid_t - Fork (char *error_str, size_t error_len); - - //------------------------------------------------------------------ - /// The master file descriptor accessor. - /// - /// This object retains ownership of the master file descriptor when - /// this accessor is used. Users can call the member function - /// PseudoTerminal::ReleaseMasterFileDescriptor() if this - /// object should release ownership of the slave file descriptor. - /// - /// @return - /// The master file descriptor, or PseudoTerminal::invalid_fd - /// if the master file descriptor is not currently valid. - /// - /// @see PseudoTerminal::ReleaseMasterFileDescriptor() - //------------------------------------------------------------------ - int - GetMasterFileDescriptor () const; - - //------------------------------------------------------------------ - /// The slave file descriptor accessor. - /// - /// This object retains ownership of the slave file descriptor when - /// this accessor is used. Users can call the member function - /// PseudoTerminal::ReleaseSlaveFileDescriptor() if this - /// object should release ownership of the slave file descriptor. - /// - /// @return - /// The slave file descriptor, or PseudoTerminal::invalid_fd - /// if the slave file descriptor is not currently valid. - /// - /// @see PseudoTerminal::ReleaseSlaveFileDescriptor() - //------------------------------------------------------------------ - int - GetSlaveFileDescriptor () const; - - //------------------------------------------------------------------ - /// Get the name of the slave pseudo terminal. - /// - /// A master pseudo terminal should already be valid prior to - /// calling this function. - /// - /// @param[out] error - /// An pointer to an error that can describe any errors that - /// occur. This can be NULL if no error status is desired. - /// - /// @return - /// The name of the slave pseudo terminal as a NULL terminated - /// C. This string that comes from static memory, so a copy of - /// the string should be made as subsequent calls can change - /// this value. NULL is returned if this object doesn't have - /// a valid master pseudo terminal opened or if the call to - /// \c ptsname() fails. - /// - /// @see PseudoTerminal::OpenFirstAvailableMaster() - //------------------------------------------------------------------ - const char* - GetSlaveName (char *error_str, size_t error_len) const; - - //------------------------------------------------------------------ - /// Open the first available pseudo terminal. - /// - /// Opens the first available pseudo terminal with \a oflag as the - /// permissions. The opened master file descriptor is stored in this - /// object and can be accessed by calling the - /// PseudoTerminal::GetMasterFileDescriptor() accessor. Clients - /// can call the PseudoTerminal::ReleaseMasterFileDescriptor() - /// accessor function if they wish to use the master file descriptor - /// beyond the lifespan of this object. - /// - /// If this object still has a valid master file descriptor when its - /// destructor is called, it will close it. - /// - /// @param[in] oflag - /// Flags to use when calling \c posix_openpt(\a oflag). - /// A value of "O_RDWR|O_NOCTTY" is suggested. - /// - /// @param[out] error - /// An pointer to an error that can describe any errors that - /// occur. This can be NULL if no error status is desired. - /// - /// @return - /// @li \b true when the a master files descriptor is - /// successfully opened. - /// @li \b false if anything goes wrong. - /// - /// @see PseudoTerminal::GetMasterFileDescriptor() - /// @see PseudoTerminal::ReleaseMasterFileDescriptor() - //------------------------------------------------------------------ - bool - OpenFirstAvailableMaster (int oflag, char *error_str, size_t error_len); - - //------------------------------------------------------------------ - /// Open the slave for the current master pseudo terminal. - /// - /// A master pseudo terminal should already be valid prior to - /// calling this function. The opened slave file descriptor is - /// stored in this object and can be accessed by calling the - /// PseudoTerminal::GetSlaveFileDescriptor() accessor. Clients - /// can call the PseudoTerminal::ReleaseSlaveFileDescriptor() - /// accessor function if they wish to use the slave file descriptor - /// beyond the lifespan of this object. - /// - /// If this object still has a valid slave file descriptor when its - /// destructor is called, it will close it. - /// - /// @param[in] oflag - /// Flags to use when calling \c open(\a oflag). - /// - /// @param[out] error - /// An pointer to an error that can describe any errors that - /// occur. This can be NULL if no error status is desired. - /// - /// @return - /// @li \b true when the a master files descriptor is - /// successfully opened. - /// @li \b false if anything goes wrong. - /// - /// @see PseudoTerminal::OpenFirstAvailableMaster() - /// @see PseudoTerminal::GetSlaveFileDescriptor() - /// @see PseudoTerminal::ReleaseSlaveFileDescriptor() - //------------------------------------------------------------------ - bool - OpenSlave (int oflag, char *error_str, size_t error_len); - - //------------------------------------------------------------------ - /// Release the master file descriptor. - /// - /// Releases ownership of the master pseudo terminal file descriptor - /// without closing it. The destructor for this class will close the - /// master file descriptor if the ownership isn't released using this - /// call and the master file descriptor has been opened. - /// - /// @return - /// The master file descriptor, or PseudoTerminal::invalid_fd - /// if the mast file descriptor is not currently valid. - //------------------------------------------------------------------ - int - ReleaseMasterFileDescriptor (); - - //------------------------------------------------------------------ - /// Release the slave file descriptor. - /// - /// Release ownership of the slave pseudo terminal file descriptor - /// without closing it. The destructor for this class will close the - /// slave file descriptor if the ownership isn't released using this - /// call and the slave file descriptor has been opened. - /// - /// @return - /// The slave file descriptor, or PseudoTerminal::invalid_fd - /// if the slave file descriptor is not currently valid. - //------------------------------------------------------------------ - int - ReleaseSlaveFileDescriptor (); - -protected: - //------------------------------------------------------------------ - // Member variables - //------------------------------------------------------------------ - int m_master_fd; ///< The file descriptor for the master. - int m_slave_fd; ///< The file descriptor for the slave. - -private: - DISALLOW_COPY_AND_ASSIGN (PseudoTerminal); - -}; - -} // namespace lldb - -#endif // #if defined(__cplusplus) -#endif // #ifndef liblldb_PseudoTerminal_h_ Modified: lldb/trunk/tools/driver/Driver.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.h?rev=105753&r1=105752&r2=105753&view=diff ============================================================================== --- lldb/trunk/tools/driver/Driver.h (original) +++ lldb/trunk/tools/driver/Driver.h Wed Jun 9 16:28:42 2010 @@ -10,7 +10,7 @@ #ifndef lldb_Driver_h_ #define lldb_Driver_h_ -#include "PseudoTerminal.h" +#include "lldb/Utility/PseudoTerminal.h" #include #include From eli.friedman at gmail.com Wed Jun 9 16:39:50 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 21:39:50 -0000 Subject: [Lldb-commits] [lldb] r105754 - /lldb/trunk/include/lldb/Utility/PseudoTerminal.h Message-ID: <20100609213950.320892A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 16:39:50 2010 New Revision: 105754 URL: http://llvm.org/viewvc/llvm-project?rev=105754&view=rev Log: Warning fix. Modified: lldb/trunk/include/lldb/Utility/PseudoTerminal.h Modified: lldb/trunk/include/lldb/Utility/PseudoTerminal.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/PseudoTerminal.h?rev=105754&r1=105753&r2=105754&view=diff ============================================================================== --- lldb/trunk/include/lldb/Utility/PseudoTerminal.h (original) +++ lldb/trunk/include/lldb/Utility/PseudoTerminal.h Wed Jun 9 16:39:50 2010 @@ -32,7 +32,7 @@ public: enum { - invalid_fd = -1, ///< Invalid file descriptor value + invalid_fd = -1 ///< Invalid file descriptor value }; //------------------------------------------------------------------ From jmolenda at apple.com Wed Jun 9 16:48:33 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 21:48:33 -0000 Subject: [Lldb-commits] [lldb] r105755 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj source/Symbol/SymbolVendor.cpp source/Symbol/SymbolVendor.mm Message-ID: <20100609214833.9FE302A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 16:48:33 2010 New Revision: 105755 URL: http://llvm.org/viewvc/llvm-project?rev=105755&view=rev Log: SymbolVendor.mm doesn't seem to have any Objective-C in it; move to SymbolVendor.cpp. Xcode project file updated. Added: lldb/trunk/source/Symbol/SymbolVendor.cpp - copied unchanged from r105752, lldb/trunk/source/Symbol/SymbolVendor.mm Removed: lldb/trunk/source/Symbol/SymbolVendor.mm Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105755&r1=105754&r2=105755&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jun 9 16:48:33 2010 @@ -176,7 +176,6 @@ 26D5B0D811B07550009A862E /* Symbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */; }; 26D5B0D911B07550009A862E /* SymbolContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */; }; 26D5B0DA11B07550009A862E /* SymbolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */; }; - 26D5B0DB11B07550009A862E /* SymbolVendor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1E10F1B8EC00F91463 /* SymbolVendor.mm */; }; 26D5B0DC11B07550009A862E /* Symtab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */; }; 26D5B0DD11B07550009A862E /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2010F1B8EC00F91463 /* Type.cpp */; }; 26D5B0DE11B07550009A862E /* TypeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2110F1B8EC00F91463 /* TypeList.cpp */; }; @@ -351,6 +350,7 @@ 9AC70390117675270086C050 /* SBInstructionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC7038F117675270086C050 /* SBInstructionList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703AE117675410086C050 /* SBInstruction.cpp */; }; 9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703B0117675490086C050 /* SBInstructionList.cpp */; }; + AF94005911C03F6500085DB9 /* SymbolVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94005711C03F6500085DB9 /* SymbolVendor.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -824,7 +824,6 @@ 26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symbol.cpp; path = source/Symbol/Symbol.cpp; sourceTree = ""; }; 26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolContext.cpp; path = source/Symbol/SymbolContext.cpp; sourceTree = ""; }; 26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFile.cpp; path = source/Symbol/SymbolFile.cpp; sourceTree = ""; }; - 26BC7F1E10F1B8EC00F91463 /* SymbolVendor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SymbolVendor.mm; path = source/Symbol/SymbolVendor.mm; sourceTree = ""; }; 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symtab.cpp; path = source/Symbol/Symtab.cpp; sourceTree = ""; }; 26BC7F2010F1B8EC00F91463 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = source/Symbol/Type.cpp; sourceTree = ""; }; 26BC7F2110F1B8EC00F91463 /* TypeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeList.cpp; path = source/Symbol/TypeList.cpp; sourceTree = ""; }; @@ -1032,6 +1031,7 @@ 9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpoint.h; path = include/lldb/API/SBBreakpoint.h; sourceTree = ""; }; 9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpointLocation.h; path = include/lldb/API/SBBreakpointLocation.h; sourceTree = ""; }; 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointLocation.cpp; path = source/API/SBBreakpointLocation.cpp; sourceTree = ""; }; + AF94005711C03F6500085DB9 /* SymbolVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolVendor.cpp; path = source/Symbol/SymbolVendor.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1664,6 +1664,7 @@ 26BC7C4B10F1B6C100F91463 /* Symbol */ = { isa = PBXGroup; children = ( + AF94005711C03F6500085DB9 /* SymbolVendor.cpp */, 26BC7C5510F1B6E900F91463 /* Block.h */, 26BC7F1310F1B8EC00F91463 /* Block.cpp */, 26BC7C5610F1B6E900F91463 /* ClangASTContext.h */, @@ -1691,7 +1692,6 @@ 26BC7C6210F1B6E900F91463 /* SymbolFile.h */, 26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */, 26BC7C6310F1B6E900F91463 /* SymbolVendor.h */, - 26BC7F1E10F1B8EC00F91463 /* SymbolVendor.mm */, 26BC7C6410F1B6E900F91463 /* Symtab.h */, 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */, 26BC7C6510F1B6E900F91463 /* Type.h */, @@ -2457,7 +2457,6 @@ 26D5B0D811B07550009A862E /* Symbol.cpp in Sources */, 26D5B0D911B07550009A862E /* SymbolContext.cpp in Sources */, 26D5B0DA11B07550009A862E /* SymbolFile.cpp in Sources */, - 26D5B0DB11B07550009A862E /* SymbolVendor.mm in Sources */, 26D5B0DC11B07550009A862E /* Symtab.cpp in Sources */, 26D5B0DD11B07550009A862E /* Type.cpp in Sources */, 26D5B0DE11B07550009A862E /* TypeList.cpp in Sources */, @@ -2622,6 +2621,7 @@ 49F1A74611B3388F003ED505 /* ClangExpressionDeclMap.cpp in Sources */, 49D7072911B5AD11001AD875 /* ClangASTSource.cpp in Sources */, 4CA9637B11B6E99A00780E28 /* CommandObjectApropos.cpp in Sources */, + AF94005911C03F6500085DB9 /* SymbolVendor.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Removed: lldb/trunk/source/Symbol/SymbolVendor.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolVendor.mm?rev=105754&view=auto ============================================================================== --- lldb/trunk/source/Symbol/SymbolVendor.mm (original) +++ lldb/trunk/source/Symbol/SymbolVendor.mm (removed) @@ -1,386 +0,0 @@ -//===-- SymbolVendor.mm -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "lldb/Symbol/SymbolVendor.h" - -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Module.h" -#include "lldb/Core/PluginManager.h" -#include "lldb/Symbol/ObjectFile.h" -#include "lldb/Symbol/SymbolFile.h" - -using namespace lldb; -using namespace lldb_private; - - -//---------------------------------------------------------------------- -// FindPlugin -// -// Platforms can register a callback to use when creating symbol -// vendors to allow for complex debug information file setups, and to -// also allow for finding separate debug information files. -//---------------------------------------------------------------------- -SymbolVendor* -SymbolVendor::FindPlugin (Module* module) -{ - std::auto_ptr instance_ap; - //---------------------------------------------------------------------- - // We currently only have one debug symbol parser... - //---------------------------------------------------------------------- - SymbolVendorCreateInstance create_callback; - for (uint32_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != NULL; ++idx) - { - instance_ap.reset(create_callback(module)); - - if (instance_ap.get()) - { - // TODO: make sure this symbol vendor is what we want. We - // currently are just returning the first one we find, but - // we may want to call this function only when we have our - // main executable module and then give all symbol vendor - // plug-ins a chance to compete for who wins. - return instance_ap.release(); - } - } - // The default implementation just tries to create debug information using the - // file representation for the module. - instance_ap.reset(new SymbolVendor(module)); - if (instance_ap.get()) - instance_ap->AddSymbolFileRepresendation(module->GetObjectFile()); - return instance_ap.release(); -} - -//---------------------------------------------------------------------- -// SymbolVendor constructor -//---------------------------------------------------------------------- -SymbolVendor::SymbolVendor(Module *module) : - ModuleChild(module), - m_mutex (Mutex::eMutexTypeRecursive), - m_type_list(), - m_compile_units(), - m_sym_file_ap() -{ - ObjectFile * objfile = module->GetObjectFile(); - ConstString target_triple; - if (objfile && objfile->GetTargetTriple(target_triple)) - { - m_type_list.GetClangASTContext().SetTargetTriple (target_triple.AsCString()); - } -} - -//---------------------------------------------------------------------- -// Destructor -//---------------------------------------------------------------------- -SymbolVendor::~SymbolVendor() -{ -} - -//---------------------------------------------------------------------- -// Add a represantion given an object file. -//---------------------------------------------------------------------- -void -SymbolVendor::AddSymbolFileRepresendation(ObjectFile *obj_file) -{ - Mutex::Locker locker(m_mutex); - if (obj_file != NULL) - m_sym_file_ap.reset(SymbolFile::FindPlugin(obj_file)); -} - -bool -SymbolVendor::SetCompileUnitAtIndex -(CompUnitSP& cu, uint32_t idx) -{ - Mutex::Locker locker(m_mutex); - const uint32_t num_compile_units = GetNumCompileUnits(); - if (idx < num_compile_units) - { - // Fire off an assertion if this compile unit already exists for now. - // The partial parsing should take care of only setting the compile - // unit once, so if this assertion fails, we need to make sure that - // we don't have a race condition, or have a second parse of the same - // compile unit. - assert(m_compile_units[idx].get() == NULL); - m_compile_units[idx] = cu; - return true; - } - return false; -} - -uint32_t -SymbolVendor::GetNumCompileUnits() -{ - Mutex::Locker locker(m_mutex); - if (m_compile_units.empty()) - { - if (m_sym_file_ap.get()) - { - // Resize our array of compile unit shared pointers -- which will - // each remain NULL until someone asks for the actual compile unit - // information. When this happens, the symbol file will be asked - // to parse this compile unit information. - m_compile_units.resize(m_sym_file_ap->GetNumCompileUnits()); - } - } - return m_compile_units.size(); -} - -size_t -SymbolVendor::ParseCompileUnitFunctions (const SymbolContext &sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseCompileUnitFunctions(sc); - return 0; -} - -bool -SymbolVendor::ParseCompileUnitLineTable (const SymbolContext &sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseCompileUnitLineTable(sc); - return false; -} - -bool -SymbolVendor::ParseCompileUnitSupportFiles (const SymbolContext& sc, FileSpecList& support_files) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseCompileUnitSupportFiles(sc, support_files); - return false; -} - -size_t -SymbolVendor::ParseFunctionBlocks (const SymbolContext &sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseFunctionBlocks(sc); - return 0; -} - -size_t -SymbolVendor::ParseTypes (const SymbolContext &sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseTypes(sc); - return 0; -} - -size_t -SymbolVendor::ParseVariablesForContext (const SymbolContext& sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ParseVariablesForContext(sc); - return 0; -} - -Type* -SymbolVendor::ResolveTypeUID(lldb::user_id_t type_uid) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ResolveTypeUID(type_uid); - return NULL; -} - - -uint32_t -SymbolVendor::ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ResolveSymbolContext(so_addr, resolve_scope, sc); - return 0; -} - -uint32_t -SymbolVendor::ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->ResolveSymbolContext(file_spec, line, check_inlines, resolve_scope, sc_list); - return 0; -} - -uint32_t -SymbolVendor::FindGlobalVariables (const ConstString &name, bool append, uint32_t max_matches, VariableList& variables) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->FindGlobalVariables(name, append, max_matches, variables); - return 0; -} - -uint32_t -SymbolVendor::FindGlobalVariables (const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->FindGlobalVariables(regex, append, max_matches, variables); - return 0; -} - -uint32_t -SymbolVendor::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->FindFunctions(name, append, sc_list); - return 0; -} - -uint32_t -SymbolVendor::FindFunctions(const RegularExpression& regex, bool append, SymbolContextList& sc_list) -{ - Mutex::Locker locker(m_mutex); - if (m_sym_file_ap.get()) - return m_sym_file_ap->FindFunctions(regex, append, sc_list); - return 0; -} - - - -//uint32_t -//SymbolVendor::FindTypes(const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types) -//{ -// Mutex::Locker locker(m_mutex); -// if (m_sym_file_ap.get()) -// { -// lldb::user_id_t udt_uid = LLDB_INVALID_UID; -// if (encoding == Type::user_defined_type) -// udt_uid = UserDefType::GetUserDefTypeUID(udt_name); -// -// return m_sym_file_ap->FindTypes(sc, name, append, max_matches, encoding, udt_uid, types); -// } -// return 0; -//} -// -//uint32_t -//SymbolVendor::FindTypes(const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types) -//{ -// Mutex::Locker locker(m_mutex); -// if (m_sym_file_ap.get()) -// { -// lldb::user_id_t udt_uid = LLDB_INVALID_UID; -// -// if (encoding == Type::user_defined_type) -// udt_uid = UserDefType::GetUserDefTypeUID(udt_name); -// -// return m_sym_file_ap->FindTypes(sc, regex, append, max_matches, encoding, udt_uid, types); -// } -// return 0; -//} - -void -SymbolVendor::Dump(Stream *s) -{ - Mutex::Locker locker(m_mutex); - bool show_context = false; - - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); - s->Indent(); - s->PutCString("SymbolVendor"); - if (m_sym_file_ap.get()) - { - ObjectFile *objfile = m_sym_file_ap->GetObjectFile(); - if (objfile) - { - const FileSpec &objfile_file_spec = objfile->GetFileSpec(); - if (objfile_file_spec) - { - s->PutCString(" ("); - objfile_file_spec.Dump(s); - s->PutChar(')'); - } - } - } - s->EOL(); - s->IndentMore(); - m_type_list.Dump(s, show_context); - - CompileUnitConstIter cu_pos, cu_end; - cu_end = m_compile_units.end(); - for (cu_pos = m_compile_units.begin(); cu_pos != cu_end; ++cu_pos) - { - // We currently only dump the compile units that have been parsed - if (cu_pos->get()) - (*cu_pos)->Dump(s, show_context); - } - - s->IndentLess(); - -} - -CompUnitSP -SymbolVendor::GetCompileUnitAtIndex(uint32_t idx) -{ - Mutex::Locker locker(m_mutex); - CompUnitSP cu_sp; - const uint32_t num_compile_units = GetNumCompileUnits(); - if (idx < num_compile_units) - { - cu_sp = m_compile_units[idx]; - if (cu_sp.get() == NULL) - { - m_compile_units[idx] = m_sym_file_ap->ParseCompileUnitAtIndex(idx); - cu_sp = m_compile_units[idx]; - } - } - return cu_sp; -} - - -//------------------------------------------------------------------ -// PluginInterface protocol -//------------------------------------------------------------------ -const char * -SymbolVendor::GetPluginName() -{ - return "SymbolVendor"; -} - -const char * -SymbolVendor::GetShortPluginName() -{ - return "vendor-default"; -} - -uint32_t -SymbolVendor::GetPluginVersion() -{ - return 1; -} - -void -SymbolVendor::GetPluginCommandHelp (const char *command, Stream *strm) -{ -} - -Error -SymbolVendor::ExecutePluginCommand (Args &command, Stream *strm) -{ - Error error; - error.SetErrorString("No plug-in command are currently supported."); - return error; -} - -Log * -SymbolVendor::EnablePluginLogging (Stream *strm, Args &command) -{ - return NULL; -} - - From jmolenda at apple.com Wed Jun 9 16:49:27 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 9 Jun 2010 14:49:27 -0700 Subject: [Lldb-commits] Request for moving PseudoTerminal.h In-Reply-To: References: Message-ID: <80ACB0FF-9EC6-4208-90B3-62ACEC85D676@apple.com> On Jun 9, 2010, at 1:52 PM, Eli Friedman wrote: > On Wed, Jun 9, 2010 at 4:08 AM, Eli Friedman wrote: >> Hi all, >> >> Could someone move PseudoTerminal.h to >> include/lldb/Utility/PseudoTerminal.h (or somewhere else public)? I'd >> do it myself, but I don't want to break the XCode build. > > Oh, and also, can someone move source/Symbol/SymbolVendor.mm to > source/Symbol/SymbolVendor.cpp? Done. Normally the .mm extension indicates that the file is a mix of Objective-C and C++ ("Objective-C++") but in this case it's straight C++. J From jmolenda at apple.com Wed Jun 9 16:56:00 2010 From: jmolenda at apple.com (Jason Molenda) Date: Wed, 09 Jun 2010 21:56:00 -0000 Subject: [Lldb-commits] [lldb] r105756 - in /lldb/trunk/source/Interpreter: ScriptInterpreterPython.cpp embedded_interpreter.py Message-ID: <20100609215600.A50C92A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 16:56:00 2010 New Revision: 105756 URL: http://llvm.org/viewvc/llvm-project?rev=105756&view=rev Log: Committing patch from Joseph Ranieri to handle 'exit()' the same as 'quit()' in the python script environment. Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp lldb/trunk/source/Interpreter/embedded_interpreter.py Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=105756&r1=105755&r2=105756&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original) +++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Jun 9 16:56:00 2010 @@ -88,7 +88,7 @@ # Check the input string to see if it was the quit\n\ # command. If so, intercept it, so that it doesn't\n\ # close stdin on us!\n\ - if (temp_str.lower() == \"quit()\"):\n\ + if (temp_str.lower() == \"quit()\" or temp_str.lower() == \"exit()\"):\n\ self.loop_exit = True\n\ in_str = \"raise SystemExit \"\n\ return in_str\n\ Modified: lldb/trunk/source/Interpreter/embedded_interpreter.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/embedded_interpreter.py?rev=105756&r1=105755&r2=105756&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/embedded_interpreter.py (original) +++ lldb/trunk/source/Interpreter/embedded_interpreter.py Wed Jun 9 16:56:00 2010 @@ -45,7 +45,7 @@ # Check the input string to see if it was the quit # command. If so, intercept it, so that it doesn't # close stdin on us! - if (temp_str.lower() == "quit()"): + if (temp_str.lower() == "quit()" or temp_str.lower() == "exit()"): self.loop_exit = True in_str = "raise SystemExit " return in_str From eli.friedman at gmail.com Wed Jun 9 17:08:29 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 09 Jun 2010 22:08:29 -0000 Subject: [Lldb-commits] [lldb] r105757 - /lldb/trunk/source/Interpreter/CommandInterpreter.cpp Message-ID: <20100609220829.DA2022A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 17:08:29 2010 New Revision: 105757 URL: http://llvm.org/viewvc/llvm-project?rev=105757&view=rev Log: Fix include path. Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=105757&r1=105756&r2=105757&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Wed Jun 9 17:08:29 2010 @@ -31,7 +31,7 @@ #include "CommandObjectMemory.h" #include "CommandObjectProcess.h" #include "CommandObjectQuit.h" -#include "CommandObjectRegexCommand.h" +#include "lldb/Interpreter/CommandObjectRegexCommand.h" #include "CommandObjectRegister.h" #include "CommandObjectRemove.h" #include "CommandObjectScript.h" From jmolenda at apple.com Wed Jun 9 20:21:21 2010 From: jmolenda at apple.com (Jason Molenda) Date: Thu, 10 Jun 2010 01:21:21 -0000 Subject: [Lldb-commits] [lldb] r105772 - /lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Message-ID: <20100610012121.EE34A2A6C12E@llvm.org> Author: jmolenda Date: Wed Jun 9 20:21:21 2010 New Revision: 105772 URL: http://llvm.org/viewvc/llvm-project?rev=105772&view=rev Log: Correctly handle the case where dyld has slid. Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=105772&r1=105771&r2=105772&view=diff ============================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Wed Jun 9 20:21:21 2010 @@ -408,11 +408,47 @@ const ByteOrder endian = m_process->GetByteOrder(); const uint32_t addr_size = m_process->GetAddressByteSize(); uint8_t buf[256]; - const size_t count = 2 * sizeof(uint32_t) + // version + dylib_info_count - addr_size * 2 + // dylib_info_addr + notification - 2 + addr_size - 2 + // processDetachedFromSharedRegion + libSystemInitialized + pad - addr_size; // dyldImageLoadAddress + const size_t count_v2 = sizeof (uint32_t) + // version + sizeof (uint32_t) + // infoArrayCount + addr_size + // infoArray + addr_size + // notification + addr_size + // processDetachedFromSharedRegion + libSystemInitialized + pad + addr_size; // dyldImageLoadAddress + const size_t count_v11 = count_v2 + + addr_size + // jitInfo + addr_size + // dyldVersion + addr_size + // errorMessage + addr_size + // terminationFlags + addr_size + // coreSymbolicationShmPage + addr_size + // systemOrderFlag + addr_size + // uuidArrayCount + addr_size + // uuidArray + addr_size + // dyldAllImageInfosAddress + addr_size + // initialImageCount + addr_size + // errorKind + addr_size + // errorClientOfDylibPath + addr_size + // errorTargetDylibPath + addr_size; // errorSymbol + assert (sizeof (buf) > count_v11); + + int count; Error error; + if (m_process->ReadMemory (m_dyld_all_image_infos_addr, buf, 4, error) == 4) + { + DataExtractor data(buf, 4, endian, addr_size); + uint32_t offset = 0; + m_dyld_all_image_infos.version = data.GetU32(&offset); + } + else + { + return false; + } + + if (m_dyld_all_image_infos.version >= 11) + count = count_v11; + else + count = count_v2; + const size_t bytes_read = m_process->ReadMemory (m_dyld_all_image_infos_addr, buf, count, error); if (bytes_read == count) { @@ -423,12 +459,33 @@ m_dyld_all_image_infos.dylib_info_addr = data.GetPointer(&offset); m_dyld_all_image_infos.notification = data.GetPointer(&offset); m_dyld_all_image_infos.processDetachedFromSharedRegion = data.GetU8(&offset); - if (m_dyld_all_image_infos.version >= 2) - { - m_dyld_all_image_infos.libSystemInitialized = data.GetU8(&offset); - // Adjust for padding. - offset += addr_size - 2; - m_dyld_all_image_infos.dyldImageLoadAddress = data.GetPointer(&offset); + m_dyld_all_image_infos.libSystemInitialized = data.GetU8(&offset); + // Adjust for padding. + offset += addr_size - 2; + m_dyld_all_image_infos.dyldImageLoadAddress = data.GetPointer(&offset); + if (m_dyld_all_image_infos.version >= 11) + { + offset += addr_size * 8; + uint64_t dyld_all_image_infos_addr = data.GetPointer(&offset); + + // When we started, we were given the actual address of the all_image_infos + // struct (probably via TASK_DYLD_INFO) in memory - this address is stored in + // m_dyld_all_image_infos_addr and is the most accurate address we have. + + // We read the dyld_all_image_infos struct from memory; it contains its own address. + // If the address in the struct does not match the actual address, + // the dyld we're looking at has been loaded at a different location (slid) from + // where it intended to load. The addresses in the dyld_all_image_infos struct + // are the original, non-slid addresses, and need to be adjusted. Most importantly + // the address of dyld and the notification address need to be adjusted. + + if (dyld_all_image_infos_addr != m_dyld_all_image_infos_addr) + { + uint64_t image_infos_offset = dyld_all_image_infos_addr - m_dyld_all_image_infos.dyldImageLoadAddress; + uint64_t notification_offset = m_dyld_all_image_infos.notification - m_dyld_all_image_infos.dyldImageLoadAddress; + m_dyld_all_image_infos.dyldImageLoadAddress = m_dyld_all_image_infos_addr - image_infos_offset; + m_dyld_all_image_infos.notification = m_dyld_all_image_infos.dyldImageLoadAddress + notification_offset; + } } return true; } From eli.friedman at gmail.com Wed Jun 9 20:36:54 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 01:36:54 -0000 Subject: [Lldb-commits] [lldb] r105773 - /lldb/trunk/include/lldb/Core/Debugger.h Message-ID: <20100610013654.E32172A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 20:36:54 2010 New Revision: 105773 URL: http://llvm.org/viewvc/llvm-project?rev=105773&view=rev Log: Don't use std::tr1::shared_ptr directly. Modified: lldb/trunk/include/lldb/Core/Debugger.h Modified: lldb/trunk/include/lldb/Core/Debugger.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Debugger.h?rev=105773&r1=105772&r2=105773&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Debugger.h (original) +++ lldb/trunk/include/lldb/Core/Debugger.h Wed Jun 9 20:36:54 2010 @@ -150,7 +150,7 @@ std::stack m_input_readers; std::string m_input_reader_data; - typedef std::tr1::shared_ptr DebuggerSP; + typedef lldb::SharedPtr::Type DebuggerSP; static DebuggerSP & GetDebuggerSP(); From eli.friedman at gmail.com Wed Jun 9 20:57:53 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 9 Jun 2010 18:57:53 -0700 Subject: [Lldb-commits] [PATCH] Remove uuid_t constructor for lldb_private::UUID Message-ID: Per subject; attached. I'd like someone with a Mac to check whether this breaks the build. -Eli -------------- next part -------------- Index: include/lldb/Core/UUID.h =================================================================== --- include/lldb/Core/UUID.h (revision 105756) +++ include/lldb/Core/UUID.h (working copy) @@ -30,7 +30,6 @@ UUID (); UUID (const UUID& rhs); UUID (const void *uuid_bytes, uint32_t num_uuid_bytes); - UUID (const uuid_t *uuid); ~UUID (); Index: source/Core/UUID.cpp =================================================================== --- source/Core/UUID.cpp (revision 105756) +++ source/Core/UUID.cpp (working copy) @@ -38,14 +38,6 @@ ::bzero (m_uuid, sizeof(m_uuid)); } -UUID::UUID (const uuid_t *uuid) -{ - if (uuid) - ::memcpy (m_uuid, uuid, sizeof (m_uuid)); - else - ::bzero (m_uuid, sizeof(m_uuid)); -} - const UUID& UUID::operator=(const UUID& rhs) { From gclayton at apple.com Wed Jun 9 21:48:14 2010 From: gclayton at apple.com (Greg Clayton) Date: Thu, 10 Jun 2010 02:48:14 -0000 Subject: [Lldb-commits] [lldb] r105777 - in /lldb/trunk/www: content.css index.html menu.css menu.html.incl Message-ID: <20100610024814.2156A2A6C12E@llvm.org> Author: gclayton Date: Wed Jun 9 21:48:13 2010 New Revision: 105777 URL: http://llvm.org/viewvc/llvm-project?rev=105777&view=rev Log: Removing www files, will replace them with new ones after this commit. Removed: lldb/trunk/www/content.css lldb/trunk/www/index.html lldb/trunk/www/menu.css lldb/trunk/www/menu.html.incl Removed: lldb/trunk/www/content.css URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/content.css?rev=105776&view=auto ============================================================================== --- lldb/trunk/www/content.css (original) +++ lldb/trunk/www/content.css (removed) @@ -1,25 +0,0 @@ -html, body { - padding:0px; - font-size:small; font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, Helvetica, sans-serif; background-color: #fff; color: #222; - line-height:1.5; -} - -h1, h2, h3, tt { color: #000 } - -h1 { padding-top:0px; margin-top:0px;} -h2 { color:#333333; padding-top:0.5em; } -h3 { padding-top: 0.5em; margin-bottom: -0.25em; color:#2d58b7} -li { padding-bottom: 0.5em; } -ul { padding-left:1.5em; } - -/* Slides */ -IMG.img_slide { - display: block; - margin-left: auto; - margin-right: auto -} - -.itemTitle { color:#2d58b7 } - -/* Tables */ -tr { vertical-align:top } Removed: lldb/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/index.html?rev=105776&view=auto ============================================================================== --- lldb/trunk/www/index.html (original) +++ lldb/trunk/www/index.html (removed) @@ -1,197 +0,0 @@ - - - - - - The LLDB Debugger - - - - - - -
    - -

    The LLDB Debugger

    - - -

    LLDB is a next generation, high-performance debugger. It is built as a set - of reusable components which highly leverage existing libraries in the - larger LLVM Project, such as the Clang expression parser and LLVM - disassembler.

    -

    LLDB is in early development, but is mature enough to support basic - debugging scenarios on Mac OS X in C, Objective-C and C++.

    - -

    All of the code in the LLDB project is available under the standard - LLVM - License, an open source "BSD-style" license.

    - - -

    Goals

    - - -

    The current state of the art in open source debuggers are that - they work in the common cases for C applications, but don't - handle many "hard cases" properly. For example, C++ expression - parsing, handling overloading, templates, multi-threading, and - other non-trivial scenarios all work in some base cases, but - don't work reliably.

    - -

    The goal of LLDB is to provide an amazing debugging experience that "just - works". We aim to solve these long-standing problems where debuggers get - confused, so that you can think about debugging your problem, not - about deficiencies in the debugger.

    - -

    With a long view, there is no good reason for a debugger to - reinvent its own C/C++ parser, type system, know all the - target calling convention details, implement its own disassembler, - etc. By using the existing libraries vended by the LLVM - project, we believe that many of these problems will be defined - away, and the debugger can focus on important issues like - process control, efficient symbol reading and indexing, thread - management, and other debugger-specific problems.

    - -

    Some more specific goals include:

    - -
      -
    • Build libraries for inclusion in IDEs, command line tools, and - other analysis tools
    • -
    • High performance and efficient memory use
    • -
    • Extensible: Python scriptable and use a plug-in architecture
    • -
    • Reuse existing compiler technology where it makes sense
    • -
    • Excellent multi-threaded debugging support
    • -
    • Great support for C, Objective-C and C++
    • -
    • Retargetable to support multiple platforms
    • -
    • Provide a base for debugger research and other innovation
    • -
    - - -

    Why a new debugger?

    - - -

    In order to achieve our goals we decided to start with a fresh architecture - that would support modern multi-threaded programs, handle debugging symbols - in an efficient manner, use compiler based code knowledge and have plug-in - support for functionality and extensions. Additionally we want the debugger - capabilities to be available to other analysis tools, be they scripts or - compiled programs, without requiring them to be GPL.

    - - -

    Features

    - - -

    LLDB supports a broad variety of basic debugging features such as - reading DWARF, supporting step, next, finish, backtraces, etc. Some - more interested bits are:

    - -
      -
    • Plug-in architecture for portability and extensibility: -
        -
      • Object file parsers for executable file formats. Support currently - includes Mach-O (32 and 64-bit) & ELF (32-bit).
      • -
      • Object container parsers to extract object files contained within a file. - Support currently includes universal Mach-O files & BSD Archives. -
      • -
      • Debug symbol file parsers to incrementally extract debug information from - object files. Support currently includes DWARF & Mach-O symbol - tables.
      • -
      • Symbol vendor plug-ins collect data from a variety of different sources - for an executable object.
      • -
      • Disassembly plug-ins for each architecture. Support currently includes - an LLVM disassembler for i386, - x86-64, & ARM/Thumb.
      • -
      • Debugger plug-ins implement the host and target specific functions - required to debug.
      • -
      -
    • SWIG-generated script bridging allows Python to access and control the - public API of the debugger library.
    • -
    • A remote protocol server, debugserver, implements Mac OS X debugging on - i386 and x86-64.
    • -
    • A command line debugger - the lldb executable itself.
    • -
    • A framework API to the library.
    • -
    - - -

    Platform Support

    - - -

    LLDB is known to work on the following platforms, but ports to new - platforms are welcome:

    - -
  • Machine Architectures: -
      -
    • Mac OS X i386 and x86-64
    • -
  • - - -

    Current Status

    - - -

    LLDB is in early development and supports basic debugging scenarios on - Mac OS X. The public API has not been finalized, and different parts are - at different levels of maturity. We welcome any help fleshing out missing - pieces and improving the code.

    - -

    What works well:

    -
      -
    • Process control, including external process control via debugserver - (which is included as part of the lldb project)
    • -
    • Breakpoints: Source-line, symbolic, C++ mangled names, module - scoping
    • -
    • Symbol reading and object file introspection
    • -
    • Script bridging
    • -
    • Thread inspection and stepping
    • -
    • Disassembly of i386, x86-64, & ARM/Thumb machine code, and - backtracing on i386 & x86-64
    • -
    • The basic command line prompt system, shared library tracking, - source listings.
    • -
    - -

    What is still pretty new:

    -
      -
    • The public API to the library
    • -
    • Expression evaluation
    • -
    • Objective-C support: stepping into/over, printing the description of - an object ("po")
    • -
    • Breakpoint actions & scripts
    • -
    • Attaching to existing processes
    • -
    - -

    What isn't there yet:

    -
      -
    • Regression test suite
    • -
    • Operating system support hasn't been fully modularized yet
    • -
    • Blocks support
    • -
    • Calling functions in expressions
    • -
    • Objective-C 2.0 Support: Printing properties, synthetic properties, - Objective-C expressions, KVO, dynamic types, dot syntax, runtime data
    • -
    • C++ support: Method access, handling demangled names, dynamic types
    • -
    • Exception support: Breaking by name, thrown object, thrower
    • - -
    - - -

    Get it and get involved!

    - - -

    To check out the code, use:

    - -
      -
    • svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
    • -
    - -

    Note that LLDB currently only builds out of the box on Mac OS X with - Xcode, but patches to improve portability are definitely welcome.

    - -

    Discussions about LLDB should go to the lldb-dev mailing - list. Commit messages for the lldb SVN module are automatically sent to the - lldb-commits - mailing list, and this is also the preferred mailing list for patch - submissions.

    -
    - - Removed: lldb/trunk/www/menu.css URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/menu.css?rev=105776&view=auto ============================================================================== --- lldb/trunk/www/menu.css (original) +++ lldb/trunk/www/menu.css (removed) @@ -1,39 +0,0 @@ -/***************/ -/* page layout */ -/***************/ - -[id=menu] { - position:fixed; - width:25ex; -} -[id=content] { - /* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */ - position:absolute; - left:29ex; - padding-right:4ex; -} - -/**************/ -/* menu style */ -/**************/ - -#menu .submenu { - padding-top:1em; - display:block; -} - -#menu label { - display:block; - font-weight: bold; - text-align: center; - background-color: rgb(192,192,192); -} -#menu a { - padding:0 .2em; - display:block; - text-align: center; - background-color: rgb(235,235,235); -} -#menu a:visited { - color:rgb(100,50,100); -} \ No newline at end of file Removed: lldb/trunk/www/menu.html.incl URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/menu.html.incl?rev=105776&view=auto ============================================================================== --- lldb/trunk/www/menu.html.incl (original) +++ lldb/trunk/www/menu.html.incl (removed) @@ -1,20 +0,0 @@ - - From gclayton at apple.com Wed Jun 9 21:48:57 2010 From: gclayton at apple.com (Greg Clayton) Date: Thu, 10 Jun 2010 02:48:57 -0000 Subject: [Lldb-commits] [lldb] r105778 - in /lldb/trunk/www: architecture.html docs.html download.html faq.html features.html goals.html index.html status.html style.css Message-ID: <20100610024857.F11C02A6C12E@llvm.org> Author: gclayton Date: Wed Jun 9 21:48:57 2010 New Revision: 105778 URL: http://llvm.org/viewvc/llvm-project?rev=105778&view=rev Log: Updated the web pages with new navigable web pages. Added: lldb/trunk/www/architecture.html (with props) lldb/trunk/www/docs.html (with props) lldb/trunk/www/download.html (with props) lldb/trunk/www/faq.html (with props) lldb/trunk/www/features.html (with props) lldb/trunk/www/goals.html (with props) lldb/trunk/www/index.html (with props) lldb/trunk/www/status.html (with props) lldb/trunk/www/style.css (with props) Added: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/architecture.html (added) +++ lldb/trunk/www/architecture.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,262 @@ + + + + + +LLDB Architecture + + + +
    + The LLDB Debugger +
    + +
    +
    + +
    +
    +

    Architecture

    +
    + +

    LLDB is a large and complex codebase. This section will help you become more familiar with + the pieces that make up LLDB and give a general overview of the general architecture.

    +
    + +
    +
    +

    Code Layout

    +
    + +

    LLDB has many code groupings that makeup the source base:

    + +
    + +
    + +
    +

    API

    +
    + +

    The API folder contains the public interface to LLDB.

    +

    We are currently vending a C++ API. In order to be able to add + methods to this API and allow people to link to our classes, + we have certain rules that we must follow:

    +
      +
    • Classes can't inherit from any other classes.
    • +
    • Classes can't contain virtual methods.
    • +
    • Classes should be compatible with script bridging utilities like swig.
    • +
    • Classes should be lighweight and be backed by a single object pointer, shared pointer or global variable in the lldb_private.
    • +
    • The interface should be as minimal as possible in order to give a complete API.
    • +
    +

    By adhering to these rules we should be able to continue to + vend a C++ API, and make changes to the API as any additional + methods added to these classes will just be a dynamic loader + lookup and they won't affect the class layout (since they + aren't virtual methods, and no members can be added to the + class). +

    + +
    + +
    +

    Breakpoint

    +
    + +

    A collection of classes that implement our breakpoint classes. + Breakpoints are resolved symbolically and always continue to + resolve themselves as your program runs. Wether settings breakpoints + by file and line, by symbol name, by symbol regular expression, + or by address, breakpoints will keep trying to resolve new locations + each time shared libraries are loaded. Breakpoints will of course + unresolve themselves when shared libraries are unloaded. Breakpoints + can also be scoped to be set only in a specific shared library. By + default, breakpoints can be set in any shared library and will continue + to attempt to be resolved with each shared library load.

    +

    Breakpoint options can be set on the breakpoint, + or on the individual locations. This allows flexibility when dealing + with breakpoints and allows us to do what the user wants. +

    + +
    + +
    +

    Commands

    +
    + +

    The command source files represent objects that implement + the functionality for all textual commands available + in our command line interface.

    +

    Every command is backed by a lldb_private::CommandObject + or lldb_private::CommandObjectMultiword object.

    +

    lldb_private::CommandObjectMultiword are commands that + have subcommands and allow command line commands to be + logically grouped into a hiearchy. +

    lldb_private::CommandObject command line commands + are the objects that implement the functionality of the + command. They can optionally define + options for themselves, as well as group those options into + logical groups that can go together. The help system is + tied into these objects and can extract the syntax and + option groupings to display appropriate help for each + command.

    +
    + +
    + +
    +

    Core

    +
    + +

    The Core source files contain basic functionality that + is required in the debugger. A wide variety of classes + are implemented: + +

      +
    • Address (section offset addressing)
    • +
    • AddressRange
    • +
    • Architecture specification
    • +
    • Broadcaster / Event / Listener
    • +
    • Communication classes that use Connection objects
    • +
    • Uniqued C strings
    • +
    • Data extraction
    • +
    • File specifications
    • +
    • Mangled names
    • +
    • Regular expressions
    • +
    • Source manager
    • +
    • Streams
    • +
    • Value objects
    • +
    +
    + +
    + +
    +

    Expression

    +
    + +

    Expression parsing files cover everything from evaluating + DWARF expressions, to evaluating expressions using + Clang.

    +

    The DWARF expression parser has been heavily modified to + support type promotion, new opcodes needed for evaluating + expressions with symbolic variable references (expression local variables, + program variables), and other operators required by + typical expressions such as assign, address of, float/double/long + double floating point values, casting, and more. The + DWARF expression parser uses a stack of lldb_private::Value + objects. These objects know how to do the standard C type + promotion, and allow for symbolic references to variables + in the program and in the LLDB process (expression local + and expression global variables).

    +

    The expression parser uses a full instance of the Clang + compiler in order to accurately evaluate expressions. + Hooks have been put into Clang so that the compiler knows + to ask about indentifiers it doesn't know about. Once + expressions have be compiled into an AST, we can then + traverse this AST and either generate a DWARF expression + that contains simple opcodes that can be quickly re-evaluated + each time an expression needs to be evaluated, or JIT'ed + up into code that can be run on the process being debugged. +

    + +
    + +
    +

    Host

    +
    + +

    LLDB tries to abstract itself from the host upon which + it is currently running by providing a host abstraction + layer This layer involves everything from spawning, detaching, + joing and killing native in process threads, to getting + current information about the current host.

    +

    Host functionality includes abstraction layers for: +

      +
    • Mutexes
    • +
    • Conditions
    • +
    • Timing functions
    • +
    • Thread functions
    • +
    • Host target triple
    • +
    • Host child process notifications
    • +
    • Host specific types
    • +
    +
    + +
    + +
    +

    Interpreter

    +
    + +

    The interpreter classes are the classes responsible for + being the base classes needed for each command object, + and is responsible for tracking and running command line + commands. +

    + +
    + +
    +

    Symbol

    +
    +

    Symbol classes involve everything needed in order to parse + object files and debug symbols. All the needed classes + for compilation units (code and debug info for a source file), + functions, lexical blocks within functions, inlined + functions, types, declaration locations, and variables + are in this section.

    +
    + +
    + +
    +

    Target

    +
    + +

    Classes that are related to a debug target include:

    +
      +
    • Target
    • +
    • Process
    • +
    • Thread
    • +
    • Stack frames
    • +
    • Stack frame registers
    • +
    • ABI for function calling in process being debugged
    • +
    • Execution context batons
    • +
    +
    + +
    + +
    +

    Utility

    +
    + +

    Utility files should be as stand alone as possible are + are available for LLDB and any plug-ins or related + applications to use.<\p> +

    Files found in the Utility section include:

    +
      +
    • Pseudo-terminal support
    • +
    • Register numbering for specific architectures.
    • +
    • String data extractors
    • +
    +
    + +
    +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/architecture.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/docs.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/docs.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/docs.html (added) +++ lldb/trunk/www/docs.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,64 @@ + + + + + +LLDB Documentation + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    Documentation

    +
    +

    LLDB is partially documented with header documentation that can be + parsed and viewed with doxygen.

    +

    This page will soon be filled with doxygen links for easy online viewing.

    +
    + +
    +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/docs.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/download.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/download.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/download.html (added) +++ lldb/trunk/www/download.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,78 @@ + + + + + +LLDB FAQ + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    Downloading LLDB sources

    +
    +

    Obtaining read only access to the LLDB sources is easy:

    +
      +
    • svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
    • +
    +
    + +
    +
    +

    Committing LLDB sources

    +
    +

    If you wish to contribute to LLDB, you must first get commit access by + requesting commit access

    +

    Once you have commit access, you will have a USERNAME and you can checkout the sources: + requesting commit access

    +
      +
    • svn co https://USERNAME at llvm.org/svn/llvm-project/lldb/trunk lldb
    • +
    +
    + +
    +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/download.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/faq.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/faq.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/faq.html (added) +++ lldb/trunk/www/faq.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,62 @@ + + + + + +LLDB FAQ + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    LLDB FAQ

    +
    +

    Q: What targets does LLDB currently support?

    +

    Mac OS X native debugging for i386 and x86_64 targets.

    +
    + +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/faq.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/features.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/features.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/features.html (added) +++ lldb/trunk/www/features.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,92 @@ + + + + + +LLDB Homepage + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    Features

    +
    +

    LLDB supports a broad variety of basic debugging features such as + reading DWARF, supporting step, next, finish, backtraces, etc. Some + more interested bits are:

    + +
      +
    • Plug-in architecture for portability and extensibility:
    • +
        +
      • Object file parsers for executable file formats. Support currently + includes Mach-O (32 and 64-bit) & ELF (32-bit).
      • +
      • Object container parsers to extract object files contained within a file. + Support currently includes universal Mach-O files & BSD Archives. +
      • +
      • Debug symbol file parsers to incrementally extract debug information from + object files. Support currently includes DWARF & Mach-O symbol + tables.
      • +
      • Symbol vendor plug-ins collect data from a variety of different sources + for an executable object.
      • +
      • Disassembly plug-ins for each architecture. Support currently includes + an LLVM disassembler for i386, x86-64 + , & ARM/Thumb.
      • +
      • Debugger plug-ins implement the host and target specific functions + required to debug.
      • +
      +
    • SWIG-generated script bridging allows Python to access and control the + public API of the debugger library.
    • +
    • A remote protocol server, debugserver, implements Mac OS X debugging on + i386 and x86-64.
    • +
    • A command line debugger - the lldb executable itself.
    • +
    • A framework API to the library.
    • +
    +
    + +
    + +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/features.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/goals.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/goals.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/goals.html (added) +++ lldb/trunk/www/goals.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,95 @@ + + + + + +LLDB Goals + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    Goals

    +
    + +

    The current state of the art in open source debuggers are that + they work in the common cases for C applications, but don't + handle many "hard cases" properly. For example, C++ expression + parsing, handling overloading, templates, multi-threading, and + other non-trivial scenarios all work in some base cases, but + don't work reliably.

    + +

    The goal of LLDB is to provide an amazing debugging experience that "just + works". We aim to solve these long-standing problems where debuggers get + confused, so that you can think about debugging your problem, not + about deficiencies in the debugger.

    + +

    With a long view, there is no good reason for a debugger to + reinvent its own C/C++ parser, type system, know all the + target calling convention details, implement its own disassembler, + etc. By using the existing libraries vended by the LLVM + project, we believe that many of these problems will be defined + away, and the debugger can focus on important issues like + process control, efficient symbol reading and indexing, thread + management, and other debugger-specific problems.

    + +

    Some more specific goals include:

    + +
      +
    • Build libraries for inclusion in IDEs, command line tools, and + other analysis tools
    • +
    • High performance and efficient memory use
    • +
    • Extensible: Python scriptable and use a plug-in architecture
    • +
    • Reuse existing compiler technology where it makes sense
    • +
    • Excellent multi-threaded debugging support
    • +
    • Great support for C, Objective-C and C++
    • +
    • Retargetable to support multiple platforms
    • +
    • Provide a base for debugger research and other innovation
    • +
    +
    + +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/goals.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/index.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/index.html (added) +++ lldb/trunk/www/index.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,120 @@ + + + + + +LLDB Homepage + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    What is LLDB?

    +
    +

    LLDB is a next generation, high-performance debugger. It is built as a set + of reusable components which highly leverage existing libraries in the + larger LLVM Project, such as the Clang expression parser and LLVM + disassembler.

    +

    LLDB is in early development, but is mature enough to support basic + debugging scenarios on Mac OS X in C, Objective-C and C++.

    + +

    All of the code in the LLDB project is available under the standard + LLVM + License, an open source "BSD-style" license.

    +
    + +
    + +
    +

    Why a new debugger?

    +
    +

    In order to achieve our goals we decided to start with a fresh architecture + that would support modern multi-threaded programs, handle debugging symbols + in an efficient manner, use compiler based code knowledge and have plug-in + support for functionality and extensions. Additionally we want the debugger + capabilities to be available to other analysis tools, be they scripts or + compiled programs, without requiring them to be GPL.

    +
    + +
    + +
    +

    Platform Support

    +
    + +

    LLDB is known to work on the following platforms, but ports to new + platforms are welcome:

    +
      +
    • Mac OS X i386 and x86-64
    • +
    +
    + +
    + + +
    +

    Get it and get involved!

    +
    + +

    To check out the code, use:

    + +
      +
    • svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
    • +
    + +

    Note that LLDB currently only builds out of the box on Mac OS X with + Xcode, but patches to improve portability are definitely welcome.

    + +

    Discussions about LLDB should go to the lldb-dev mailing + list. Commit messages for the lldb SVN module are automatically sent to the + lldb-commits + mailing list, and this is also the preferred mailing list for patch + submissions.

    +
    + +
    +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/index.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/status.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/status.html?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/status.html (added) +++ lldb/trunk/www/status.html Wed Jun 9 21:48:57 2010 @@ -0,0 +1,103 @@ + + + + + +LLDB Status + + + +
    + The LLDB Debugger +
    + +
    +
    +
    +
    +

    General

    + +
    + + +
    +
    +
    +

    Status

    +
    + +

    LLDB is in early development and supports basic debugging scenarios on + Mac OS X. The public API has not been finalized, and different parts are + at different levels of maturity. We welcome any help fleshing out missing + pieces and improving the code.

    + +

    What works well:

    +
      +
    • Process control, including external process control via debugserver + (which is included as part of the lldb project)
    • +
    • Breakpoints: Source-line, symbolic, C++ mangled names, module + scoping
    • +
    • Symbol reading and object file introspection
    • +
    • Script bridging
    • +
    • Thread inspection and stepping
    • +
    • Disassembly of i386, x86-64, & ARM/Thumb machine code, and + backtracing on i386 & x86-64
    • +
    • The basic command line prompt system, shared library tracking, + source listings.
    • +
    + +

    What is still pretty new:

    +
      +
    • The public API to the library
    • +
    • Expression evaluation
    • +
    • Objective-C support: stepping into/over, printing the description of + an object ("po")
    • +
    • Breakpoint actions & scripts
    • +
    • Attaching to existing processes
    • +
    + +

    What isn't there yet:

    +
      +
    • Regression test suite
    • +
    • Operating system support hasn't been fully modularized yet
    • +
    • Blocks support
    • +
    • Calling functions in expressions
    • +
    • Objective-C 2.0 Support: Printing properties, synthetic properties, + Objective-C expressions, KVO, dynamic types, dot syntax, runtime data
    • +
    • C++ support: Method access, handling demangled names, dynamic types
    • +
    • Exception support: Breaking by name, thrown object, thrower
    • +
    +
    + +
    +
    +
    +
    + + \ No newline at end of file Propchange: lldb/trunk/www/status.html ------------------------------------------------------------------------------ svn:executable = * Added: lldb/trunk/www/style.css URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/style.css?rev=105778&view=auto ============================================================================== --- lldb/trunk/www/style.css (added) +++ lldb/trunk/www/style.css Wed Jun 9 21:48:57 2010 @@ -0,0 +1,96 @@ + +.www_title { font-family: "Georgia,Palatino,Times,Roman"; + font-size: 33pt; + text-align: center;} + +#container { + margin: 0px auto; + text-align: left; + width: 860px; +} +#header{ + height:40px; + width:777px; +} +#content{ + padding: 0px 0px 0px 0px; + border:1px solid white; +} +#left{ + padding: 0px 0px 0px 0px; + border:1px solid white; + width:192px; + float:left; +} +#middle{ + padding: 0px 0px 0px 0px; + border:1px solid white; + margin-left:200px; + margin-right:196px; + width:658px; +} + +/*Credits: Dynamic Drive CSS Library */ +/*URL: http://www.dynamicdrive.com/style/ */ + +.urbangreymenu{ +width: 190px; /*width of menu*/ +} + +.urbangreymenu .headerbar{ +font: bold 13px Verdana; +color: white; +background: #606060; +margin-bottom: 0; /*bottom spacing between header and rest of content*/ +text-transform: uppercase; +padding: 7px 0 7px 7px; +} + +.urbangreymenu ul{ +list-style-type: none; +margin: 0; +padding: 0; +margin-bottom: 0; /*bottom spacing between each UL and rest of content*/ +} + +.urbangreymenu ul li{ +padding-bottom: 1px; /*bottom spacing between menu items*/ +} + +.urbangreymenu ul li a{ +font: normal 12px Arial; +color: black; +background: #E9E9E9; +display: block; +padding: 5px 0; +line-height: 17px; +padding-left: 14px; +text-decoration: none; +} + +.urbangreymenu ul li a:visited{ +color: black; +} + +.urbangreymenu ul li a:hover{ /*hover state CSS*/ +color: black; +background: #bbbbbb; +} + + +.post{ +width: 640px; /*width of menu*/ +} + +.postheader{ +font: bold 13px Verdana; +color: white; +background: #606060; +margin-bottom: 0; /*bottom spacing between header and rest of content*/ +text-transform: uppercase; +padding: 7px 0 7px 7px; +} + +.postcontent{ + padding-left: 14px; +} Propchange: lldb/trunk/www/style.css ------------------------------------------------------------------------------ svn:executable = * From gclayton at apple.com Wed Jun 9 21:50:28 2010 From: gclayton at apple.com (Greg Clayton) Date: Thu, 10 Jun 2010 02:50:28 -0000 Subject: [Lldb-commits] [lldb] r105779 - /lldb/trunk/www/architecture.html Message-ID: <20100610025028.5AFB32A6C12E@llvm.org> Author: gclayton Date: Wed Jun 9 21:50:28 2010 New Revision: 105779 URL: http://llvm.org/viewvc/llvm-project?rev=105779&view=rev Log: Fixed an error in the architecture page. Modified: lldb/trunk/www/architecture.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105779&r1=105778&r2=105779&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Wed Jun 9 21:50:28 2010 @@ -13,7 +13,40 @@
    - +
    +
    +

    General

    + +
    + + +

    Architecture

    From gclayton at apple.com Wed Jun 9 21:54:02 2010 From: gclayton at apple.com (Greg Clayton) Date: Wed, 9 Jun 2010 19:54:02 -0700 Subject: [Lldb-commits] [PATCH] Remove uuid_t constructor for lldb_private::UUID In-Reply-To: References: Message-ID: <0CB997BC-2738-4327-9263-A3877459965A@apple.com> It doesn't break the build. Go ahead and commit this. On Jun 9, 2010, at 6:57 PM, Eli Friedman wrote: > Per subject; attached. I'd like someone with a Mac to check whether > this breaks the build. > > -Eli > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits From eli.friedman at gmail.com Wed Jun 9 22:08:05 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 03:08:05 -0000 Subject: [Lldb-commits] [lldb] r105780 - in /lldb/trunk: include/lldb/Core/UUID.h source/Core/UUID.cpp Message-ID: <20100610030805.42DCF2A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 22:08:05 2010 New Revision: 105780 URL: http://llvm.org/viewvc/llvm-project?rev=105780&view=rev Log: Remove unused uuid_t constructor for lldb_private::UUID. Modified: lldb/trunk/include/lldb/Core/UUID.h lldb/trunk/source/Core/UUID.cpp Modified: lldb/trunk/include/lldb/Core/UUID.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=105780&r1=105779&r2=105780&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/UUID.h (original) +++ lldb/trunk/include/lldb/Core/UUID.h Wed Jun 9 22:08:05 2010 @@ -30,7 +30,6 @@ UUID (); UUID (const UUID& rhs); UUID (const void *uuid_bytes, uint32_t num_uuid_bytes); - UUID (const uuid_t *uuid); ~UUID (); Modified: lldb/trunk/source/Core/UUID.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UUID.cpp?rev=105780&r1=105779&r2=105780&view=diff ============================================================================== --- lldb/trunk/source/Core/UUID.cpp (original) +++ lldb/trunk/source/Core/UUID.cpp Wed Jun 9 22:08:05 2010 @@ -38,14 +38,6 @@ ::bzero (m_uuid, sizeof(m_uuid)); } -UUID::UUID (const uuid_t *uuid) -{ - if (uuid) - ::memcpy (m_uuid, uuid, sizeof (m_uuid)); - else - ::bzero (m_uuid, sizeof(m_uuid)); -} - const UUID& UUID::operator=(const UUID& rhs) { From eli.friedman at gmail.com Wed Jun 9 23:51:35 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 04:51:35 -0000 Subject: [Lldb-commits] [lldb] r105781 - /lldb/trunk/source/lldb-log.cpp Message-ID: <20100610045136.09EF92A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 23:51:35 2010 New Revision: 105781 URL: http://llvm.org/viewvc/llvm-project?rev=105781&view=rev Log: Add missing include. Modified: lldb/trunk/source/lldb-log.cpp Modified: lldb/trunk/source/lldb-log.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb-log.cpp?rev=105781&r1=105780&r2=105781&view=diff ============================================================================== --- lldb/trunk/source/lldb-log.cpp (original) +++ lldb/trunk/source/lldb-log.cpp Wed Jun 9 23:51:35 2010 @@ -16,7 +16,7 @@ #include "lldb/Core/Args.h" #include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" - +#include using namespace lldb; using namespace lldb_private; From eli.friedman at gmail.com Wed Jun 9 23:56:01 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 04:56:01 -0000 Subject: [Lldb-commits] [lldb] r105782 - /lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Message-ID: <20100610045601.0D0A72A6C12E@llvm.org> Author: efriedma Date: Wed Jun 9 23:56:00 2010 New Revision: 105782 URL: http://llvm.org/viewvc/llvm-project?rev=105782&view=rev Log: Expand AR_EFMT1 because the define is not present on Linux (and possibly other systems). Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=105782&r1=105781&r2=105782&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original) +++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Wed Jun 9 23:56:00 2010 @@ -56,7 +56,7 @@ std::string str; char *err; str.assign ((const char *)data.GetData(&offset, 16), 16); - if (str.find(AR_EFMT1) == 0) + if (str.find("#1/") == 0) { // If the name is longer than 16 bytes, or contains an embedded space // then it will use this format where the length of the name is From chandlerc at google.com Thu Jun 10 00:32:51 2010 From: chandlerc at google.com (Chandler Carruth) Date: Wed, 9 Jun 2010 22:32:51 -0700 Subject: [Lldb-commits] [llvm-commits] Patch to LLDB Architecture page In-Reply-To: References: Message-ID: Moving to lldb-commits rather than llvm-commits... On Wed, Jun 9, 2010 at 10:26 PM, Mike Miller wrote: > There's a closing tag with a backslash instead of a slash on > http://lldb.llvm.org/architecture.html, leading a <\p> to be visible to > the user on the page. Patch attached which fixes this. > > - Mike > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/lldb-commits/attachments/20100609/5b3b4dc9/attachment.html From echristo at apple.com Thu Jun 10 00:35:26 2010 From: echristo at apple.com (Eric Christopher) Date: Thu, 10 Jun 2010 05:35:26 -0000 Subject: [Lldb-commits] [lldb] r105783 - /lldb/trunk/www/architecture.html Message-ID: <20100610053526.5013C2A6C12C@llvm.org> Author: echristo Date: Thu Jun 10 00:35:26 2010 New Revision: 105783 URL: http://llvm.org/viewvc/llvm-project?rev=105783&view=rev Log: Fix paragraph tag. Patch by Mike Miller. Modified: lldb/trunk/www/architecture.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105783&r1=105782&r2=105783&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Thu Jun 10 00:35:26 2010 @@ -10,7 +10,7 @@
    The LLDB Debugger
    - +
    @@ -278,7 +278,7 @@

    Utility files should be as stand alone as possible are are available for LLDB and any plug-ins or related - applications to use.<\p> + applications to use.

    Files found in the Utility section include:

    • Pseudo-terminal support
    • @@ -292,4 +292,4 @@
    - \ No newline at end of file + From echristo at apple.com Thu Jun 10 00:35:59 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 9 Jun 2010 22:35:59 -0700 Subject: [Lldb-commits] [llvm-commits] Patch to LLDB Architecture page In-Reply-To: References: Message-ID: On Jun 9, 2010, at 10:26 PM, Mike Miller wrote: > Committed. Thanks! -eric From gclayton at apple.com Thu Jun 10 01:33:13 2010 From: gclayton at apple.com (Greg Clayton) Date: Wed, 9 Jun 2010 23:33:13 -0700 Subject: [Lldb-commits] [lldb] r105746 - /lldb/trunk/include/lldb/lldb-enumerations.h In-Reply-To: <20100609192651.EAA9B2A6C12E@llvm.org> References: <20100609192651.EAA9B2A6C12E@llvm.org> Message-ID: <900CDD39-6860-4937-BCDE-53D7A4C49F20@apple.com> Eli, Can you change this back to somehow use some sort of #ifdeffery on linux? We had a working version for Mac OS X, there must be an easy way to do this for linux. Shared libraries at Apple are not supposed to have any global init constructors in them (we have an build exception for this right now for other things inside LLVM that have global init ctors) but we would like to avoid adding any in the LLDB codebase if at all possible. Also we would like to avoid defining a constant in a header file. We should probably modify the Host.h time to somehow autodetect this and set the define appropriately. We currently add the "-Wglobal-constructors" to all C++ compiles to see these issues as they arise. /Volumes/work/gclayton/Documents/src/lldb/include/lldb/lldb-enumerations.h:86:0 /Volumes/work/gclayton/Documents/src/lldb/include/lldb/lldb-enumerations.h:86: warning: 'lldb::eByteOrderHost' requires global construction You will see some code (which can sometimes get ugly) around LLDB that deals with avoiding global constructors. The above example below from SymbolFileDWARF.cpp shows a way to have a static variable in a source file without having to have a global init ctor: static const ConstString& GetSectionNameDebugInfo() { static const ConstString g_sect_name("__debug_info"); return g_sect_name; } There are also some ugly examples where multiple functions must access a static and a GetAndSet function is made. One such example is in Log.cpp: static Stream * StreamForSTDOUTAccess (bool set, StreamSP &stream_sp); Let me know if you can make the changes for linux, else I might need to back out the change. Greg Clayton On Jun 9, 2010, at 12:26 PM, Eli Friedman wrote: > Author: efriedma > Date: Wed Jun 9 14:26:51 2010 > New Revision: 105746 > > URL: http://llvm.org/viewvc/llvm-project?rev=105746&view=rev > Log: > Use portable endianness routine from LLVM. > > > Modified: > lldb/trunk/include/lldb/lldb-enumerations.h > > Modified: lldb/trunk/include/lldb/lldb-enumerations.h > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105746&r1=105745&r2=105746&view=diff > ============================================================================== > --- lldb/trunk/include/lldb/lldb-enumerations.h (original) > +++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Jun 9 14:26:51 2010 > @@ -10,6 +10,8 @@ > #ifndef LLDB_enumerations_h_ > #define LLDB_enumerations_h_ > > +#include "llvm/System/Host.h" > + > namespace lldb { > > //---------------------------------------------------------------------- > @@ -71,18 +73,18 @@ > eByteOrderInvalid = 0, > eByteOrderLittle = 1234, > eByteOrderBig = 4321, > - eByteOrderPDP = 3412, > -#if defined (__LITTLE_ENDIAN__) > - eByteOrderHost = eByteOrderLittle > -#elif defined (__BIG_ENDIAN__) > - eByteOrderHost = eByteOrderBig > -#elif defined (__PDP_ENDIAN__) > - eByteOrderHost = eByteOrderPDP > -#else > -#error unable to detect endianness > -#endif > + eByteOrderPDP = 3412 > } ByteOrder; > > +inline ByteOrder getHostByteOrder() { > + if (llvm::sys::isLittleEndianHost()) > + return eByteOrderLittle; > + return eByteOrderBig; > +} > + > +// FIXME: Replace uses of eByteOrderHost with getHostByteOrder()! > +const ByteOrder eByteOrderHost = getHostByteOrder(); > + > //---------------------------------------------------------------------- > // Register encoding definitions > //---------------------------------------------------------------------- > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/lldb-commits/attachments/20100609/154d653a/attachment-0001.html From eli.friedman at gmail.com Thu Jun 10 01:41:41 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Wed, 9 Jun 2010 23:41:41 -0700 Subject: [Lldb-commits] [lldb] r105746 - /lldb/trunk/include/lldb/lldb-enumerations.h In-Reply-To: <900CDD39-6860-4937-BCDE-53D7A4C49F20@apple.com> References: <20100609192651.EAA9B2A6C12E@llvm.org> <900CDD39-6860-4937-BCDE-53D7A4C49F20@apple.com> Message-ID: On Wed, Jun 9, 2010 at 11:33 PM, Greg Clayton wrote: > Eli, > Can you change this back to somehow use some sort of #ifdeffery on linux? We > had a working version for Mac OS X, there must be an easy way to do this for > linux. > Shared libraries at Apple are not supposed to have any global init > constructors in them (we have an build exception for this right now for > other things inside LLVM that have global init ctors) but we would like to > avoid adding any in the LLDB codebase if at all possible. Also we would like > to avoid defining a constant in a header file. > We should probably modify the Host.h time to somehow autodetect this and set > the define appropriately. > We currently add the "-Wglobal-constructors" to all C++ compiles to see > these issues as they arise. > /Volumes/work/gclayton/Documents/src/lldb/include/lldb/lldb-enumerations.h:86:0 > /Volumes/work/gclayton/Documents/src/lldb/include/lldb/lldb-enumerations.h:86: > warning: 'lldb::eByteOrderHost' requires global construction > > You will see some code (which can sometimes get ugly) around LLDB that deals > with avoiding global constructors. > The above example below from SymbolFileDWARF.cpp shows a way to have a > static variable in a source file without having to have a global init ctor: > static const ConstString& > GetSectionNameDebugInfo() > { > ? ? static const ConstString g_sect_name("__debug_info"); > ? ? return g_sect_name; > } > There are also some ugly examples where multiple functions must access a > static and a GetAndSet function is made. One such example is in Log.cpp: > static Stream * > StreamForSTDOUTAccess (bool set, StreamSP &stream_sp); > Let me know if you can make the changes for linux, else I might need to back > out the change. Globally replacing eByteOrderHost with getHostByteOrder() should be sufficient here; I can't properly test such a change, though. It would be nice if you could do that; otherwise, feel free to back out. -Eli > Greg Clayton > > On Jun 9, 2010, at 12:26 PM, Eli Friedman wrote: > > Author: efriedma > Date: Wed Jun ?9 14:26:51 2010 > New Revision: 105746 > > URL: http://llvm.org/viewvc/llvm-project?rev=105746&view=rev > Log: > Use portable endianness routine from LLVM. > > > Modified: > ???lldb/trunk/include/lldb/lldb-enumerations.h > > Modified: lldb/trunk/include/lldb/lldb-enumerations.h > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105746&r1=105745&r2=105746&view=diff > ============================================================================== > --- lldb/trunk/include/lldb/lldb-enumerations.h (original) > +++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Jun ?9 14:26:51 2010 > @@ -10,6 +10,8 @@ > #ifndef LLDB_enumerations_h_ > #define LLDB_enumerations_h_ > > +#include "llvm/System/Host.h" > + > namespace lldb { > > //---------------------------------------------------------------------- > @@ -71,18 +73,18 @@ > ????eByteOrderInvalid ??= 0, > ????eByteOrderLittle ???= 1234, > ????eByteOrderBig ??????= 4321, > - ???eByteOrderPDP ??????= 3412, > -#if ??defined (__LITTLE_ENDIAN__) > - ???eByteOrderHost ?????= eByteOrderLittle > -#elif defined (__BIG_ENDIAN__) > - ???eByteOrderHost ?????= eByteOrderBig > -#elif defined (__PDP_ENDIAN__) > - ???eByteOrderHost ?????= eByteOrderPDP > -#else > -#error unable to detect endianness > -#endif > + ???eByteOrderPDP ??????= 3412 > } ByteOrder; > > +inline ByteOrder getHostByteOrder() { > + ?if (llvm::sys::isLittleEndianHost()) > + ???return eByteOrderLittle; > + ?return eByteOrderBig; > +} > + > +// FIXME: Replace uses of eByteOrderHost with getHostByteOrder()! > +const ByteOrder eByteOrderHost = getHostByteOrder(); > + > //---------------------------------------------------------------------- > // Register encoding definitions > //---------------------------------------------------------------------- > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits > > From clattner at apple.com Thu Jun 10 01:57:30 2010 From: clattner at apple.com (Chris Lattner) Date: Wed, 9 Jun 2010 23:57:30 -0700 Subject: [Lldb-commits] [lldb] r105778 - in /lldb/trunk/www: architecture.html docs.html download.html faq.html features.html goals.html index.html status.html style.css In-Reply-To: <20100610024857.F11C02A6C12E@llvm.org> References: <20100610024857.F11C02A6C12E@llvm.org> Message-ID: <7BA26D9C-B419-4C72-8E31-31B0E4AE8109@apple.com> On Jun 9, 2010, at 7:48 PM, Greg Clayton wrote: > Author: gclayton > Date: Wed Jun 9 21:48:57 2010 > New Revision: 105778 > > URL: http://llvm.org/viewvc/llvm-project?rev=105778&view=rev > Log: > Updated the web pages with new navigable web pages. Wow, this looks great! -Chris From benny.kra at googlemail.com Thu Jun 10 03:12:17 2010 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Thu, 10 Jun 2010 08:12:17 -0000 Subject: [Lldb-commits] [lldb] r105784 - in /lldb/trunk/www: architecture.html goals.html Message-ID: <20100610081217.7340C2A6C12D@llvm.org> Author: d0k Date: Thu Jun 10 03:12:17 2010 New Revision: 105784 URL: http://llvm.org/viewvc/llvm-project?rev=105784&view=rev Log: Add some missing close tags. Modified: lldb/trunk/www/architecture.html lldb/trunk/www/goals.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105784&r1=105783&r2=105784&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Thu Jun 10 03:12:17 2010 @@ -98,7 +98,7 @@ methods added to these classes will just be a dynamic loader lookup and they won't affect the class layout (since they aren't virtual methods, and no members can be added to the - class). + class).

    @@ -119,7 +119,7 @@ to attempt to be resolved with each shared library load.

    Breakpoint options can be set on the breakpoint, or on the individual locations. This allows flexibility when dealing - with breakpoints and allows us to do what the user wants. + with breakpoints and allows us to do what the user wants.

    @@ -135,7 +135,7 @@ or lldb_private::CommandObjectMultiword object.

    lldb_private::CommandObjectMultiword are commands that have subcommands and allow command line commands to be - logically grouped into a hiearchy. + logically grouped into a hiearchy.

    lldb_private::CommandObject command line commands are the objects that implement the functionality of the command. They can optionally define @@ -154,7 +154,7 @@

    The Core source files contain basic functionality that is required in the debugger. A wide variety of classes - are implemented: + are implemented:

    • Address (section offset addressing)
    • @@ -201,7 +201,7 @@ traverse this AST and either generate a DWARF expression that contains simple opcodes that can be quickly re-evaluated each time an expression needs to be evaluated, or JIT'ed - up into code that can be run on the process being debugged. + up into code that can be run on the process being debugged.

    @@ -215,7 +215,7 @@ layer This layer involves everything from spawning, detaching, joing and killing native in process threads, to getting current information about the current host.

    -

    Host functionality includes abstraction layers for: +

    Host functionality includes abstraction layers for:

    • Mutexes
    • Conditions
    • @@ -236,7 +236,7 @@

      The interpreter classes are the classes responsible for being the base classes needed for each command object, and is responsible for tracking and running command line - commands. + commands.

    Modified: lldb/trunk/www/goals.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/goals.html?rev=105784&r1=105783&r2=105784&view=diff ============================================================================== --- lldb/trunk/www/goals.html (original) +++ lldb/trunk/www/goals.html Thu Jun 10 03:12:17 2010 @@ -88,8 +88,9 @@ + - \ No newline at end of file + From jmolenda at apple.com Thu Jun 10 03:23:00 2010 From: jmolenda at apple.com (Jason Molenda) Date: Thu, 10 Jun 2010 08:23:00 -0000 Subject: [Lldb-commits] [lldb] r105785 - /lldb/trunk/www/architecture.html Message-ID: <20100610082300.4DA9F2A6C12C@llvm.org> Author: jmolenda Date: Thu Jun 10 03:23:00 2010 New Revision: 105785 URL: http://llvm.org/viewvc/llvm-project?rev=105785&view=rev Log: Spelling fix from Sebastian Redl. Modified: lldb/trunk/www/architecture.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105785&r1=105784&r2=105785&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Thu Jun 10 03:23:00 2010 @@ -109,7 +109,7 @@

    A collection of classes that implement our breakpoint classes. Breakpoints are resolved symbolically and always continue to - resolve themselves as your program runs. Wether settings breakpoints + resolve themselves as your program runs. Whether settings breakpoints by file and line, by symbol name, by symbol regular expression, or by address, breakpoints will keep trying to resolve new locations each time shared libraries are loaded. Breakpoints will of course From eli.friedman at gmail.com Thu Jun 10 18:00:15 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 23:00:15 -0000 Subject: [Lldb-commits] [lldb] r105794 - /lldb/trunk/include/lldb/lldb-enumerations.h Message-ID: <20100610230015.F29C92A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 18:00:15 2010 New Revision: 105794 URL: http://llvm.org/viewvc/llvm-project?rev=105794&view=rev Log: Remove global init constructor from r105746. Modified: lldb/trunk/include/lldb/lldb-enumerations.h Modified: lldb/trunk/include/lldb/lldb-enumerations.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105794&r1=105793&r2=105794&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-enumerations.h (original) +++ lldb/trunk/include/lldb/lldb-enumerations.h Thu Jun 10 18:00:15 2010 @@ -83,7 +83,7 @@ } // FIXME: Replace uses of eByteOrderHost with getHostByteOrder()! -const ByteOrder eByteOrderHost = getHostByteOrder(); +#define eByteOrderHost getHostByteOrder() //---------------------------------------------------------------------- // Register encoding definitions From eli.friedman at gmail.com Thu Jun 10 18:36:31 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 23:36:31 -0000 Subject: [Lldb-commits] [lldb] r105797 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp Message-ID: <20100610233631.9B9312A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 18:36:31 2010 New Revision: 105797 URL: http://llvm.org/viewvc/llvm-project?rev=105797&view=rev Log: Make qsort_r usage "portable". Why does a function which seems so simple have to be so complicated? Modified: lldb/trunk/include/lldb/Symbol/Symtab.h lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/include/lldb/Symbol/Symtab.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105797&r1=105796&r2=105797&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) +++ lldb/trunk/include/lldb/Symbol/Symtab.h Thu Jun 10 18:36:31 2010 @@ -60,6 +60,7 @@ typedef collection::const_iterator const_iterator; static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); + static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); void InitNameIndexes (); void InitAddressIndexes (); Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105797&r1=105796&r2=105797&view=diff ============================================================================== --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Thu Jun 10 18:36:31 2010 @@ -251,6 +251,10 @@ return 1; } +int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) { + CompareSymbolValueByIndex(thunk, a, b); +} + void Symtab::SortSymbolIndexesByValue (std::vector& indexes, bool remove_duplicates) const { @@ -259,7 +263,12 @@ return; // Sort the indexes in place using qsort + // FIXME: (WRONGDEFINE) Need a better define for this! +#ifdef __APPLE__ ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); +#else + ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); +#endif // Remove any duplicates if requested if (remove_duplicates) From eli.friedman at gmail.com Thu Jun 10 18:45:58 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 23:45:58 -0000 Subject: [Lldb-commits] [lldb] r105798 - in /lldb/trunk: include/lldb/Core/Error.h source/Core/Error.cpp Message-ID: <20100610234558.EDD552A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 18:45:58 2010 New Revision: 105798 URL: http://llvm.org/viewvc/llvm-project?rev=105798&view=rev Log: Make Error.h and Error.cpp compile on Linux. Modified: lldb/trunk/include/lldb/Core/Error.h lldb/trunk/source/Core/Error.cpp Modified: lldb/trunk/include/lldb/Core/Error.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Error.h?rev=105798&r1=105797&r2=105798&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/Error.h (original) +++ lldb/trunk/include/lldb/Core/Error.h Thu Jun 10 18:45:58 2010 @@ -11,7 +11,9 @@ #define __DCError_h__ #if defined(__cplusplus) +#ifdef __APPLE__ #include +#endif #include #include #include @@ -90,7 +92,7 @@ /// A const reference to this object. //------------------------------------------------------------------ const Error& - operator = (kern_return_t err); + operator = (uint32_t err); ~Error(); @@ -200,7 +202,7 @@ /// A mach error code. //------------------------------------------------------------------ void - SetError (kern_return_t err); + SetError (uint32_t err); //------------------------------------------------------------------ /// Set accesssor with an error value and type. Modified: lldb/trunk/source/Core/Error.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Error.cpp?rev=105798&r1=105797&r2=105798&view=diff ============================================================================== --- lldb/trunk/source/Core/Error.cpp (original) +++ lldb/trunk/source/Core/Error.cpp Thu Jun 10 18:45:58 2010 @@ -15,6 +15,9 @@ // Project includes #include "lldb/Core/Error.h" #include "lldb/Core/Log.h" +#include +#include +#include #if defined (__arm__) #include @@ -52,7 +55,7 @@ // Assignment operator //---------------------------------------------------------------------- const Error& -Error::operator = (kern_return_t err) +Error::operator = (uint32_t err) { m_code = err; m_type = eErrorTypeMachKernel; @@ -81,7 +84,9 @@ switch (m_type) { case eErrorTypeMachKernel: +#ifdef __APPLE__ s = ::mach_error_string (m_code); +#endif break; case eErrorTypePOSIX: @@ -223,7 +228,7 @@ // "eErrorTypeMachKernel" //---------------------------------------------------------------------- void -Error::SetError (kern_return_t err) +Error::SetError (uint32_t err) { m_code = err; m_type = eErrorTypeMachKernel; From eli.friedman at gmail.com Thu Jun 10 18:56:16 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Thu, 10 Jun 2010 23:56:16 -0000 Subject: [Lldb-commits] [lldb] r105799 - /lldb/trunk/source/Core/DataExtractor.cpp Message-ID: <20100610235616.3AC9A2A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 18:56:16 2010 New Revision: 105799 URL: http://llvm.org/viewvc/llvm-project?rev=105799&view=rev Log: Remove dependency on Mac-specific libkern/OSByteOrder.h. Modified: lldb/trunk/source/Core/DataExtractor.cpp Modified: lldb/trunk/source/Core/DataExtractor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=105799&r1=105798&r2=105799&view=diff ============================================================================== --- lldb/trunk/source/Core/DataExtractor.cpp (original) +++ lldb/trunk/source/Core/DataExtractor.cpp Thu Jun 10 18:56:16 2010 @@ -8,12 +8,13 @@ //===----------------------------------------------------------------------===// #include -#include #include #include #include +#include "llvm/Support/MathExtras.h" + #include "lldb/Core/DataExtractor.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/Log.h" @@ -25,6 +26,37 @@ using namespace lldb; using namespace lldb_private; +static uint16_t LLDB_ReadInt16(const unsigned char* ptr, unsigned offset) { + uint16_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return val; +} +static uint32_t LLDB_ReadInt32(const unsigned char* ptr, unsigned offset) { + uint32_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return val; +} +static uint64_t LLDB_ReadInt64(const unsigned char* ptr, unsigned offset) { + uint64_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return val; +} +static uint16_t LLDB_ReadSwapInt16(const unsigned char* ptr, unsigned offset) { + uint16_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return llvm::ByteSwap_16(val); +} +static uint32_t LLDB_ReadSwapInt32(const unsigned char* ptr, unsigned offset) { + uint32_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return llvm::ByteSwap_32(val); +} +static uint64_t LLDB_ReadSwapInt64(const unsigned char* ptr, unsigned offset) { + uint64_t val; + memcpy(&val, ptr + offset, sizeof(val)); + return llvm::ByteSwap_64(val); +} + #define NON_PRINTABLE_CHAR '.' //---------------------------------------------------------------------- // Default constructor. @@ -426,9 +458,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt16(m_start, offset); + val = LLDB_ReadSwapInt16(m_start, offset); else - val = _OSReadInt16 (m_start, offset); + val = LLDB_ReadInt16 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); @@ -459,12 +491,12 @@ if (m_byte_order != eByteOrderHost) { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = OSReadSwapInt16 (m_start, offset); + *value_ptr = LLDB_ReadSwapInt16 (m_start, offset); } else { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = _OSReadInt16 (m_start, offset); + *value_ptr = LLDB_ReadInt16 (m_start, offset); } // Advance the offset @@ -490,9 +522,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt32 (m_start, offset); + val = LLDB_ReadSwapInt32 (m_start, offset); else - val = _OSReadInt32 (m_start, offset); + val = LLDB_ReadInt32 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); @@ -523,13 +555,13 @@ if (m_byte_order != eByteOrderHost) { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = OSReadSwapInt32 (m_start, offset); + *value_ptr = LLDB_ReadSwapInt32 (m_start, offset); } else { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = _OSReadInt32 (m_start, offset); + *value_ptr = LLDB_ReadInt32 (m_start, offset); } // Advance the offset @@ -554,9 +586,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt64 (m_start, offset); + val = LLDB_ReadSwapInt64 (m_start, offset); else - val = _OSReadInt64 (m_start, offset); + val = LLDB_ReadInt64 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); @@ -585,13 +617,13 @@ if (m_byte_order != eByteOrderHost) { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = OSReadSwapInt64 (m_start, offset); + *value_ptr = LLDB_ReadSwapInt64 (m_start, offset); } else { for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size) - *value_ptr = _OSReadInt64 (m_start, offset); + *value_ptr = LLDB_ReadInt64 (m_start, offset); } // Advance the offset @@ -710,9 +742,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt32 (m_start, offset); + val = LLDB_ReadSwapInt32 (m_start, offset); else - val = _OSReadInt32 (m_start, offset); + val = LLDB_ReadInt32 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); @@ -728,9 +760,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt64 (m_start, offset); + val = LLDB_ReadSwapInt64 (m_start, offset); else - val = _OSReadInt64 (m_start, offset); + val = LLDB_ReadInt64 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); @@ -750,9 +782,9 @@ if ( ValidOffsetForDataOfSize(offset, sizeof(val)) ) { if (m_byte_order != eByteOrderHost) - val = OSReadSwapInt64 (m_start, offset); + val = LLDB_ReadSwapInt64 (m_start, offset); else - val = _OSReadInt64 (m_start, offset); + val = LLDB_ReadInt64 (m_start, offset); // Advance the offset *offset_ptr += sizeof(val); From gclayton at apple.com Thu Jun 10 19:51:46 2010 From: gclayton at apple.com (Greg Clayton) Date: Fri, 11 Jun 2010 00:51:46 -0000 Subject: [Lldb-commits] [lldb] r105802 - /lldb/trunk/source/Symbol/Symtab.cpp Message-ID: <20100611005146.58C012A6C12C@llvm.org> Author: gclayton Date: Thu Jun 10 19:51:46 2010 New Revision: 105802 URL: http://llvm.org/viewvc/llvm-project?rev=105802&view=rev Log: Fixed an issue where a return value wasn't being returned from Symtab::CompareSymbolValueByIndexLinux. Modified: lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105802&r1=105801&r2=105802&view=diff ============================================================================== --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Thu Jun 10 19:51:46 2010 @@ -251,8 +251,9 @@ return 1; } -int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) { - CompareSymbolValueByIndex(thunk, a, b); +int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) +{ + return CompareSymbolValueByIndex(thunk, a, b); } void From gclayton at apple.com Thu Jun 10 22:25:35 2010 From: gclayton at apple.com (Greg Clayton) Date: Fri, 11 Jun 2010 03:25:35 -0000 Subject: [Lldb-commits] [lldb] r105806 - in /lldb/trunk: include/lldb/ include/lldb/Core/ include/lldb/Symbol/ lldb.xcodeproj/ source/Core/ source/Host/macosx/ source/Plugins/Disassembler/llvm/ source/Plugins/DynamicLoader/MacOSX-DYLD/ source/Plugins/ObjectFile/ELF/ source/Plugins/ObjectFile/Mach-O/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/MacOSX-User/source/MacOSX/ source/Plugins/Process/Utility/ source/Plugins/Process/gdb-remote/ Message-ID: <20100611032535.4ADB62A6C12C@llvm.org> Author: gclayton Date: Thu Jun 10 22:25:34 2010 New Revision: 105806 URL: http://llvm.org/viewvc/llvm-project?rev=105806&view=rev Log: Made lldb_private::ArchSpec more generic so that it can take a mach-o cpu type and sub-type, or an ELF e_machine value. Also added a generic CPU type to the arch spec class so we can have a single arch definition that the LLDB core code can use. Previously a lot of places in the code were using the mach-o definitions from a macosx header file. Switches over to using "llvm/Support/MachO.h" for the llvm::MachO::XXX for the CPU types and sub types for mach-o ArchSpecs. Added "llvm/Support/ELF.h" so we can use the "llvm::ELF::XXX" defines for the ELF ArchSpecs. Got rid of all CPU_TYPE_ and CPU_SUBTYPE_ defines that were previously being used in LLDB. Modified: lldb/trunk/include/lldb/Core/ArchSpec.h lldb/trunk/include/lldb/Symbol/ObjectFile.h lldb/trunk/include/lldb/lldb-enumerations.h lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Core/ArchSpec.cpp lldb/trunk/source/Host/macosx/Symbols.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.h lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.h lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.h lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/include/lldb/Core/ArchSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/ArchSpec.h (original) +++ lldb/trunk/include/lldb/Core/ArchSpec.h Thu Jun 10 22:25:34 2010 @@ -28,6 +28,19 @@ class ArchSpec { public: + // Generic CPU types that each m_type needs to know how to convert + // their m_cpu and m_sub to. + typedef enum CPU + { + eCPU_Unknown, + eCPU_arm, + eCPU_i386, + eCPU_x86_64, + eCPU_ppc, + eCPU_ppc64, + eCPU_sparc + }; + //------------------------------------------------------------------ /// Default constructor. /// @@ -42,7 +55,7 @@ /// Constructor that initializes the object with supplied cpu and /// subtypes. //------------------------------------------------------------------ - ArchSpec (uint32_t cpu, uint32_t sub); + ArchSpec (lldb::ArchitectureType arch_type, uint32_t cpu, uint32_t sub); //------------------------------------------------------------------ /// Construct with architecture name. @@ -108,7 +121,7 @@ /// freed. //------------------------------------------------------------------ static const char * - AsCString (uint32_t cpu, uint32_t subtype); + AsCString (lldb::ArchitectureType arch_type, uint32_t cpu, uint32_t subtype); //------------------------------------------------------------------ /// Clears the object state. @@ -127,6 +140,10 @@ uint32_t GetAddressByteSize () const; + + CPU + GetGenericCPUType () const; + //------------------------------------------------------------------ /// CPU subtype get accessor. /// @@ -194,7 +211,7 @@ /// String values that are returned do not need to be freed. //------------------------------------------------------------------ static const char * - GetRegisterName (uint32_t cpu, uint32_t subtype, uint32_t reg_num, uint32_t flavor); + GetRegisterName (lldb::ArchitectureType arch_type, uint32_t cpu, uint32_t subtype, uint32_t reg_num, uint32_t flavor); //------------------------------------------------------------------ /// Test if the contained architecture is valid. @@ -271,12 +288,22 @@ //------------------------------------------------------------------ lldb::ByteOrder GetDefaultEndian () const; + + + lldb::ArchitectureType + GetType() const + { + return m_type; + } + protected: //------------------------------------------------------------------ // Member variables //------------------------------------------------------------------ - uint32_t m_cpu; ///< The cpu type of the architecture - uint32_t m_sub; ///< The cpu subtype of the architecture + lldb::ArchitectureType m_type; + // m_type => eArchTypeMachO eArchTypeELF + uint32_t m_cpu; // cpu type ELF header e_machine + uint32_t m_sub; // cpu subtype nothing }; Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original) +++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Thu Jun 10 22:25:34 2010 @@ -33,15 +33,6 @@ /// the same file, or archive files that contain multiple objects /// (ranlib archives) (possibly for multiple architectures as well). /// -/// It is possible to determine how many architectures an object file -/// contains by using the ObjectFile::GetNumArchitectures() const -/// accessor function. The individual architectures can be extracted -/// using the -/// ObjectFile::GetArchitectureAtIndex (uint32_t, ArchSpec&) const -/// function. The object file can also be asked to select one of these -/// architectures using the -/// ObjectFile::SetArchitecture (const ArchSpec&) function. -/// /// Object archive files (e.g. ranlib archives) can contain /// multiple .o (object) files that must be selected by index or by name. /// The number of objects that an ObjectFile contains can be determined Modified: lldb/trunk/include/lldb/lldb-enumerations.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-enumerations.h (original) +++ lldb/trunk/include/lldb/lldb-enumerations.h Thu Jun 10 22:25:34 2010 @@ -354,6 +354,15 @@ eInputReaderDone // reader was just popped off the stack and is done } InputReaderAction; + +typedef enum ArchitectureType +{ + eArchTypeInvalid, + eArchTypeMachO, + eArchTypeELF, + kNumArchTypes +} ArchitectureType; + } // namespace lldb Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Jun 10 22:25:34 2010 @@ -527,7 +527,7 @@ 2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExtractorGDBRemote.cpp; path = source/Utility/StringExtractorGDBRemote.cpp; sourceTree = ""; }; 2676A094119C93C8008A98EF /* StringExtractorGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringExtractorGDBRemote.h; path = source/Utility/StringExtractorGDBRemote.h; sourceTree = ""; }; 2682F16A115EDA0D00CCFF99 /* PseudoTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PseudoTerminal.cpp; path = source/Utility/PseudoTerminal.cpp; sourceTree = ""; }; - 2682F16B115EDA0D00CCFF99 /* PseudoTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PseudoTerminal.h; path = source/Utility/PseudoTerminal.h; sourceTree = ""; }; + 2682F16B115EDA0D00CCFF99 /* PseudoTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PseudoTerminal.h; path = include/lldb/Utility/PseudoTerminal.h; sourceTree = ""; }; 2682F284115EF3A700CCFF99 /* SBError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBError.cpp; path = source/API/SBError.cpp; sourceTree = ""; }; 2682F286115EF3BD00CCFF99 /* SBError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBError.h; path = include/lldb/API/SBError.h; sourceTree = ""; }; 2689B0A4113EE3CD00A4AEDB /* Symbols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbols.h; path = include/lldb/Host/Symbols.h; sourceTree = ""; }; Modified: lldb/trunk/source/Core/ArchSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Core/ArchSpec.cpp (original) +++ lldb/trunk/source/Core/ArchSpec.cpp Thu Jun 10 22:25:34 2010 @@ -9,43 +9,19 @@ #include "lldb/Core/ArchSpec.h" -#include -#include +//#include +//#include #include +#include "llvm/Support/ELF.h" +#include "llvm/Support/MachO.h" + using namespace lldb; using namespace lldb_private; #define ARCH_SPEC_SEPARATOR_CHAR '-' -#ifndef CPU_TYPE_ARM -#define CPU_TYPE_ARM ((cpu_type_t) 12) -#endif - -#ifndef CPU_SUBTYPE_ARM_ALL -#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) -#endif - -#ifndef CPU_SUBTYPE_ARM_V4T -#define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) -#endif - -#ifndef CPU_SUBTYPE_ARM_V6 -#define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) -#endif - -#ifndef CPU_SUBTYPE_ARM_V5TEJ -#define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) -#endif - -#ifndef CPU_SUBTYPE_ARM_XSCALE -#define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) -#endif - -#ifndef CPU_SUBTYPE_ARM_V7 -#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) -#endif //---------------------------------------------------------------------- // A structure that describes all of the information we want to know @@ -58,6 +34,16 @@ const char *name; }; + +static const char *g_arch_type_strings[] = +{ + "invalid", + "mach-o", + "elf" +}; + +#define CPU_ANY (UINT32_MAX) + //---------------------------------------------------------------------- // A table that gets searched linearly for matches. This table is used // to convert cpu type and subtypes to architecture names, and to @@ -65,38 +51,38 @@ // is important and allows the precedence to be set when the table is // built. //---------------------------------------------------------------------- -static ArchDefinition g_arch_defs[] = +static ArchDefinition g_mach_arch_defs[] = { - { CPU_TYPE_ANY, CPU_TYPE_ANY , "all" }, - { CPU_TYPE_ARM, CPU_TYPE_ANY , "arm" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_ALL , "arm" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V4T , "armv4" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V5TEJ , "armv5" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V6 , "armv6" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V7 , "armv7" }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_XSCALE , "xscale" }, - { CPU_TYPE_POWERPC, CPU_TYPE_ANY , "ppc" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_ALL , "ppc" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_601 , "ppc601" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_602 , "ppc602" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_603 , "ppc603" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_603e , "ppc603e" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_603ev , "ppc603ev" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_604 , "ppc604" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_604e , "ppc604e" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_620 , "ppc620" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_750 , "ppc750" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_7400 , "ppc7400" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_7450 , "ppc7450" }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_970 , "ppc970" }, - { CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC_ALL , "ppc64" }, - { CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC_970 , "ppc970-64" }, - { CPU_TYPE_I386, CPU_SUBTYPE_I386_ALL , "i386" }, - { CPU_TYPE_I386, CPU_SUBTYPE_486 , "i486" }, - { CPU_TYPE_I386, CPU_SUBTYPE_486SX , "i486sx" }, - { CPU_TYPE_I386, CPU_TYPE_ANY , "i386" }, - { CPU_TYPE_X86_64, CPU_SUBTYPE_X86_64_ALL , "x86_64" }, - { CPU_TYPE_X86_64, CPU_TYPE_ANY , "x86_64" }, + { CPU_ANY, CPU_ANY , "all" }, + { llvm::MachO::CPUTypeARM, CPU_ANY , "arm" }, + { llvm::MachO::CPUTypeARM, 0 , "arm" }, + { llvm::MachO::CPUTypeARM, 5 , "armv4" }, + { llvm::MachO::CPUTypeARM, 6 , "armv6" }, + { llvm::MachO::CPUTypeARM, 7 , "armv5" }, + { llvm::MachO::CPUTypeARM, 8 , "xscale" }, + { llvm::MachO::CPUTypeARM, 9 , "armv7" }, + { llvm::MachO::CPUTypePowerPC, CPU_ANY , "ppc" }, + { llvm::MachO::CPUTypePowerPC, 0 , "ppc" }, + { llvm::MachO::CPUTypePowerPC, 1 , "ppc601" }, + { llvm::MachO::CPUTypePowerPC, 2 , "ppc602" }, + { llvm::MachO::CPUTypePowerPC, 3 , "ppc603" }, + { llvm::MachO::CPUTypePowerPC, 4 , "ppc603e" }, + { llvm::MachO::CPUTypePowerPC, 5 , "ppc603ev" }, + { llvm::MachO::CPUTypePowerPC, 6 , "ppc604" }, + { llvm::MachO::CPUTypePowerPC, 7 , "ppc604e" }, + { llvm::MachO::CPUTypePowerPC, 8 , "ppc620" }, + { llvm::MachO::CPUTypePowerPC, 9 , "ppc750" }, + { llvm::MachO::CPUTypePowerPC, 10 , "ppc7400" }, + { llvm::MachO::CPUTypePowerPC, 11 , "ppc7450" }, + { llvm::MachO::CPUTypePowerPC, 100 , "ppc970" }, + { llvm::MachO::CPUTypePowerPC64, 0 , "ppc64" }, + { llvm::MachO::CPUTypePowerPC64, 100 , "ppc970-64" }, + { llvm::MachO::CPUTypeI386, 3 , "i386" }, + { llvm::MachO::CPUTypeI386, 4 , "i486" }, + { llvm::MachO::CPUTypeI386, 0x84 , "i486sx" }, + { llvm::MachO::CPUTypeI386, CPU_ANY , "i386" }, + { llvm::MachO::CPUTypeX86_64, 3 , "x86_64" }, + { llvm::MachO::CPUTypeX86_64, CPU_ANY , "x86_64" }, // TODO: when we get a platform that knows more about the host OS we should // let it call some accessor funcitons to set the default system arch for @@ -104,29 +90,74 @@ // table. #if defined (__i386__) || defined(__x86_64__) - { CPU_TYPE_X86_64, CPU_SUBTYPE_X86_64_ALL , LLDB_ARCH_DEFAULT }, - { CPU_TYPE_I386, CPU_SUBTYPE_I386_ALL , LLDB_ARCH_DEFAULT_32BIT }, - { CPU_TYPE_X86_64, CPU_SUBTYPE_X86_64_ALL , LLDB_ARCH_DEFAULT_64BIT }, + { llvm::MachO::CPUTypeX86_64, 3 , LLDB_ARCH_DEFAULT }, + { llvm::MachO::CPUTypeI386, 3 , LLDB_ARCH_DEFAULT_32BIT }, + { llvm::MachO::CPUTypeX86_64, 3 , LLDB_ARCH_DEFAULT_64BIT }, #elif defined (__arm__) - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V6 , LLDB_ARCH_DEFAULT }, - { CPU_TYPE_ARM, CPU_SUBTYPE_ARM_V6 , LLDB_ARCH_DEFAULT_32BIT }, + { llvm::MachO::CPUTypeARM, 6 , LLDB_ARCH_DEFAULT }, + { llvm::MachO::CPUTypeARM, 6 , LLDB_ARCH_DEFAULT_32BIT }, #elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__) - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_7400 , LLDB_ARCH_DEFAULT }, - { CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_7400 , LLDB_ARCH_DEFAULT_32BIT }, - { CPU_TYPE_POWERPC64, CPU_SUBTYPE_POWERPC_970 , LLDB_ARCH_DEFAULT_64BIT }, + { llvm::MachO::CPUTypePowerPC, 10 , LLDB_ARCH_DEFAULT }, + { llvm::MachO::CPUTypePowerPC, 10 , LLDB_ARCH_DEFAULT_32BIT }, + { llvm::MachO::CPUTypePowerPC64, 100 , LLDB_ARCH_DEFAULT_64BIT }, #endif }; //---------------------------------------------------------------------- // Figure out how many architecture definitions we have //---------------------------------------------------------------------- -const size_t k_num_arch_defs = sizeof(g_arch_defs)/sizeof(ArchDefinition); +const size_t k_num_mach_arch_defs = sizeof(g_mach_arch_defs)/sizeof(ArchDefinition); + + + +//---------------------------------------------------------------------- +// A table that gets searched linearly for matches. This table is used +// to convert cpu type and subtypes to architecture names, and to +// convert architecture names to cpu types and subtypes. The ordering +// is important and allows the precedence to be set when the table is +// built. +//---------------------------------------------------------------------- +static ArchDefinition g_elf_arch_defs[] = +{ + { llvm::ELF::EM_M32 , 0, "m32" }, // AT&T WE 32100 + { llvm::ELF::EM_SPARC , 0, "sparc" }, // AT&T WE 32100 + { llvm::ELF::EM_386 , 0, "i386" }, // Intel 80386 + { llvm::ELF::EM_68K , 0, "68k" }, // Motorola 68000 + { llvm::ELF::EM_88K , 0, "88k" }, // Motorola 88000 + { llvm::ELF::EM_486 , 0, "i486" }, // Intel 486 (deprecated) + { llvm::ELF::EM_860 , 0, "860" }, // Intel 80860 + { llvm::ELF::EM_MIPS , 0, "rs3000" }, // MIPS RS3000 + { llvm::ELF::EM_PPC , 0, "ppc" }, // PowerPC + { 21 , 0, "ppc64" }, // PowerPC64 + { llvm::ELF::EM_ARM , 0, "arm" }, // ARM + { llvm::ELF::EM_ALPHA , 0, "alpha" }, // DEC Alpha + { llvm::ELF::EM_SPARCV9, 0, "sparc9" }, // SPARC V9 + { llvm::ELF::EM_X86_64 , 0, "x86_64" }, // AMD64 +#if defined (__i386__) || defined(__x86_64__) + { llvm::ELF::EM_X86_64 , 0, LLDB_ARCH_DEFAULT }, + { llvm::ELF::EM_386 , 0, LLDB_ARCH_DEFAULT_32BIT }, + { llvm::ELF::EM_X86_64 , 0, LLDB_ARCH_DEFAULT_64BIT }, +#elif defined (__arm__) + { llvm::ELF::EM_ARM , 0, LLDB_ARCH_DEFAULT }, + { llvm::ELF::EM_ARM , 0, LLDB_ARCH_DEFAULT_32BIT }, +#elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__) + { llvm::ELF::EM_PPC , 0, LLDB_ARCH_DEFAULT }, + { llvm::ELF::EM_PPC , 0, LLDB_ARCH_DEFAULT_32BIT }, + { llvm::ELF::EM_PPC64 , 0, LLDB_ARCH_DEFAULT_64BIT }, +#endif +}; + +//---------------------------------------------------------------------- +// Figure out how many architecture definitions we have +//---------------------------------------------------------------------- +const size_t k_num_elf_arch_defs = sizeof(g_elf_arch_defs)/sizeof(ArchDefinition); //---------------------------------------------------------------------- // Default constructor //---------------------------------------------------------------------- ArchSpec::ArchSpec() : + m_type (eArchTypeMachO), // Use the most complete arch definition which will always be translatable to any other ArchitectureType values m_cpu (LLDB_INVALID_CPUTYPE), m_sub (0) { @@ -136,7 +167,8 @@ // Constructor that initializes the object with supplied cpu and // subtypes. //---------------------------------------------------------------------- -ArchSpec::ArchSpec(uint32_t cpu, uint32_t sub) : +ArchSpec::ArchSpec (lldb::ArchitectureType arch_type, uint32_t cpu, uint32_t sub) : + m_type (arch_type), m_cpu (cpu), m_sub (sub) { @@ -156,12 +188,13 @@ // liblldb_ARCH_DEFAULT_32BIT // The 64 bit arch the current system defaults to (if any) //---------------------------------------------------------------------- -ArchSpec::ArchSpec(const char *arch_name) : +ArchSpec::ArchSpec (const char *arch_name) : + m_type (eArchTypeMachO), // Use the most complete arch definition which will always be translatable to any other ArchitectureType values m_cpu (LLDB_INVALID_CPUTYPE), m_sub (0) { if (arch_name) - SetArch(arch_name); + SetArch (arch_name); } //---------------------------------------------------------------------- @@ -179,6 +212,7 @@ { if (this != &rhs) { + m_type = rhs.m_type; m_cpu = rhs.m_cpu; m_sub = rhs.m_sub; } @@ -191,7 +225,7 @@ const char * ArchSpec::AsCString() const { - return ArchSpec::AsCString(m_cpu, m_sub); + return ArchSpec::AsCString(m_type, m_cpu, m_sub); } //---------------------------------------------------------------------- @@ -199,23 +233,55 @@ // and subtype. //---------------------------------------------------------------------- const char * -ArchSpec::AsCString(uint32_t cpu, uint32_t sub) +ArchSpec::AsCString (lldb::ArchitectureType arch_type, uint32_t cpu, uint32_t sub) { - for (uint32_t i=0; i= kNumArchTypes) + return NULL; + + switch (arch_type) { - if (cpu == g_arch_defs[i].cpu) + case eArchTypeInvalid: + break; + + case eArchTypeMachO: + for (uint32_t i=0; iGetTarget().GetImages().FindFirstModuleForFileSpec (m_dyld.file_spec); if (dyld_module_sp.get() == NULL || dyld_module_sp->GetArchitecture() != dyld_arch) @@ -591,7 +591,7 @@ ModuleList loaded_module_list; for (uint32_t idx = 0; idxGetTarget().GetImages().FindFirstModuleForFileSpec (m_dyld_image_infos[idx].file_spec)); if (image_module_sp.get() == NULL || image_module_sp->GetArchitecture() != arch_spec) { @@ -829,7 +829,7 @@ if (exe_idx < m_dyld_image_infos.size()) { bool set_executable = false; - ArchSpec dyld_exe_arch_spec(m_dyld_image_infos[exe_idx].header.cputype, m_dyld_image_infos[exe_idx].header.cpusubtype); + ArchSpec dyld_exe_arch_spec(eArchTypeMachO, m_dyld_image_infos[exe_idx].header.cputype, m_dyld_image_infos[exe_idx].header.cpusubtype); ModuleSP exe_module_sp(m_process->GetTarget().GetExecutableModule()); if (exe_module_sp.get()) { Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Thu Jun 10 22:25:34 2010 @@ -25,8 +25,6 @@ #define CASE_AND_STREAM(s, def, width) case def: s->Printf("%-*s", width, #def); break; -static uint32_t ELFMachineToMachCPU(Elf32_Half machine); - using namespace lldb; using namespace lldb_private; using namespace std; @@ -824,24 +822,6 @@ } } -static uint32_t -ELFMachineToMachCPU(Elf32_Half machine) -{ - switch (machine) - { - case EM_SPARC: return CPU_TYPE_SPARC; - case EM_386: return CPU_TYPE_I386; - case EM_68K: return CPU_TYPE_MC680x0; - case EM_88K: return CPU_TYPE_MC88000; - case EM_860: return CPU_TYPE_I860; - case EM_MIPS: return 8; // commented out in mach/machine.h - case EM_PPC: return CPU_TYPE_POWERPC; - case EM_PPC64: return CPU_TYPE_POWERPC64; - case EM_ARM: return 12; // commented out in mach/machine.h - } - return 0; -} - bool ObjectFileELF::GetTargetTriple (ConstString &target_triple) { @@ -866,10 +846,10 @@ case EM_PPC64: triple.assign("powerpc64-"); break; case EM_ARM: triple.assign("arm-"); break; } - // TODO: determine if there is a vendor in the ELF? Default to "apple" for now - triple += "apple-"; - // TODO: determine if there is an OS in the ELF? Default to "darwin" for now - triple += "darwin10"; + // TODO: determine if there is a vendor in the ELF? Default to "linux" for now + triple += "linux-"; + // TODO: determine if there is an OS in the ELF? Default to "gnu" for now + triple += "gnu"; g_target_triple.SetCString(triple.c_str()); target_triple = g_target_triple; } @@ -877,14 +857,6 @@ } -//bool -//ELF32RuntimeFileParser::GetArch(ArchSpec &arch) const -//{ -// arch.SetCPUType(ELFMachineToMachCPU(m_header.e_machine)); -// arch.SetCPUSubtype(ArchSpec::eAny); -// return true; -//} - //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Thu Jun 10 22:25:34 2010 @@ -171,7 +171,7 @@ { m_data.GetU32(&offset, &m_header.cputype, 6); - ArchSpec mach_arch(m_header.cputype, m_header.cpusubtype); + ArchSpec mach_arch(eArchTypeMachO, m_header.cputype, m_header.cpusubtype); if (mach_arch == m_module->GetArchitecture()) { // Read in all only the load command data @@ -1168,7 +1168,7 @@ else s->PutCString("ObjectFileMachO32"); - ArchSpec header_arch(m_header.cputype, m_header.cpusubtype); + ArchSpec header_arch(eArchTypeMachO, m_header.cputype, m_header.cpusubtype); *s << ", file = '" << m_file << "', arch = " << header_arch.AsCString() << "\n"; Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp Thu Jun 10 22:25:34 2010 @@ -94,13 +94,6 @@ } - -uint32_t -MachThreadContext_arm::GetCPUType() -{ - return CPU_TYPE_ARM; -} - void MachThreadContext_arm::ThreadWillResume() { @@ -1879,6 +1872,6 @@ void MachThreadContext_arm::Initialize() { - ArchSpec arch_spec(CPU_TYPE_ARM, CPU_TYPE_ANY); + ArchSpec arch_spec(eArchTypeMachO, 12, UINT32_MAX); ProcessMacOSX::AddArchCreateCallback(arch_spec, MachThreadContext_arm::Create); } Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.h (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.h Thu Jun 10 22:25:34 2010 @@ -46,9 +46,6 @@ virtual void RefreshStateAfterStop (); - static uint32_t - GetCPUType (); - protected: kern_return_t EnableHardwareSingleStep (bool enable); Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.cpp Thu Jun 10 22:25:34 2010 @@ -55,13 +55,6 @@ m_flags_reg = reg_ctx->ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS); } - -uint32_t -MachThreadContext_i386::GetCPUType() -{ - return CPU_TYPE_I386; -} - void MachThreadContext_i386::ThreadWillResume() { Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.h (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_i386.h Thu Jun 10 22:25:34 2010 @@ -40,7 +40,6 @@ virtual bool NotifyException(MachException::Data& exc); virtual size_t GetStackFrameData(lldb_private::StackFrame *first_frame, std::vector >& fp_pc_pairs); - static uint32_t GetCPUType(); protected: // kern_return_t EnableHardwareSingleStep (bool enable); Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.cpp Thu Jun 10 22:25:34 2010 @@ -54,12 +54,6 @@ m_flags_reg = reg_ctx->ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS); } -uint32_t -MachThreadContext_x86_64::GetCPUType() -{ - return CPU_TYPE_X86_64; -} - void MachThreadContext_x86_64::ThreadWillResume() { Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.h?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.h (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_x86_64.h Thu Jun 10 22:25:34 2010 @@ -54,9 +54,6 @@ virtual size_t GetStackFrameData (lldb_private::StackFrame *first_frame, std::vector >& fp_pc_pairs); - static uint32_t - GetCPUType(); - protected: // kern_return_t EnableHardwareSingleStep (bool enable); uint32_t m_flags_reg; 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=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Thu Jun 10 22:25:34 2010 @@ -532,31 +532,32 @@ static const uint8_t g_ppc_breakpoint_opcode[] = { 0x7F, 0xC0, 0x00, 0x08 }; static const uint8_t g_i386_breakpoint_opcode[] = { 0xCC }; - switch (m_arch_spec.GetCPUType()) + ArchSpec::CPU arch_cpu = m_arch_spec.GetGenericCPUType(); + switch (arch_cpu) { - case CPU_TYPE_ARM: + case ArchSpec::eCPU_i386: + case ArchSpec::eCPU_x86_64: + trap_opcode = g_i386_breakpoint_opcode; + trap_opcode_size = sizeof(g_i386_breakpoint_opcode); + break; + + case ArchSpec::eCPU_arm: // TODO: fill this in for ARM. We need to dig up the symbol for // the address in the breakpoint locaiton and figure out if it is // an ARM or Thumb breakpoint. trap_opcode = g_arm_breakpoint_opcode; trap_opcode_size = sizeof(g_arm_breakpoint_opcode); break; - - case CPU_TYPE_POWERPC: - case CPU_TYPE_POWERPC64: + + case ArchSpec::eCPU_ppc: + case ArchSpec::eCPU_ppc64: trap_opcode = g_ppc_breakpoint_opcode; trap_opcode_size = sizeof(g_ppc_breakpoint_opcode); break; - case CPU_TYPE_I386: - case CPU_TYPE_X86_64: - trap_opcode = g_i386_breakpoint_opcode; - trap_opcode_size = sizeof(g_i386_breakpoint_opcode); - break; - default: assert(!"Unhandled architecture in ProcessMacOSX::GetSoftwareBreakpointTrapOpcode()"); - return 0; + break; } if (trap_opcode && trap_opcode_size) @@ -1721,16 +1722,19 @@ // We don't need to do this for ARM, and we really shouldn't now that we // have multiple CPU subtypes and no posix_spawnattr call that allows us // to set which CPU subtype to launch... - cpu_type_t cpu = arch_spec.GetCPUType(); - if (cpu != 0 && cpu != CPU_TYPE_ANY && cpu != LLDB_INVALID_CPUTYPE) + if (arch_spec.GetType() == eArchTypeMachO) { - size_t ocount = 0; - err.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX); - if (err.Fail() || log) - err.PutToLog(log, "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount); + cpu_type_t cpu = arch_spec.GetCPUType(); + if (cpu != 0 && cpu != UINT32_MAX && cpu != LLDB_INVALID_CPUTYPE) + { + size_t ocount = 0; + err.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX); + if (err.Fail() || log) + err.PutToLog(log, "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount); - if (err.Fail() != 0 || ocount != 1) - return LLDB_INVALID_PROCESS_ID; + if (err.Fail() != 0 || ocount != 1) + return LLDB_INVALID_PROCESS_ID; + } } #endif Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp?rev=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp (original) +++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp Thu Jun 10 22:25:34 2010 @@ -1153,38 +1153,14 @@ // Set this to zero in case we can't tell if there are any HW breakpoints g_num_supported_hw_breakpoints = 0; - // Read the DBGDIDR to get the number of available hardware breakpoints - // However, in some of our current armv7 processors, hardware - // breakpoints/watchpoints were not properly connected. So detect those - // cases using a field in a sysctl. For now we are using "hw.cpusubtype" - // field to distinguish CPU architectures. This is a hack until we can - // get fixed, at which point we will switch to - // using a different sysctl string that will tell us how many BRPs - // are available to us directly without having to read DBGDIDR. uint32_t register_DBGDIDR; asm("mrc p14, 0, %0, c0, c0, 0" : "=r" (register_DBGDIDR)); - uint32_t numBRPs = bits(register_DBGDIDR, 27, 24); + g_num_supported_hw_breakpoints = bits(register_DBGDIDR, 27, 24); // Zero is reserved for the BRP count, so don't increment it if it is zero - if (numBRPs > 0) - numBRPs++; - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "DBGDIDR=0x%8.8x (number BRP pairs = %u)", register_DBGDIDR, numBRPs); - - if (numBRPs > 0) - { - uint32_t cpu_subtype; - size_t len; - len = sizeof(cpusubtype); - // TODO: remove this hack and change to using hw.optional.xx when implmented - if (::sysctlbyname("hw.cpusubtype", &cpusubtype, &len, NULL, 0) == 0) - { - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "hw.cpusubtype=0x%d", cpusubtype); - if (cpusubtype == CPU_SUBTYPE_ARM_V7) - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "Hardware breakpoints disabled for armv7 (rdar://problem/6372672)"); - else - g_num_supported_hw_breakpoints = numBRPs; - } - } + if (g_num_supported_hw_breakpoints > 0) + g_num_supported_hw_breakpoints++; + ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "DBGDIDR=0x%8.8x (number BRP pairs = %u)", register_DBGDIDR, g_num_supported_hw_breakpoints); } return g_num_supported_hw_breakpoints; @@ -1306,37 +1282,11 @@ { // Set this to zero in case we can't tell if there are any HW breakpoints g_num_supported_hw_watchpoints = 0; - // Read the DBGDIDR to get the number of available hardware breakpoints - // However, in some of our current armv7 processors, hardware - // breakpoints/watchpoints were not properly connected. So detect those - // cases using a field in a sysctl. For now we are using "hw.cpusubtype" - // field to distinguish CPU architectures. This is a hack until we can - // get fixed, at which point we will switch to - // using a different sysctl string that will tell us how many WRPs - // are available to us directly without having to read DBGDIDR. uint32_t register_DBGDIDR; asm("mrc p14, 0, %0, c0, c0, 0" : "=r" (register_DBGDIDR)); - uint32_t numWRPs = bits(register_DBGDIDR, 31, 28) + 1; - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "DBGDIDR=0x%8.8x (number WRP pairs = %u)", register_DBGDIDR, numWRPs); - - if (numWRPs > 0) - { - uint32_t cpusubtype; - size_t len; - len = sizeof(cpusubtype); - // TODO: remove this hack and change to using hw.optional.xx when implmented - if (::sysctlbyname("hw.cpusubtype", &cpusubtype, &len, NULL, 0) == 0) - { - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "hw.cpusubtype=0x%d", cpusubtype); - - if (cpusubtype == CPU_SUBTYPE_ARM_V7) - ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "Hardware watchpoints disabled for armv7 (rdar://problem/6372672)"); - else - g_num_supported_hw_watchpoints = numWRPs; - } - } - + g_num_supported_hw_watchpoints = bits(register_DBGDIDR, 31, 28) + 1; + ProcessMacOSXLog::LogIf(PD_LOG_THREAD, "DBGDIDR=0x%8.8x (number WRP pairs = %u)", register_DBGDIDR, g_num_supported_hw_watchpoints); } return g_num_supported_hw_watchpoints; #else 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=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/MacOSXLibunwindCallbacks.cpp Thu Jun 10 22:25:34 2010 @@ -250,15 +250,16 @@ if (arg == 0) return -1; - Thread *th = (Thread *) arg; - const ArchSpec target_arch (th->GetProcess().GetTarget().GetArchitecture ()); + Thread *thread = (Thread *) arg; - if (target_arch.GetCPUType() == CPU_TYPE_I386) + const ArchSpec::CPU arch_cpu = thread->GetProcess().GetTarget().GetArchitecture ().GetGenericCPUType(); + + if (arch_cpu == ArchSpec::eCPU_i386) { if (EDGetDisassembler (&disasm, "i386-apple-darwin", kEDAssemblySyntaxX86ATT) != 0) return -1; } - else if (target_arch.GetCPUType() == CPU_TYPE_X86_64) + else if (arch_cpu == ArchSpec::eCPU_x86_64) { if (EDGetDisassembler (&disasm, "x86_64-apple-darwin", kEDAssemblySyntaxX86ATT) != 0) return -1; 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=105806&r1=105805&r2=105806&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Jun 10 22:25:34 2010 @@ -875,31 +875,32 @@ static const uint8_t g_ppc_breakpoint_opcode[] = { 0x7F, 0xC0, 0x00, 0x08 }; static const uint8_t g_i386_breakpoint_opcode[] = { 0xCC }; - switch (m_arch_spec.GetCPUType()) + ArchSpec::CPU arch_cpu = m_arch_spec.GetGenericCPUType(); + switch (arch_cpu) { - case CPU_TYPE_ARM: - // TODO: fill this in for ARM. We need to dig up the symbol for - // the address in the breakpoint locaiton and figure out if it is - // an ARM or Thumb breakpoint. - trap_opcode = g_arm_breakpoint_opcode; - trap_opcode_size = sizeof(g_arm_breakpoint_opcode); - break; - - case CPU_TYPE_POWERPC: - case CPU_TYPE_POWERPC64: - trap_opcode = g_ppc_breakpoint_opcode; - trap_opcode_size = sizeof(g_ppc_breakpoint_opcode); - break; - - case CPU_TYPE_I386: - case CPU_TYPE_X86_64: - trap_opcode = g_i386_breakpoint_opcode; - trap_opcode_size = sizeof(g_i386_breakpoint_opcode); - break; - - default: - assert(!"Unhandled architecture in ProcessGDBRemote::GetSoftwareBreakpointTrapOpcode()"); - return 0; + case ArchSpec::eCPU_i386: + case ArchSpec::eCPU_x86_64: + trap_opcode = g_i386_breakpoint_opcode; + trap_opcode_size = sizeof(g_i386_breakpoint_opcode); + break; + + case ArchSpec::eCPU_arm: + // TODO: fill this in for ARM. We need to dig up the symbol for + // the address in the breakpoint locaiton and figure out if it is + // an ARM or Thumb breakpoint. + trap_opcode = g_arm_breakpoint_opcode; + trap_opcode_size = sizeof(g_arm_breakpoint_opcode); + break; + + case ArchSpec::eCPU_ppc: + case ArchSpec::eCPU_ppc64: + trap_opcode = g_ppc_breakpoint_opcode; + trap_opcode_size = sizeof(g_ppc_breakpoint_opcode); + break; + + default: + assert(!"Unhandled architecture in ProcessMacOSX::GetSoftwareBreakpointTrapOpcode()"); + break; } if (trap_opcode && trap_opcode_size) @@ -1719,16 +1720,19 @@ // We don't need to do this for ARM, and we really shouldn't now that we // have multiple CPU subtypes and no posix_spawnattr call that allows us // to set which CPU subtype to launch... - cpu_type_t cpu = inferior_arch.GetCPUType(); - if (cpu != 0 && cpu != CPU_TYPE_ANY && cpu != LLDB_INVALID_CPUTYPE) + if (inferior_arch.GetType() == eArchTypeMachO) { - size_t ocount = 0; - error.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX); - if (error.Fail() || log) - error.PutToLog(log, "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount); + cpu_type_t cpu = inferior_arch.GetCPUType(); + if (cpu != 0 && cpu != UINT32_MAX && cpu != LLDB_INVALID_CPUTYPE) + { + size_t ocount = 0; + error.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX); + if (error.Fail() || log) + error.PutToLog(log, "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount); - if (error.Fail() != 0 || ocount != 1) - return error; + if (error.Fail() != 0 || ocount != 1) + return error; + } } #endif @@ -2175,9 +2179,11 @@ ProcessGDBRemote::GetLibUnwindAddressSpace () { unw_targettype_t target_type = UNW_TARGET_UNSPECIFIED; - if (m_target.GetArchitecture().GetCPUType() == CPU_TYPE_I386) + + ArchSpec::CPU arch_cpu = m_target.GetArchitecture().GetGenericCPUType(); + if (arch_cpu == ArchSpec::eCPU_i386) target_type = UNW_TARGET_I386; - if (m_target.GetArchitecture().GetCPUType() == CPU_TYPE_X86_64) + else if (arch_cpu == ArchSpec::eCPU_x86_64) target_type = UNW_TARGET_X86_64; if (m_libunwind_addr_space) From eli.friedman at gmail.com Thu Jun 10 23:24:36 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:24:36 -0000 Subject: [Lldb-commits] [lldb] r105808 - /lldb/trunk/include/lldb/Core/ArchSpec.h Message-ID: <20100611042436.D064F2A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:24:36 2010 New Revision: 105808 URL: http://llvm.org/viewvc/llvm-project?rev=105808&view=rev Log: Fix warning. Modified: lldb/trunk/include/lldb/Core/ArchSpec.h Modified: lldb/trunk/include/lldb/Core/ArchSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=105808&r1=105807&r2=105808&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/ArchSpec.h (original) +++ lldb/trunk/include/lldb/Core/ArchSpec.h Thu Jun 10 23:24:36 2010 @@ -30,7 +30,7 @@ public: // Generic CPU types that each m_type needs to know how to convert // their m_cpu and m_sub to. - typedef enum CPU + enum CPU { eCPU_Unknown, eCPU_arm, From eli.friedman at gmail.com Thu Jun 10 23:26:08 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:26:08 -0000 Subject: [Lldb-commits] [lldb] r105810 - /lldb/trunk/source/Core/ArchSpec.cpp Message-ID: <20100611042608.5ED862A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:26:08 2010 New Revision: 105810 URL: http://llvm.org/viewvc/llvm-project?rev=105810&view=rev Log: Add missing include; fix missed constant to use llvm::MachO. Modified: lldb/trunk/source/Core/ArchSpec.cpp Modified: lldb/trunk/source/Core/ArchSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=105810&r1=105809&r2=105810&view=diff ============================================================================== --- lldb/trunk/source/Core/ArchSpec.cpp (original) +++ lldb/trunk/source/Core/ArchSpec.cpp Thu Jun 10 23:26:08 2010 @@ -9,8 +9,7 @@ #include "lldb/Core/ArchSpec.h" -//#include -//#include +#include #include @@ -1610,7 +1609,7 @@ break; case eArchTypeMachO: - if (GetCPUType() & CPU_ARCH_ABI64) + if (GetCPUType() & llvm::MachO::CPUArchABI64) return 8; else return 4; From eli.friedman at gmail.com Thu Jun 10 23:29:29 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:29:29 -0000 Subject: [Lldb-commits] [lldb] r105811 - /lldb/trunk/source/Core/Log.cpp Message-ID: <20100611042929.3469D2A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:29:29 2010 New Revision: 105811 URL: http://llvm.org/viewvc/llvm-project?rev=105811&view=rev Log: Use Host::GetCurrentThreadID() instead of mach_thread_self(). Modified: lldb/trunk/source/Core/Log.cpp Modified: lldb/trunk/source/Core/Log.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Log.cpp?rev=105811&r1=105810&r2=105811&view=diff ============================================================================== --- lldb/trunk/source/Core/Log.cpp (original) +++ lldb/trunk/source/Core/Log.cpp Thu Jun 10 23:29:29 2010 @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// // C Includes -#include #include #include #include @@ -206,12 +205,12 @@ // Add the process and thread if requested if (log_options & LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD) - header.Printf ("[%4.4x/%4.4x]: ", getpid(), mach_thread_self()); + header.Printf ("[%4.4x/%4.4x]: ", getpid(), Host::GetCurrentThreadID()); // Add the process and thread if requested if (log_options & LLDB_LOG_OPTION_PREPEND_THREAD_NAME) { - const char *thread_name_str = Host::GetThreadName (getpid(), mach_thread_self()); + const char *thread_name_str = Host::GetThreadName (getpid(), Host::GetCurrentThreadID()); if (thread_name_str) header.Printf ("%s ", thread_name_str); } From eli.friedman at gmail.com Thu Jun 10 23:50:35 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:50:35 -0000 Subject: [Lldb-commits] [lldb] r105812 - in /lldb/trunk: include/lldb/Host/TimeValue.h source/Host/macosx/TimeValue.cpp Message-ID: <20100611045035.90E462A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:50:35 2010 New Revision: 105812 URL: http://llvm.org/viewvc/llvm-project?rev=105812&view=rev Log: Fix TimeValue::Offset* to take uint64_t Modified: lldb/trunk/include/lldb/Host/TimeValue.h lldb/trunk/source/Host/macosx/TimeValue.cpp Modified: lldb/trunk/include/lldb/Host/TimeValue.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/TimeValue.h?rev=105812&r1=105811&r2=105812&view=diff ============================================================================== --- lldb/trunk/include/lldb/Host/TimeValue.h (original) +++ lldb/trunk/include/lldb/Host/TimeValue.h Thu Jun 10 23:50:35 2010 @@ -57,13 +57,13 @@ IsValid () const; void - OffsetWithSeconds (uint32_t sec); + OffsetWithSeconds (uint64_t sec); void - OffsetWithMicroSeconds (uint32_t usec); + OffsetWithMicroSeconds (uint64_t usec); void - OffsetWithNanoSeconds (uint32_t nsec); + OffsetWithNanoSeconds (uint64_t nsec); static TimeValue Now(); Modified: lldb/trunk/source/Host/macosx/TimeValue.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/TimeValue.cpp?rev=105812&r1=105811&r2=105812&view=diff ============================================================================== --- lldb/trunk/source/Host/macosx/TimeValue.cpp (original) +++ lldb/trunk/source/Host/macosx/TimeValue.cpp Thu Jun 10 23:50:35 2010 @@ -97,19 +97,19 @@ } void -TimeValue::OffsetWithSeconds (uint32_t sec) +TimeValue::OffsetWithSeconds (uint64_t sec) { m_nano_seconds += sec * NSEC_PER_SEC; } void -TimeValue::OffsetWithMicroSeconds (uint32_t usec) +TimeValue::OffsetWithMicroSeconds (uint64_t usec) { m_nano_seconds += usec * NSEC_PER_USEC; } void -TimeValue::OffsetWithNanoSeconds (uint32_t nsec) +TimeValue::OffsetWithNanoSeconds (uint64_t nsec) { m_nano_seconds += nsec; } From eli.friedman at gmail.com Thu Jun 10 23:52:22 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:52:22 -0000 Subject: [Lldb-commits] [lldb] r105813 - /lldb/trunk/source/Core/FileSpec.cpp Message-ID: <20100611045222.E8A0C2A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:52:22 2010 New Revision: 105813 URL: http://llvm.org/viewvc/llvm-project?rev=105813&view=rev Log: Use st_mtime instead of st_mtimespec for portability. Modified: lldb/trunk/source/Core/FileSpec.cpp Modified: lldb/trunk/source/Core/FileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpec.cpp?rev=105813&r1=105812&r2=105813&view=diff ============================================================================== --- lldb/trunk/source/Core/FileSpec.cpp (original) +++ lldb/trunk/source/Core/FileSpec.cpp Thu Jun 10 23:52:22 2010 @@ -373,7 +373,7 @@ TimeValue mod_time; struct stat file_stats; if (GetFileStats (this, &file_stats)) - mod_time = file_stats.st_mtimespec; + mod_time.OffsetWithSeconds(file_stats.st_mtime); return mod_time; } From eli.friedman at gmail.com Thu Jun 10 23:54:56 2010 From: eli.friedman at gmail.com (Eli Friedman) Date: Fri, 11 Jun 2010 04:54:56 -0000 Subject: [Lldb-commits] [lldb] r105814 - /lldb/trunk/source/Host/macosx/TimeValue.cpp Message-ID: <20100611045456.EB6802A6C12C@llvm.org> Author: efriedma Date: Thu Jun 10 23:54:56 2010 New Revision: 105814 URL: http://llvm.org/viewvc/llvm-project?rev=105814&view=rev Log: Fix includes. Modified: lldb/trunk/source/Host/macosx/TimeValue.cpp Modified: lldb/trunk/source/Host/macosx/TimeValue.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/TimeValue.cpp?rev=105814&r1=105813&r2=105814&view=diff ============================================================================== --- lldb/trunk/source/Host/macosx/TimeValue.cpp (original) +++ lldb/trunk/source/Host/macosx/TimeValue.cpp Thu Jun 10 23:54:56 2010 @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// -#include "TimeValue.h" +#include "lldb/Host/TimeValue.h" +#include // C Includes // C++ Includes From resistor at mac.com Fri Jun 11 15:52:57 2010 From: resistor at mac.com (Owen Anderson) Date: Fri, 11 Jun 2010 20:52:57 -0000 Subject: [Lldb-commits] [lldb] r105834 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp Message-ID: <20100611205257.B3B8D2A6C12C@llvm.org> Author: resistor Date: Fri Jun 11 15:52:57 2010 New Revision: 105834 URL: http://llvm.org/viewvc/llvm-project?rev=105834&view=rev Log: Replace qsort_r with std::sort. This gets rid of a lot of portability ickiness, and is cleaner to boot. I'm fairly confident that I converted the comparator over properly, and what testing I could figure out how to run seemed to pass, but it would be great if someone in the know could check behind me. Modified: lldb/trunk/include/lldb/Symbol/Symtab.h lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/include/lldb/Symbol/Symtab.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105834&r1=105833&r2=105834&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) +++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jun 11 15:52:57 2010 @@ -59,8 +59,6 @@ typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; - static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); - static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); void InitNameIndexes (); void InitAddressIndexes (); Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105834&r1=105833&r2=105834&view=diff ============================================================================== --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jun 11 15:52:57 2010 @@ -214,46 +214,36 @@ const Symbol *symbols; }; -int -Symtab::CompareSymbolValueByIndex (void *thunk, const void *a, const void *b) -{ - const Symbol *symbols = (const Symbol *)thunk; - uint32_t index_a = *((uint32_t *) a); - uint32_t index_b = *((uint32_t *) b); - - addr_t value_a; - addr_t value_b; - if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) - { - value_a = symbols[index_a].GetValue ().GetOffset(); - value_b = symbols[index_b].GetValue ().GetOffset(); - } - else - { - value_a = symbols[index_a].GetValue ().GetFileAddress(); - value_b = symbols[index_b].GetValue ().GetFileAddress(); - } - - if (value_a == value_b) - { - // The if the values are equal, use the original symbol user ID - lldb::user_id_t uid_a = symbols[index_a].GetID(); - lldb::user_id_t uid_b = symbols[index_b].GetID(); - if (uid_a < uid_b) - return -1; - if (uid_a > uid_b) - return 1; - return 0; - } - else if (value_a < value_b) - return -1; - - return 1; -} +namespace { + struct SymbolIndexComparator { + const std::vector& symbols; + SymbolIndexComparator(const std::vector& s) : symbols(s) { } + bool operator()(uint32_t index_a, uint32_t index_b) { + addr_t value_a; + addr_t value_b; + if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) { + value_a = symbols[index_a].GetValue ().GetOffset(); + value_b = symbols[index_b].GetValue ().GetOffset(); + } else { + value_a = symbols[index_a].GetValue ().GetFileAddress(); + value_b = symbols[index_b].GetValue ().GetFileAddress(); + } -int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) -{ - return CompareSymbolValueByIndex(thunk, a, b); + if (value_a == value_b) { + // The if the values are equal, use the original symbol user ID + lldb::user_id_t uid_a = symbols[index_a].GetID(); + lldb::user_id_t uid_b = symbols[index_b].GetID(); + if (uid_a < uid_b) + return true; + if (uid_a > uid_b) + return false; + return false; + } else if (value_a < value_b) + return true; + + return false; + } + }; } void @@ -263,13 +253,8 @@ if (indexes.size() <= 1) return; - // Sort the indexes in place using qsort - // FIXME: (WRONGDEFINE) Need a better define for this! -#ifdef __APPLE__ - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); -#else - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); -#endif + // Sort the indexes in place using std::sort + std::sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols)); // Remove any duplicates if requested if (remove_duplicates) From jason at molenda.com Fri Jun 11 16:03:13 2010 From: jason at molenda.com (Jason Molenda) Date: Fri, 11 Jun 2010 14:03:13 -0700 Subject: [Lldb-commits] [lldb] r105834 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp In-Reply-To: <20100611205257.B3B8D2A6C12C@llvm.org> References: <20100611205257.B3B8D2A6C12C@llvm.org> Message-ID: <23DB182B-8E1E-431F-8EEF-9FB49F9E4218@molenda.com> Please back this change out Owen, until you've addressed the point Greg made here - http://lists.cs.uiuc.edu/pipermail/lldb-dev/2010-June/000039.html J On Jun 11, 2010, at 1:52 PM, Owen Anderson wrote: > Author: resistor > Date: Fri Jun 11 15:52:57 2010 > New Revision: 105834 > > URL: http://llvm.org/viewvc/llvm-project?rev=105834&view=rev > Log: > Replace qsort_r with std::sort. This gets rid of a lot of portability > ickiness, and is cleaner to boot. > > I'm fairly confident that I converted the comparator over properly, > and what testing I could figure out how to run seemed to pass, but it > would be great if someone in the know could check behind me. > > Modified: > lldb/trunk/include/lldb/Symbol/Symtab.h > lldb/trunk/source/Symbol/Symtab.cpp > > Modified: lldb/trunk/include/lldb/Symbol/Symtab.h > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105834&r1=105833&r2=105834&view=diff > ============================================================================== > --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) > +++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jun 11 15:52:57 2010 > @@ -59,8 +59,6 @@ > typedef collection::iterator iterator; > typedef collection::const_iterator const_iterator; > > - static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); > - static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); > void InitNameIndexes (); > void InitAddressIndexes (); > > > Modified: lldb/trunk/source/Symbol/Symtab.cpp > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105834&r1=105833&r2=105834&view=diff > ============================================================================== > --- lldb/trunk/source/Symbol/Symtab.cpp (original) > +++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jun 11 15:52:57 2010 > @@ -214,46 +214,36 @@ > const Symbol *symbols; > }; > > -int > -Symtab::CompareSymbolValueByIndex (void *thunk, const void *a, const void *b) > -{ > - const Symbol *symbols = (const Symbol *)thunk; > - uint32_t index_a = *((uint32_t *) a); > - uint32_t index_b = *((uint32_t *) b); > - > - addr_t value_a; > - addr_t value_b; > - if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) > - { > - value_a = symbols[index_a].GetValue ().GetOffset(); > - value_b = symbols[index_b].GetValue ().GetOffset(); > - } > - else > - { > - value_a = symbols[index_a].GetValue ().GetFileAddress(); > - value_b = symbols[index_b].GetValue ().GetFileAddress(); > - } > - > - if (value_a == value_b) > - { > - // The if the values are equal, use the original symbol user ID > - lldb::user_id_t uid_a = symbols[index_a].GetID(); > - lldb::user_id_t uid_b = symbols[index_b].GetID(); > - if (uid_a < uid_b) > - return -1; > - if (uid_a > uid_b) > - return 1; > - return 0; > - } > - else if (value_a < value_b) > - return -1; > - > - return 1; > -} > +namespace { > + struct SymbolIndexComparator { > + const std::vector& symbols; > + SymbolIndexComparator(const std::vector& s) : symbols(s) { } > + bool operator()(uint32_t index_a, uint32_t index_b) { > + addr_t value_a; > + addr_t value_b; > + if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) { > + value_a = symbols[index_a].GetValue ().GetOffset(); > + value_b = symbols[index_b].GetValue ().GetOffset(); > + } else { > + value_a = symbols[index_a].GetValue ().GetFileAddress(); > + value_b = symbols[index_b].GetValue ().GetFileAddress(); > + } > > -int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) > -{ > - return CompareSymbolValueByIndex(thunk, a, b); > + if (value_a == value_b) { > + // The if the values are equal, use the original symbol user ID > + lldb::user_id_t uid_a = symbols[index_a].GetID(); > + lldb::user_id_t uid_b = symbols[index_b].GetID(); > + if (uid_a < uid_b) > + return true; > + if (uid_a > uid_b) > + return false; > + return false; > + } else if (value_a < value_b) > + return true; > + > + return false; > + } > + }; > } > > void > @@ -263,13 +253,8 @@ > if (indexes.size() <= 1) > return; > > - // Sort the indexes in place using qsort > - // FIXME: (WRONGDEFINE) Need a better define for this! > -#ifdef __APPLE__ > - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); > -#else > - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); > -#endif > + // Sort the indexes in place using std::sort > + std::sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols)); > > // Remove any duplicates if requested > if (remove_duplicates) > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits From resistor at mac.com Fri Jun 11 16:07:26 2010 From: resistor at mac.com (Owen Anderson) Date: Fri, 11 Jun 2010 21:07:26 -0000 Subject: [Lldb-commits] [lldb] r105835 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp Message-ID: <20100611210726.687402A6C12C@llvm.org> Author: resistor Date: Fri Jun 11 16:07:26 2010 New Revision: 105835 URL: http://llvm.org/viewvc/llvm-project?rev=105835&view=rev Log: Revert my previous patch. Apparently the code-size impact of std::sort isn't acceptable. Modified: lldb/trunk/include/lldb/Symbol/Symtab.h lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/include/lldb/Symbol/Symtab.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105835&r1=105834&r2=105835&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) +++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jun 11 16:07:26 2010 @@ -59,6 +59,8 @@ typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; + static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); + static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); void InitNameIndexes (); void InitAddressIndexes (); Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105835&r1=105834&r2=105835&view=diff ============================================================================== --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jun 11 16:07:26 2010 @@ -214,36 +214,46 @@ const Symbol *symbols; }; -namespace { - struct SymbolIndexComparator { - const std::vector& symbols; - SymbolIndexComparator(const std::vector& s) : symbols(s) { } - bool operator()(uint32_t index_a, uint32_t index_b) { - addr_t value_a; - addr_t value_b; - if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) { - value_a = symbols[index_a].GetValue ().GetOffset(); - value_b = symbols[index_b].GetValue ().GetOffset(); - } else { - value_a = symbols[index_a].GetValue ().GetFileAddress(); - value_b = symbols[index_b].GetValue ().GetFileAddress(); - } +int +Symtab::CompareSymbolValueByIndex (void *thunk, const void *a, const void *b) +{ + const Symbol *symbols = (const Symbol *)thunk; + uint32_t index_a = *((uint32_t *) a); + uint32_t index_b = *((uint32_t *) b); - if (value_a == value_b) { - // The if the values are equal, use the original symbol user ID - lldb::user_id_t uid_a = symbols[index_a].GetID(); - lldb::user_id_t uid_b = symbols[index_b].GetID(); - if (uid_a < uid_b) - return true; - if (uid_a > uid_b) - return false; - return false; - } else if (value_a < value_b) - return true; - - return false; - } - }; + addr_t value_a; + addr_t value_b; + if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) + { + value_a = symbols[index_a].GetValue ().GetOffset(); + value_b = symbols[index_b].GetValue ().GetOffset(); + } + else + { + value_a = symbols[index_a].GetValue ().GetFileAddress(); + value_b = symbols[index_b].GetValue ().GetFileAddress(); + } + + if (value_a == value_b) + { + // The if the values are equal, use the original symbol user ID + lldb::user_id_t uid_a = symbols[index_a].GetID(); + lldb::user_id_t uid_b = symbols[index_b].GetID(); + if (uid_a < uid_b) + return -1; + if (uid_a > uid_b) + return 1; + return 0; + } + else if (value_a < value_b) + return -1; + + return 1; +} + +int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) +{ + return CompareSymbolValueByIndex(thunk, a, b); } void @@ -253,8 +263,13 @@ if (indexes.size() <= 1) return; - // Sort the indexes in place using std::sort - std::sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols)); + // Sort the indexes in place using qsort + // FIXME: (WRONGDEFINE) Need a better define for this! +#ifdef __APPLE__ + ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); +#else + ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); +#endif // Remove any duplicates if requested if (remove_duplicates) From resistor at mac.com Fri Jun 11 16:40:17 2010 From: resistor at mac.com (Owen Anderson) Date: Fri, 11 Jun 2010 14:40:17 -0700 Subject: [Lldb-commits] [lldb] r105834 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp In-Reply-To: <23DB182B-8E1E-431F-8EEF-9FB49F9E4218@molenda.com> References: <20100611205257.B3B8D2A6C12C@llvm.org> <23DB182B-8E1E-431F-8EEF-9FB49F9E4218@molenda.com> Message-ID: <209EF5DD-9FE9-4A1D-B7DF-0AF924273295@mac.com> OK, so I did some measurement on this issue, using optimized (-Os) builds of LLDB, without debug symbols, targeting x86-64. When using qsort_r, Symtab.o is 43KB. When using std::sort, Symtab.o is 46KB. A 7% increase in file size on a single file. The qsort_r version of LLDB.framework is 32,840,512 bytes. The std::sort version of LLDB.framework is 32,840,937 bytes. A 0.001% increase in file size of the overall library. :-) Interestingly, it appears that those extra symbols get coalesced with ones already present (presumably in the LLVM libraries), so it doesn't actually add much at all to the resulting library. --Owen On Jun 11, 2010, at 2:03 PM, Jason Molenda wrote: > Please back this change out Owen, until you've addressed the point Greg made here - > http://lists.cs.uiuc.edu/pipermail/lldb-dev/2010-June/000039.html > > J > > On Jun 11, 2010, at 1:52 PM, Owen Anderson wrote: > >> Author: resistor >> Date: Fri Jun 11 15:52:57 2010 >> New Revision: 105834 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=105834&view=rev >> Log: >> Replace qsort_r with std::sort. This gets rid of a lot of portability >> ickiness, and is cleaner to boot. >> >> I'm fairly confident that I converted the comparator over properly, >> and what testing I could figure out how to run seemed to pass, but it >> would be great if someone in the know could check behind me. >> >> Modified: >> lldb/trunk/include/lldb/Symbol/Symtab.h >> lldb/trunk/source/Symbol/Symtab.cpp >> >> Modified: lldb/trunk/include/lldb/Symbol/Symtab.h >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105834&r1=105833&r2=105834&view=diff >> ============================================================================== >> --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) >> +++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jun 11 15:52:57 2010 >> @@ -59,8 +59,6 @@ >> typedef collection::iterator iterator; >> typedef collection::const_iterator const_iterator; >> >> - static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); >> - static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); >> void InitNameIndexes (); >> void InitAddressIndexes (); >> >> >> Modified: lldb/trunk/source/Symbol/Symtab.cpp >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105834&r1=105833&r2=105834&view=diff >> ============================================================================== >> --- lldb/trunk/source/Symbol/Symtab.cpp (original) >> +++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jun 11 15:52:57 2010 >> @@ -214,46 +214,36 @@ >> const Symbol *symbols; >> }; >> >> -int >> -Symtab::CompareSymbolValueByIndex (void *thunk, const void *a, const void *b) >> -{ >> - const Symbol *symbols = (const Symbol *)thunk; >> - uint32_t index_a = *((uint32_t *) a); >> - uint32_t index_b = *((uint32_t *) b); >> - >> - addr_t value_a; >> - addr_t value_b; >> - if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) >> - { >> - value_a = symbols[index_a].GetValue ().GetOffset(); >> - value_b = symbols[index_b].GetValue ().GetOffset(); >> - } >> - else >> - { >> - value_a = symbols[index_a].GetValue ().GetFileAddress(); >> - value_b = symbols[index_b].GetValue ().GetFileAddress(); >> - } >> - >> - if (value_a == value_b) >> - { >> - // The if the values are equal, use the original symbol user ID >> - lldb::user_id_t uid_a = symbols[index_a].GetID(); >> - lldb::user_id_t uid_b = symbols[index_b].GetID(); >> - if (uid_a < uid_b) >> - return -1; >> - if (uid_a > uid_b) >> - return 1; >> - return 0; >> - } >> - else if (value_a < value_b) >> - return -1; >> - >> - return 1; >> -} >> +namespace { >> + struct SymbolIndexComparator { >> + const std::vector& symbols; >> + SymbolIndexComparator(const std::vector& s) : symbols(s) { } >> + bool operator()(uint32_t index_a, uint32_t index_b) { >> + addr_t value_a; >> + addr_t value_b; >> + if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) { >> + value_a = symbols[index_a].GetValue ().GetOffset(); >> + value_b = symbols[index_b].GetValue ().GetOffset(); >> + } else { >> + value_a = symbols[index_a].GetValue ().GetFileAddress(); >> + value_b = symbols[index_b].GetValue ().GetFileAddress(); >> + } >> >> -int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) >> -{ >> - return CompareSymbolValueByIndex(thunk, a, b); >> + if (value_a == value_b) { >> + // The if the values are equal, use the original symbol user ID >> + lldb::user_id_t uid_a = symbols[index_a].GetID(); >> + lldb::user_id_t uid_b = symbols[index_b].GetID(); >> + if (uid_a < uid_b) >> + return true; >> + if (uid_a > uid_b) >> + return false; >> + return false; >> + } else if (value_a < value_b) >> + return true; >> + >> + return false; >> + } >> + }; >> } >> >> void >> @@ -263,13 +253,8 @@ >> if (indexes.size() <= 1) >> return; >> >> - // Sort the indexes in place using qsort >> - // FIXME: (WRONGDEFINE) Need a better define for this! >> -#ifdef __APPLE__ >> - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); >> -#else >> - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); >> -#endif >> + // Sort the indexes in place using std::sort >> + std::sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols)); >> >> // Remove any duplicates if requested >> if (remove_duplicates) >> >> >> _______________________________________________ >> lldb-commits mailing list >> lldb-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits > From jason at molenda.com Fri Jun 11 16:46:54 2010 From: jason at molenda.com (Jason Molenda) Date: Fri, 11 Jun 2010 14:46:54 -0700 Subject: [Lldb-commits] [lldb] r105834 - in /lldb/trunk: include/lldb/Symbol/Symtab.h source/Symbol/Symtab.cpp In-Reply-To: <209EF5DD-9FE9-4A1D-B7DF-0AF924273295@mac.com> References: <20100611205257.B3B8D2A6C12C@llvm.org> <23DB182B-8E1E-431F-8EEF-9FB49F9E4218@molenda.com> <209EF5DD-9FE9-4A1D-B7DF-0AF924273295@mac.com> Message-ID: <6E138690-67B5-415D-91DD-133BE1019E54@molenda.com> Thanks for looking at this more closely. I'd like to hear from Greg - I don't know what specific problem he was seeing when he adopted the crufty qsort_r API instead of std::sort. I know he wouldn't have done this unless there was a real problem with std::sort on some data set he was looking at. J On Jun 11, 2010, at 2:40 PM, Owen Anderson wrote: > OK, so I did some measurement on this issue, using optimized (-Os) builds of LLDB, without debug symbols, targeting x86-64. > > When using qsort_r, Symtab.o is 43KB. > When using std::sort, Symtab.o is 46KB. > A 7% increase in file size on a single file. > > The qsort_r version of LLDB.framework is 32,840,512 bytes. > The std::sort version of LLDB.framework is 32,840,937 bytes. > A 0.001% increase in file size of the overall library. :-) > > Interestingly, it appears that those extra symbols get coalesced with ones already present (presumably in the LLVM libraries), so it doesn't actually add much at all to the resulting library. > > --Owen > > On Jun 11, 2010, at 2:03 PM, Jason Molenda wrote: > >> Please back this change out Owen, until you've addressed the point Greg made here - >> http://lists.cs.uiuc.edu/pipermail/lldb-dev/2010-June/000039.html >> >> J >> >> On Jun 11, 2010, at 1:52 PM, Owen Anderson wrote: >> >>> Author: resistor >>> Date: Fri Jun 11 15:52:57 2010 >>> New Revision: 105834 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=105834&view=rev >>> Log: >>> Replace qsort_r with std::sort. This gets rid of a lot of portability >>> ickiness, and is cleaner to boot. >>> >>> I'm fairly confident that I converted the comparator over properly, >>> and what testing I could figure out how to run seemed to pass, but it >>> would be great if someone in the know could check behind me. >>> >>> Modified: >>> lldb/trunk/include/lldb/Symbol/Symtab.h >>> lldb/trunk/source/Symbol/Symtab.cpp >>> >>> Modified: lldb/trunk/include/lldb/Symbol/Symtab.h >>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=105834&r1=105833&r2=105834&view=diff >>> ============================================================================== >>> --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) >>> +++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jun 11 15:52:57 2010 >>> @@ -59,8 +59,6 @@ >>> typedef collection::iterator iterator; >>> typedef collection::const_iterator const_iterator; >>> >>> - static int CompareSymbolValueByIndex (void *thunk, const void *a, const void *b); >>> - static int CompareSymbolValueByIndexLinux (const void *a, const void *b, void *thunk); >>> void InitNameIndexes (); >>> void InitAddressIndexes (); >>> >>> >>> Modified: lldb/trunk/source/Symbol/Symtab.cpp >>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=105834&r1=105833&r2=105834&view=diff >>> ============================================================================== >>> --- lldb/trunk/source/Symbol/Symtab.cpp (original) >>> +++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jun 11 15:52:57 2010 >>> @@ -214,46 +214,36 @@ >>> const Symbol *symbols; >>> }; >>> >>> -int >>> -Symtab::CompareSymbolValueByIndex (void *thunk, const void *a, const void *b) >>> -{ >>> - const Symbol *symbols = (const Symbol *)thunk; >>> - uint32_t index_a = *((uint32_t *) a); >>> - uint32_t index_b = *((uint32_t *) b); >>> - >>> - addr_t value_a; >>> - addr_t value_b; >>> - if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) >>> - { >>> - value_a = symbols[index_a].GetValue ().GetOffset(); >>> - value_b = symbols[index_b].GetValue ().GetOffset(); >>> - } >>> - else >>> - { >>> - value_a = symbols[index_a].GetValue ().GetFileAddress(); >>> - value_b = symbols[index_b].GetValue ().GetFileAddress(); >>> - } >>> - >>> - if (value_a == value_b) >>> - { >>> - // The if the values are equal, use the original symbol user ID >>> - lldb::user_id_t uid_a = symbols[index_a].GetID(); >>> - lldb::user_id_t uid_b = symbols[index_b].GetID(); >>> - if (uid_a < uid_b) >>> - return -1; >>> - if (uid_a > uid_b) >>> - return 1; >>> - return 0; >>> - } >>> - else if (value_a < value_b) >>> - return -1; >>> - >>> - return 1; >>> -} >>> +namespace { >>> + struct SymbolIndexComparator { >>> + const std::vector& symbols; >>> + SymbolIndexComparator(const std::vector& s) : symbols(s) { } >>> + bool operator()(uint32_t index_a, uint32_t index_b) { >>> + addr_t value_a; >>> + addr_t value_b; >>> + if (symbols[index_a].GetValue().GetSection() == symbols[index_b].GetValue().GetSection()) { >>> + value_a = symbols[index_a].GetValue ().GetOffset(); >>> + value_b = symbols[index_b].GetValue ().GetOffset(); >>> + } else { >>> + value_a = symbols[index_a].GetValue ().GetFileAddress(); >>> + value_b = symbols[index_b].GetValue ().GetFileAddress(); >>> + } >>> >>> -int Symtab::CompareSymbolValueByIndexLinux(const void* a, const void* b, void* thunk) >>> -{ >>> - return CompareSymbolValueByIndex(thunk, a, b); >>> + if (value_a == value_b) { >>> + // The if the values are equal, use the original symbol user ID >>> + lldb::user_id_t uid_a = symbols[index_a].GetID(); >>> + lldb::user_id_t uid_b = symbols[index_b].GetID(); >>> + if (uid_a < uid_b) >>> + return true; >>> + if (uid_a > uid_b) >>> + return false; >>> + return false; >>> + } else if (value_a < value_b) >>> + return true; >>> + >>> + return false; >>> + } >>> + }; >>> } >>> >>> void >>> @@ -263,13 +253,8 @@ >>> if (indexes.size() <= 1) >>> return; >>> >>> - // Sort the indexes in place using qsort >>> - // FIXME: (WRONGDEFINE) Need a better define for this! >>> -#ifdef __APPLE__ >>> - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), (void *)&m_symbols[0], Symtab::CompareSymbolValueByIndex); >>> -#else >>> - ::qsort_r (&indexes[0], indexes.size(), sizeof(uint32_t), CompareSymbolValueByIndexLinux, (void *)&m_symbols[0]); >>> -#endif >>> + // Sort the indexes in place using std::sort >>> + std::sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols)); >>> >>> // Remove any duplicates if requested >>> if (remove_duplicates) >>> >>> >>> _______________________________________________ >>> lldb-commits mailing list >>> lldb-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits >> > From sabre at nondot.org Fri Jun 11 17:52:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 Jun 2010 22:52:46 -0000 Subject: [Lldb-commits] [lldb] r105847 - /lldb/trunk/www/architecture.html Message-ID: <20100611225246.43AA82A6C12C@llvm.org> Author: lattner Date: Fri Jun 11 17:52:46 2010 New Revision: 105847 URL: http://llvm.org/viewvc/llvm-project?rev=105847&view=rev Log: fix a few typos. Modified: lldb/trunk/www/architecture.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105847&r1=105846&r2=105847&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Fri Jun 11 17:52:46 2010 @@ -196,7 +196,7 @@

    The expression parser uses a full instance of the Clang compiler in order to accurately evaluate expressions. Hooks have been put into Clang so that the compiler knows - to ask about indentifiers it doesn't know about. Once + to ask about identifiers it doesn't know about. Once expressions have be compiled into an AST, we can then traverse this AST and either generate a DWARF expression that contains simple opcodes that can be quickly re-evaluated @@ -212,8 +212,8 @@

    LLDB tries to abstract itself from the host upon which it is currently running by providing a host abstraction - layer This layer involves everything from spawning, detaching, - joing and killing native in process threads, to getting + layer. This layer involves everything from spawning, detaching, + joining and killing native in-process threads, to getting current information about the current host.

    Host functionality includes abstraction layers for:

      From clattner at apple.com Fri Jun 11 17:56:20 2010 From: clattner at apple.com (Chris Lattner) Date: Fri, 11 Jun 2010 15:56:20 -0700 Subject: [Lldb-commits] [lldb] r105748 - /lldb/trunk/source/Core/UUID.cpp In-Reply-To: <20100609193654.B5B2D2A6C12E@llvm.org> References: <20100609193654.B5B2D2A6C12E@llvm.org> Message-ID: <85D7B23C-5201-4177-87EC-FDDF0D6B19A2@apple.com> On Jun 9, 2010, at 12:36 PM, Greg Clayton wrote: > Author: gclayton > Date: Wed Jun 9 14:36:54 2010 > New Revision: 105748 > > URL: http://llvm.org/viewvc/llvm-project?rev=105748&view=rev > Log: > For header includes we are currently trying to adopt some aspects of the > Google C++ coding guidelines where includes are done as: > > 1 - the header file for the current source file > 2 - C includes > 3 - C++ includes > 4 - external project includes > 5 - current project includes Hey Greg, Any objection to migrating to the llvm style? http://llvm.org/docs/CodingStandards.html#scf_includes http://llvm.org/docs/CodingStandards.html#hl_dontinclude Also, in C++ code, it is generally better to #include instead of , because it is technically more portable. Any objection to eventually migrating this way? -Chris > > > > Modified: > lldb/trunk/source/Core/UUID.cpp > > Modified: lldb/trunk/source/Core/UUID.cpp > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UUID.cpp?rev=105748&r1=105747&r2=105748&view=diff > ============================================================================== > --- lldb/trunk/source/Core/UUID.cpp (original) > +++ lldb/trunk/source/Core/UUID.cpp Wed Jun 9 14:36:54 2010 > @@ -9,13 +9,14 @@ > > #include "lldb/Core/UUID.h" > // C Includes > +#include > +#include > +#include > + > // C++ Includes > // Other libraries and framework includes > // Project includes > #include "lldb/Core/Stream.h" > -#include > -#include > -#include > > using namespace lldb_private; > > > > _______________________________________________ > lldb-commits mailing list > lldb-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits From sabre at nondot.org Fri Jun 11 18:04:20 2010 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 Jun 2010 23:04:20 -0000 Subject: [Lldb-commits] [lldb] r105849 - in /lldb/trunk/www: index.html sidebar.incl Message-ID: <20100611230420.D4F042A6C12C@llvm.org> Author: lattner Date: Fri Jun 11 18:04:20 2010 New Revision: 105849 URL: http://llvm.org/viewvc/llvm-project?rev=105849&view=rev Log: split the sidebar out to an SSI file so it isn't duplicated everywhere. Added: lldb/trunk/www/sidebar.incl Modified: lldb/trunk/www/index.html Modified: lldb/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/index.html?rev=105849&r1=105848&r2=105849&view=diff ============================================================================== --- lldb/trunk/www/index.html (original) +++ lldb/trunk/www/index.html Fri Jun 11 18:04:20 2010 @@ -13,40 +13,9 @@
      -
      -
      -

      General

      - -
      - - -
      + + +

      What is LLDB?

      Added: lldb/trunk/www/sidebar.incl URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/sidebar.incl?rev=105849&view=auto ============================================================================== --- lldb/trunk/www/sidebar.incl (added) +++ lldb/trunk/www/sidebar.incl Fri Jun 11 18:04:20 2010 @@ -0,0 +1,35 @@ + +
      +
      +

      General

      + +
      + + +
      \ No newline at end of file From sabre at nondot.org Fri Jun 11 18:07:14 2010 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 Jun 2010 23:07:14 -0000 Subject: [Lldb-commits] [lldb] r105850 - in /lldb/trunk/www: architecture.html docs.html download.html faq.html features.html goals.html status.html Message-ID: <20100611230715.08F402A6C12C@llvm.org> Author: lattner Date: Fri Jun 11 18:07:14 2010 New Revision: 105850 URL: http://llvm.org/viewvc/llvm-project?rev=105850&view=rev Log: that seemed to work, switch the rest of the files to use the shared sidebar.incl file. Modified: lldb/trunk/www/architecture.html lldb/trunk/www/docs.html lldb/trunk/www/download.html lldb/trunk/www/faq.html lldb/trunk/www/features.html lldb/trunk/www/goals.html lldb/trunk/www/status.html Modified: lldb/trunk/www/architecture.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/architecture.html?rev=105850&r1=105849&r2=105850&view=diff ============================================================================== --- lldb/trunk/www/architecture.html (original) +++ lldb/trunk/www/architecture.html Fri Jun 11 18:07:14 2010 @@ -13,40 +13,9 @@
      -
      -
      -

      General

      - -
      - - -
      + + +

      Architecture

      Modified: lldb/trunk/www/docs.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/docs.html?rev=105850&r1=105849&r2=105850&view=diff ============================================================================== --- lldb/trunk/www/docs.html (original) +++ lldb/trunk/www/docs.html Fri Jun 11 18:07:14 2010 @@ -13,40 +13,9 @@
      -
      -
      -

      General

      - -
      - - -
      + + +

      Documentation

      Modified: lldb/trunk/www/download.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/download.html?rev=105850&r1=105849&r2=105850&view=diff ============================================================================== --- lldb/trunk/www/download.html (original) +++ lldb/trunk/www/download.html Fri Jun 11 18:07:14 2010 @@ -13,40 +13,9 @@
      -
      -
      -

      General

      - -
      - - -
      + + +

      Downloading LLDB sources

      Modified: lldb/trunk/www/faq.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/faq.html?rev=105850&r1=105849&r2=105850&view=diff ============================================================================== --- lldb/trunk/www/faq.html (original) +++ lldb/trunk/www/faq.html Fri Jun 11 18:07:14 2010 @@ -7,56 +7,24 @@ -
      - The LLDB Debugger -
      +
      + The LLDB Debugger +
      -
      -
      -
      -

      General

      - -
      - - -
      -
      -
      -

      LLDB FAQ

      -
      -

      Q: What targets does LLDB currently support?

      -

      Mac OS X native debugging for i386 and x86_64 targets.

      -
      - -
      -
      +
      + + +
      +
      +

      LLDB FAQ

      +
      +

      Q: What targets does LLDB currently support?

      +

      Mac OS X native debugging for i386 and x86_64 targets.

      +
      + +
      +
      \ No newline at end of file Modified: lldb/trunk/www/features.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/features.html?rev=105850&r1=105849&r2=105850&view=diff ============================================================================== --- lldb/trunk/www/features.html (original) +++ lldb/trunk/www/features.html Fri Jun 11 18:07:14 2010 @@ -13,28 +13,8 @@
      -
      -
      -

      General

      - -
      - + +