[Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Ravitheja Addepally via lldb-commits
Author: ravitheja
Date: Wed Sep 23 02:19:02 2015
New Revision: 248366

URL: http://llvm.org/viewvc/llvm-project?rev=248366&view=rev
Log:
Testcase and fix for bug 24074

Summary:
In bug 24074, the type information is not shown
correctly. This commit  includes the following -
-> Changes for displaying correct type based on
   current lexical scope for the command "image
   lookup -t"
-> The corresponding testcase.

Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg

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

Added:
lldb/trunk/include/lldb/Symbol/TypeMap.h
lldb/trunk/source/Symbol/TypeMap.cpp
lldb/trunk/test/lang/c/typedef/
lldb/trunk/test/lang/c/typedef/Makefile
lldb/trunk/test/lang/c/typedef/Testtypedef.py
lldb/trunk/test/lang/c/typedef/main.c
Modified:
lldb/trunk/include/lldb/Core/Module.h
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/include/lldb/Symbol/SymbolFile.h
lldb/trunk/include/lldb/Symbol/SymbolVendor.h
lldb/trunk/include/lldb/Symbol/TypeList.h
lldb/trunk/include/lldb/lldb-forward.h
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/trunk/source/Symbol/CMakeLists.txt
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/SymbolFile.cpp
lldb/trunk/source/Symbol/SymbolVendor.cpp
lldb/trunk/source/Symbol/TypeList.cpp

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=248366&r1=248365&r2=248366&view=diff
==
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Wed Sep 23 02:19:02 2015
@@ -1193,7 +1193,7 @@ private:
 const CompilerDeclContext *parent_decl_ctx,
 bool append, 
 size_t max_matches,
-TypeList& types);
+TypeMap& types);
 
 
 DISALLOW_COPY_AND_ASSIGN (Module);

Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=248366&r1=248365&r2=248366&view=diff
==
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Wed Sep 23 02:19:02 2015
@@ -299,6 +299,27 @@ public:
ConstString &language_object_name);
 
 //--
+/// If this symbol context represents a function that is a method,
+/// return true and provide information about the method.
+///
+/// @param[out] language
+/// If \b true is returned, the language for the method.
+///
+/// @param[out] is_instance_method
+/// If \b true is returned, \b true if this is a instance method,
+/// \b false if this is a static/class function.
+///
+/// @param[out] language_object_name
+/// If \b true is returned, the name of the artificial variable
+/// for the language ("this" for C++, "self" for ObjC).
+///
+/// @return
+/// \b True if this symbol context represents a function that
+/// is a method of a class, \b false otherwise.
+//--
+void
+   SortTypeList(TypeMap &type_map, TypeList &type_list) const;
+//--
 /// Find a name of the innermost function for the symbol context.
 ///
 /// For instance, if the symbol context contains an inlined block,

Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=248366&r1=248365&r2=248366&view=diff
==
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Wed Sep 23 02:19:02 2015
@@ -141,7 +141,7 @@ public:
 virtual uint32_tFindGlobalVariables (const RegularExpression& 
regex, bool append, uint32_t max_matches, VariableList& variables);
 virtual uint32_tFindFunctions (const ConstString &name, const 
CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool 
include_inlines, bool append, SymbolContextList& sc_list);
 virtual uint32_tFindFunctions (const RegularExpression& regex, 
bool include_inlines, bool append, SymbolContextList& sc_list);
-virtual uint32_

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-23 Thread Ilia K via lldb-commits
ki.stfu requested changes to this revision.
ki.stfu added a comment.

Please, next time make a patch with full context:

  svn diff --diff-cmd diff -x "-U" > mypatch.txt

This will help us to reduce the review time.



Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:14
@@ +13,3 @@
+# evaluates array when char-array-as-string is off
+def eval_array(self, name, length, typ):
+self.runCmd("-var-create - * " + name)

Probably it should be named like eval_and_check_array()


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:16-19
@@ +15,6 @@
+self.runCmd("-var-create - * " + name)
+self.expect("\^done,name=\"var\d+\",numchild=\"" + 
+str(length) +
+"\",value=\"\[" + str(length) + "\]\",type=\"" +
+typ + " \[" + str(length) + "\]\",thread-id=\"1\",has_more=\"0\"")
+

Please use '%' operator to format the string.


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:21
@@ +20,3 @@
+
+# evaluates array or pointer when char-array-as-string is on
+def eval_ap(self, name, value, sum_part, typ):

This comment deceives us because you use eval_ap on the line #56 at the time 
when char-array-as-string is "off".


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:22
@@ +21,3 @@
+# evaluates array or pointer when char-array-as-string is on
+def eval_ap(self, name, value, sum_part, typ):
+self.runCmd("-var-create - * " + name)

What is ap stands for?


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:26
@@ +25,3 @@
+value +
+"\\\"t\""+ sum_part 
+"\"n\\\"\",type=\"" +
+typ +

This looks like a magic. \t is a part of the variable's value, so please pass 
it via arguments too.

BTW: Use add_slashes() from MiLibraryLoadedTestCase.test_lldbmi_library_loaded 
test case to reduce amount of '\' characters.


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:62
@@ -46,4 +61,3 @@
 # Test that an char16_t* is expanded to string when print 
char-array-as-string is "off"
-self.runCmd("-var-create - * u16p")
-self.expect("\^done,name=\"var\d+\",numchild=\"1\",value=\"0x[0-9a-f]+ 
u\\\"t\"hello\"n\\\"\",type=\"const
 char16_t \*\",thread-id=\"1\",has_more=\"0\"")
+self.eval_ap("u16p", "0x[0-9a-f]+ u", "hello", "const char16_t \\*")
 

'u' belongs to "hello". Please pass them together.


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:85
@@ -74,4 +84,3 @@
 # Test that an char[] with escape chars is expanded to string when 
print char-array-as-string is "on"
-self.runCmd("-var-create - * ca")
-
self.expect("\^done,name=\"var\d+\",numchild=\"10\",value=\"\\\"t\"hello\"n\\\"\",type=\"const
 char \[10\]\",thread-id=\"1\",has_more=\"0\"")
+self.eval_ap("ca", "", "hello", "const char \\[[0-9]+\\]")
 

Why the size is a regexp (it was 10)?


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:100
@@ +99,3 @@
+# Test russian unicode strings
+rval = "Эмбаркадеро"
+self.eval_ap("u16p_rus", "0x[0-9a-f]+ u", rval, "const char16_t \\*")

Please don't use your company name here.


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:109
@@ +108,3 @@
+# in python regex  -> \
+rval = '' * 7 + '" ' + '' * 2 + 'n'
+self.eval_ap("u16p_esc", "0x[0-9a-f]+ u", rval, "const char16_t \\*")

Where is it from? It must be removed before merging.


Comment at: test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py:121-143
@@ -101,3 +120,25 @@
 
 @lldbmi_test
 @skipIfWindows #llvm.org/pr24452: Get lldb-mi working on Windows
+@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfLinux # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
+def test_lldbmi_stl_types(self):
+"""Test that 'lldb-mi --interpreter' print summary for STL types."""
+
+self.spawnLldbMi(args = None)
+
+# Load executable
+self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+self.expect("\^done")
+
+# Run to BP_gdb_set_show_print_char_array_as_string_test
+line = line_number('main.cpp', '// BP_cpp_stl_types_test')
+self.runCmd("-break-insert main.cpp:%d" % line)
+self.expect("\^done,bkpt={number=\"1\"")
+self.runCmd("-exec-run")
+self.expect("\^running")
+self.expect("\*stopped,reason=\"breakpoint-hit\"")
+
+

Re: [Lldb-commits] [PATCH] D13056: Fix race condition during process detach

2015-09-23 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248371: Fix race condition during process detach (authored 
by labath).

Changed prior to commit:
  http://reviews.llvm.org/D13056?vs=35372&id=35476#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13056

Files:
  lldb/trunk/include/lldb/Target/Process.h
  lldb/trunk/source/Target/Process.cpp
  lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py

Index: lldb/trunk/source/Target/Process.cpp
===
--- lldb/trunk/source/Target/Process.cpp
+++ lldb/trunk/source/Target/Process.cpp
@@ -3916,52 +3916,46 @@
 }
 
 Error
-Process::HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp)
+Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp)
 {
 Error error;
 if (m_public_state.GetValue() == eStateRunning)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
 if (log)
-log->Printf("Process::%s() About to halt.", __FUNCTION__);
-error = Halt();
-if (error.Success())
+log->Printf("Process::%s() About to stop.", __FUNCTION__);
+
+SendAsyncInterrupt();
+
+// Consume the interrupt event.
+TimeValue timeout (TimeValue::Now());
+timeout.OffsetWithSeconds(10);
+StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
+
+// If the process exited while we were waiting for it to stop, put the exited event into
+// the shared pointer passed in and return.  Our caller doesn't need to do anything else, since
+// they don't have a process anymore...
+
+if (state == eStateExited || m_private_state.GetValue() == eStateExited)
 {
-// Consume the halt event.
-TimeValue timeout (TimeValue::Now());
-timeout.OffsetWithSeconds(1);
-StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
-
-// If the process exited while we were waiting for it to stop, put the exited event into
-// the shared pointer passed in and return.  Our caller doesn't need to do anything else, since
-// they don't have a process anymore...
-
-if (state == eStateExited || m_private_state.GetValue() == eStateExited)
-{
-if (log)
-log->Printf("Process::HaltForDestroyOrDetach() Process exited while waiting to Halt.");
-return error;
-}
-else
-exit_event_sp.reset(); // It is ok to consume any non-exit stop events
-
-if (state != eStateStopped)
-{
-if (log)
-log->Printf("Process::HaltForDestroyOrDetach() Halt failed to stop, state is: %s", StateAsCString(state));
-// If we really couldn't stop the process then we should just error out here, but if the
-// lower levels just bobbled sending the event and we really are stopped, then continue on.
-StateType private_state = m_private_state.GetValue();
-if (private_state != eStateStopped)
-{
-return error;
-}
-}
+if (log)
+log->Printf("Process::%s() Process exited while waiting to stop.", __FUNCTION__);
+return error;
 }
 else
+exit_event_sp.reset(); // It is ok to consume any non-exit stop events
+
+if (state != eStateStopped)
 {
 if (log)
-log->Printf("Process::HaltForDestroyOrDetach() Halt got error: %s", error.AsCString());
+log->Printf("Process::%s() failed to stop, state is: %s", __FUNCTION__, StateAsCString(state));
+// If we really couldn't stop the process then we should just error out here, but if the
+// lower levels just bobbled sending the event and we really are stopped, then continue on.
+StateType private_state = m_private_state.GetValue();
+if (private_state != eStateStopped)
+{
+return error;
+}
 }
 }
 return error;
@@ -3980,7 +3974,7 @@
 {
 if (DetachRequiresHalt())
 {
-error = HaltForDestroyOrDetach (exit_event_sp);
+error = StopForDestroyOrDetach (exit_event_sp);
 if (!error.Success())
 {
 m_destroy_in_process = false;
@@ -4054,7 +4048,7 @@
 EventSP exit_event_sp;
 if (DestroyRequiresHalt())
 {
-error = HaltForDestroyOrDetach(exit_event_sp);
+error = StopForDestroyOrDetach(exit_event_sp);
 }
 
 if (m_public_state.GetValue() != eStateRunning)
@@ -5231,7 +5225,7 @@
 break;
 case 'i':
 

[Lldb-commits] [lldb] r248371 - Fix race condition during process detach

2015-09-23 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Sep 23 05:16:57 2015
New Revision: 248371

URL: http://llvm.org/viewvc/llvm-project?rev=248371&view=rev
Log:
Fix race condition during process detach

Summary:
The following situation occured in TestAttachResume:

The inferior was stoped at a breakpoint and we did a continue, immediately 
followed by a detach.
Since there was a trap instruction under the IP, the continue did a 
step-over-breakpoint before
resuming the inferior for real. In some cases, the detach command was executed 
between these two
events (after the step-over stop, but before continue). Here, public state was 
running, but
private state was stopped. This caused a problem because HaltForDestroyOrDetach 
was checking the
public state to see whether it needs to stop the process (call Halt()), but 
Halt() was checking
the private state and concluded that there is nothing for it to do.

Solution: Instead of Halt() call SendAsyncInterrupt(), which will then cause 
Halt() to be
executed in the context of the private state thread. I also rename 
HaltForDestroyOrDetach to
reflect it does not call halt directly.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Target/Process.cpp
lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=248371&r1=248370&r2=248371&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Sep 23 05:16:57 2015
@@ -3479,7 +3479,7 @@ protected:
 }
 
 Error
-HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp);
+StopForDestroyOrDetach(lldb::EventSP &exit_event_sp);
 
 bool
 StateChangedIsExternallyHijacked();

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=248371&r1=248370&r2=248371&view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Sep 23 05:16:57 2015
@@ -3916,52 +3916,46 @@ Process::Halt (bool clear_thread_plans)
 }
 
 Error
-Process::HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp)
+Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp)
 {
 Error error;
 if (m_public_state.GetValue() == eStateRunning)
 {
 Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
 if (log)
-log->Printf("Process::%s() About to halt.", __FUNCTION__);
-error = Halt();
-if (error.Success())
+log->Printf("Process::%s() About to stop.", __FUNCTION__);
+
+SendAsyncInterrupt();
+
+// Consume the interrupt event.
+TimeValue timeout (TimeValue::Now());
+timeout.OffsetWithSeconds(10);
+StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
+
+// If the process exited while we were waiting for it to stop, put the 
exited event into
+// the shared pointer passed in and return.  Our caller doesn't need 
to do anything else, since
+// they don't have a process anymore...
+
+if (state == eStateExited || m_private_state.GetValue() == 
eStateExited)
 {
-// Consume the halt event.
-TimeValue timeout (TimeValue::Now());
-timeout.OffsetWithSeconds(1);
-StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
-
-// If the process exited while we were waiting for it to stop, put 
the exited event into
-// the shared pointer passed in and return.  Our caller doesn't 
need to do anything else, since
-// they don't have a process anymore...
-
-if (state == eStateExited || m_private_state.GetValue() == 
eStateExited)
-{
-if (log)
-log->Printf("Process::HaltForDestroyOrDetach() Process 
exited while waiting to Halt.");
-return error;
-}
-else
-exit_event_sp.reset(); // It is ok to consume any non-exit 
stop events
-
-if (state != eStateStopped)
-{
-if (log)
-log->Printf("Process::HaltForDestroyOrDetach() Halt failed 
to stop, state is: %s", StateAsCString(state));
-// If we really couldn't stop the process then we should just 
error out here, but if the
-// lower levels just bobbled sending the event and we really 
are stopped, then continue on.
-StateType private_state = m_private_state.GetValue();
-if (private_state != eStateStopped)
-  

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Pavel Labath via lldb-commits
labath added inline comments.


Comment at: source/Target/Process.cpp:3934
@@ +3933,3 @@
+
+ListenerSP listener_sp (new 
Listener("lldb.Process.HaltForDestroyOrDetach.hijack"));
+HijackProcessEvents(listener_sp.get());

ki.stfu wrote:
> btw: please update this line when Process::HaltForDestroyOrDetach will be 
> renamed to StopForDestroyOrDetach
The renaming patch has landed in r248371.

I am not sure about this, as I don't understand the full context of this 
change, so take this comment with a grain of salt. However, this seems to be 
introducing a race here... If I understand correctly, you are trying to make 
sure that someone else (sitting in another thread, waiting for public process 
events) does not snatch the process stop event from under you. If that is the 
case then this can still happen if the process stops very quickly (i.e., the 
event is broadcast after SendAsyncInterrupt(), but before 
HijackProcessEvents()). To avoid this, I think you should hijack the events 
before you interrupt the process, possibly even before StopForDestroyOrDetach 
is called (to handle the case when the process stops naturally just as you are 
about to kill it). Have you figured out what is the other thread doing that is 
causing the crash (i.e., where is the memory WaitForProcessToStop is 
referencing freed?)

I'd be interested to hear what Greg and Jim have to say about this..


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


[Lldb-commits] [lldb] r248373 - Fix xcode build after r248366

2015-09-23 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Wed Sep 23 06:00:35 2015
New Revision: 248373

URL: http://llvm.org/viewvc/llvm-project?rev=248373&view=rev
Log:
Fix xcode build after r248366

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=248373&r1=248372&r2=248373&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Sep 23 06:00:35 2015
@@ -713,6 +713,7 @@
6D95DC001B9DC057000E318A /* DIERef.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6D95DBFD1B9DC057000E318A /* DIERef.cpp */; };
6D95DC011B9DC057000E318A /* HashedNameToDIE.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp 
*/; };
6D95DC021B9DC057000E318A /* SymbolFileDWARFDwo.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 6D95DBFF1B9DC057000E318A /* 
SymbolFileDWARFDwo.cpp */; };
+   6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */; };
8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp 
*/; };
8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* 
MemoryHistoryASan.cpp */; };
8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* 
ThreadCollection.cpp */; };
@@ -2403,6 +2404,8 @@
6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = SymbolFileDWARFDwo.cpp; sourceTree = ""; };
6D95DC031B9DC06F000E318A /* DIERef.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
DIERef.h; sourceTree = ""; };
6D95DC041B9DC06F000E318A /* SymbolFileDWARFDwo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SymbolFileDWARFDwo.h; sourceTree = ""; };
+   6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = TypeMap.cpp; path = source/Symbol/TypeMap.cpp; sourceTree = ""; };
+   6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeMap.h; path = 
include/lldb/Symbol/TypeMap.h; sourceTree = ""; };
8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = MemoryHistory.cpp; path = source/Target/MemoryHistory.cpp; sourceTree = 
""; };
8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; 
path = include/lldb/Target/MemoryHistory.h; sourceTree = ""; };
8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = MemoryHistoryASan.cpp; sourceTree = ""; };
@@ -4207,6 +4210,8 @@
26BC7C4B10F1B6C100F91463 /* Symbol */ = {
isa = PBXGroup;
children = (
+   6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */,
+   6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */,
26BC7C5510F1B6E900F91463 /* Block.h */,
26BC7F1310F1B8EC00F91463 /* Block.cpp */,
26BC7C5610F1B6E900F91463 /* ClangASTContext.h 
*/,
@@ -6638,6 +6643,7 @@
3FBA69E11B6067120008F44A /* 
ScriptInterpreterNone.cpp in Sources */,
266DFE9713FD656E00D0C574 /* OperatingSystem.cpp 
in Sources */,
26954EBE1401EE8B00294D09 /* 
DynamicRegisterInfo.cpp in Sources */,
+   6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in 
Sources */,
255EFF761AFABA950069F277 /* LockFilePosix.cpp 
in Sources */,
3FBA69EC1B6067430008F44A /* 
PythonDataObjects.cpp in Sources */,
26274FA714030F79006BA130 /* 
DynamicLoaderDarwinKernel.cpp in Sources */,


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


[Lldb-commits] [PATCH] D13096: Handle OMPArraySection in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
emaste created this revision.
emaste added reviewers: granata.enrico, clayborg, brucem.
emaste added a subscriber: lldb-commits.

And remove the switch default, so that the -Wcovered-switch-default warning 
will catch new types in the future.

http://reviews.llvm.org/D13096

Files:
  source/Symbol/ClangASTContext.cpp

Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4492,6 +4491,7 @@
 case clang::BuiltinType::Kind::OCLImage2dArray:
 case clang::BuiltinType::Kind::OCLImage3d:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:


Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4492,6 +4491,7 @@
 case clang::BuiltinType::Kind::OCLImage2dArray:
 case clang::BuiltinType::Kind::OCLImage3d:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin removed rL LLVM as the repository for this revision.
KLapshin updated this revision to Diff 35491.

http://reviews.llvm.org/D12968

Files:
  source/Target/Process.cpp

Index: source/Target/Process.cpp
===
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -3930,8 +3930,16 @@
 // Consume the interrupt event.
 TimeValue timeout (TimeValue::Now());
 timeout.OffsetWithSeconds(10);
-StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
 
+ListenerSP listener_sp (new 
Listener("lldb.Process.StopForDestroyOrDetach.hijack"));
+HijackProcessEvents(listener_sp.get());
+
+StateType state = WaitForProcessToStop (&timeout, &exit_event_sp, 
true, listener_sp.get());
+
+// Don't forget to notify other listeners.
+RestoreProcessEvents();
+BroadcastEvent(exit_event_sp);
+
 // If the process exited while we were waiting for it to stop, put the 
exited event into
 // the shared pointer passed in and return.  Our caller doesn't need 
to do anything else, since
 // they don't have a process anymore...


Index: source/Target/Process.cpp
===
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -3930,8 +3930,16 @@
 // Consume the interrupt event.
 TimeValue timeout (TimeValue::Now());
 timeout.OffsetWithSeconds(10);
-StateType state = WaitForProcessToStop (&timeout, &exit_event_sp);
 
+ListenerSP listener_sp (new Listener("lldb.Process.StopForDestroyOrDetach.hijack"));
+HijackProcessEvents(listener_sp.get());
+
+StateType state = WaitForProcessToStop (&timeout, &exit_event_sp, true, listener_sp.get());
+
+// Don't forget to notify other listeners.
+RestoreProcessEvents();
+BroadcastEvent(exit_event_sp);
+
 // If the process exited while we were waiting for it to stop, put the exited event into
 // the shared pointer passed in and return.  Our caller doesn't need to do anything else, since
 // they don't have a process anymore...
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment.

@labath,

I updated patch against actual source in SVN - i.e. with taking into account 
your change (Halt*->Stop*).

Regarding matter of this patch - I just tried to make process stop synchronous, 
see Process::ResumeSynchronous() - same technique was applied month ago.

Agreed what crash may be related to freed memory reuse, but not investigated it 
yet in deep.


http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done.
KLapshin added a comment.

Done.


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Pavel Labath via lldb-commits
labath added a comment.

In http://reviews.llvm.org/D12968#251696, @KLapshin wrote:

> Regarding matter of this patch - I just tried to make process stop 
> synchronous, see Process::ResumeSynchronous() - same technique was applied 
> months ago (@ki.stfu).
>
> Agreed what crash may be related to freed memory reuse, but not investigated 
> it yet in deep.


Fair enough, your patch definitely makes things better. I'm just trying to 
understand the root cause so we can fix this definitively.

If you look at ResumeSynchronous, you see that the hijacking happens there 
before we attempt to resume the process (PrivateResume()). This makes it 
race-free because we grab the events before it gets a chance to generate any. 
In your case, things are a bit more complicated, since the process is already 
running and can come to a stop at any moment, and we need to make sure we don't 
miss those events.

Do you have the ability to run lldb-mi under valgrind or msan? If you can, I'd 
be interested in taking a look at the output they produce in this case. Or if 
you have a simple repro case, I can try to do it myself.

pl


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment.

In http://reviews.llvm.org/D12968#251719, @labath wrote:

> In http://reviews.llvm.org/D12968#251696, @KLapshin wrote:
>
> > Regarding matter of this patch - I just tried to make process stop 
> > synchronous, see Process::ResumeSynchronous() - same technique was applied 
> > months ago (@ki.stfu).
> >
> > Agreed what crash may be related to freed memory reuse, but not 
> > investigated it yet in deep.
>
>
> Fair enough, your patch definitely makes things better. I'm just trying to 
> understand the root cause so we can fix this definitively.
>
> If you look at ResumeSynchronous, you see that the hijacking happens there 
> before we attempt to resume the process (PrivateResume()). This makes it 
> race-free because we grab the events before it gets a chance to generate any. 
> In your case, things are a bit more complicated, since the process is already 
> running and can come to a stop at any moment, and we need to make sure we 
> don't miss those events.
>
> Do you have the ability to run lldb-mi under valgrind or msan? If you can, 
> I'd be interested in taking a look at the output they produce in this case. 
> Or if you have a simple repro case, I can try to do it myself.
>
> pl


@labath,

No, I didn't tried to use valgrind yet, as testcase you can create some Cocoa 
app in Xcode (actually Empty Form template is enough - just to make sure what 
app will not ended by itself), then start debug session on iOS device or OSX 
using lldb-mi (i.e. - via MI) and just do -exec-run, then do -exec-abort while 
app running - without this patch you will be able to reproduce crash easily. I 
checked if crash may be reproduced with your race condition patch - yes, 
reproducible.


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Ryan Brown via lldb-commits
The doc comment for SortTypeList() is wrong.
On Sep 23, 2015 12:20 AM, "Ravitheja Addepally via lldb-commits" <
lldb-commits@lists.llvm.org> wrote:

> Author: ravitheja
> Date: Wed Sep 23 02:19:02 2015
> New Revision: 248366
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248366&view=rev
> Log:
> Testcase and fix for bug 24074
>
> Summary:
> In bug 24074, the type information is not shown
> correctly. This commit  includes the following -
> -> Changes for displaying correct type based on
>current lexical scope for the command "image
>lookup -t"
> -> The corresponding testcase.
>
> Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg
>
> Differential Revision: http://reviews.llvm.org/D12404
>
> Added:
> lldb/trunk/include/lldb/Symbol/TypeMap.h
> lldb/trunk/source/Symbol/TypeMap.cpp
> lldb/trunk/test/lang/c/typedef/
> lldb/trunk/test/lang/c/typedef/Makefile
> lldb/trunk/test/lang/c/typedef/Testtypedef.py
> lldb/trunk/test/lang/c/typedef/main.c
> Modified:
> lldb/trunk/include/lldb/Core/Module.h
> lldb/trunk/include/lldb/Symbol/SymbolContext.h
> lldb/trunk/include/lldb/Symbol/SymbolFile.h
> lldb/trunk/include/lldb/Symbol/SymbolVendor.h
> lldb/trunk/include/lldb/Symbol/TypeList.h
> lldb/trunk/include/lldb/lldb-forward.h
> lldb/trunk/source/Commands/CommandObjectTarget.cpp
> lldb/trunk/source/Core/Module.cpp
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
> lldb/trunk/source/Symbol/CMakeLists.txt
> lldb/trunk/source/Symbol/SymbolContext.cpp
> lldb/trunk/source/Symbol/SymbolFile.cpp
> lldb/trunk/source/Symbol/SymbolVendor.cpp
> lldb/trunk/source/Symbol/TypeList.cpp
>
> Modified: lldb/trunk/include/lldb/Core/Module.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=248366&r1=248365&r2=248366&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Core/Module.h (original)
> +++ lldb/trunk/include/lldb/Core/Module.h Wed Sep 23 02:19:02 2015
> @@ -1193,7 +1193,7 @@ private:
>  const CompilerDeclContext *parent_decl_ctx,
>  bool append,
>  size_t max_matches,
> -TypeList& types);
> +TypeMap& types);
>
>
>  DISALLOW_COPY_AND_ASSIGN (Module);
>
> Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=248366&r1=248365&r2=248366&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
> +++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Wed Sep 23 02:19:02 2015
> @@ -299,6 +299,27 @@ public:
> ConstString &language_object_name);
>
>  //--
> +/// If this symbol context represents a function that is a method,
> +/// return true and provide information about the method.
> +///
> +/// @param[out] language
> +/// If \b true is returned, the language for the method.
> +///
> +/// @param[out] is_instance_method
> +/// If \b true is returned, \b true if this is a instance method,
> +/// \b false if this is a static/class function.
> +///
> +/// @param[out] language_object_name
> +/// If \b true is returned, the name of the artificial variable
> +/// for the language ("this" for C++, "self" for ObjC).
> +///
> +/// @return
> +/// \b True if this symbol context represents a function that
> +/// is a method of a class, \b false otherwise.
> +//--
> +void
> +   SortTypeList(TypeMap &type_map, TypeList &type_list) const;
> +//--
>  /// Find a name of the innermost function for the symbol context.
>  ///
>  /// For instance, if the symbol context contains an inlined block,
>
> Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=248366&r1=248365&r2=248366&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
> +++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Wed Sep 23 02:19:02 2015
> @@ -141,7 +141,7 @@ public:
>  virtual uint32_tFindGlobalVariables (const RegularExpression&
> regex, bool append, uint32_t max_matches, VariableList& variables);
>  virtual uint32

Re: [Lldb-commits] [PATCH] D13096: Handle OMPArraySection in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
emaste added a comment.

Oh, it seems there are more new types added after I first made this change:

  ../tools/lldb/source/Symbol/ClangASTContext.cpp:4445:21: warning: 10 
enumeration values not handled in switch: 'OCLImage2dDepth', 
'OCLImage2dArrayDepth', 'OCLImage2dMSAA'... [-Wswitch]


http://reviews.llvm.org/D13096



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


[Lldb-commits] [lldb] r248384 - Cleaned up results formatter options hand-off.

2015-09-23 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Sep 23 10:21:28 2015
New Revision: 248384

URL: http://llvm.org/viewvc/llvm-project?rev=248384&view=rev
Log:
Cleaned up results formatter options hand-off.

* --results-formatter-options renamed to --results-formatter-option,
  with short version of -O

* Multiple --results-formatter-option=OPTION can be specified.  The
  comma-separating mechanism has been removed.

* XunitFormatter options modified: -n and -r are now short forms of
  --ignore-skip-name and --ignore-skip-reason.  Those long option
  names were tweaked lightly.  They also can be specified multiple
  times on the command line.  The comma-separating, multiple-pattern-
  per-option mechanism has been removed.

One can now specify:

  dotest.py --results-file stdout -O-ndsym -O-nlldb-mi

for example, to ignore reporting skips for dsym-related or lldb-mi-related
tests in the xUnit report.

Modified:
lldb/trunk/test/dosep.py
lldb/trunk/test/dotest.py
lldb/trunk/test/dotest_args.py
lldb/trunk/test/test_results.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248384&r1=248383&r2=248384&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Wed Sep 23 10:21:28 2015
@@ -1068,43 +1068,87 @@ def get_test_runner_strategies(num_threa
 }
 
 
-def _remove_option(args, option_name, removal_count):
+def _remove_option(
+args, long_option_name, short_option_name, takes_arg):
 """Removes option and related option arguments from args array.
+
+This method removes all short/long options that match the given
+arguments.
+
 @param args the array of command line arguments (in/out)
-@param option_name the full command line representation of the
-option that will be removed (including '--' or '-').
-@param the count of elements to remove.  A value of 1 will remove
-just the found option, while 2 will remove the option and its first
-argument.
+
+@param long_option_name the full command line representation of the
+long-form option that will be removed (including '--').
+
+@param short_option_name the short version of the command line option
+that will be removed (including '-').
+
+@param takes_arg True if the option takes an argument.
+
 """
-try:
-index = args.index(option_name)
-# Handle the exact match case.
-del args[index:index+removal_count]
-return
-except ValueError:
-# Thanks to argparse not handling options with known arguments
-# like other options parsing libraries (see
-# https://bugs.python.org/issue9334), we need to support the
-# --results-formatter-options={second-level-arguments} (note
-# the equal sign to fool the first-level arguments parser into
-# not treating the second-level arguments as first-level
-# options). We're certainly at risk of getting this wrong
-# since now we're forced into the business of trying to figure
-# out what is an argument (although I think this
-# implementation will suffice).
-regex_string = "^" + option_name + "="
-regex = re.compile(regex_string)
+if long_option_name is not None:
+regex_string = "^" + long_option_name + "="
+long_regex = re.compile(regex_string)
+if short_option_name is not None:
+# Short options we only match the -X and assume
+# any arg is one command line argument jammed together.
+# i.e. -O--abc=1 is a single argument in the args list.
+# We don't handle -O --abc=1, as argparse doesn't handle
+# it, either.
+regex_string = "^" + short_option_name
+short_regex = re.compile(regex_string)
+
+def remove_long_internal():
+"""Removes one matching long option from args.
+@returns True if one was found and removed; False otherwise.
+"""
+try:
+index = args.index(long_option_name)
+# Handle the exact match case.
+if takes_arg:
+removal_count = 2
+else:
+removal_count = 1
+del args[index:index+removal_count]
+return True
+except ValueError:
+# Thanks to argparse not handling options with known arguments
+# like other options parsing libraries (see
+# https://bugs.python.org/issue9334), we need to support the
+# --results-formatter-options={second-level-arguments} (note
+# the equal sign to fool the first-level arguments parser into
+# not treating the second-level arguments as first-level
+# options). We're certainly at risk of getting this wrong
+# since now we're forced into the business of trying to figure
+# out what is an argument (although I think this
+  

Re: [Lldb-commits] [PATCH] D13102: Rename clang_type -> compiler_type for variables.

2015-09-23 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

This doesn't cover files with Clang in their name. But it should cover just 
about everything else.


http://reviews.llvm.org/D13102



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


Re: [Lldb-commits] [PATCH] D13049: execinfo.h isn't needed on Mac OS X for Host.mm.

2015-09-23 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

Ping? This should be safe and almost risk-free.


http://reviews.llvm.org/D13049



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


Re: [Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Ed Maste via lldb-commits
On 23 September 2015 at 03:19, Ravitheja Addepally via lldb-commits
 wrote:
> Author: ravitheja
> Date: Wed Sep 23 02:19:02 2015
> New Revision: 248366
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248366&view=rev
> Log:
> Testcase and fix for bug 24074

This change introduced a segfault in 10 or so test cases on FreeBSD:

FAIL: LLDB (suite) :: Test11588.py
FAIL: LLDB (suite) :: TestAnonymous.py
FAIL: LLDB (suite) :: TestCPPStaticMembers.py
FAIL: LLDB (suite) :: TestCPPStaticMethods.py
FAIL: LLDB (suite) :: TestCppScope.py
FAIL: LLDB (suite) :: TestCppValueCast.py
FAIL: LLDB (suite) :: TestDataFormatterCategories.py
FAIL: LLDB (suite) :: TestDataFormatterEnumFormat.py
FAIL: LLDB (suite) :: TestStructTypes.py
FAIL: LLDB (suite) :: TestTypeList.py

The backtrace is available at https://bpaste.net/show/e6bb411e0a08
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r247953 - TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions.

2015-09-23 Thread Greg Clayton via lldb-commits
% ./dotest.py lang/cpp/dynamic-value
LLDB library dir: /Volumes/work/gclayton/Documents/src/lldb/tot/build/Debug
LLDB import library dir: 
/Volumes/work/gclayton/Documents/src/lldb/tot/build/Debug
lldb-350.99.0
lldb.pre_flight: None
lldb.post_flight: None

Session logs for test failures/errors/unexpected successes will go into 
directory '2015-09-23-09_48_14'
Command invoked: ./dotest.py lang/cpp/dynamic-value
compilers=['clang']

Configuration: arch=x86_64 compiler=clang
--
Collected 6 tests

.=success F=fail E=error s=skipped x=expected-fail u=unexpected-success

.x.x..
--
Ran 6 tests in 5.136s

RESULT: PASSED (4 passes, 0 failures, 0 errors, 0 skipped, 2 expected failures, 
0 unexpected successes)
Session logs for test failures/errors/unexpected successes can be found in 
directory '2015-09-23-09_48_14'

This passes on MacOSX. You will need to help me figure out what it going wrong. 
You should be able to repro this by looking at what the test case did, which is 
what I did since I didn't write this test. But it looks like the steps to repro 
should be:

Compile "sbvalue-cast.cpp" into an executable:

% make CXX_SOURCES=sbvalue-cast.cpp

Then run LLDB on the a.out binary that is produced:

% ll a.out
(lldb) target create "a.out"
(lldb) b /Set breakpoint here/
(lldb) r
(lldb) frame variable --dynamic-type no-dynamic-values *teller
(Base) *teller = (m_base_val = 20)

Can you let me know what your output for the above command looks like?

> On Sep 21, 2015, at 7:57 AM, Zachary Turner  wrote:
> 
> Hi Greg, will you have some time to look at this today?  It's definitely this 
> patch that started causing the failure, so I suspect there is something wrong 
> on all platforms
> 
> On Fri, Sep 18, 2015 at 12:41 PM Zachary Turner  wrote:
> Hi Greg,
> 
> This has broken TestCppValueCast on Windows.  Ironically, it has also *fixed* 
> TestCxxWcharT on Windows.  In any case, here is the important line from the 
> log file of TestCppValueCast.
> 
> Traceback (most recent call last):
>   File "D:\src\llvm\tools\lldb\test\lldbtest.py", line 483, in wrapper
> return func(self, *args, **kwargs)
>   File "D:\src\llvm\tools\lldb\test\lldbtest.py", line 551, in wrapper
> return func(self, *args, **kwargs)
>   File 
> "D:\src\llvm\tools\lldb\test\lang\cpp\dynamic-value\TestCppValueCast.py", 
> line 49, in test_value_cast_with_dwarf_and_regular_inheritance
> self.do_sbvalue_cast(self.exe_name)
>   File 
> "D:\src\llvm\tools\lldb\test\lang\cpp\dynamic-value\TestCppValueCast.py", 
> line 99, in do_sbvalue_cast
> 
> self.assertTrue(tellerA.GetChildMemberWithName('m_base_val').GetValueAsUnsigned(error,
>  0) == 20)
> AssertionError: False is not True
> 
> Is it possible your patch has an error?
> 
> On Thu, Sep 17, 2015 at 3:25 PM Greg Clayton via lldb-commits 
>  wrote:
> Author: gclayton
> Date: Thu Sep 17 17:23:34 2015
> New Revision: 247953
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=247953&view=rev
> Log:
> TypeSystem is now a plugin interface and removed any "ClangASTContext 
> &Class::GetClangASTContext()" functions.
> 
> This cleans up type systems to be more pluggable. Prior to this we had issues:
> - Module, SymbolFile, and many others has "ClangASTContext 
> &GetClangASTContext()" functions. All have been switched over to use 
> "TypeSystem *GetTypeSystemForLanguage()"
> - Cleaned up any places that were using the GetClangASTContext() functions to 
> use TypeSystem
> - Cleaned up Module so that it no longer has dedicated type system member 
> variables:
> lldb::ClangASTContextUP m_ast;  ///< The Clang AST context 
> for this module.
> lldb::GoASTContextUPm_go_ast;   ///< The Go AST context for 
> this module.
> 
> Now we have a type system map:
> 
> typedef std::map TypeSystemMap;
> TypeSystemMap   m_type_system_map;///< A map of any type 
> systems associated with this module
> - Many places in code were using ClangASTContext static functions to place 
> with CompilerType objects and add modifiers (const, volatile, restrict) and 
> to make typedefs, L and R value references and more. These have been made 
> into CompilerType functions that are abstract:
> 
> class CompilerType
> {
> ...
> 
> //--
> // Return a new CompilerType that is a L value reference to this type if
> // this type is valid and the type system supports L value references,
> // else return an invalid type.
> //--
> CompilerType
> GetLValueReferenceType () const;
> 
> //--
> // Return a new CompilerType that is a R value reference to this type if
> // this type is valid and the type s

[Lldb-commits] [lldb] r248397 - test framework: fixed issue when using results formatter with no formatter options

2015-09-23 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Sep 23 12:20:09 2015
New Revision: 248397

URL: http://llvm.org/viewvc/llvm-project?rev=248397&view=rev
Log:
test framework: fixed issue when using results formatter with no formatter 
options

I broke the formatter options-passing parsing when no formatter
options are provided.

Modified:
lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=248397&r1=248396&r2=248397&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Sep 23 12:20:09 2015
@@ -1000,10 +1000,12 @@ def setupTestResults():
 # Handle formatter options for the results formatter class.
 formatter_arg_parser = clazz.arg_parser()
 if results_formatter_options and len(results_formatter_options) > 0:
-formatter_options = formatter_arg_parser.parse_args(
-results_formatter_options)
+command_line_options = results_formatter_options
 else:
-formatter_options = []
+command_line_options = []
+
+formatter_options = formatter_arg_parser.parse_args(
+command_line_options)
 
 # Create the TestResultsFormatter given the processed options.
 results_formatter_object = clazz(results_file_object, 
formatter_options)


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


Re: [Lldb-commits] [PATCH] D13066: DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good as long as the test suite if happy.


http://reviews.llvm.org/D13066



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


Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D13094



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


Re: [Lldb-commits] [PATCH] D13096: Handle OMPArraySection in ClangASTContext::GetEncoding

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg added a comment.

You need to add more diffs to take care of the extra enums or does this patch 
include those already?


http://reviews.llvm.org/D13096



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


Re: [Lldb-commits] [PATCH] D13102: Rename clang_type -> compiler_type for variables.

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D13102



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


[Lldb-commits] [lldb] r248401 - DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child

2015-09-23 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Wed Sep 23 12:47:08 2015
New Revision: 248401

URL: http://llvm.org/viewvc/llvm-project?rev=248401&view=rev
Log:
DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child

Summary:
With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if
DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns
false if any base class is of an incomplete type. This helps in cases like
these:

  class Foo
  {
  public:
std::string str;
  };
  ...
  Foo f;

If a file with the above code is compiled with a modern clang but without
the -fno-limit-debug-info (or similar) option, then the DWARF has only
a forward declration for std::string. In which case, the type for
"class Foo" cannot be completed. If LLDB does not detect that a child
member has incomplete type, then it wrongly conveys to clang (the LLDB
compiler) that "class Foo" is complete, and consequently crashes due to
an assertion failure in clang when running commands like "p f" or
"frame var f".

Reviewers: clayborg

Subscribers: lldb-commits

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

Added:
lldb/trunk/test/lang/cpp/incomplete-types/
lldb/trunk/test/lang/cpp/incomplete-types/Makefile
lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
lldb/trunk/test/lang/cpp/incomplete-types/length.cpp
lldb/trunk/test/lang/cpp/incomplete-types/length.h
lldb/trunk/test/lang/cpp/incomplete-types/main.cpp
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=248401&r1=248400&r2=248401&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Wed Sep 
23 12:47:08 2015
@@ -1770,7 +1770,6 @@ DWARFASTParserClang::CompleteTypeFromDWA
  
type->GetName().AsCString());
 assert (clang_type);
 DWARFAttributes attributes;
-
 switch (tag)
 {
 case DW_TAG_structure_type:
@@ -1817,17 +1816,25 @@ DWARFASTParserClang::CompleteTypeFromDWA
 DWARFDIECollection member_function_dies;
 
 DelayedPropertyList delayed_properties;
-ParseChildMembers (sc,
-   die,
-   clang_type,
-   class_language,
-   base_classes,
-   member_accessibilities,
-   member_function_dies,
-   delayed_properties,
-   default_accessibility,
-   is_a_class,
-   layout_info);
+if (!ParseChildMembers (sc,
+die,
+clang_type,
+class_language,
+base_classes,
+member_accessibilities,
+member_function_dies,
+delayed_properties,
+default_accessibility,
+is_a_class,
+layout_info))
+{
+auto module = dwarf->GetObjectFile()->GetModule();
+module->ReportError (":: Class %s has members with 
incomplete type.", die.GetName());
+if (die.GetCU()->GetProducer() == 
DWARFCompileUnit::eProducerClang)
+module->ReportError(":: Try compiling the source 
file with -fno-limit-debug-info.");
+
+return false;
+}
 
 // Now parse any methods if there were any...
 size_t num_functions = member_function_dies.Size();
@@ -1902,7 +1909,6 @@ DWARFASTParserClang::CompleteTypeFromDWA
 // Make sure all base classes refer to complete types 
and not
 // forward declarations. If we don't do this, clang 
will crash
 // with an assertion in the call to 
clang_type.SetBaseClassesForClassType()
-bool base_class_error = false;
 for (auto &base_class : base_classes)
 {
 

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment.

As little summary what should be added to existing lldb-mi in context of this 
review:

- list-features MI command (for getting supported features in future, currently 
only one "exec-run-start-option" feature will be reported)
- add --start option to -exec-run, set StopAtEntry flag in LaunchInfo if 
--start option specified on input
- rework process launch in way SB target API only allowed,
- add tests




Repository:
  rL LLVM

http://reviews.llvm.org/D12977



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


Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

If you are going to hijack you do need to do it before you call Halt().


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [PATCH] D13096: Handle new types in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
emaste retitled this revision from "Handle OMPArraySection in 
ClangASTContext::GetEncoding" to "Handle new types in 
ClangASTContext::GetEncoding".
emaste updated this revision to Diff 35532.
emaste added a comment.

More new types added after my initial patch.


http://reviews.llvm.org/D13096

Files:
  source/Symbol/ClangASTContext.cpp

Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4484,14 +4483,25 @@
 case clang::BuiltinType::Kind::BuiltinFn:
 case clang::BuiltinType::Kind::Dependent:
 case clang::BuiltinType::Kind::Half:
+case clang::BuiltinType::Kind::OCLClkEvent:
 case clang::BuiltinType::Kind::OCLEvent:
 case clang::BuiltinType::Kind::OCLImage1d:
 case clang::BuiltinType::Kind::OCLImage1dArray:
 case clang::BuiltinType::Kind::OCLImage1dBuffer:
 case clang::BuiltinType::Kind::OCLImage2d:
 case clang::BuiltinType::Kind::OCLImage2dArray:
+case clang::BuiltinType::Kind::OCLImage2dArrayDepth:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAA:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepth:
+case clang::BuiltinType::Kind::OCLImage2dDepth:
+case clang::BuiltinType::Kind::OCLImage2dMSAA:
+case clang::BuiltinType::Kind::OCLImage2dMSAADepth:
 case clang::BuiltinType::Kind::OCLImage3d:
+case clang::BuiltinType::Kind::OCLQueue:
+case clang::BuiltinType::Kind::OCLNDRange:
+case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:


Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4484,14 +4483,25 @@
 case clang::BuiltinType::Kind::BuiltinFn:
 case clang::BuiltinType::Kind::Dependent:
 case clang::BuiltinType::Kind::Half:
+case clang::BuiltinType::Kind::OCLClkEvent:
 case clang::BuiltinType::Kind::OCLEvent:
 case clang::BuiltinType::Kind::OCLImage1d:
 case clang::BuiltinType::Kind::OCLImage1dArray:
 case clang::BuiltinType::Kind::OCLImage1dBuffer:
 case clang::BuiltinType::Kind::OCLImage2d:
 case clang::BuiltinType::Kind::OCLImage2dArray:
+case clang::BuiltinType::Kind::OCLImage2dArrayDepth:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAA:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepth:
+case clang::BuiltinType::Kind::OCLImage2dDepth:
+case clang::BuiltinType::Kind::OCLImage2dMSAA:
+case clang::BuiltinType::Kind::OCLImage2dMSAADepth:
 case clang::BuiltinType::Kind::OCLImage3d:
+case clang::BuiltinType::Kind::OCLQueue:
+case clang::BuiltinType::Kind::OCLNDRange:
+case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r248410 - Remove expectedFailureFreeBSD from passing TestChangeValueAPI test

2015-09-23 Thread Ed Maste via lldb-commits
Author: emaste
Date: Wed Sep 23 13:20:51 2015
New Revision: 248410

URL: http://llvm.org/viewvc/llvm-project?rev=248410&view=rev
Log:
Remove expectedFailureFreeBSD from passing TestChangeValueAPI test

This test used fail intermittently, but now passes consistently on
FreeBSD in local runs. We'll investigate further if it's intermittent
on the FreeBSD buildbot, once it's restored.

llvm.org/pr15039

Modified:
lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py

Modified: lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py?rev=248410&r1=248409&r2=248410&view=diff
==
--- lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py 
(original)
+++ lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py Wed 
Sep 23 13:20:51 2015
@@ -42,7 +42,6 @@ class ChangeValueAPITestCase(TestBase):
 self.check_line = line_number('main.c', '// Stop here and check 
values')
 self.end_line = line_number ('main.c', '// Set a breakpoint here at 
the end')
 
-@expectedFailureFreeBSD("llvm.org/pr15039 test fails intermittently on 
FreeBSD")
 def change_value_api(self, exe_name):
 """Exercise some SBValue APIs."""
 exe = os.path.join(os.getcwd(), exe_name)


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


[Lldb-commits] [lldb] r248411 - Remove expectedFailureFreeBSD from passing test

2015-09-23 Thread Ed Maste via lldb-commits
Author: emaste
Date: Wed Sep 23 13:23:38 2015
New Revision: 248411

URL: http://llvm.org/viewvc/llvm-project?rev=248411&view=rev
Log:
Remove expectedFailureFreeBSD from passing test

ClassTypesTestCase::test_with_dwarf_and_constructor_name

llvm.org/pr14540

Modified:
lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py

Modified: lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py?rev=248411&r1=248410&r2=248411&view=diff
==
--- lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py Wed Sep 23 13:23:38 
2015
@@ -71,7 +71,6 @@ class ClassTypesTestCase(TestBase):
 # rdar://problem/8557478
 # test/class_types test failures: runCmd: expr this->m_c_int
 @dwarf_test
-@expectedFailureFreeBSD('llvm.org/pr14540')
 def test_with_dwarf_and_constructor_name (self):
 """Test 'frame variable this' and 'expr this' when stopped inside a 
constructor."""
 self.buildDwarf()


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


[Lldb-commits] [lldb] r248414 - Handle new types in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
Author: emaste
Date: Wed Sep 23 13:32:34 2015
New Revision: 248414

URL: http://llvm.org/viewvc/llvm-project?rev=248414&view=rev
Log:
Handle new types in ClangASTContext::GetEncoding

And remove the switch default, so that the -Wcovered-switch-default
warning will catch new types next time they're added.

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

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=248414&r1=248413&r2=248414&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Sep 23 13:32:34 2015
@@ -,7 +,6 @@ ClangASTContext::GetEncoding (lldb::opaq
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4484,14 +4483,25 @@ ClangASTContext::GetEncoding (lldb::opaq
 case clang::BuiltinType::Kind::BuiltinFn:
 case clang::BuiltinType::Kind::Dependent:
 case clang::BuiltinType::Kind::Half:
+case clang::BuiltinType::Kind::OCLClkEvent:
 case clang::BuiltinType::Kind::OCLEvent:
 case clang::BuiltinType::Kind::OCLImage1d:
 case clang::BuiltinType::Kind::OCLImage1dArray:
 case clang::BuiltinType::Kind::OCLImage1dBuffer:
 case clang::BuiltinType::Kind::OCLImage2d:
 case clang::BuiltinType::Kind::OCLImage2dArray:
+case clang::BuiltinType::Kind::OCLImage2dArrayDepth:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAA:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepth:
+case clang::BuiltinType::Kind::OCLImage2dDepth:
+case clang::BuiltinType::Kind::OCLImage2dMSAA:
+case clang::BuiltinType::Kind::OCLImage2dMSAADepth:
 case clang::BuiltinType::Kind::OCLImage3d:
+case clang::BuiltinType::Kind::OCLQueue:
+case clang::BuiltinType::Kind::OCLNDRange:
+case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:


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


Re: [Lldb-commits] [PATCH] D13096: Handle new types in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
emaste added a comment.

http://reviews.llvm.org/rL248414


http://reviews.llvm.org/D13096



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


Re: [Lldb-commits] [PATCH] D13096: Handle new types in ClangASTContext::GetEncoding

2015-09-23 Thread Ed Maste via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248414: Handle new types in ClangASTContext::GetEncoding 
(authored by emaste).

Changed prior to commit:
  http://reviews.llvm.org/D13096?vs=35532&id=35537#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13096

Files:
  lldb/trunk/source/Symbol/ClangASTContext.cpp

Index: lldb/trunk/source/Symbol/ClangASTContext.cpp
===
--- lldb/trunk/source/Symbol/ClangASTContext.cpp
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4484,14 +4483,25 @@
 case clang::BuiltinType::Kind::BuiltinFn:
 case clang::BuiltinType::Kind::Dependent:
 case clang::BuiltinType::Kind::Half:
+case clang::BuiltinType::Kind::OCLClkEvent:
 case clang::BuiltinType::Kind::OCLEvent:
 case clang::BuiltinType::Kind::OCLImage1d:
 case clang::BuiltinType::Kind::OCLImage1dArray:
 case clang::BuiltinType::Kind::OCLImage1dBuffer:
 case clang::BuiltinType::Kind::OCLImage2d:
 case clang::BuiltinType::Kind::OCLImage2dArray:
+case clang::BuiltinType::Kind::OCLImage2dArrayDepth:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAA:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepth:
+case clang::BuiltinType::Kind::OCLImage2dDepth:
+case clang::BuiltinType::Kind::OCLImage2dMSAA:
+case clang::BuiltinType::Kind::OCLImage2dMSAADepth:
 case clang::BuiltinType::Kind::OCLImage3d:
+case clang::BuiltinType::Kind::OCLQueue:
+case clang::BuiltinType::Kind::OCLNDRange:
+case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:


Index: lldb/trunk/source/Symbol/ClangASTContext.cpp
===
--- lldb/trunk/source/Symbol/ClangASTContext.cpp
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp
@@ -,7 +,6 @@
 case clang::Type::Builtin:
 switch (llvm::cast(qual_type)->getKind())
 {
-default: assert(0 && "Unknown builtin type!");
 case clang::BuiltinType::Void:
 break;
 
@@ -4484,14 +4483,25 @@
 case clang::BuiltinType::Kind::BuiltinFn:
 case clang::BuiltinType::Kind::Dependent:
 case clang::BuiltinType::Kind::Half:
+case clang::BuiltinType::Kind::OCLClkEvent:
 case clang::BuiltinType::Kind::OCLEvent:
 case clang::BuiltinType::Kind::OCLImage1d:
 case clang::BuiltinType::Kind::OCLImage1dArray:
 case clang::BuiltinType::Kind::OCLImage1dBuffer:
 case clang::BuiltinType::Kind::OCLImage2d:
 case clang::BuiltinType::Kind::OCLImage2dArray:
+case clang::BuiltinType::Kind::OCLImage2dArrayDepth:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAA:
+case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepth:
+case clang::BuiltinType::Kind::OCLImage2dDepth:
+case clang::BuiltinType::Kind::OCLImage2dMSAA:
+case clang::BuiltinType::Kind::OCLImage2dMSAADepth:
 case clang::BuiltinType::Kind::OCLImage3d:
+case clang::BuiltinType::Kind::OCLQueue:
+case clang::BuiltinType::Kind::OCLNDRange:
+case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
+case clang::BuiltinType::Kind::OMPArraySection:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r248416 - [TestCppIncompleteTypes] Fix Makefile to handle different archs.

2015-09-23 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Wed Sep 23 13:36:39 2015
New Revision: 248416

URL: http://llvm.org/viewvc/llvm-project?rev=248416&view=rev
Log:
[TestCppIncompleteTypes] Fix Makefile to handle different archs.

Reviewers: chying

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/lang/cpp/incomplete-types/Makefile

Modified: lldb/trunk/test/lang/cpp/incomplete-types/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/incomplete-types/Makefile?rev=248416&r1=248415&r2=248416&view=diff
==
--- lldb/trunk/test/lang/cpp/incomplete-types/Makefile (original)
+++ lldb/trunk/test/lang/cpp/incomplete-types/Makefile Wed Sep 23 13:36:39 2015
@@ -2,8 +2,8 @@ LEVEL = ../../../make
 
 CXX_SOURCES = main.cpp length.cpp
 
-CFLAGS_LIMIT = -g -O0 -c
-CFLAGS_NO_LIMIT = -g -O0 -c
+CFLAGS_LIMIT = -c $(CXXFLAGS)
+CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
 
 ifneq (,$(findstring clang,$(CC)))
   CFLAGS_LIMIT += -flimit-debug-info
@@ -13,10 +13,10 @@ endif
 all: limit nolimit
 
 limit: main.o length_limit.o
-   $(CXX) main.o length_limit.o -o limit
+   $(CXX) $(LDFLAGS) main.o length_limit.o -o limit
 
 nolimit: main.o length_nolimit.o
-   $(CXX) main.o length_nolimit.o -o nolimit
+   $(CXX) $(LDFLAGS) main.o length_nolimit.o -o nolimit
 
 main.o: main.cpp
$(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o


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


[Lldb-commits] [PATCH] D13111: [TestCppIncompleteTypes] Fix Makefile to handle different archs.

2015-09-23 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added a reviewer: chying.
sivachandra added a subscriber: lldb-commits.

http://reviews.llvm.org/D13111

Files:
  test/lang/cpp/incomplete-types/Makefile

Index: test/lang/cpp/incomplete-types/Makefile
===
--- test/lang/cpp/incomplete-types/Makefile
+++ test/lang/cpp/incomplete-types/Makefile
@@ -2,8 +2,8 @@
 
 CXX_SOURCES = main.cpp length.cpp
 
-CFLAGS_LIMIT = -g -O0 -c
-CFLAGS_NO_LIMIT = -g -O0 -c
+CFLAGS_LIMIT = -c $(CXXFLAGS)
+CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
 
 ifneq (,$(findstring clang,$(CC)))
   CFLAGS_LIMIT += -flimit-debug-info
@@ -13,10 +13,10 @@
 all: limit nolimit
 
 limit: main.o length_limit.o
-   $(CXX) main.o length_limit.o -o limit
+   $(CXX) $(LDFLAGS) main.o length_limit.o -o limit
 
 nolimit: main.o length_nolimit.o
-   $(CXX) main.o length_nolimit.o -o nolimit
+   $(CXX) $(LDFLAGS) main.o length_nolimit.o -o nolimit
 
 main.o: main.cpp
$(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o


Index: test/lang/cpp/incomplete-types/Makefile
===
--- test/lang/cpp/incomplete-types/Makefile
+++ test/lang/cpp/incomplete-types/Makefile
@@ -2,8 +2,8 @@
 
 CXX_SOURCES = main.cpp length.cpp
 
-CFLAGS_LIMIT = -g -O0 -c
-CFLAGS_NO_LIMIT = -g -O0 -c
+CFLAGS_LIMIT = -c $(CXXFLAGS)
+CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
 
 ifneq (,$(findstring clang,$(CC)))
   CFLAGS_LIMIT += -flimit-debug-info
@@ -13,10 +13,10 @@
 all: limit nolimit
 
 limit: main.o length_limit.o
-	$(CXX) main.o length_limit.o -o limit
+	$(CXX) $(LDFLAGS) main.o length_limit.o -o limit
 
 nolimit: main.o length_nolimit.o
-	$(CXX) main.o length_nolimit.o -o nolimit
+	$(CXX) $(LDFLAGS) main.o length_nolimit.o -o nolimit
 
 main.o: main.cpp
 	$(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13111: [TestCppIncompleteTypes] Fix Makefile to handle different archs.

2015-09-23 Thread Siva Chandra via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248416: [TestCppIncompleteTypes] Fix Makefile to handle 
different archs. (authored by sivachandra).

Changed prior to commit:
  http://reviews.llvm.org/D13111?vs=35535&id=35539#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13111

Files:
  lldb/trunk/test/lang/cpp/incomplete-types/Makefile

Index: lldb/trunk/test/lang/cpp/incomplete-types/Makefile
===
--- lldb/trunk/test/lang/cpp/incomplete-types/Makefile
+++ lldb/trunk/test/lang/cpp/incomplete-types/Makefile
@@ -2,8 +2,8 @@
 
 CXX_SOURCES = main.cpp length.cpp
 
-CFLAGS_LIMIT = -g -O0 -c
-CFLAGS_NO_LIMIT = -g -O0 -c
+CFLAGS_LIMIT = -c $(CXXFLAGS)
+CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
 
 ifneq (,$(findstring clang,$(CC)))
   CFLAGS_LIMIT += -flimit-debug-info
@@ -13,10 +13,10 @@
 all: limit nolimit
 
 limit: main.o length_limit.o
-   $(CXX) main.o length_limit.o -o limit
+   $(CXX) $(LDFLAGS) main.o length_limit.o -o limit
 
 nolimit: main.o length_nolimit.o
-   $(CXX) main.o length_nolimit.o -o nolimit
+   $(CXX) $(LDFLAGS) main.o length_nolimit.o -o nolimit
 
 main.o: main.cpp
$(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o


Index: lldb/trunk/test/lang/cpp/incomplete-types/Makefile
===
--- lldb/trunk/test/lang/cpp/incomplete-types/Makefile
+++ lldb/trunk/test/lang/cpp/incomplete-types/Makefile
@@ -2,8 +2,8 @@
 
 CXX_SOURCES = main.cpp length.cpp
 
-CFLAGS_LIMIT = -g -O0 -c
-CFLAGS_NO_LIMIT = -g -O0 -c
+CFLAGS_LIMIT = -c $(CXXFLAGS)
+CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
 
 ifneq (,$(findstring clang,$(CC)))
   CFLAGS_LIMIT += -flimit-debug-info
@@ -13,10 +13,10 @@
 all: limit nolimit
 
 limit: main.o length_limit.o
-	$(CXX) main.o length_limit.o -o limit
+	$(CXX) $(LDFLAGS) main.o length_limit.o -o limit
 
 nolimit: main.o length_nolimit.o
-	$(CXX) main.o length_nolimit.o -o nolimit
+	$(CXX) $(LDFLAGS) main.o length_nolimit.o -o nolimit
 
 main.o: main.cpp
 	$(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Enrico Granata via lldb-commits
I am seeing the same issue on OS X

Ravitheja, can you investigate this?
Or should we just revert?

> On Sep 23, 2015, at 9:54 AM, Ed Maste via lldb-commits 
>  wrote:
> 
> On 23 September 2015 at 03:19, Ravitheja Addepally via lldb-commits
>  wrote:
>> Author: ravitheja
>> Date: Wed Sep 23 02:19:02 2015
>> New Revision: 248366
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=248366&view=rev
>> Log:
>> Testcase and fix for bug 24074
> 
> This change introduced a segfault in 10 or so test cases on FreeBSD:
> 
> FAIL: LLDB (suite) :: Test11588.py
> FAIL: LLDB (suite) :: TestAnonymous.py
> FAIL: LLDB (suite) :: TestCPPStaticMembers.py
> FAIL: LLDB (suite) :: TestCPPStaticMethods.py
> FAIL: LLDB (suite) :: TestCppScope.py
> FAIL: LLDB (suite) :: TestCppValueCast.py
> FAIL: LLDB (suite) :: TestDataFormatterCategories.py
> FAIL: LLDB (suite) :: TestDataFormatterEnumFormat.py
> FAIL: LLDB (suite) :: TestStructTypes.py
> FAIL: LLDB (suite) :: TestTypeList.py
> 
> The backtrace is available at https://bpaste.net/show/e6bb411e0a08
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


Re: [Lldb-commits] [Diffusion] rL247709: Make the source-map help grammatical.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

Users:
  jingham (Author)

http://reviews.llvm.org/rL247709



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


Re: [Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Ed Maste via lldb-commits
I'd suggest we revert for now and bring it back after testing on all
platforms. There were a couple of nits and changes in the committed
version relative to the version in the review as well so I think it's
better to bring it back with those fixed up.

On 23 September 2015 at 14:52, Enrico Granata  wrote:
>
> I am seeing the same issue on OS X
>
> Ravitheja, can you investigate this?
> Or should we just revert?
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL247709: Make the source-map help grammatical.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn raised a concern with this commit.
dawn added a comment.

Hi Jim,

This test has been failing on OSX ever since this commit:

  ./dotest.py -f RegisterCommandsTestCase.test_register_expressions
  
Failure-TestRegisters.RegisterCommandsTestCase.test_register_expressions-x86_64-clang.log

lldb is built with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  security unlock-keychain -p   
/Users/testuser/Library/Keychains/login.keychain 
  ninja
  cd ../tools/lldb/test
  ./dotest.py --output-on-success -v

Can you have a look please?

Thanks in advance,
-Dawn


Users:
  jingham (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247709



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


Re: [Lldb-commits] [Diffusion] rL247773: [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

Users:
  jaydeep (Author)

http://reviews.llvm.org/rL247773



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


[Lldb-commits] [lldb] r248421 - Revert 248366 "Testcase and fix for bug 24074"

2015-09-23 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Sep 23 14:32:56 2015
New Revision: 248421

URL: http://llvm.org/viewvc/llvm-project?rev=248421&view=rev
Log:
Revert 248366 "Testcase and fix for bug 24074"

This commit introduced regressions in several test cases on FreeBSD and Mac OS X


Removed:
lldb/trunk/include/lldb/Symbol/TypeMap.h
lldb/trunk/source/Symbol/TypeMap.cpp
lldb/trunk/test/lang/c/typedef/
Modified:
lldb/trunk/include/lldb/Core/Module.h
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/include/lldb/Symbol/SymbolFile.h
lldb/trunk/include/lldb/Symbol/SymbolVendor.h
lldb/trunk/include/lldb/Symbol/TypeList.h
lldb/trunk/include/lldb/lldb-forward.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/trunk/source/Symbol/CMakeLists.txt
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/SymbolFile.cpp
lldb/trunk/source/Symbol/SymbolVendor.cpp
lldb/trunk/source/Symbol/TypeList.cpp

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=248421&r1=248420&r2=248421&view=diff
==
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Wed Sep 23 14:32:56 2015
@@ -1193,7 +1193,7 @@ private:
 const CompilerDeclContext *parent_decl_ctx,
 bool append, 
 size_t max_matches,
-TypeMap& types);
+TypeList& types);
 
 
 DISALLOW_COPY_AND_ASSIGN (Module);

Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=248421&r1=248420&r2=248421&view=diff
==
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Wed Sep 23 14:32:56 2015
@@ -299,27 +299,6 @@ public:
ConstString &language_object_name);
 
 //--
-/// If this symbol context represents a function that is a method,
-/// return true and provide information about the method.
-///
-/// @param[out] language
-/// If \b true is returned, the language for the method.
-///
-/// @param[out] is_instance_method
-/// If \b true is returned, \b true if this is a instance method,
-/// \b false if this is a static/class function.
-///
-/// @param[out] language_object_name
-/// If \b true is returned, the name of the artificial variable
-/// for the language ("this" for C++, "self" for ObjC).
-///
-/// @return
-/// \b True if this symbol context represents a function that
-/// is a method of a class, \b false otherwise.
-//--
-void
-   SortTypeList(TypeMap &type_map, TypeList &type_list) const;
-//--
 /// Find a name of the innermost function for the symbol context.
 ///
 /// For instance, if the symbol context contains an inlined block,

Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=248421&r1=248420&r2=248421&view=diff
==
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Wed Sep 23 14:32:56 2015
@@ -141,7 +141,7 @@ public:
 virtual uint32_tFindGlobalVariables (const RegularExpression& 
regex, bool append, uint32_t max_matches, VariableList& variables);
 virtual uint32_tFindFunctions (const ConstString &name, const 
CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool 
include_inlines, bool append, SymbolContextList& sc_list);
 virtual uint32_tFindFunctions (const RegularExpression& regex, 
bool include_inlines, bool append, SymbolContextList& sc_list);
-virtual uint32_tFindTypes (const SymbolContext& sc, const 
ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, 
uint32_t max_matches, TypeMap& types);
+virtual uint32_tFindTypes (const SymbolContext& sc, const 
ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, 
uint32_t max_matches, TypeList& types);
 

Re: [Lldb-commits] [lldb] r248366 - Testcase and fix for bug 24074

2015-09-23 Thread Enrico Granata via lldb-commits

> On Sep 23, 2015, at 12:09 PM, Ed Maste  wrote:
> 
> I'd suggest we revert for now and bring it back after testing on all
> platforms. There were a couple of nits and changes in the committed
> version relative to the version in the review as well so I think it's
> better to bring it back with those fixed up.
> 
> On 23 September 2015 at 14:52, Enrico Granata  wrote:
>> 
>> I am seeing the same issue on OS X
>> 
>> Ravitheja, can you investigate this?
>> Or should we just revert?
>> 


Reverted in r248421

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

http://reviews.llvm.org/rL248338



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn raised a concern with this commit.
dawn added a comment.

Hi Enrico,

This commit has caused catasrophic test failures on OSX.  The failure count went
 up by 512.

lldb is built with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  security unlock-keychain -p   
/Users/testuser/Library/Keychains/login.keychain
  ninja
  cd ../tools/lldb/test
  ./dotest.py --output-on-success -v

Can you have a look please?

Thanks in advance,
-Dawn


Users:
  dawn (Auditor)

http://reviews.llvm.org/rL248338



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


Re: [Lldb-commits] [PATCH] D12809: Better scheme to lookup alternate mangled name when looking up function address.

2015-09-23 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

Friendly periodic ping. Let me know if once in 2 days is too frequent.


http://reviews.llvm.org/D12809



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Enrico Granata via lldb-commits

> On Sep 23, 2015, at 12:42 PM, Dawn Perchik via lldb-commits 
>  wrote:
> 
> dawn added a subscriber: dawn.
> dawn raised a concern with this commit.
> dawn added a comment.
> 
> Hi Enrico,
> 
> This commit has caused catasrophic test failures on OSX.  The failure count 
> went
> up by 512.
> 
> lldb is built with cmake/ninja, and tests are run in the test dir as follows:
> 
>  cd ~/llvm
>  mkdir -p build_ninja && cd build_ninja
>  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
> -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
>  security unlock-keychain -p   
> /Users/testuser/Library/Keychains/login.keychain
>  ninja
>  cd ../tools/lldb/test
>  ./dotest.py --output-on-success -v
> 
> Can you have a look please?
> 
> Thanks in advance,
> -Dawn
> 
> 
> Users:
>  dawn (Auditor)
> 
> http://reviews.llvm.org/rL248338
> 
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Dawn,
I can certainly take a look at this, but I don’t anticipate finding much

We have been running in this mode (with run meaning —shell-expand-args) for 
months now internally, with no catastrophic test failures
Also, there is a test case that specifically validates launching via argdumper

Are you able to manually launch *any* inferior with an lldb built this way? Is 
argdumper being built as part of your builds?

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


[Lldb-commits] [PATCH] D13114: Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: tfiala.
chying added a subscriber: lldb-commits.

-SIGHUP doesn't exist on Windows

http://reviews.llvm.org/D13114

Files:
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r248427 - Make the ObjCLanguageRuntimes comply with llvm-style RTTI

2015-09-23 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Sep 23 15:12:19 2015
New Revision: 248427

URL: http://llvm.org/viewvc/llvm-project?rev=248427&view=rev
Log:
Make the ObjCLanguageRuntimes comply with llvm-style RTTI


Modified:
lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
lldb/trunk/include/lldb/lldb-private-enumerations.h
lldb/trunk/source/Expression/ClangExpressionParser.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h

Modified: lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h?rev=248427&r1=248426&r2=248427&view=diff
==
--- lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h Wed Sep 23 15:12:19 
2015
@@ -26,6 +26,8 @@
 #include "lldb/Symbol/Type.h"
 #include "lldb/Target/LanguageRuntime.h"
 
+#include "llvm/Support/Casting.h"
+
 class CommandObjectObjC_ClassTable_Dump;
 
 namespace lldb_private {
@@ -36,6 +38,13 @@ class ObjCLanguageRuntime :
 public LanguageRuntime
 {
 public:
+enum class ObjCRuntimeVersions
+{
+eObjC_VersionUnknown = 0,
+eAppleObjC_V1 = 1,
+eAppleObjC_V2 = 2
+};
+
 typedef lldb::addr_t ObjCISA;
 
 class ClassDescriptor;
@@ -293,9 +302,9 @@ public:
 CreateObjectChecker (const char *) = 0;
 
 virtual ObjCRuntimeVersions
-GetRuntimeVersion ()
+GetRuntimeVersion () const
 {
-return eObjC_VersionUnknown;
+return ObjCRuntimeVersions::eObjC_VersionUnknown;
 }
 
 bool

Modified: lldb/trunk/include/lldb/lldb-private-enumerations.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-enumerations.h?rev=248427&r1=248426&r2=248427&view=diff
==
--- lldb/trunk/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-private-enumerations.h Wed Sep 23 15:12:19 2015
@@ -106,13 +106,6 @@ typedef enum SortOrder
 eSortOrderByName
 } SortOrder;
 
-typedef enum ObjCRuntimeVersions {
-eObjC_VersionUnknown = 0,
-eAppleObjC_V1 = 1,
-eAppleObjC_V2 = 2
-} ObjCRuntimeVersions;
-
-
 //--
 // LazyBool is for boolean values that need to be calculated lazily.
 // Values start off set to eLazyBoolCalculate, and then they can be

Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=248427&r1=248426&r2=248427&view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Wed Sep 23 15:12:19 
2015
@@ -277,7 +277,7 @@ ClangExpressionParser::ClangExpressionPa
 {
 if (process_sp->GetObjCLanguageRuntime())
 {
-if (process_sp->GetObjCLanguageRuntime()->GetRuntimeVersion() == 
eAppleObjC_V2)
+if (process_sp->GetObjCLanguageRuntime()->GetRuntimeVersion() == 
ObjCLanguageRuntime::ObjCRuntimeVersions::eAppleObjC_V2)
 m_compiler->getLangOpts().ObjCRuntime.set(ObjCRuntime::MacOSX, 
VersionTuple(10, 7));
 else
 
m_compiler->getLangOpts().ObjCRuntime.set(ObjCRuntime::FragileMacOSX, 
VersionTuple(10, 7));

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp?rev=248427&r1=248426&r2=248427&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp Wed Sep 23 15:12:19 2015
@@ -624,7 +624,7 @@ SyntheticChildrenFrontEnd* lldb_private:
 lldb::ProcessSP process_sp (valobj_sp->GetProcessSP());
 if (!process_sp)
 return NULL;
-AppleObjCRuntime *runtime = 
(AppleObjCRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
+AppleObjCRuntime *runtime = 
llvm::dyn_cast_or_null(process_sp->GetObjCLanguageRuntime());
 if (!runtime)
 return NULL;
 

Modified: 
lldb/trunk/source/Plugins/LanguageRunti

[Lldb-commits] [lldb] r248429 - The Visual Studio compiler does not like this C-ism when 'enum class'es are involved

2015-09-23 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Sep 23 15:49:15 2015
New Revision: 248429

URL: http://llvm.org/viewvc/llvm-project?rev=248429&view=rev
Log:
The Visual Studio compiler does not like this C-ism when 'enum class'es are 
involved


Modified:

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248429&r1=248428&r2=248429&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
 Wed Sep 23 15:49:15 2015
@@ -105,7 +105,7 @@ protected:
 static bool
 AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
 
-static enum ObjCRuntimeVersions
+static ObjCRuntimeVersions
 GetObjCVersion (Process *process, lldb::ModuleSP &objc_module_sp);
 
 void


___
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-09-23 Thread Greg Clayton via lldb-commits
clayborg resigned from this revision.
clayborg removed a reviewer: clayborg.
clayborg added a comment.

We need to get Sean Callanan as a reviewer on this. Jim is out for a few weeks, 
so Sean will need to OK 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


Re: [Lldb-commits] [Diffusion] rL248048: Added support for resolving symbolic links to FileSpec.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

Users:
  spyffe (Author)

http://reviews.llvm.org/rL248048



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


Re: [Lldb-commits] [Diffusion] rL248048: Added support for resolving symbolic links to FileSpec.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn added a comment.

Hi Sean,

These 3 tests have been failing on OSX ever since this commit:

  
Failure-TestLaunchWithShellExpand.LaunchWithShellExpandTestCase.test_with_dsym-x86_64-clang.log
  
Failure-TestLaunchWithShellExpand.LaunchWithShellExpandTestCase.test_with_dwarf-x86_64-clang.log
  
Failure-TestTerminal.LaunchInTerminalTestCase.test_launch_in_terminal-x86_64-clang.log

Run as:

  ./dotest.py -f LaunchWithShellExpandTestCase.test_with_dsym
  ./dotest.py -f LaunchWithShellExpandTestCase.test_with_dwarf
  ./dotest.py -f LaunchInTerminalTestCase.test_launch_in_terminal

lldb is built with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  security unlock-keychain -p   
/Users/testuser/Library/Keychains/login.keychain
  ninja
  cd ../tools/lldb/test
  ./dotest.py --output-on-success -v

Can you have a look please?

Thanks in advance,
-Dawn


Users:
  spyffe (Author)

http://reviews.llvm.org/rL248048



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


Re: [Lldb-commits] [Diffusion] rL248048: Added support for resolving symbolic links to FileSpec.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn raised a concern with this commit.

Users:
  spyffe (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL248048



___
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-09-23 Thread Greg Clayton via lldb-commits
clayborg added a subscriber: clayborg.
clayborg added a comment.

Even though clang isn't done this way for historical reason, I would like to 
see the Go expression parser files (.cpp and .h) over into 
"source/Plugins/ExpressionParser/Go". The following files should be moved:

  include/lldb/Expression/GoAST.h
  include/lldb/Expression/GoLexer.h
  include/lldb/Expression/GoParser.h
  include/lldb/Expression/GoUserExpression.h
  source/Expression/GoLexer.cpp
  source/Expression/GoParser.cpp
  source/Expression/GoUserExpression.cpp
  source/Expression/gen_go_ast.py
  unittests/Expression/GoParserTest.cpp


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] [lldb] r248429 - The Visual Studio compiler does not like this C-ism when 'enum class'es are involved

2015-09-23 Thread Zachary Turner via lldb-commits
If you change "enum" to "enum class" I think it will work (IANALL but I
think it's even more correct).  But if what you've done works, then that
should be fine.

On Wed, Sep 23, 2015 at 1:50 PM Enrico Granata via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: enrico
> Date: Wed Sep 23 15:49:15 2015
> New Revision: 248429
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248429&view=rev
> Log:
> The Visual Studio compiler does not like this C-ism when 'enum class'es
> are involved
>
>
> Modified:
>
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
>
> Modified:
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248429&r1=248428&r2=248429&view=diff
>
> ==
> ---
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> (original)
> +++
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> Wed Sep 23 15:49:15 2015
> @@ -105,7 +105,7 @@ protected:
>  static bool
>  AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
>
> -static enum ObjCRuntimeVersions
> +static ObjCRuntimeVersions
>  GetObjCVersion (Process *process, lldb::ModuleSP &objc_module_sp);
>
>  void
>
>
> ___
> 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] [Diffusion] rL247773: [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn raised a concern with this commit.
dawn added a comment.

Hi Jay,

This test has been failing on OSX ever since this commit:

  ./dotest.py -f TestCppNsImport.test_with_dwarf_and_run_command
  
Failure-TestCppNsImport.TestCppNsImport.test_with_dwarf_and_run_command-x86_64-clang.log

lldb is built with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  security unlock-keychain -p   
/Users/testuser/Library/Keychains/login.keychain
  ninja
  cd ../tools/lldb/test
  ./dotest.py --output-on-success -v

Can you have a look please?

Thanks in advance,
-Dawn


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247773



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


Re: [Lldb-commits] [lldb] r248429 - The Visual Studio compiler does not like this C-ism when 'enum class'es are involved

2015-09-23 Thread Enrico Granata via lldb-commits

> On Sep 23, 2015, at 2:31 PM, Zachary Turner  wrote:
> 
> If you change "enum" to "enum class" I think it will work

Yes that would also work

> (IANALL but I think it's even more correct). 

IANALL either, but I beg to differ on that
The way I usually heard it explained is that C has different “namespaces” (*) 
where it puts structs, vs. enums, vs. typedefs, and that is why you need to 
classify names with the kind of type they are - or make typedefs for them
(*) not in the C++ sense of the term, in the sense of bucket where the compiler 
would go look for a type given a typename
In C++ all kinds of types all live in common buckets, so the classification is 
redundant, but allowed, because C

> But if what you've done works, then that should be fine.

I haven’t heard any more rumbling from the bot. I’ll take that as approval of 
my patch :-)

> 
> On Wed, Sep 23, 2015 at 1:50 PM Enrico Granata via lldb-commits 
> mailto:lldb-commits@lists.llvm.org>> wrote:
> Author: enrico
> Date: Wed Sep 23 15:49:15 2015
> New Revision: 248429
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=248429&view=rev 
> 
> Log:
> The Visual Studio compiler does not like this C-ism when 'enum class'es are 
> involved
> 
> 
> Modified:
> 
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> 
> Modified: 
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248429&r1=248428&r2=248429&view=diff
>  
> 
> ==
> --- 
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
>  (original)
> +++ 
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
>  Wed Sep 23 15:49:15 2015
> @@ -105,7 +105,7 @@ protected:
>  static bool
>  AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
> 
> -static enum ObjCRuntimeVersions
> +static ObjCRuntimeVersions
>  GetObjCVersion (Process *process, lldb::ModuleSP &objc_module_sp);
> 
>  void
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org 
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits 
> 


Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


[Lldb-commits] [lldb] r248434 - Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
Author: chying
Date: Wed Sep 23 16:53:18 2015
New Revision: 248434

URL: http://llvm.org/viewvc/llvm-project?rev=248434&view=rev
Log:
Check existence of SIGHUP before using it

Summary: -SIGHUP doesn't exist on Windows

Reviewers: tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248434&r1=248433&r2=248434&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Wed Sep 23 16:53:18 2015
@@ -285,7 +285,8 @@ def process_dir_worker_multiprocessing(
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@ def main(print_details_on_success, num_t
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


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


Re: [Lldb-commits] [PATCH] D13114: Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248434: Check existence of SIGHUP before using it (authored 
by chying).

Changed prior to commit:
  http://reviews.llvm.org/D13114?vs=35543&id=35557#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13114

Files:
  lldb/trunk/test/dosep.py

Index: lldb/trunk/test/dosep.py
===
--- lldb/trunk/test/dosep.py
+++ lldb/trunk/test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


Index: lldb/trunk/test/dosep.py
===
--- lldb/trunk/test/dosep.py
+++ lldb/trunk/test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL247968: [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

Users:
  jaydeep (Author)

http://reviews.llvm.org/rL247968



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


Re: [Lldb-commits] [Diffusion] rL247968: [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn raised a concern with this commit.
dawn added a comment.

Hi Jay,

This test has been failing on OSX ever since this commit:

  ./dotest.py -f ConnectRemoteTestCase.test_connect_remote
  
Failure-TestConnectRemote.ConnectRemoteTestCase.test_connect_remote-x86_64-clang.log

lldb is built with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  security unlock-keychain -p   
/Users/testuser/Library/Keychains/login.keychain
  ninja
  cd ../tools/lldb/test
  ./dotest.py --output-on-success -v

Can you have a look please?

Thanks in advance,
-Dawn


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247968



___
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-09-23 Thread Greg Clayton via lldb-commits
clayborg added a comment.

I see you moved the JIT code over into ClangUserExpression. I was wondering if 
all languages might not want to generate llvm IR and then let the JIT make code 
from the llvm IR? This is the reason were originally left the IR in the 
UserExpression. IR is very generic and can be applied to just about anything. 
Any interest in using llvm IR for the Go expression parser? I am assuming you 
have made a expression tree that you evaluate. This would be very similar to 
what we do. When we evaluate an expression currently we generate the llvm IR 
and then we say "that is easy to emulate (just a bunch of loads and stores), so 
we don't actually need to JIT it up, we can just emulate the IR. If it is too 
complex, we pass this along to the JIT and let it generate code for us.


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] [Diffusion] rL247741: Clean up register naming conventions inside lldb.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

http://reviews.llvm.org/rL247741



___
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-09-23 Thread Ryan Brown via lldb-commits
ribrdb added a comment.

Hmm. I assumed you're using clang to generate llvm IR, is that not the case?
I don't really want to write a whole go compiler.
Right now I'm interpreting the AST using the ValueObject API. This also lets me 
reuse the error checking and things implemented in the type system. 
Reimplementing this in IR seems like it would be more complicated and harder to 
understand/maintain.
Another concern I have is that the go stack is not compatible with c. If we're 
going to execute jited code we'd probably also need to allocate a separate 
stack.


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] D13066: DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child

2015-09-23 Thread David Blaikie via lldb-commits
dblaikie added a subscriber: dblaikie.


Comment at: test/lang/cpp/incomplete-types/Makefile:8
@@ +7,3 @@
+
+ifneq (,$(findstring clang,$(CC)))
+  CFLAGS_LIMIT += -flimit-debug-info

In case it's interesting, you can get similarly problematic DWARF by using a 
dynamic class (one with virtual functions) with a key function that is not 
defined in the current translation unit. 

GCC implements this behavior as well (whereas GCC doesn't implement the 
behavior that is triggering on basic_string involving explicit instantiation 
declarations/definitions) and also has a flag for it: -femit-class-debug-always 
(I think last I recall, Eric Christopher mentioned he'd looked at the GCC 
implementation of this flag and it differed in some ways from Clang's, so he 
was reticent to add a compatibility flag for this in Clang... but we could 
discuss/revisit that, perhaps (though I suppose it wouldn't allow you to 
/enable/ this optimization, only disable it - not sure if there's a way to 
opt-in in GCC))

Though it's easy to "disable" the feature by simply not triggering it, rather 
than using a flag to turn it off - eg: providing no key function for a type (if 
you're triggering the dynamic class case, not the template case), or removing 
an explicit instantiation declaration/definition (if you're triggering the 
template case)


Comment at: test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py:5
@@ +4,3 @@
+
+class TestCppIncompleteTypes(TestBase):
+

You don't seem to have a test case for the shared library case in the bug 
report? (decl in one obj, def in the other, shared library/object/whatever 
boundary between the two)

(& not sure what the behavior is in the case where the def is provided in one 
obj and they are statically linked together - bug report mentions the failure 
doesn't occur, but I don't know if it does the right thing (actually finds the 
definition) - I know lldb used to not do the right thing there, and had some 
error message about the compiler being wrong)


Comment at: test/lang/cpp/incomplete-types/length.h:4
@@ +3,3 @@
+
+#include 
+

Having a test case depend on the entire header of  seems a bit brittle 
- and means this test may or may not test the behavior you're interested in, 
depending on how the standard library is defined (depending on whether it 
actually has an explicit instantiation decl/def for basic_string or not)


http://reviews.llvm.org/D13066



___
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-09-23 Thread Ryan Brown via lldb-commits
ribrdb added a comment.

I suppose JIT might make more sense if we want to implement more complicated 
expressions like looping and calling in to go code.
There's lots of issues to solve before we can call into go code however. In 
addition to the stack I'm not sure what to do about the GC. Also I believe at 
least some parts of the go runtime are assuming knowledge of the complete call 
graph and may have issues if we're calling functions from an unexpected place. 
So want to just start with something simple.


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] [Diffusion] rL247741: Clean up register naming conventions inside lldb.

2015-09-23 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn added a comment.

These tests have been failing on OSX ever since this commit:

  ./dotest.py -f 
LldbGdbServerTestCase.test_qRegisterInfo_returns_all_valid_results_debugserver_dsym
  ./dotest.py -f 
LldbGdbServerTestCase.test_qRegisterInfo_returns_one_valid_result_debugserver_dsym

I know there's been some discussion on lldb-commits about the lldb-server 
lately, so maybe this is a problem with how I'm building/testing?  Perhaps 
someone can clear things up for me and tell me what I'm doing wrong, or if this 
is a real regression?

I build lldb with cmake/ninja, and tests are run in the test dir as follows:

  cd ~/llvm
  mkdir -p build_ninja && cd build_ninja
  cmake -G Ninja .. "-DLLVM_TARGETS_TO_BUILD=ARM;X86;AArch64" 
-DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_BUILD_TYPE=Release
  ninja
  cd ../tools/lldb/test
  export 
LLDB_DEBUGSERVER_PATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver
  ./dotest.py --output-on-success -v --executable ~/llvm/build_ninja/bin/lldb

Thanks in advance,
-Dawn


http://reviews.llvm.org/rL247741



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


[Lldb-commits] [lldb] r248450 - Added the ability to register key callbacks for much easier key handling. Also added the elapsed time display to the status bar.

2015-09-23 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Sep 23 19:19:42 2015
New Revision: 248450

URL: http://llvm.org/viewvc/llvm-project?rev=248450&view=rev
Log:
Added the ability to register key callbacks for much easier key handling. Also 
added the elapsed time display to the status bar.


Modified:
lldb/trunk/test/curses_results.py
lldb/trunk/test/lldbcurses.py

Modified: lldb/trunk/test/curses_results.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/curses_results.py?rev=248450&r1=248449&r2=248450&view=diff
==
--- lldb/trunk/test/curses_results.py (original)
+++ lldb/trunk/test/curses_results.py Wed Sep 23 19:19:42 2015
@@ -10,9 +10,12 @@ Configuration options for lldbtest.py se
 """
 
 import curses
+import datetime
 import lldbcurses
+import math
 import sys
 import test_results
+import time
 
 class Curses(test_results.ResultsFormatter):
 """Receives live results from tests that are running and reports them to 
the terminal in a curses GUI"""
@@ -28,14 +31,15 @@ class Curses(test_results.ResultsFormatt
 self.results = list()
 self.saved_first_responder = None
 try:
-self.main_window = lldbcurses.intialize_curses()
-self.main_window.delegate = self.handle_main_window_key
+self.main_window = lldbcurses.intialize_curses() 
+self.main_window.add_key_action('\t', 
self.main_window.select_next_first_responder, "Switch between views that can 
respond to keyboard input")
 self.main_window.refresh()
 self.job_panel = None
 self.results_panel = None
 self.status_panel = None
 self.info_panel = None
 self.hide_status_list = list()
+self.start_time = time.time()
 except:
 self.have_curses = False
 lldbcurses.terminate_curses()
@@ -66,71 +70,41 @@ class Curses(test_results.ResultsFormatt
 else:
 return status
 
-def handle_main_window_key(self, window, key):
-if key == ord('\t'):
-self.main_window.select_next_first_responder()
-
-def handle_info_panel_key(self, window, key):
-window.resign_first_responder(remove_from_parent=True, 
new_first_responder=self.saved_first_responder)
-window.hide()
+def show_info_panel(self):
+selected_idx = self.results_panel.get_selected_idx()
+if selected_idx >= 0 and selected_idx < len(self.results):
+if self.info_panel is None:
+info_frame = 
self.results_panel.get_contained_rect(top_inset=10, left_inset=10, 
right_inset=10, height=30)
+self.info_panel = lldbcurses.BoxedPanel(info_frame, "Result 
Details")
+# Add a key action for any key that will hide this panel when 
any key is pressed
+self.info_panel.add_key_action(-1, self.hide_info_panel, 'Hide 
the info panel')
+self.info_panel.top()
+else:
+self.info_panel.show()
+
+self.saved_first_responder = self.main_window.first_responder  
+self.main_window.set_first_responder(self.info_panel)
+test_start = self.results[selected_idx][0]
+test_result = self.results[selected_idx][1]
+self.info_panel.set_line(0, "File: %s" % 
(test_start['test_filename']))
+self.info_panel.set_line(1, "Test: %s.%s" % 
(test_start['test_class'], test_start['test_name']))
+self.info_panel.set_line(2, "Time: %s" % 
(test_result['elapsed_time']))
+self.info_panel.set_line(3, "Status: %s" % (test_result['status']))
+
+def hide_info_panel(self):
+self.info_panel.resign_first_responder(remove_from_parent=True, 
new_first_responder=self.saved_first_responder)
+self.info_panel.hide()
 self.saved_first_responder = None
 self.main_window.refresh()
-return True
-
-def handle_job_panel_key(self, window, key):
-return False
-
-def handle_result_panel_key(self, window, key):
-toggle_status = None
-if key == ord('\r') or key == ord('\n') or key == curses.KEY_ENTER:
-selected_idx = self.results_panel.get_selected_idx()
-if selected_idx >= 0 and selected_idx < len(self.results):
-if self.info_panel is None:
-info_frame = 
self.results_panel.get_contained_rect(top_inset=10, left_inset=10, 
right_inset=10, height=30)
-self.info_panel = lldbcurses.BoxedPanel(info_frame, 
"Result Details", delegate=self.handle_info_panel_key)
-self.info_panel.top()
-else:
-self.info_panel.show()
-
-self.saved_first_responder = self.main_window.first_responder  
-self.main_window.set_first_responder(self.info_panel)
-test_start = sel

Re: [Lldb-commits] [PATCH] D13066: DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child

2015-09-23 Thread Siva Chandra via lldb-commits
sivachandra added inline comments.


Comment at: test/lang/cpp/incomplete-types/Makefile:8
@@ +7,3 @@
+
+ifneq (,$(findstring clang,$(CC)))
+  CFLAGS_LIMIT += -flimit-debug-info

dblaikie wrote:
> In case it's interesting, you can get similarly problematic DWARF by using a 
> dynamic class (one with virtual functions) with a key function that is not 
> defined in the current translation unit. 
> 
> GCC implements this behavior as well (whereas GCC doesn't implement the 
> behavior that is triggering on basic_string involving explicit instantiation 
> declarations/definitions) and also has a flag for it: 
> -femit-class-debug-always (I think last I recall, Eric Christopher mentioned 
> he'd looked at the GCC implementation of this flag and it differed in some 
> ways from Clang's, so he was reticent to add a compatibility flag for this in 
> Clang... but we could discuss/revisit that, perhaps (though I suppose it 
> wouldn't allow you to /enable/ this optimization, only disable it - not sure 
> if there's a way to opt-in in GCC))
> 
> Though it's easy to "disable" the feature by simply not triggering it, rather 
> than using a flag to turn it off - eg: providing no key function for a type 
> (if you're triggering the dynamic class case, not the template case), or 
> removing an explicit instantiation declaration/definition (if you're 
> triggering the template case)
Thanks for this info. I can remove the use of std::string and make use of a 
dynamic class to test this behavior. And, if it can be tested with GCC as well, 
then @skipIfGcc can be removed.


Comment at: test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py:5
@@ +4,3 @@
+
+class TestCppIncompleteTypes(TestBase):
+

dblaikie wrote:
> You don't seem to have a test case for the shared library case in the bug 
> report? (decl in one obj, def in the other, shared library/object/whatever 
> boundary between the two)
> 
> (& not sure what the behavior is in the case where the def is provided in one 
> obj and they are statically linked together - bug report mentions the failure 
> doesn't occur, but I don't know if it does the right thing (actually finds 
> the definition) - I know lldb used to not do the right thing there, and had 
> some error message about the compiler being wrong)
Per my understanding, LLDB does not search the world to complete or lookup a 
type. So, shared library case will not still work. If the objects are 
statically linked, it will however.

Making it work in the shared library case is the next step. I treated pr24812 
as unrelated to this. I can open it back if you feel it should be kept open 
until the shared library case is fixed.


http://reviews.llvm.org/D13066



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


[Lldb-commits] [lldb] r248457 - execinfo.h isn't needed on Mac OS X for Host.mm.

2015-09-23 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Wed Sep 23 20:37:32 2015
New Revision: 248457

URL: http://llvm.org/viewvc/llvm-project?rev=248457&view=rev
Log:
execinfo.h isn't needed on Mac OS X for Host.mm.

Summary: This is no longer needed as this file no longer calls backtrace().

Reviewers: clayborg

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Host/macosx/Host.mm

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=248457&r1=248456&r2=248457&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Wed Sep 23 20:37:32 2015
@@ -25,7 +25,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 


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


Re: [Lldb-commits] [PATCH] D13049: execinfo.h isn't needed on Mac OS X for Host.mm.

2015-09-23 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248457: execinfo.h isn't needed on Mac OS X for Host.mm. 
(authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D13049?vs=35354&id=35581#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13049

Files:
  lldb/trunk/source/Host/macosx/Host.mm

Index: lldb/trunk/source/Host/macosx/Host.mm
===
--- lldb/trunk/source/Host/macosx/Host.mm
+++ lldb/trunk/source/Host/macosx/Host.mm
@@ -25,7 +25,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 


Index: lldb/trunk/source/Host/macosx/Host.mm
===
--- lldb/trunk/source/Host/macosx/Host.mm
+++ lldb/trunk/source/Host/macosx/Host.mm
@@ -25,7 +25,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL247968: [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-23 Thread Jaydeep Patil via lldb-commits
jaydeep added a comment.

Hi Dawn,

Let me check and get back to you.

Regards,
Jaydeep


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247968



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Bruce Mitchener via lldb-commits
brucem added a subscriber: brucem.
brucem added a comment.

I ran into this myself and looked into it.

What is happening is that it is looking for `argdumper` and not finding it. 
This happens because it is looking in the `lib` directory within the build 
directory, but `argdumper` is in the `bin` directory (where it should be).

The reason that it looks in the wrong place comes down to logic within 
`HostInfoMacOSX::ComputeSupportExeDirectory` which expects everything to always 
be built as a typical Mac OS X bundle.

This does prevent `lldb` from launching any inferior currently on Mac OS X when 
built with cmake.


Users:
  dawn (Auditor)

http://reviews.llvm.org/rL248338



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


Re: [Lldb-commits] [PATCH] D5503: Very minimal non-8-bit byte support for diverse kalimba architectures

2015-09-23 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.

This review is mighty stale, but going through my differentials I saw it was 
still around.  It looked good for the time.


http://reviews.llvm.org/D5503



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


[Lldb-commits] [PATCH] D13124: test runner: switch to pure-Python timeout mechanism

2015-09-23 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added reviewers: zturner, clayborg, labath.
tfiala added a subscriber: lldb-commits.

For all the parallel test runners, provide a pure-Python mechanism for timing 
out dotest inferior processes that run for too long.

Stock OS X and Windows do not have a built-in timeout helper app.  This allows 
those systems to support timeouts.  It also transforms the timeout from being 
implemented via a system process to costing a single thread.

Tested on Linux and OS X with positive timeout verification.

Greg: this also comments out one of the curses cleanup calls into keyboard 
handling.  I found that always hung the test shutdown on the curses runner.  
(Attached with a python debugger to verify).

http://reviews.llvm.org/D13124

Files:
  test/curses_results.py
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -45,28 +45,10 @@
 import subprocess
 import sys
 import threading
-import test_results
 import dotest_channels
 import dotest_args
 
 
-def get_timeout_command():
-"""Search for a suitable timeout command."""
-if not sys.platform.startswith("win32"):
-try:
-subprocess.call("timeout", stderr=subprocess.PIPE)
-return "timeout"
-except OSError:
-pass
-try:
-subprocess.call("gtimeout", stderr=subprocess.PIPE)
-return "gtimeout"
-except OSError:
-pass
-return None
-
-timeout_command = get_timeout_command()
-
 # Status codes for running command with timeout.
 eTimedOut, ePassed, eFailed = 124, 0, 1
 
@@ -171,7 +153,6 @@
 unexpected_successes = unexpected_successes + int(unexpected_success_count.group(1))
 if error_count is not None:
 failures = failures + int(error_count.group(1))
-pass
 return passes, failures, unexpected_successes
 
 
@@ -180,13 +161,74 @@
 os.setpgid(os.getpid(), os.getpid())
 
 
+class CommunicatorThread(threading.Thread):
+"""Provides a thread class that communicates with a subprocess."""
+def __init__(self, process, event):
+super(CommunicatorThread, self).__init__()
+# Don't let this thread prevent shutdown.
+self.daemon = True
+self.process = process
+self.pid = process.pid
+self.event = event
+self.output = None
+
+def run(self):
+try:
+# Communicate with the child process.
+# This will not complete until the child process terminates.
+self.output = self.process.communicate()
+self.event.set()
+except:
+with output_lock:
+print ("\nexception while using communicate() for "
+   "pid: {}").format(self.pid)
+
+
+TIMEOUT_REGEX = re.compile(r"(^\d+)([smhd])?$")
+
+
+def timeout_to_seconds(timeout):
+"""Converts timeout/gtimeout timeout values into seconds.
+
+@param timeout a timeout in the form of xm representing x minutes.
+
+@return None if timeout is None, or the number of seconds as a float
+if a valid timeout format was specified.
+"""
+if timeout is None:
+return None
+else:
+match = TIMEOUT_REGEX.match(timeout)
+if match:
+value = float(match.group(1))
+units = match.group(2)
+if units is None:
+# default is seconds.  No conversion necessary.
+return value
+elif units == 's':
+# Seconds.  No conversion necessary.
+return value
+elif units == 'm':
+# Value is in minutes.
+return 60.0 * value
+elif units == 'h':
+# Value is in hours.
+return (60.0 * 60.0) * value
+elif units == 'd':
+# Value is in days.
+return 24 * (60.0 * 60.0) * value
+else:
+raise Exception("unexpected units value '{}'".format(units))
+else:
+raise Exception("could not parse TIMEOUT spec '{}'".format(
+timeout))
+
+
 def call_with_timeout(command, timeout, name, inferior_pid_events):
 """Run command with a timeout if possible.
 -s QUIT will create a coredump if they are enabled on your system
 """
-process = None
-if timeout_command and timeout != "0":
-command = [timeout_command, '-s', 'QUIT', timeout] + command
+timeout_seconds = timeout_to_seconds(timeout)
 
 if GET_WORKER_INDEX is not None:
 try:
@@ -214,15 +256,68 @@
 inferior_pid = process.pid
 if inferior_pid_events:
 inferior_pid_events.put_nowait(('created', inferior_pid))
-output = process.communicate()
 
-# The inferior should now be entirely wrapped up.
-exit_status = process.returncode
-if exit_status is None:
-raise Exception(
-"no exit status available aft

Re: [Lldb-commits] [PATCH] D13124: test runner: switch to pure-Python timeout mechanism

2015-09-23 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: test/curses_results.py:223
@@ -223,1 +222,3 @@
+# Greg - not sure why this is here.  It locks up on 
exit.
+# self.main_window.key_event_loop()
 lldbcurses.terminate_curses()

Greg, let me know if there's something more sensible I can do here rather than 
comment it out.  It never seemed to return and just kept looping.


http://reviews.llvm.org/D13124



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


Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Ilia K via lldb-commits
ki.stfu requested changes to this revision.
ki.stfu added a comment.
This revision now requires changes to proceed.

Your fix in assign operator looks good. Others go out of scope of this CL, so 
please revert them.



Comment at: tools/lldb-mi/MIUtilString.cpp:41
@@ -40,3 +40,3 @@
 CMIUtilString::CMIUtilString(const char *vpData)
-: std::string(vpData)
+: std::string(vpData != nullptr ? vpData : "")
 {

Not sure about usefulness of these changes. The NULL usually means an error in 
contrast to "" which means "there is nothing to show". In your case, you can 
check whether it's NULL or not, and then construct an object.

Besides that, you can use operator=:
```
SBValue val;
CMIUtilString s;
if (const char* s_cstr = val.GetSummary())
  s = s_cstr;
```


Comment at: tools/lldb-mi/MIUtilString.cpp:45-56
@@ -44,14 +44,14 @@
 
 //++ 

 // Details: CMIUtilString constructor.
 // Type:Method.
 // Args:vpData  - Pointer to UTF8 text data.
 // Return:  None.
 // Throws:  None.
 //--
 CMIUtilString::CMIUtilString(const char *const *vpData)
-: std::string((const char *)vpData)
+: std::string(vpData != nullptr ? (const char *)vpData : "")
 {
 }
 
 //++ 


Is it really used somewhere?


http://reviews.llvm.org/D13094



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Todd Fiala via lldb-commits
tfiala added a subscriber: tfiala.
tfiala added a comment.

Are you all still seeing this now?  I am heading to sleep but can have a
look early in the morning...


Users:
  dawn (Auditor)

http://reviews.llvm.org/rL248338



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Todd Fiala via lldb-commits
Are you all still seeing this now?  I am heading to sleep but can have a
look early in the morning...

On Wed, Sep 23, 2015 at 10:09 PM, Bruce Mitchener via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> brucem added a subscriber: brucem.
> brucem added a comment.
>
> I ran into this myself and looked into it.
>
> What is happening is that it is looking for `argdumper` and not finding
> it. This happens because it is looking in the `lib` directory within the
> build directory, but `argdumper` is in the `bin` directory (where it should
> be).
>
> The reason that it looks in the wrong place comes down to logic within
> `HostInfoMacOSX::ComputeSupportExeDirectory` which expects everything to
> always be built as a typical Mac OS X bundle.
>
> This does prevent `lldb` from launching any inferior currently on Mac OS X
> when built with cmake.
>
>
> Users:
>   dawn (Auditor)
>
> http://reviews.llvm.org/rL248338
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>



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


Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment.

Without this change I have to use temporary const char* variable each time I 
call GetData() GetSummary(), GetValue() and so on
It would be nice to be able to do something like this

CMIUtilString s = v.GetSummary();
if (!s.empty()) {

  CMIUtilString v = v.GetValue();
  if (!v.empty()) {
   // and so on
  }

}

And whenever I need error check I can use temporary const char* or just  "if 
(v.GetSummary() != NULL)


http://reviews.llvm.org/D13094



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


Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment.

Also in MI empty value and NULL value almost always mean "no output". Checking 
for NULL everywhere is just not convenient


http://reviews.llvm.org/D13094



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


Re: [Lldb-commits] [Diffusion] rL248338: Move the "run" alias from process launch --shell to process launch --shell…

2015-09-23 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

Yes. With a change that I'm going to submit for review:

  batavia:build-llvm bruce$ bin/lldb bin/clang
  (lldb) target create "bin/clang"
  Current executable set to 'bin/clang' (x86_64).
  (lldb) b main
  Breakpoint 1: where = clang`main, address = 0x00012890
  (lldb) run
  error: could not find argdumper tool: 
/Users/bruce/Development/build-llvm/lib/argdumper
  (lldb)


Users:
  dawn (Auditor)

http://reviews.llvm.org/rL248338



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