Re: [Lldb-commits] [PATCH] D14118: Changes for Bug 17384

2015-10-29 Thread Ravitheja Addepally via lldb-commits
ravitheja added a comment.

Hi,
This link for the traces needs a password, could u maybe provide me the 
login details or upload these somewhere else ? Also could u provide me the 
value of the AuxVectors during this test ?

BR,
A Ravi Theja


http://reviews.llvm.org/D14118



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13296: [LLDB] Fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before

2015-10-29 Thread Mohit Bhakkad via lldb-commits
mohit.bhakkad added a comment.

In http://reviews.llvm.org/D13296#265608, @jingham wrote:

> This change alters the timing for the handling of ignore counts for 
> watchpoints.  The original implementation (and the way ignore counts work for 
> breakpoints) is that the breakpoint's ignore count gets checked during the 
> "synchronous" phase of breakpoint stop evaluation.  So it happens when the 
> private stop event is received, and if the ignore count is not satisfied then 
> a public event is not generated.
>
> Your version will move the decision making to the async ShouldStop, i.e. when 
> an event is getting pulled from the public event queue.  If these were 
> breakpoints it would mean that the synchronous callbacks would still fire 
> even if they fail their ignore count test.  Watchpoints don't currently have 
> synchronous callbacks - and I'm not sure we would ever need to support that.  
> If you moved the adjustment code you do in PerformAction to the synchronous 
> callback (Watchpoint::ShouldStop) that would keep breakpoints & watchpoints 
> behaving symmetrically.  It's worth trying that, I am pretty sure that will 
> be a safe place to do your little dance.  But if it isn't, then I don't mind 
> having it in PerformAction provided you put a note to that effect somewhere 
> obvious in Watchpoint.h.


Hi @jingham, I tried to move adjustment code to ShouldStopSynchronous before we 
call ShouldStop, but its not getting stepped to next PC. Looks like threadplan 
are not active in that phase of code. Could you suggest anything wrong I may be 
doing or should I resubmit this patch by putting condition code before we print 
anything.

> Note, if you end up going with the current patch, isn't quite right, however. 
>  You need to move the check for the watchpoint ignore count up before 
> printing out the old & new values.  An ignored watchpoint shouldn't print 
> anything, it should be as if it never stopped.  Where you have the check, the 
> old & new values will get printed even if the watchpoint is ignored.



Repository:
  rL LLVM

http://reviews.llvm.org/D13296



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251626 - Fix flakyness in TestChangeProcessGroup

2015-10-29 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Oct 29 08:44:09 2015
New Revision: 251626

URL: http://llvm.org/viewvc/llvm-project?rev=251626&view=rev
Log:
Fix flakyness in TestChangeProcessGroup

The test was verifying that the pid of the child is not equal to its process
group by searching for text substrings. This failed in the rare cases when the
pid actually *was* a substring of the process group (even though they were not
equal).

Change the test to use SB API and do proper numeric comparisons.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py?rev=251626&r1=251625&r2=251626&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
 Thu Oct 29 08:44:09 2015
@@ -77,11 +77,14 @@ class ChangeProcessGroupTestCase(TestBas
 thread = process.GetSelectedThread()
 
 # release the child from its loop
-self.expect("expr release_child_flag = 1", substrs = ["= 1"])
+value = 
thread.GetSelectedFrame().EvaluateExpression("release_child_flag = 1")
+self.assertTrue(value.IsValid() and value.GetValueAsUnsigned(0) == 1);
 process.Continue()
 
 # make sure the child's process group id is different from its pid
-self.expect("print (int)getpgid(0)", substrs = [pid], matching=False)
+value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
+self.assertTrue(value.IsValid())
+self.assertNotEqual(value.GetValueAsUnsigned(0), int(pid));
 
 # step over the setpgid() call
 thread.StepOver()
@@ -89,7 +92,9 @@ class ChangeProcessGroupTestCase(TestBas
 
 # verify that the process group has been set correctly
 # this also checks that we are still in full control of the child
-self.expect("print (pid_t)getpgid(0)", substrs = [pid])
+value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
+self.assertTrue(value.IsValid())
+self.assertEqual(value.GetValueAsUnsigned(0), int(pid));
 
 # run to completion
 process.Continue()


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

2015-10-29 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

OK looks good then.


http://reviews.llvm.org/D14162



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251628 - Fixup lldb-argdumper cmake build

2015-10-29 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Oct 29 09:14:24 2015
New Revision: 251628

URL: http://llvm.org/viewvc/llvm-project?rev=251628&view=rev
Log:
Fixup lldb-argdumper cmake build

forgot to rename in one spot.

Modified:
lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=251628&r1=251627&r2=251628&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Thu Oct 29 09:14:24 2015
@@ -35,7 +35,7 @@ if (NOT LLDB_DISABLE_PYTHON)
 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
 COMMENT "Python script sym-linking LLDB Python API")
 # We depend on liblldb being built before we can do this step.
-add_dependencies(finish_swig liblldb argdumper)
+add_dependencies(finish_swig liblldb lldb-argdumper)
 
 # If we build the readline module, we depend on that happening
 # first.


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D14177: Better handle the arguments common to all MI commands.

2015-10-29 Thread Hafiz Abid Qadeer via lldb-commits
abidh created this revision.
abidh added a reviewer: ki.stfu.
abidh added a subscriber: lldb-commits.

I observed that eclipse was passing --thread-group for many other commands
then we are currently handling. Looking at the MI documentation, the
following link states that each MI command accept the --thread and
--frame option. Looking at the GDB implementation, it seems that apart
from these 2, --thread-group is also handled the same way.

https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management

So instead of handling those arguments in every comamnds, I have moved
them into the base class and removed them from elsewhere. Now any command
can use these arguments. The patch seems big but most of the changes are
mechanical.

http://reviews.llvm.org/D14177

Files:
  packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
  tools/lldb-mi/MICmdBase.cpp
  tools/lldb-mi/MICmdBase.h
  tools/lldb-mi/MICmdCmdBreak.cpp
  tools/lldb-mi/MICmdCmdBreak.h
  tools/lldb-mi/MICmdCmdData.cpp
  tools/lldb-mi/MICmdCmdData.h
  tools/lldb-mi/MICmdCmdExec.cpp
  tools/lldb-mi/MICmdCmdExec.h
  tools/lldb-mi/MICmdCmdFile.cpp
  tools/lldb-mi/MICmdCmdFile.h
  tools/lldb-mi/MICmdCmdGdbSet.cpp
  tools/lldb-mi/MICmdCmdGdbSet.h
  tools/lldb-mi/MICmdCmdGdbShow.cpp
  tools/lldb-mi/MICmdCmdGdbShow.h
  tools/lldb-mi/MICmdCmdStack.cpp
  tools/lldb-mi/MICmdCmdStack.h
  tools/lldb-mi/MICmdCmdVar.cpp
  tools/lldb-mi/MICmdCmdVar.h
  tools/lldb-mi/MICmdInvoker.cpp

Index: tools/lldb-mi/MICmdInvoker.cpp
===
--- tools/lldb-mi/MICmdInvoker.cpp
+++ tools/lldb-mi/MICmdInvoker.cpp
@@ -189,16 +189,20 @@
 {
 bool bOk = CmdAdd(vCmd);
 
-if (bOk && !vCmd.ParseArgs())
+if(bOk)
 {
-// Report command execution failed
-const SMICmdData cmdData(vCmd.GetCmdData());
-CmdStdout(cmdData);
-CmdCauseAppExit(vCmd);
-CmdDelete(cmdData.id);
+vCmd.ParseCommonArgs();
+if (!vCmd.ParseArgs())
+{
+// Report command execution failed
+const SMICmdData cmdData(vCmd.GetCmdData());
+CmdStdout(cmdData);
+CmdCauseAppExit(vCmd);
+CmdDelete(cmdData.id);
 
-// Proceed to wait or execute next command
-return MIstatus::success;
+// Proceed to wait or execute next command
+return MIstatus::success;
+}
 }
 
 if (bOk && !vCmd.Execute())
Index: tools/lldb-mi/MICmdCmdVar.h
===
--- tools/lldb-mi/MICmdCmdVar.h
+++ tools/lldb-mi/MICmdCmdVar.h
@@ -78,9 +78,6 @@
 bool m_bValid; // True = Variable is valid, false = not valid
 CMIUtilString m_strExpression;
 CMIUtilString m_strValue;
-const CMIUtilString m_constStrArgThread;  // Not specified in MI spec but Eclipse gives this option
-const CMIUtilString m_constStrArgThreadGroup; // Not specified in MI spec but Eclipse gives this option
-const CMIUtilString m_constStrArgFrame;   // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgName;
 const CMIUtilString m_constStrArgFrameAddr;
 const CMIUtilString m_constStrArgExpression;
Index: tools/lldb-mi/MICmdCmdVar.cpp
===
--- tools/lldb-mi/MICmdCmdVar.cpp
+++ tools/lldb-mi/MICmdCmdVar.cpp
@@ -51,9 +51,6 @@
 , m_strType("??")
 , m_bValid(false)
 , m_strValue("??")
-, m_constStrArgThread("thread")
-, m_constStrArgThreadGroup("thread-group")
-, m_constStrArgFrame("frame")
 , m_constStrArgName("name")
 , m_constStrArgFrameAddr("frame-addr")
 , m_constStrArgExpression("expression")
@@ -88,10 +85,6 @@
 bool
 CMICmdCmdVarCreate::ParseArgs()
 {
-m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
-m_setCmdArgs.Add(
-new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
-m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, false, true));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFrameAddr, false, true));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpression, true, true, true, true));
Index: tools/lldb-mi/MICmdCmdStack.h
===
--- tools/lldb-mi/MICmdCmdStack.h
+++ tools/lldb-mi/MICmdCmdStack.h
@@ -57,7 +57,6 @@
 // Attributes:
   private:
 MIuint m_nThreadFrames;
-const CMIUtilString m_constStrArgThread;   // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
 };
 
@@ -122,7 +121,6 @@
   private:
 MIuint m_n

Re: [Lldb-commits] [PATCH] D14177: Better handle the arguments common to all MI commands.

2015-10-29 Thread Ilia K via lldb-commits
ki.stfu added inline comments.


Comment at: tools/lldb-mi/MICmdBase.h:68
@@ -67,2 +67,3 @@
 virtual MIuint GetGUID();
+void ParseCommonArgs();
 

How about renaming it to AddCommonArgs and making it protected?


Comment at: tools/lldb-mi/MICmdInvoker.cpp:192
@@ -191,3 +191,3 @@
 
-if (bOk && !vCmd.ParseArgs())
+if(bOk)
 {

nic: add a space please


http://reviews.llvm.org/D14177



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14177: Better handle the arguments common to all MI commands.

2015-10-29 Thread Hafiz Abid Qadeer via lldb-commits
abidh updated this revision to Diff 38741.
abidh added a comment.

Handled review comments.


http://reviews.llvm.org/D14177

Files:
  packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
  tools/lldb-mi/MICmdBase.cpp
  tools/lldb-mi/MICmdBase.h
  tools/lldb-mi/MICmdCmdBreak.cpp
  tools/lldb-mi/MICmdCmdBreak.h
  tools/lldb-mi/MICmdCmdData.cpp
  tools/lldb-mi/MICmdCmdData.h
  tools/lldb-mi/MICmdCmdExec.cpp
  tools/lldb-mi/MICmdCmdExec.h
  tools/lldb-mi/MICmdCmdFile.cpp
  tools/lldb-mi/MICmdCmdFile.h
  tools/lldb-mi/MICmdCmdGdbSet.cpp
  tools/lldb-mi/MICmdCmdGdbSet.h
  tools/lldb-mi/MICmdCmdGdbShow.cpp
  tools/lldb-mi/MICmdCmdGdbShow.h
  tools/lldb-mi/MICmdCmdStack.cpp
  tools/lldb-mi/MICmdCmdStack.h
  tools/lldb-mi/MICmdCmdVar.cpp
  tools/lldb-mi/MICmdCmdVar.h
  tools/lldb-mi/MICmdInvoker.cpp

Index: tools/lldb-mi/MICmdInvoker.cpp
===
--- tools/lldb-mi/MICmdInvoker.cpp
+++ tools/lldb-mi/MICmdInvoker.cpp
@@ -189,16 +189,20 @@
 {
 bool bOk = CmdAdd(vCmd);
 
-if (bOk && !vCmd.ParseArgs())
+if (bOk)
 {
-// Report command execution failed
-const SMICmdData cmdData(vCmd.GetCmdData());
-CmdStdout(cmdData);
-CmdCauseAppExit(vCmd);
-CmdDelete(cmdData.id);
+vCmd.AddCommonArgs();
+if (!vCmd.ParseArgs())
+{
+// Report command execution failed
+const SMICmdData cmdData(vCmd.GetCmdData());
+CmdStdout(cmdData);
+CmdCauseAppExit(vCmd);
+CmdDelete(cmdData.id);
 
-// Proceed to wait or execute next command
-return MIstatus::success;
+// Proceed to wait or execute next command
+return MIstatus::success;
+}
 }
 
 if (bOk && !vCmd.Execute())
Index: tools/lldb-mi/MICmdCmdVar.h
===
--- tools/lldb-mi/MICmdCmdVar.h
+++ tools/lldb-mi/MICmdCmdVar.h
@@ -78,9 +78,6 @@
 bool m_bValid; // True = Variable is valid, false = not valid
 CMIUtilString m_strExpression;
 CMIUtilString m_strValue;
-const CMIUtilString m_constStrArgThread;  // Not specified in MI spec but Eclipse gives this option
-const CMIUtilString m_constStrArgThreadGroup; // Not specified in MI spec but Eclipse gives this option
-const CMIUtilString m_constStrArgFrame;   // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgName;
 const CMIUtilString m_constStrArgFrameAddr;
 const CMIUtilString m_constStrArgExpression;
Index: tools/lldb-mi/MICmdCmdVar.cpp
===
--- tools/lldb-mi/MICmdCmdVar.cpp
+++ tools/lldb-mi/MICmdCmdVar.cpp
@@ -51,9 +51,6 @@
 , m_strType("??")
 , m_bValid(false)
 , m_strValue("??")
-, m_constStrArgThread("thread")
-, m_constStrArgThreadGroup("thread-group")
-, m_constStrArgFrame("frame")
 , m_constStrArgName("name")
 , m_constStrArgFrameAddr("frame-addr")
 , m_constStrArgExpression("expression")
@@ -88,10 +85,6 @@
 bool
 CMICmdCmdVarCreate::ParseArgs()
 {
-m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
-m_setCmdArgs.Add(
-new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
-m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, false, true));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFrameAddr, false, true));
 m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpression, true, true, true, true));
Index: tools/lldb-mi/MICmdCmdStack.h
===
--- tools/lldb-mi/MICmdCmdStack.h
+++ tools/lldb-mi/MICmdCmdStack.h
@@ -57,7 +57,6 @@
 // Attributes:
   private:
 MIuint m_nThreadFrames;
-const CMIUtilString m_constStrArgThread;   // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
 };
 
@@ -122,7 +121,6 @@
   private:
 MIuint m_nThreadFrames;
 VecMIValueResult_t m_vecMIValueResult;
-const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgFrameLow;
 const CMIUtilString m_constStrArgFrameHigh;
 };
@@ -155,7 +153,6 @@
   private:
 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
 CMICmnMIValueList m_miValueList;
-const CMIUtilString m_constStrArgThread;  // Not specified in MI spec but Eclipse gives this option
 const CMIUtilString m_constStrArgPrintValues;
 const CMIUtilString m_constStrArgFrameLow;
 const CMIUtilString m_constStrArgFram

Re: [Lldb-commits] [PATCH] D14177: Better handle the arguments common to all MI commands.

2015-10-29 Thread Hafiz Abid Qadeer via lldb-commits
abidh marked an inline comment as done.


Comment at: tools/lldb-mi/MICmdBase.h:68
@@ -67,2 +67,3 @@
 virtual MIuint GetGUID();
+void AddCommonArgs();
 

Changed name. But it cant be protected as it is called from the outside.


Comment at: tools/lldb-mi/MICmdInvoker.cpp:192
@@ -191,3 +191,3 @@
 
-if (bOk && !vCmd.ParseArgs())
+if (bOk)
 {

Done.


http://reviews.llvm.org/D14177



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14118: Changes for Bug 17384

2015-10-29 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

In http://reviews.llvm.org/D14118#277675, @ravitheja wrote:

> Hi,
>
>   This link for the traces needs a password, could u maybe provide me the 
> login details or upload these somewhere else ? Also could u provide me the 
> value of the AuxVectors during this test ?
>
>
> BR,
>  A Ravi Theja


Hi Ravi,

I shared logs archive with you in Google Drive - please try to download it.
Unfortunately, I don't have AUXV values for test - potentially, you can get GCE 
instance for yourself (https://cloud.google.com/compute/docs/linux-quickstart) 
and try to reproduce this problem on it.


http://reviews.llvm.org/D14118



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14177: Better handle the arguments common to all MI commands.

2015-10-29 Thread Ilia K via lldb-commits
ki.stfu accepted this revision.
ki.stfu added a comment.
This revision is now accepted and ready to land.

LGTM



Comment at: tools/lldb-mi/MICmdBase.h:68
@@ -67,2 +67,3 @@
 virtual MIuint GetGUID();
+void AddCommonArgs();
 

abidh wrote:
> Changed name. But it cant be protected as it is called from the outside.
OK


http://reviews.llvm.org/D14177



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251636 - Better handle the arguments common to all MI commands.

2015-10-29 Thread Hafiz Abid Qadeer via lldb-commits
Author: abidh
Date: Thu Oct 29 11:30:47 2015
New Revision: 251636

URL: http://llvm.org/viewvc/llvm-project?rev=251636&view=rev
Log:
Better handle the arguments common to all MI commands.

Summary:
I observed that eclipse was passing --thread-group for many other commands
then we are currently handling. Looking at the MI documentation, the
following link states that each MI command accept the --thread and
--frame option. Looking at the GDB implementation, it seems that apart
from these 2, --thread-group is also handled the same way.

https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management

So instead of handling those arguments in every comamnds, I have moved
them into the base class and removed them from elsewhere. Now any command
can use these arguments. The patch seems big but most of the changes are
mechanical.

Reviewers: ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14177

Modified:
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
lldb/trunk/tools/lldb-mi/MICmdBase.cpp
lldb/trunk/tools/lldb-mi/MICmdBase.h
lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdBreak.h
lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdData.h
lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdExec.h
lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdFile.h
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.h
lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdStack.h
lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdVar.h
lldb/trunk/tools/lldb-mi/MICmdInvoker.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py?rev=251636&r1=251635&r2=251636&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py 
Thu Oct 29 11:30:47 2015
@@ -441,7 +441,7 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test that -stack-select-frame requires 1 mandatory argument
 self.runCmd("-stack-select-frame")
-self.expect("\^error,msg=\"Command 'stack-select-frame'\. Command 
Args\. Validation failed. Mandatory args not found: frame\"")
+self.expect("\^error,msg=\"Command 'stack-select-frame'\. Command 
Args\. Validation failed. Mandatory args not found: frame_id\"")
 
 # Test that -stack-select-frame fails on invalid frame number
 self.runCmd("-stack-select-frame 99")

Modified: lldb/trunk/tools/lldb-mi/MICmdBase.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdBase.cpp?rev=251636&r1=251635&r2=251636&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdBase.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdBase.cpp Thu Oct 29 11:30:47 2015
@@ -11,6 +11,7 @@
 #include "MICmdBase.h"
 #include "MICmnMIValueConst.h"
 #include "MICmnLLDBDebugSessionInfo.h"
+#include "MICmdArgValOptionLong.h"
 
 //++ 

 // Details: CMICmdBase constructor.
@@ -23,6 +24,12 @@ CMICmdBase::CMICmdBase()
 : m_pSelfCreatorFn(nullptr)
 , m_rLLDBDebugSessionInfo(CMICmnLLDBDebugSessionInfo::Instance())
 , m_bHasResultRecordExtra(false)
+, m_constStrArgThreadGroup("thread-group")
+, m_constStrArgThread("thread")
+, m_constStrArgFrame("frame")
+, m_ThreadGrpArgMandatory(false)
+, m_ThreadArgMandatory(false)
+, m_FrameArgMandatory(false)
 {
 }
 
@@ -79,6 +86,20 @@ CMICmdBase::GetMiCmd() const
 }
 
 //++ 

+// Details: Help parse the arguments that are common to all commands.
+// Args:None.
+// Return:  None
+// Throws:  None.
+//--
+void
+CMICmdBase::AddCommonArgs()
+{
+m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, 
m_ThreadGrpArgMandatory, true, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
+m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, 
m_ThreadArgMandatory, true, CMICmdArgValListBase::eArgValType_Number, 1));
+m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, 
m_FrameArgMandatory, true, CMICmdArgValListBase::eArgValType_Number, 1));
+}
+
+//++ 

 // Details: The invoker requires this functi

Re: [Lldb-commits] Buildbot e-mail notification has been changed

2015-10-29 Thread Renato Golin via lldb-commits
On 28 October 2015 at 16:33, Galina Kistanova via llvm-commits
 wrote:
> E-mail notification has been changed in the buildmaster. Now it should not
> count interrupted builds to figure out if notification should be send.

Thanks Galina, that'll reduce the noise considerably!

cheers,
--renato
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13296: [LLDB] Fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before

2015-10-29 Thread Jim Ingham via lldb-commits

> On Oct 29, 2015, at 3:34 AM, Mohit Bhakkad  wrote:
> 
> mohit.bhakkad added a comment.
> 
> In http://reviews.llvm.org/D13296#265608, @jingham wrote:
> 
>> This change alters the timing for the handling of ignore counts for 
>> watchpoints.  The original implementation (and the way ignore counts work 
>> for breakpoints) is that the breakpoint's ignore count gets checked during 
>> the "synchronous" phase of breakpoint stop evaluation.  So it happens when 
>> the private stop event is received, and if the ignore count is not satisfied 
>> then a public event is not generated.
>> 
>> Your version will move the decision making to the async ShouldStop, i.e. 
>> when an event is getting pulled from the public event queue.  If these were 
>> breakpoints it would mean that the synchronous callbacks would still fire 
>> even if they fail their ignore count test.  Watchpoints don't currently have 
>> synchronous callbacks - and I'm not sure we would ever need to support that. 
>>  If you moved the adjustment code you do in PerformAction to the synchronous 
>> callback (Watchpoint::ShouldStop) that would keep breakpoints & watchpoints 
>> behaving symmetrically.  It's worth trying that, I am pretty sure that will 
>> be a safe place to do your little dance.  But if it isn't, then I don't mind 
>> having it in PerformAction provided you put a note to that effect somewhere 
>> obvious in Watchpoint.h.
> 
> 
> Hi @jingham, I tried to move adjustment code to ShouldStopSynchronous before 
> we call ShouldStop, but its not getting stepped to next PC. Looks like 
> threadplan are not active in that phase of code. Could you suggest anything 
> wrong I may be doing or should I resubmit this patch by putting condition 
> code before we print anything.

I think it is fine to do that latter.  The watchpoint code really needs an 
overhaul anyway, so taking the easy route here seems fine.  Just leave a 
comment somewhere explaining the behavior difference so when we get around to 
fixing it up we'll remember that it works this way.

Jim


> 
>> Note, if you end up going with the current patch, isn't quite right, 
>> however.  You need to move the check for the watchpoint ignore count up 
>> before printing out the old & new values.  An ignored watchpoint shouldn't 
>> print anything, it should be as if it never stopped.  Where you have the 
>> check, the old & new values will get printed even if the watchpoint is 
>> ignored.
> 
> 
> 
> Repository:
>  rL LLVM
> 
> http://reviews.llvm.org/D13296
> 
> 
> 

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251642 - Add an 'internal' kind of summary to support one-off subclasses of TypeSummaryImpl

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 13:58:13 2015
New Revision: 251642

URL: http://llvm.org/viewvc/llvm-project?rev=251642&view=rev
Log:
Add an 'internal' kind of summary to support one-off subclasses of 
TypeSummaryImpl

Modified:
lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
lldb/trunk/source/API/SBTypeSummary.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSummary.h?rev=251642&r1=251641&r2=251642&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeSummary.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSummary.h Thu Oct 29 13:58:13 
2015
@@ -63,7 +63,8 @@ namespace lldb_private {
 {
 eSummaryString,
 eScript,
-eCallback
+eCallback,
+eInternal
 };
 
 virtual

Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=251642&r1=251641&r2=251642&view=diff
==
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Thu Oct 29 13:58:13 2015
@@ -328,8 +328,21 @@ SBTypeSummary::operator == (lldb::SBType
 bool
 SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs)
 {
-if (IsValid() == false)
-return !rhs.IsValid();
+if (IsValid())
+{
+// valid and invalid are different
+if (!rhs.IsValid())
+return false;
+}
+else
+{
+// invalid and valid are different
+if (rhs.IsValid())
+return false;
+else
+// both invalid are the same
+return true;
+}
 
 if (m_opaque_sp->GetKind() != rhs.m_opaque_sp->GetKind())
 return false;
@@ -348,6 +361,8 @@ SBTypeSummary::IsEqualTo (lldb::SBTypeSu
 if (IsSummaryString() != rhs.IsSummaryString())
 return false;
 return GetOptions() == rhs.GetOptions();
+case TypeSummaryImpl::Kind::eInternal:
+return (m_opaque_sp.get() == rhs.m_opaque_sp.get());
 }
 
 return false;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13073: Add an expression parser for Go

2015-10-29 Thread Ryan Brown via lldb-commits
ribrdb added a comment.

Is this ready to submit?



Comment at: source/Expression/LLVMUserExpression.cpp:43-60
@@ +42,20 @@
+
+LLVMUserExpression::LLVMUserExpression(ExecutionContextScope &exe_scope, const 
char *expr, const char *expr_prefix,
+   lldb::LanguageType language, ResultType 
desired_type)
+: UserExpression(exe_scope, expr, expr_prefix, language, desired_type)
+, m_stack_frame_bottom(LLDB_INVALID_ADDRESS)
+, m_stack_frame_top(LLDB_INVALID_ADDRESS)
+, m_transformed_text()
+, m_execution_unit_sp()
+, m_materializer_ap()
+, m_jit_module_wp()
+, m_enforce_valid_object(true)
+, m_in_cplusplus_method(false)
+, m_in_objectivec_method(false)
+, m_in_static_method(false)
+, m_needs_object_ptr(false)
+, m_const_object(false)
+, m_target(NULL)
+, m_can_interpret(false)
+, m_materialized_address(LLDB_INVALID_ADDRESS)
+{

jingham wrote:
> Don't write initializers with the commas in front like this.  We don't do it 
> this way anywhere else in lldb, and it looks really weird...
I've updated the clang-format config to fix this.


Repository:
  rL LLVM

http://reviews.llvm.org/D13073



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251647 - Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Target; other minor fixes.

2015-10-29 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 29 15:12:40 2015
New Revision: 251647

URL: http://llvm.org/viewvc/llvm-project?rev=251647&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in some files in 
include/lldb/Target; other minor fixes.

Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/include/lldb/Target/Thread.h

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=251647&r1=251646&r2=251647&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Oct 29 15:12:40 2015
@@ -17,7 +17,8 @@
 
 // C++ Includes
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 
@@ -56,7 +57,7 @@ struct Range;
 class ProcessProperties : public Properties
 {
 public:
-// Pass NULL for "process" if the ProcessProperties are to be the global 
copy
+// Pass nullptr for "process" if the ProcessProperties are to be the 
global copy
 ProcessProperties (lldb_private::Process *process);
 
 ~ProcessProperties() override;
@@ -107,11 +108,10 @@ public:
 GetWarningsOptimization () const;
 
 protected:
-
 static void
 OptionValueChangedCallback (void *baton, OptionValue *option_value);
 
-Process * m_process; // Can be NULL for global ProcessProperties
+Process * m_process; // Can be nullptr for global ProcessProperties
 };
 
 typedef std::shared_ptr ProcessPropertiesSP;
@@ -327,9 +327,7 @@ public:
 const char *
 GetProcessPluginName () const
 {
-if (m_plugin_name.empty())
-return NULL;
-return m_plugin_name.c_str();
+return (m_plugin_name.empty() ? nullptr : m_plugin_name.c_str());
 }
 
 void
@@ -401,7 +399,6 @@ public:
 m_listener_sp = listener_sp;
 }
 
-
 Listener &
 GetListenerForProcess (Debugger &debugger);
 
@@ -420,18 +417,15 @@ protected:
 class ProcessLaunchCommandOptions : public Options
 {
 public:
-
 ProcessLaunchCommandOptions (CommandInterpreter &interpreter) :
 Options(interpreter)
 {
 // Keep default values of all options in one place: 
OptionParsingStarting ()
 OptionParsingStarting ();
 }
-
-~ProcessLaunchCommandOptions() override
-{
-}
-
+
+~ProcessLaunchCommandOptions() override = default;
+
 Error
 SetOptionValue (uint32_t option_idx, const char *option_arg) override;
 
@@ -539,11 +533,8 @@ protected:
 class ProcessInstanceInfoList
 {
 public:
-ProcessInstanceInfoList () :
-m_infos()
-{
-}
-
+ProcessInstanceInfoList() = default;
+
 void
 Clear()
 {
@@ -565,25 +556,19 @@ public:
 const char *
 GetProcessNameAtIndex (size_t idx)
 {
-if (idx < m_infos.size())
-return m_infos[idx].GetName();
-return NULL;
+return ((idx < m_infos.size()) ? m_infos[idx].GetName() : nullptr);
 }
 
 size_t
 GetProcessNameLengthAtIndex (size_t idx)
 {
-if (idx < m_infos.size())
-return m_infos[idx].GetNameLength();
-return 0;
+return ((idx < m_infos.size()) ? m_infos[idx].GetNameLength() : 0);
 }
 
 lldb::pid_t
 GetProcessIDAtIndex (size_t idx)
 {
-if (idx < m_infos.size())
-return m_infos[idx].GetProcessID();
-return 0;
+return ((idx < m_infos.size()) ? m_infos[idx].GetProcessID() : 0);
 }
 
 bool
@@ -610,7 +595,6 @@ protected:
 collection m_infos;
 };
 
-
 // This class tracks the Modification state of the process.  Things that can 
currently modify
 // the program are running the program (which will up the StopID) and writing 
memory (which
 // will up the MemoryID.)  
@@ -618,7 +602,7 @@ protected:
 
 class ProcessModID
 {
-friend bool operator== (const ProcessModID &lhs, const ProcessModID &rhs);   
+friend bool operator== (const ProcessModID &lhs, const ProcessModID &rhs); 
  
 public:
 ProcessModID () : 
 m_stop_id (0),
@@ -644,7 +628,7 @@ public:
 return *this;
 }
 
-~ProcessModID () {}
+~ProcessModID() = default;
 
 void BumpStopID () { 
 m_stop_id++;
@@ -727,6 +711,7 @@ private:
 uint32_t m_running_user_expression;
 lldb::EventSP m_last_natural_stop_event;
 };
+
 inline bool operator== (const ProcessModID &lhs, const ProcessModID &rhs)
 {
 if (lhs.StopIDEqual (rhs)
@@ -738,11 +723,7 @@ inline bool operator== (const ProcessMod
 
 inline bool operator!= (const ProcessModID &lhs, const ProcessModID &rhs)
 {
-if (!lhs.StopIDEqual (rhs)
-|| !lhs.MemoryIDEqual (rhs))
-return true;
-else
-return false;
+return (!lhs.StopIDEqual (rhs) || !lhs.MemoryIDEqual (rhs));
 }
 
 //--
@@

Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.

2015-10-29 Thread Ryan Brown via lldb-commits
ribrdb added a comment.

Is this ready to submit?


http://reviews.llvm.org/D13878



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251648 - Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Target; other minor fixes.

2015-10-29 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 29 15:33:47 2015
New Revision: 251648

URL: http://llvm.org/viewvc/llvm-project?rev=251648&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in remaining files in 
include/lldb/Target; other minor fixes.

Modified:
lldb/trunk/include/lldb/Target/ExecutionContext.h
lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/include/lldb/Target/QueueItem.h
lldb/trunk/include/lldb/Target/StackFrame.h
lldb/trunk/include/lldb/Target/StackFrameList.h
lldb/trunk/include/lldb/Target/StackID.h
lldb/trunk/include/lldb/Target/TargetList.h
lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
lldb/trunk/include/lldb/Target/ThreadSpec.h

Modified: lldb/trunk/include/lldb/Target/ExecutionContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ExecutionContext.h?rev=251648&r1=251647&r2=251648&view=diff
==
--- lldb/trunk/include/lldb/Target/ExecutionContext.h (original)
+++ lldb/trunk/include/lldb/Target/ExecutionContext.h Thu Oct 29 15:33:47 2015
@@ -6,6 +6,21 @@
 // License. See LICENSE.TXT for details.
 //
 
//===--===//
+
+#ifndef liblldb_ExecutionContext_h_
+#define liblldb_ExecutionContext_h_
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "lldb/lldb-private.h"
+#include "lldb/Target/StackID.h"
+#include "lldb/Host/Mutex.h"
+
+namespace lldb_private {
+
+//===--===//
 /// Execution context objects refer to objects in the execution of the
 /// program that is being debugged. The consist of one or more of the 
 /// following objects: target, process, thread, and frame. Many objects
@@ -30,17 +45,6 @@
 /// to a wide variety of functions that require execution contexts.
 
//===--===//
 
-
-
-#ifndef liblldb_ExecutionContext_h_
-#define liblldb_ExecutionContext_h_
-
-#include "lldb/lldb-private.h"
-#include "lldb/Target/StackID.h"
-#include "lldb/Host/Mutex.h"
-
-namespace lldb_private {
-
 //--
 /// @class ExecutionContextRef ExecutionContext.h 
"lldb/Target/ExecutionContext.h"
 /// @brief A class that holds a weak reference to an execution context.
@@ -86,7 +90,7 @@ public:
 ExecutionContextRef (const ExecutionContextRef &rhs);
 
 //--
-/// Construct using an ExecutionContext object that might be NULL.
+/// Construct using an ExecutionContext object that might be nullptr.
 /// 
 /// If \a exe_ctx_ptr is valid, then make weak references to any
 /// valid objects in the ExecutionContext, otherwise no weak 
@@ -102,22 +106,6 @@ public:
 ExecutionContextRef (const ExecutionContext &exe_ctx);
 
 //--
-/// Assignment operator
-/// 
-/// Copy all weak references in \a rhs.
-//--
-ExecutionContextRef &
-operator =(const ExecutionContextRef &rhs);
-
-//--
-/// Assignment operator from a ExecutionContext
-/// 
-/// Make weak references to any strongly referenced objects in \a exe_ctx.
-//--
-ExecutionContextRef &
-operator =(const ExecutionContext &exe_ctx);
-
-//--
 /// Construct using the target and all the selected items inside of it
 /// (the process and its selected thread, and the thread's selected
 /// frame). If there is no selected thread, default to the first thread
@@ -154,10 +142,27 @@ public:
 ExecutionContextRef (ExecutionContextScope &exe_scope);
 
 ~ExecutionContextRef();
+
+//--
+/// Assignment operator
+/// 
+/// Copy all weak references in \a rhs.
+//--
+ExecutionContextRef &
+operator =(const ExecutionContextRef &rhs);
+
+//--
+/// Assignment operator from a ExecutionContext
+/// 
+/// Make weak references to any strongly referenced objects in \a exe_ctx.
+//--
+ExecutionContextRef &
+operator =(const ExecutionContext &exe_ctx);
+
 //--
 /// Clear the object's state.
 ///
-/// S

Re: [Lldb-commits] [PATCH] D13073: Add an expression parser for Go

2015-10-29 Thread Jim Ingham via lldb-commits
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.

Yes, that looks good.


Repository:
  rL LLVM

http://reviews.llvm.org/D13073



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.

2015-10-29 Thread Enrico Granata via lldb-commits
granata.enrico accepted this revision.
granata.enrico added a comment.
This revision is now accepted and ready to land.

I think it's OK to land this, yes

I would still like to think about ways that we can avoid using hardcoded 
formatters here, but it seems non-trivial and I don't know enough about Go to 
suggest an obvious solution


http://reviews.llvm.org/D13878



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251657 - Give the test class it's own name (it was reusing the name from TestCompletions.py).

2015-10-29 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Oct 29 16:54:50 2015
New Revision: 251657

URL: http://llvm.org/viewvc/llvm-project?rev=251657&view=rev
Log:
Give the test class it's own name (it was reusing the name from 
TestCompletions.py).

Modified:
lldb/trunk/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py?rev=251657&r1=251656&r2=251657&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py 
Thu Oct 29 16:54:50 2015
@@ -10,7 +10,7 @@ import os
 import lldb
 from lldbtest import *
 
-class CommandLineCompletionTestCase(TestBase):
+class TestSTTYBeforeAndAfter(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251660 - Add a --language (-l) option to the formatter delete commands in order to allow removing formatters from language categories

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 17:18:05 2015
New Revision: 251660

URL: http://llvm.org/viewvc/llvm-project?rev=251660&view=rev
Log:
Add a --language (-l) option to the formatter delete commands in order to allow 
removing formatters from language categories

This is slightly harder to test because formatters cannot be added to language 
categories, so deletions are irreversible (in a debugger run)
I plan to add a test case soon, but I need to think about the right approach to 
obtain one


Modified:
lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/DataFormatters/DataVisualization.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/DataVisualization.h?rev=251660&r1=251659&r2=251660&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/DataVisualization.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/DataVisualization.h Thu Oct 29 
17:18:05 2015
@@ -115,6 +115,10 @@ public:
  lldb::TypeCategoryImplSP &entry,
  bool allow_create = true);
 
+static bool
+GetCategory (lldb::LanguageType language,
+ lldb::TypeCategoryImplSP &entry);
+
 static void
 Add (const ConstString &category);
 

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=251660&r1=251659&r2=251660&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Thu Oct 29 17:18:05 2015
@@ -939,6 +939,9 @@ private:
 case 'w':
 m_category = std::string(option_arg);
 break;
+case 'l':
+m_language = 
Language::GetLanguageTypeFromString(option_arg);
+break;
 default:
 error.SetErrorStringWithFormat ("unrecognized option 
'%c'", short_option);
 break;
@@ -952,6 +955,7 @@ private:
 {
 m_delete_all = false;
 m_category = "default";
+m_language = lldb::eLanguageTypeUnknown;
 }
 
 const OptionDefinition*
@@ -968,7 +972,7 @@ private:
 
 bool m_delete_all;
 std::string m_category;
-
+lldb::LanguageType m_language;
 };
 
 CommandOptions m_options;
@@ -1042,11 +1046,22 @@ protected:
 return result.Succeeded();
 }
 
-lldb::TypeCategoryImplSP category;
-
DataVisualization::Categories::GetCategory(ConstString(m_options.m_category.c_str()),
 category);
+bool delete_category = false;
 
-bool delete_category = category->Delete(typeCS,
-eFormatCategoryItemValue | 
eFormatCategoryItemRegexValue);
+if (m_options.m_language != lldb::eLanguageTypeUnknown)
+{
+lldb::TypeCategoryImplSP category;
+DataVisualization::Categories::GetCategory(m_options.m_language, 
category);
+if (category)
+delete_category = category->Delete(typeCS, 
eFormatCategoryItemValue | eFormatCategoryItemRegexValue);
+}
+else
+{
+lldb::TypeCategoryImplSP category;
+
DataVisualization::Categories::GetCategory(ConstString(m_options.m_category.c_str()),
 category);
+if (category)
+delete_category = category->Delete(typeCS, 
eFormatCategoryItemValue | eFormatCategoryItemRegexValue);
+}
 
 if (delete_category)
 {
@@ -1069,6 +1084,7 @@ CommandObjectTypeFormatDelete::CommandOp
 {
 { LLDB_OPT_SET_1, false, "all", 'a', OptionParser::eNoArgument, NULL, 
NULL, 0, eArgTypeNone,  "Delete from every category."},
 { LLDB_OPT_SET_2, false, "category", 'w', OptionParser::eRequiredArgument, 
NULL, NULL, 0, eArgTypeName,  "Delete from given category."},
+{ LLDB_OPT_SET_3, false, "language", 'l', OptionParser::eRequiredArgument, 
NULL, NULL, 0, eArgTypeLanguage,  "Delete from given language's category."},
 { 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
 };
 
@@ -1960,6 +1976,9 @@ private:
 case 'w':
 m_category = std::string(option_arg);
 break;
+case 'l':
+m_language = 
Language::GetLanguageTypeFromString(option_arg);
+break;
 default:
 error.SetErrorStringWithFormat ("unrecognized option 
'%c'", short_option);
 break;
@@ -1973,6 +1992,7 @

[Lldb-commits] [lldb] r251663 - Do not accept nullptr descriptions as valid summaries to be printed

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 17:29:06 2015
New Revision: 251663

URL: http://llvm.org/viewvc/llvm-project?rev=251663&view=rev
Log:
Do not accept nullptr descriptions as valid summaries to be printed

Modified:
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp

Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=251663&r1=251662&r2=251663&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Thu Oct 29 17:29:06 2015
@@ -945,8 +945,13 @@ lldb_private::formatters::GetOSXEpoch ()
 bool
 lldb_private::formatters::RuntimeSpecificDescriptionSummaryProvider 
(ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options)
 {
-stream.Printf("%s",valobj.GetObjectDescription());
-return true;
+if (const char* description = valobj.GetObjectDescription())
+{
+stream.Printf("%s", description);
+return true;
+}
+else
+return false;
 }
 
 template bool


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251668 - Add a --offset option to memory read that allows one to specify, given a type, how many sizeof(type) bytes to speak before starting to read memory

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 18:40:24 2015
New Revision: 251668

URL: http://llvm.org/viewvc/llvm-project?rev=251668&view=rev
Log:
Add a --offset option to memory read that allows one to specify, given a type, 
how many sizeof(type) bytes to speak before starting to read memory

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py?rev=251668&r1=251667&r2=251668&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
 Thu Oct 29 18:40:24 2015
@@ -89,3 +89,12 @@ class MemoryReadTestCase(TestBase):
 # 0x7fff5fbff598: error: unsupported byte size (20) for float format
 self.expect("memory read --format 'float' --count 1 --size 20 
`&my_double`",
 substrs = ['unsupported byte size (20) for float format'])
+
+self.expect('memory read --type int --count 5 `&my_ints[0]`',
+substrs=['(int) 0x', '2','4','6','8','10'])
+
+self.expect('memory read --type int --count 5 --format hex 
`&my_ints[0]`',
+substrs=['(int) 0x', '0x','0a'])
+
+self.expect('memory read --type int --count 5 --offset 5 
`&my_ints[0]`',
+substrs=['(int) 0x', '12', '14','16','18', '20'])

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp?rev=251668&r1=251667&r2=251668&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp 
Thu Oct 29 18:40:24 2015
@@ -12,6 +12,7 @@ int main (int argc, char const *argv[])
 {
 char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0};
 double my_double = 1234.5678;
+int my_ints[] = {2,4,6,8,10,12,14,16,18,20,22};
 printf("my_string=%s\n", my_string); // Set break point at this line.
 printf("my_double=%g\n", my_double);
 return 0;

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=251668&r1=251667&r2=251668&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Thu Oct 29 18:40:24 2015
@@ -49,6 +49,7 @@ g_option_table[] =
 { LLDB_OPT_SET_1, false, "num-per-line" ,'l', 
OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeNumberPerLine ,"The 
number of items per line to display."},
 { LLDB_OPT_SET_2, false, "binary"   ,'b', OptionParser::eNoArgument
  , NULL, NULL, 0, eArgTypeNone  ,"If true, memory will be saved as 
binary. If false, the memory is saved save as an ASCII dump that uses the 
format, size, count and number per line settings."},
 { LLDB_OPT_SET_3, true , "type" ,'t', 
OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeNone  ,"The 
name of a type to view memory as."},
+{ LLDB_OPT_SET_3, false , "offset"  ,'o', 
OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeCount ,"How 
many elements of the specified type to skip before starting to display data."},
 { LLDB_OPT_SET_1|
   LLDB_OPT_SET_2|
   LLDB_OPT_SET_3, false, "force",'r', OptionParser::eNoArgument,   
NULL, NULL, 0, eArgTypeNone  ,"Necessary if reading over 
target.max-memory-read-size bytes."},
@@ -63,7 +64,8 @@ public:
 OptionGroupReadMemory () :
 m_num_per_line (1,1),
 m_output_as_binary (false),
-m_view_as_type()
+m_view_as_type(),
+m_offset(0,0)
 {
 }
 
@@ -112,6 +114,10 @@ public:
 m_force = true;
 break;
 
+case 'o':
+error = m_offset.SetValueFromString(option_arg);
+break;
+
 default:
 error.SetErrorStringWithFormat("unrecognized short option 
'%c'", short_option);
 break;
@@ -126,6 +132,7 @@ public:
 m_output_as_binary = false;
 m_view_as_type.Clear();
 m_force = false;
+m_offset.Clear();
 }
 
 Error
@@ -291,13 +298,15 

[Lldb-commits] [lldb] r251670 - Remove two #if0ed regions of code that we were using for an experiment but don't really want

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 18:53:34 2015
New Revision: 251670

URL: http://llvm.org/viewvc/llvm-project?rev=251670&view=rev
Log:
Remove two #if0ed regions of code that we were using for an experiment but 
don't really want

Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=251670&r1=251669&r2=251670&view=diff
==
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp 
(original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Thu Oct 
29 18:53:34 2015
@@ -620,14 +620,6 @@ LoadLibStdcppFormatters(lldb::TypeCatego
 
cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(RegularExpressionSP(new 
RegularExpression("^std::(__cxx11::)?list<.+>(( )?&)?$")),
 
SyntheticChildrenSP(new ScriptedSyntheticChildren(stl_synth_flags,

   
"lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider")));
-#if 0
-// With only this, I get std::list showing the content, all children on 
the same line.
-// With this and the section below, I see one child element per line.
-
cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(RegularExpressionSP(new 
RegularExpression("^std::__cxx11::_List_base<.+>(( )?&)?$")),
-
SyntheticChildrenSP(new ScriptedSyntheticChildren(stl_synth_flags,
-   
   
"lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider")));
-#endif
-
 
stl_summary_flags.SetDontShowChildren(false);stl_summary_flags.SetSkipPointers(true);
 
cpp_category_sp->GetRegexTypeSummariesContainer()->Add(RegularExpressionSP(new 
RegularExpression("^std::vector<.+>(( )?&)?$")),

TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags,
@@ -638,12 +630,6 @@ LoadLibStdcppFormatters(lldb::TypeCatego
 
cpp_category_sp->GetRegexTypeSummariesContainer()->Add(RegularExpressionSP(new 
RegularExpression("^std::(__cxx11::)?list<.+>(( )?&)?$")),

TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags,

  "size=${svar%#}")));
-#if 0
-// With this, I get std::list showing one child per line.  Requires the 
change above to get anything, though.
-
cpp_category_sp->GetRegexTypeSummariesContainer()->Add(RegularExpressionSP(new 
RegularExpression("^std::__cxx11::_List_base<.+>(( )?&)?$")),
-   
TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags,
-   
  "size=${svar%#}")));
-#endif
 
 AddCXXSynthetic(cpp_category_sp, 
lldb_private::formatters::LibStdcppVectorIteratorSyntheticFrontEndCreator, 
"std::vector iterator synthetic children", 
ConstString("^__gnu_cxx::__normal_iterator<.+>$"), stl_synth_flags, true);
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251673 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Symbol; other minor fixes.

2015-10-29 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 29 19:04:20 2015
New Revision: 251673

URL: http://llvm.org/viewvc/llvm-project?rev=251673&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Symbol; other 
minor fixes.

Modified:
lldb/trunk/include/lldb/Symbol/Block.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/ClangASTImporter.h
lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCommon.h
lldb/trunk/include/lldb/Symbol/CompilerType.h
lldb/trunk/include/lldb/Symbol/GoASTContext.h
lldb/trunk/include/lldb/Symbol/LineTable.h
lldb/trunk/include/lldb/Symbol/ObjectContainer.h
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/include/lldb/Symbol/SymbolContextScope.h
lldb/trunk/include/lldb/Symbol/UnwindPlan.h

Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=251673&r1=251672&r2=251673&view=diff
==
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Thu Oct 29 19:04:20 2015
@@ -10,6 +10,12 @@
 #ifndef liblldb_Block_h_
 #define liblldb_Block_h_
 
+// C Includes
+// C++ Includes
+#include 
+
+// Other libraries and framework includes
+// Project includes
 #include "lldb/lldb-private.h"
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Core/RangeMap.h"
@@ -209,7 +215,7 @@ public:
 /// Get the parent block.
 ///
 /// @return
-/// The parent block pointer, or NULL if this block has no 
+/// The parent block pointer, or nullptr if this block has no 
 /// parent.
 //--
 Block *
@@ -221,7 +227,7 @@ public:
 /// @return
 /// If this block contains inlined function info, it will return
 /// this block, else parent blocks will be searched to see if
-/// any contain this block. NULL will be returned if this block
+/// any contain this block. nullptr will be returned if this block
 /// nor any parent blocks are inlined function blocks.
 //--
 Block *
@@ -231,7 +237,7 @@ public:
 /// Get the inlined parent block for this block.
 ///
 /// @return
-/// The parent block pointer, or NULL if this block has no 
+/// The parent block pointer, or nullptr if this block has no 
 /// parent.
 //--
 Block *
@@ -241,7 +247,7 @@ public:
 /// Get the sibling block for this block.
 ///
 /// @return
-/// The sibling block pointer, or NULL if this block has no 
+/// The sibling block pointer, or nullptr if this block has no 
 /// sibling.
 //--
 Block *
@@ -251,15 +257,13 @@ public:
 /// Get the first child block.
 ///
 /// @return
-/// The first child block pointer, or NULL if this block has no 
+/// The first child block pointer, or nullptr if this block has no 
 /// children.
 //--
 Block *
 GetFirstChild () const
 {
-if (m_children.empty())
-return NULL;
-return m_children.front().get();
+return (m_children.empty() ? nullptr : m_children.front().get());
 }
 
 //--
@@ -346,7 +350,7 @@ public:
 /// Get const accessor for any inlined function information.
 ///
 /// @return
-/// A const pointer to any inlined function information, or NULL
+/// A const pointer to any inlined function information, or nullptr
 /// if this is a regular block.
 //--
 const InlineFunctionInfo*
@@ -375,16 +379,16 @@ public:
 ///
 /// @param[in] name
 /// The method name for the inlined function. This value should
-/// not be NULL.
+/// not be nullptr.
 ///
 /// @param[in] mangled
 /// The mangled method name for the inlined function. This can
-/// be NULL if there is no mangled name for an inlined function
+/// be nullptr if there is no mangled name for an inlined function
 /// or if the name is the same as \a name.
 ///
 /// @param[in] decl_ptr
 /// A optional pointer to declaration information for the
-/// inlined function information. This value can be NULL to
+/// inlined function information. This value can be nullptr to
 /// indicate that no declaration information is available.
 ///
 /// @param[in] call_decl_ptr

Mo

Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Pavel Labath via lldb-commits
labath requested changes to this revision.
labath added a comment.
This revision now requires changes to proceed.

Thanks for the patch. Looks good, but we need to make sure things continue to 
work on non-linux systems...



Comment at: tools/lldb/source/Host/common/File.cpp:301
@@ -299,1 +300,3 @@
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
 if (options & eOpenOptionCloseOnExec)

This needs to evaluate to true on non-linux systems.
Would `#ifdef O_CLOEXEC` work for you ?


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Kamil Rytarowski via lldb-commits
krytarowski added a subscriber: krytarowski.


Comment at: tools/lldb/source/Host/common/File.cpp:301
@@ -299,1 +300,3 @@
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
 if (options & eOpenOptionCloseOnExec)

labath wrote:
> This needs to evaluate to true on non-linux systems.
> Would `#ifdef O_CLOEXEC` work for you ?
NetBSD:

```
/usr/include/fcntl.h:#defineO_CLOEXEC   0x0040  /* set close on 
exec */
```


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Kamil Rytarowski via lldb-commits
krytarowski requested changes to this revision.
krytarowski added a reviewer: krytarowski.


Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:32
@@ -31,1 +31,3 @@
 
+#include 
+

Is this file just for Linux?


Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:254
@@ -251,1 +253,3 @@
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
 if (!child_process_inherit)

Stop breaking NetBSD.


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Bruce Mitchener via lldb-commits
brucem added a subscriber: brucem.
brucem requested changes to this revision.
brucem added a reviewer: brucem.


Comment at: tools/lldb/source/Host/linux/HostThreadLinux.cpp:33
@@ -32,3 +32,3 @@
 {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
+#if (defined(__GLIBC__) && defined(_GNU_SOURCE) && __GLIBC__ >= 2 && 
__GLIBC_MINOR__ >= 12) || defined(__ANDROID__)
 ::pthread_setname_np(thread, name.data());

This is probably better done with weak symbols or a check in configure and 
cmake rather than hard-coding this stuff in the C pre-processor.



Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:32
@@ -31,1 +31,3 @@
 
+#include 
+

krytarowski wrote:
> Is this file just for Linux?
This file isn't Linux only, so the concerns expressed by Labath are valid here 
as well.  (The same thing is true of other inclusions of ``.)


Comment at: tools/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:72
@@ -71,1 +71,3 @@
 
+// Missing defines due to bug: 
https://sourceware.org/bugzilla/show_bug.cgi?id=4125
+

This bug was fixed in 2007, over 8 years ago ... at what point do we stop 
carrying around this baggage?


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Kamil Rytarowski via lldb-commits
krytarowski added inline comments.


Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:43
@@ -40,3 +42,3 @@
 // TODO: Add more platforms that support pipe2.
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) || 
defined(__NetBSD__)
+#if (defined(__linux__) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) || 
(defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
 #define PIPE2_SUPPORTED 1

How about moving `PIPE2_SUPPORTED` to `include/lldb/Host/*/Config.h`? It could 
be renamed to `LLDB_CONFIG_PIPE2_SUPPORTED`. Feel free to include in the Linux 
configuration headers needed to detect Linux version.


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-29 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Oct 29 20:09:54 2015
New Revision: 251678

URL: http://llvm.org/viewvc/llvm-project?rev=251678&view=rev
Log:
Some test cases that need the lldbExec path were failing because lldbExec was 
turning out to be None even though it was being validly set by dotest.py

It turns out that lldbtest_config was being imported locally to 
"lldbsuite.test" instead of globally, so when the test cases got individually 
brought by a global import via __import__ by unittest2, they did not see the 
lldbtest_config import, and ended up importing a new separate copy of it, with 
lldbExec unset

This is a simple hackaround that brings lldbtest_config to global visibility 
and makes sure the configuration data is correctly shared


Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=251678&r1=251677&r2=251678&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Oct 29 20:09:54 2015
@@ -21,6 +21,10 @@ for available options.
 """
 
 from __future__ import print_function
+# this module needs to have global visibility, otherwise test cases
+# will import it anew in their local namespace, essentially losing access
+# to all the configuration data
+globals()['lldbtest_config'] = __import__('lldbtest_config')
 
 import use_lldb_suite
 
@@ -42,7 +46,6 @@ import test_results
 from test_results import EventBuilder
 import inspect
 import unittest2
-import lldbtest_config
 import test_categories
 
 import six


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

2015-10-29 Thread Kamil Rytarowski via lldb-commits
krytarowski added inline comments.


Comment at: tools/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:72
@@ -71,1 +71,3 @@
 
+// Missing defines due to bug: 
https://sourceware.org/bugzilla/show_bug.cgi?id=4125
+

brucem wrote:
> This bug was fixed in 2007, over 8 years ago ... at what point do we stop 
> carrying around this baggage?
Few defines aren't much of entanglement. RHEL5 is still supported upstream 
(till 2017).

https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Product_life_cycle


Repository:
  rL LLVM

http://reviews.llvm.org/D14182



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251681 - Added real editline tests.

2015-10-29 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Oct 29 21:54:52 2015
New Revision: 251681

URL: http://llvm.org/viewvc/llvm-project?rev=251681&view=rev
Log:
Added real editline tests.

These are two simple tests that make sure single line and
multiline content are processed and received by Editline.cpp.

Fancier tests to come...

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme
lldb/trunk/source/Host/CMakeLists.txt
lldb/trunk/unittests/Editline/EditlineTest.cpp

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251681&r1=251680&r2=251681&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Oct 29 21:54:52 2015
@@ -909,13 +909,6 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
-   2326CF411BDD636100A5CEAC /* PBXContainerItemProxy */ = {
-   isa = PBXContainerItemProxy;
-   containerPortal = 08FB7793FE84155DC02AAC07 /* Project 
object */;
-   proxyType = 1;
-   remoteGlobalIDString = 26680206115FD0ED008E1FE4;
-   remoteInfo = LLDB;
-   };
235AFBC1199BC70700897A4B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project 
object */;
@@ -937,6 +930,13 @@
remoteGlobalIDString = 456F67721AD46CE9002850C2;
remoteInfo = "debugserver-mini";
};
+   23AB8B6A1BDF513B008BF3B0 /* PBXContainerItemProxy */ = {
+   isa = PBXContainerItemProxy;
+   containerPortal = 08FB7793FE84155DC02AAC07 /* Project 
object */;
+   proxyType = 1;
+   remoteGlobalIDString = 2689FFC913353D7A00698AC0;
+   remoteInfo = "lldb-core";
+   };
262CFC7111A450CB00946C6C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 265E9BE1115C2BAA00D0DCCB /* 
debugserver.xcodeproj */;
@@ -5831,7 +5831,7 @@
buildRules = (
);
dependencies = (
-   2326CF421BDD636100A5CEAC /* PBXTargetDependency 
*/,
+   23AB8B6B1BDF513B008BF3B0 /* PBXTargetDependency 
*/,
);
name = "lldb-gtest";
productName = "lldb-gtest";
@@ -6965,11 +6965,6 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
-   2326CF421BDD636100A5CEAC /* PBXTargetDependency */ = {
-   isa = PBXTargetDependency;
-   target = 26680206115FD0ED008E1FE4 /* LLDB */;
-   targetProxy = 2326CF411BDD636100A5CEAC /* 
PBXContainerItemProxy */;
-   };
235AFBC2199BC70700897A4B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 26F5C26910F3D9A4009D5894 /* lldb-tool */;
@@ -6980,6 +6975,11 @@
target = 235AFBB5199BC6AD00897A4B /* Linux */;
targetProxy = 235AFBC3199BC70B00897A4B /* 
PBXContainerItemProxy */;
};
+   23AB8B6B1BDF513B008BF3B0 /* PBXTargetDependency */ = {
+   isa = PBXTargetDependency;
+   target = 2689FFC913353D7A00698AC0 /* lldb-core */;
+   targetProxy = 23AB8B6A1BDF513B008BF3B0 /* 
PBXContainerItemProxy */;
+   };
262CFC7211A450CB00946C6C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = debugserver;
@@ -7404,31 +7404,13 @@
239504D81BDD451400963CEA /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
-   CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-   CLANG_ENABLE_MODULES = YES;
-   CLANG_ENABLE_OBJC_ARC = YES;
-   CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-   CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-   CODE_SIGN_IDENTITY = "-";
-   ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",

[Lldb-commits] [lldb] r251684 - Make new dotest.py executable

2015-10-29 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Oct 29 22:52:27 2015
New Revision: 251684

URL: http://llvm.org/viewvc/llvm-project?rev=251684&view=rev
Log:
Make new dotest.py executable

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py   (contents, props 
changed)

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=251684&r1=251683&r2=251684&view=diff
==
(empty)

Propchange: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
--
svn:executable = *


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r251681 - Added real editline tests.

2015-10-29 Thread Zachary Turner via lldb-commits
On Thu, Oct 29, 2015 at 7:57 PM Todd Fiala via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: tfiala
> Date: Thu Oct 29 21:54:52 2015
> New Revision: 251681
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251681&view=rev
> Log:
> Added real editline tests.
>
> These are two simple tests that make sure single line and
> multiline content are processed and received by Editline.cpp.
>
> Fancier tests to come...
>
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
> lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme
> lldb/trunk/source/Host/CMakeLists.txt
> lldb/trunk/unittests/Editline/EditlineTest.cpp
>
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=251681&r1=251680&r2=251681&view=diff
>
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Oct 29 21:54:52 2015
> @@ -909,13 +909,6 @@
>  /* End PBXBuildFile section */
>
>  /* Begin PBXContainerItemProxy section */
> -   2326CF411BDD636100A5CEAC /* PBXContainerItemProxy */ = {
> -   isa = PBXContainerItemProxy;
> -   containerPortal = 08FB7793FE84155DC02AAC07 /*
> Project object */;
> -   proxyType = 1;
> -   remoteGlobalIDString = 26680206115FD0ED008E1FE4;
> -   remoteInfo = LLDB;
> -   };
> 235AFBC1199BC70700897A4B /* PBXContainerItemProxy */ = {
> isa = PBXContainerItemProxy;
> containerPortal = 08FB7793FE84155DC02AAC07 /*
> Project object */;
> @@ -937,6 +930,13 @@
> remoteGlobalIDString = 456F67721AD46CE9002850C2;
> remoteInfo = "debugserver-mini";
> };
> +   23AB8B6A1BDF513B008BF3B0 /* PBXContainerItemProxy */ = {
> +   isa = PBXContainerItemProxy;
> +   containerPortal = 08FB7793FE84155DC02AAC07 /*
> Project object */;
> +   proxyType = 1;
> +   remoteGlobalIDString = 2689FFC913353D7A00698AC0;
> +   remoteInfo = "lldb-core";
> +   };
> 262CFC7111A450CB00946C6C /* PBXContainerItemProxy */ = {
> isa = PBXContainerItemProxy;
> containerPortal = 265E9BE1115C2BAA00D0DCCB /*
> debugserver.xcodeproj */;
> @@ -5831,7 +5831,7 @@
> buildRules = (
> );
> dependencies = (
> -   2326CF421BDD636100A5CEAC /*
> PBXTargetDependency */,
> +   23AB8B6B1BDF513B008BF3B0 /*
> PBXTargetDependency */,
> );
> name = "lldb-gtest";
> productName = "lldb-gtest";
> @@ -6965,11 +6965,6 @@
>  /* End PBXSourcesBuildPhase section */
>
>  /* Begin PBXTargetDependency section */
> -   2326CF421BDD636100A5CEAC /* PBXTargetDependency */ = {
> -   isa = PBXTargetDependency;
> -   target = 26680206115FD0ED008E1FE4 /* LLDB */;
> -   targetProxy = 2326CF411BDD636100A5CEAC /*
> PBXContainerItemProxy */;
> -   };
> 235AFBC2199BC70700897A4B /* PBXTargetDependency */ = {
> isa = PBXTargetDependency;
> target = 26F5C26910F3D9A4009D5894 /* lldb-tool */;
> @@ -6980,6 +6975,11 @@
> target = 235AFBB5199BC6AD00897A4B /* Linux */;
> targetProxy = 235AFBC3199BC70B00897A4B /*
> PBXContainerItemProxy */;
> };
> +   23AB8B6B1BDF513B008BF3B0 /* PBXTargetDependency */ = {
> +   isa = PBXTargetDependency;
> +   target = 2689FFC913353D7A00698AC0 /* lldb-core */;
> +   targetProxy = 23AB8B6A1BDF513B008BF3B0 /*
> PBXContainerItemProxy */;
> +   };
> 262CFC7211A450CB00946C6C /* PBXTargetDependency */ = {
> isa = PBXTargetDependency;
> name = debugserver;
> @@ -7404,31 +7404,13 @@
> 239504D81BDD451400963CEA /* Debug */ = {
> isa = XCBuildConfiguration;
> buildSettings = {
> -   CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
> -   CLANG_ENABLE_MODULES = YES;
> -   CLANG_ENABLE_OBJC_ARC = YES;
> -   CLANG_WARN_DIRECT_OBJC_ISA_USAGE =
> YES_ERROR;
> -   CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
> -   CODE_SIGN_IDENTITY = "-";
> -

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-29 Thread Zachary Turner via lldb-commits
Wow.  That's a weird problem.  Thanks for finding it!

Would it work if we move the definition of the `lldbtest_config` class into
lldbsuite/test/__init__.py?  This way the configuration should be part of
the global package state of the lldbsuite.test package, which all the tests
are already members of the same package, so they wouldn't even need to
import anything (I think).

On Thu, Oct 29, 2015 at 6:12 PM Enrico Granata via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: enrico
> Date: Thu Oct 29 20:09:54 2015
> New Revision: 251678
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251678&view=rev
> Log:
> Some test cases that need the lldbExec path were failing because lldbExec
> was turning out to be None even though it was being validly set by dotest.py
>
> It turns out that lldbtest_config was being imported locally to
> "lldbsuite.test" instead of globally, so when the test cases got
> individually brought by a global import via __import__ by unittest2, they
> did not see the lldbtest_config import, and ended up importing a new
> separate copy of it, with lldbExec unset
>
> This is a simple hackaround that brings lldbtest_config to global
> visibility and makes sure the configuration data is correctly shared
>
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/dotest.py
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=251678&r1=251677&r2=251678&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Oct 29
> 20:09:54 2015
> @@ -21,6 +21,10 @@ for available options.
>  """
>
>  from __future__ import print_function
> +# this module needs to have global visibility, otherwise test cases
> +# will import it anew in their local namespace, essentially losing access
> +# to all the configuration data
> +globals()['lldbtest_config'] = __import__('lldbtest_config')
>
>  import use_lldb_suite
>
> @@ -42,7 +46,6 @@ import test_results
>  from test_results import EventBuilder
>  import inspect
>  import unittest2
> -import lldbtest_config
>  import test_categories
>
>  import six
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13859: [LLDB][LLGS Test] Check length of register, only when its available

2015-10-29 Thread Mohit Bhakkad via lldb-commits
mohit.bhakkad updated this revision to Diff 38785.
mohit.bhakkad added a comment.

Changes in this revision:

- Fixed GetUserRegisterCount () to get count registers which are actually 
present.

This will make llgs send E45 when reg_index is of some unavailable reg.


Repository:
  rL LLVM

http://reviews.llvm.org/D13859

Files:
  source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_mips.h
  source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_mips64.h

Index: source/Plugins/Process/Utility/RegisterContextLinux_mips64.h
===
--- source/Plugins/Process/Utility/RegisterContextLinux_mips64.h
+++ source/Plugins/Process/Utility/RegisterContextLinux_mips64.h
@@ -19,7 +19,7 @@
 : public lldb_private::RegisterInfoInterface
 {
 public:
-RegisterContextLinux_mips64(const lldb_private::ArchSpec &target_arch);
+RegisterContextLinux_mips64(const lldb_private::ArchSpec &target_arch, bool msa_present = true);
 
 size_t
 GetGPRSize() const override;
Index: source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
===
--- source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
+++ source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
@@ -75,27 +75,31 @@
 }
 
 uint32_t
-GetUserRegisterInfoCount (const ArchSpec &target_arch)
+GetUserRegisterInfoCount (const ArchSpec &target_arch, bool msa_present)
 {
 switch (target_arch.GetMachine())
 {
 case llvm::Triple::mips:
 case llvm::Triple::mipsel:
-return static_cast (k_num_user_registers_mips);
+if (msa_present)
+return static_cast (k_num_user_registers_mips);
+return static_cast (k_num_user_registers_mips - k_num_msa_registers_mips); 
 case llvm::Triple::mips64el:
 case llvm::Triple::mips64:
-return static_cast (k_num_user_registers_mips64);
+if (msa_present)
+return static_cast (k_num_user_registers_mips64);
+return static_cast (k_num_user_registers_mips64 - k_num_msa_registers_mips64);
 default:
 assert(false && "Unhandled target architecture.");
 return 0;
 }
 }
 
-RegisterContextLinux_mips64::RegisterContextLinux_mips64(const ArchSpec &target_arch) :
+RegisterContextLinux_mips64::RegisterContextLinux_mips64(const ArchSpec &target_arch, bool msa_present) :
 lldb_private::RegisterInfoInterface(target_arch),
 m_register_info_p (GetRegisterInfoPtr (target_arch)),
 m_register_info_count (GetRegisterInfoCount (target_arch)),
-m_user_register_count (GetUserRegisterInfoCount (target_arch))
+m_user_register_count (GetUserRegisterInfoCount (target_arch, msa_present))
 {
 }
 
Index: source/Plugins/Process/Utility/RegisterContextLinux_mips.h
===
--- source/Plugins/Process/Utility/RegisterContextLinux_mips.h
+++ source/Plugins/Process/Utility/RegisterContextLinux_mips.h
@@ -17,7 +17,7 @@
 : public lldb_private::RegisterInfoInterface
 {
 public:
-RegisterContextLinux_mips(const lldb_private::ArchSpec &target_arch);
+RegisterContextLinux_mips(const lldb_private::ArchSpec &target_arch, bool msa_present = true);
 
 size_t
 GetGPRSize() const override;
@@ -30,6 +30,9 @@
 
 uint32_t
 GetUserRegisterCount () const override;
+
+private:
+uint32_t m_user_register_count;
 };
 
 #endif
Index: source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
===
--- source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
+++ source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
@@ -29,8 +29,17 @@
 #include "RegisterInfos_mips.h"
 #undef DECLARE_REGISTER_INFOS_MIPS_STRUCT
 
-RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch) :
-RegisterInfoInterface(target_arch)
+uint32_t
+GetUserRegisterInfoCount (bool msa_present)
+{
+if (msa_present)
+return static_cast (k_num_user_registers_mips);
+return static_cast (k_num_user_registers_mips - k_num_msa_registers_mips);
+}
+
+RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch, bool msa_present) :
+RegisterInfoInterface(target_arch),
+m_user_register_count (GetUserRegisterInfoCount (msa_present))
 {
 }
 
@@ -63,5 +72,5 @@
 uint32_t
 RegisterContextLinux_mips::GetUserRegisterCount () const
 {
-return static_cast (k_num_user_registers_mips);
+return static_cast (m_user_register_count);
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits