[Lldb-commits] [lldb] r247537 - Switch default disposition of realtime signals

2015-09-14 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Sep 14 04:05:43 2015
New Revision: 247537

URL: http://llvm.org/viewvc/llvm-project?rev=247537&view=rev
Log:
Switch default disposition of realtime signals

Summary:
Realtime signals generally do not represent an error condition in an 
application but are more
like a regular means of IPC. As such, we shouldn't interrupt an application 
whenever it recieves
one. If any application will use these signals, it will probably use them a 
lot, rendering it's
debugging tiresome if we stopped at every signal. Furthermore, these signals 
are likely to be used
in a low level library, and the programmer may not even be aware of their 
presence.

For these reasons, I am switching the default disposition of realtime signals 
on all supported
platforms (i.e. Linux and Freebsd) to no-stop, no-notify. Any user still 
wishing to receive these
signals can always change the default to suit his needs.

Reviewers: ovyalov, emaste

Subscribers: lldb-commits, emaste

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

Modified:
lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp
lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp
lldb/trunk/source/Plugins/Process/Utility/MipsLinuxSignals.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp?rev=247537&r1=247536&r2=247537&view=diff
==
--- lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp Mon Sep 14 
04:05:43 2015
@@ -28,68 +28,68 @@ FreeBSDSignals::Reset()
 
 //SIGNO   NAME   SHORT NAME  SUPPRESS STOP   NOTIFY 
DESCRIPTION 
 //==     ==   == == 
===
-AddSignal (32,"SIGTHR",  "THR",  false,   true , true , 
"thread interrupt");
-AddSignal (33,"SIGLIBRT","LIBRT",false,   true , true , 
"reserved by real-time library");
-AddSignal (65,"SIGRTMIN","RTMIN",false,   true , true , "real 
time signal 0");
-AddSignal (66,"SIGRTMIN+1",  "RTMIN+1",  false,   true , true , "real 
time signal 1");
-AddSignal (67,"SIGRTMIN+2",  "RTMIN+2",  false,   true , true , "real 
time signal 2");
-AddSignal (68,"SIGRTMIN+3",  "RTMIN+3",  false,   true , true , "real 
time signal 3");
-AddSignal (69,"SIGRTMIN+4",  "RTMIN+4",  false,   true , true , "real 
time signal 4");
-AddSignal (70,"SIGRTMIN+5",  "RTMIN+5",  false,   true , true , "real 
time signal 5");
-AddSignal (71,"SIGRTMIN+6",  "RTMIN+6",  false,   true , true , "real 
time signal 6");
-AddSignal (72,"SIGRTMIN+7",  "RTMIN+7",  false,   true , true , "real 
time signal 7");
-AddSignal (73,"SIGRTMIN+8",  "RTMIN+8",  false,   true , true , "real 
time signal 8");
-AddSignal (74,"SIGRTMIN+9",  "RTMIN+9",  false,   true , true , "real 
time signal 9");
-AddSignal (75,"SIGRTMIN+10", "RTMIN+10", false,   true , true , "real 
time signal 10");
-AddSignal (76,"SIGRTMIN+11", "RTMIN+11", false,   true , true , "real 
time signal 11");
-AddSignal (77,"SIGRTMIN+12", "RTMIN+12", false,   true , true , "real 
time signal 12");
-AddSignal (78,"SIGRTMIN+13", "RTMIN+13", false,   true , true , "real 
time signal 13");
-AddSignal (79,"SIGRTMIN+14", "RTMIN+14", false,   true , true , "real 
time signal 14");
-AddSignal (80,"SIGRTMIN+15", "RTMIN+15", false,   true , true , "real 
time signal 15");
-AddSignal (81,"SIGRTMIN+16", "RTMIN+16", false,   true , true , "real 
time signal 16");
-AddSignal (82,"SIGRTMIN+17", "RTMIN+17", false,   true , true , "real 
time signal 17");
-AddSignal (83,"SIGRTMIN+18", "RTMIN+18", false,   true , true , "real 
time signal 18");
-AddSignal (84,"SIGRTMIN+19", "RTMIN+19", false,   true , true , "real 
time signal 19");
-AddSignal (85,"SIGRTMIN+20", "RTMIN+20", false,   true , true , "real 
time signal 20");
-AddSignal (86,"SIGRTMIN+21", "RTMIN+21", false,   true , true , "real 
time signal 21");
-AddSignal (87,"SIGRTMIN+22", "RTMIN+22", false,   true , true , "real 
time signal 22");
-AddSignal (88,"SIGRTMIN+23", "RTMIN+23", false,   true , true , "real 
time signal 23");
-AddSignal (89,"SIGRTMIN+24", "RTMIN+24", false,   true , true , "real 
time signal 24");
-AddSignal (90,"SIGRTMIN+25", "RTMIN+25", false,   true , true , "real 
time signal 25");
-AddSignal (91,"SIGRTMIN+26", "RTMIN+26", false,   true , true , "real 
time signal 26");
-AddSignal (92,"SIGRTMIN+27", "RTMIN+27", false,   true , true , "real 
time signal 27");
-AddSignal (93,"SIGRTMIN+28", "RTMIN+28", false,   true , true , "real 
time signal 28");

Re: [Lldb-commits] [PATCH] D12795: Switch default disposition of realtime signals

2015-09-14 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247537: Switch default disposition of realtime signals 
(authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D12795?vs=34534&id=34661#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12795

Files:
  lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp
  lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp
  lldb/trunk/source/Plugins/Process/Utility/MipsLinuxSignals.cpp

Index: lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp
===
--- lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -59,37 +59,37 @@
 AddSignal (29,   "SIGIO",   "IO",   false,   true , true , "input/output ready");
 AddSignal (30,   "SIGPWR",  "PWR",  false,   true , true , "power failure");
 AddSignal (31,   "SIGSYS",  "SYS",  false,   true , true , "invalid system call");
-AddSignal (32,   "SIG32",   "SIG32",false,   true , true , "threading library internal signal 1");
-AddSignal (33,   "SIG33",   "SIG33",false,   true , true , "threading library internal signal 2");
-AddSignal (34,   "SIGRTMIN","RTMIN",false,   true , true , "real time signal 0");
-AddSignal (35,   "SIGRTMIN+1",  "RTMIN+1",  false,   true , true , "real time signal 1");
-AddSignal (36,   "SIGRTMIN+2",  "RTMIN+2",  false,   true , true , "real time signal 2");
-AddSignal (37,   "SIGRTMIN+3",  "RTMIN+3",  false,   true , true , "real time signal 3");
-AddSignal (38,   "SIGRTMIN+4",  "RTMIN+4",  false,   true , true , "real time signal 4");
-AddSignal (39,   "SIGRTMIN+5",  "RTMIN+5",  false,   true , true , "real time signal 5");
-AddSignal (40,   "SIGRTMIN+6",  "RTMIN+6",  false,   true , true , "real time signal 6");
-AddSignal (41,   "SIGRTMIN+7",  "RTMIN+7",  false,   true , true , "real time signal 7");
-AddSignal (42,   "SIGRTMIN+8",  "RTMIN+8",  false,   true , true , "real time signal 8");
-AddSignal (43,   "SIGRTMIN+9",  "RTMIN+9",  false,   true , true , "real time signal 9");
-AddSignal (44,   "SIGRTMIN+10", "RTMIN+10", false,   true , true , "real time signal 10");
-AddSignal (45,   "SIGRTMIN+11", "RTMIN+11", false,   true , true , "real time signal 11");
-AddSignal (46,   "SIGRTMIN+12", "RTMIN+12", false,   true , true , "real time signal 12");
-AddSignal (47,   "SIGRTMIN+13", "RTMIN+13", false,   true , true , "real time signal 13");
-AddSignal (48,   "SIGRTMIN+14", "RTMIN+14", false,   true , true , "real time signal 14");
-AddSignal (49,   "SIGRTMIN+15", "RTMIN+15", false,   true , true , "real time signal 15");
-AddSignal (50,   "SIGRTMAX-14", "RTMAX-14", false,   true , true , "real time signal 16"); // switching to SIGRTMAX-xxx to match "kill -l" output
-AddSignal (51,   "SIGRTMAX-13", "RTMAX-13", false,   true , true , "real time signal 17");
-AddSignal (52,   "SIGRTMAX-12", "RTMAX-12", false,   true , true , "real time signal 18");
-AddSignal (53,   "SIGRTMAX-11", "RTMAX-11", false,   true , true , "real time signal 19");
-AddSignal (54,   "SIGRTMAX-10", "RTMAX-10", false,   true , true , "real time signal 20");
-AddSignal (55,   "SIGRTMAX-9",  "RTMAX-9",  false,   true , true , "real time signal 21");
-AddSignal (56,   "SIGRTMAX-8",  "RTMAX-8",  false,   true , true , "real time signal 22");
-AddSignal (57,   "SIGRTMAX-7",  "RTMAX-7",  false,   true , true , "real time signal 23");
-AddSignal (58,   "SIGRTMAX-6",  "RTMAX-6",  false,   true , true , "real time signal 24");
-AddSignal (59,   "SIGRTMAX-5",  "RTMAX-5",  false,   true , true , "real time signal 25");
-AddSignal (60,   "SIGRTMAX-4",  "RTMAX-4",  false,   true , true , "real time signal 26");
-AddSignal (61,   "SIGRTMAX-3",  "RTMAX-3",  false,   true , true , "real time signal 27");
-AddSignal (62,   "SIGRTMAX-2",  "RTMAX-2",  false,   true , true , "real time signal 28");
-AddSignal (63,   "SIGRTMAX-1",  "RTMAX-1",  false,   true , true , "real time signal 29");
-AddSignal (64,   "SIGRTMAX","RTMAX",false,   true , true , "real time signal 30");
+AddSignal (32,   "SIG32",   "SIG32",false,   false, false, "threading library internal signal 1");
+AddSignal (33,   "SIG33",   "SIG33",false,   false, false, "threading library internal signal 2");
+AddSignal (34,   "SIGRTMIN","RTMIN",false,   false, false, "real time signal 0");
+AddSignal (35,   "SIGRTMIN+1",  "RTMIN+1",  false,   false, false, "real time signal 1");
+AddSignal (36,   "SIGRTMIN+2",  "RTMIN+2",  false,   false, false, "real time signal 2");
+AddSignal (37,   "SIGRTMIN+3",  "RTMIN+3",  false,   false, false, "real time signal 3");
+AddSignal (38,   "SIGRTMIN+4",  "RTMIN+4",  false,   false, false, "real time s

Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Tamas Berghammer via lldb-commits
tberghammer added a subscriber: tberghammer.
tberghammer added a comment.

Generally looks good to me with a few minor comments, but please wait for a 
review from Greg or Jim.



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3201
@@ +3200,3 @@
+
+if (attributes.ExtractFormValueAtIndex(i, form_value) && attr 
== DW_AT_type)
+return dwarf->ResolveTypeUID(DIERef(form_value).GetUID());

(nit): Please swap the order of the condition as ExtractFormValueAtIndex will 
be slower then the comparision


Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3883-3884
@@ +3882,4 @@
+{
+dw_offset_t spec_uid = form_value.Reference();
+if (UserIDMatches(spec_uid))
+{

This check don't make sense here because dw_offset_t is 32bit and and 
UserIDMatches expects a 64bit value ant checks the symbol file id against the 
upper 32bit.


Comment at: test/lang/cpp/nsimport/TestCppNsImport.py:19
@@ -18,2 +18,3 @@
 
+@expectedFailureAll
 @dwarf_test

Please add a bug number, or at least a short comment about why this test is 
XFAIL-ed


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12746: The pipe2(2) call is supported on NetBSD

2015-09-14 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Please commit it if it's OK.


Repository:
  rL LLVM

http://reviews.llvm.org/D12746



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


Re: [Lldb-commits] [PATCH] D12659: Use SI_KERNEL on platforms defining it

2015-09-14 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Please commit it if it's OK.


Repository:
  rL LLVM

http://reviews.llvm.org/D12659



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


[Lldb-commits] [lldb] r247552 - Remove XTIMEOUT from TestChangeProcessGroup on linux

2015-09-14 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Sep 14 07:31:47 2015
New Revision: 247552

URL: http://llvm.org/viewvc/llvm-project?rev=247552&view=rev
Log:
Remove XTIMEOUT from TestChangeProcessGroup on linux

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=247552&r1=247551&r2=247552&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Mon Sep 14 07:31:47 2015
@@ -673,7 +673,6 @@ def getExpectedTimeouts(platform_name):
 "TestMultithreaded.py",
 "TestRegisters.py",  # ~12/600 dosep runs (build 3120-3122)
 "TestThreadStepOut.py",
-"TestChangeProcessGroup.py",
 }
 elif target.startswith("android"):
 expected_timeout |= {


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


[Lldb-commits] [lldb] r247558 - Limit scope of RegisterContextPOSIX.h header

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 08:16:59 2015
New Revision: 247558

URL: http://llvm.org/viewvc/llvm-project?rev=247558&view=rev
Log:
Limit scope of RegisterContextPOSIX.h header

RegisterContextPOSIX.h is poorly named and contains only the declaration
of POSIXBreakpointProtocol, which is used for in-process live kernel
debugging. It is now relevant only to FreeBSD.

In source/Plugins/Process/Utility/RegisterContext*.h (after assorted
rework and refactoring) it only served the purpose of #including other
necessary headers as a side-effect. Remove it from them and just include
the required headers directly.

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

Modified:

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.h

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp

lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp

lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp

lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp

lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp

Modified: 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h?rev=247558&r1=247557&r2=247558&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
 Mon Sep 14 08:16:59 2015
@@ -10,6 +10,7 @@
 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
 #define liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
 
+#include "RegisterContextPOSIX.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
 
 class RegisterContextPOSIXProcessMonitor_arm:

Modified: 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h?rev=247558&r1=247557&r2=247558&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h
 Mon Sep 14 08:16:59 2015
@@ -10,6 +10,7 @@
 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_arm64_H_
 #define liblldb_RegisterContextPOSIXProcessMonitor_arm64_H_
 
+#include "RegisterContextPOSIX.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h"
 
 class RegisterContextPOSIXProcessMonitor_arm64:

Modified: 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h?rev=247558&r1=247557&r2=247558&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
 Mon Sep 14 08:16:59 2015
@@ -10,6 +10,7 @@
 #ifndef liblldb_RegisterContextPOSIXProc

Re: [Lldb-commits] [PATCH] D12830: Limit scope of RegisterContextPOSIX.h header

2015-09-14 Thread Ed Maste via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247558: Limit scope of RegisterContextPOSIX.h header 
(authored by emaste).

Changed prior to commit:
  http://reviews.llvm.org/D12830?vs=34631&id=34666#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12830

Files:
  
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
  
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h
  
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
  
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.h
  
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_i386.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
  lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
  lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
  lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
  
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
  lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp

Index: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
===
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Target/Thread.h"
-#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
 #include "RegisterContextPOSIXCore_mips64.h"
 
 using namespace lldb_private;
Index: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
===
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Target/Thread.h"
-#include "RegisterContextPOSIX.h"
 #include "RegisterContextPOSIXCore_powerpc.h"
 
 using namespace lldb_private;
Index: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
===
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Target/Thread.h"
-#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
 #include "RegisterContextPOSIXCore_arm.h"
 
 using namespace lldb_private;
Index: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
===
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Target/Thread.h"
-#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
 #include "RegisterContextPOSIXCore_x86_64.h"
 
 using namespace lldb_private;
Index: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
===
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Tar

[Lldb-commits] [lldb] r247561 - Move RegisterContextPOSIX.h to FreeBSD subdir

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:20:56 2015
New Revision: 247561

URL: http://llvm.org/viewvc/llvm-project?rev=247561&view=rev
Log:
Move RegisterContextPOSIX.h to FreeBSD subdir

It is now used only by the FreeBSD in-process ptrace implementation.

Added:
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h
  - copied unchanged from r247557, 
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h
Removed:
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h
Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h?rev=247561&r1=247560&r2=247561&view=diff
==
--- lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.h Mon Sep 14 
09:20:56 2015
@@ -16,7 +16,7 @@
 
 // Other libraries and framework includes
 #include "lldb/Target/Thread.h"
-#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
+#include "RegisterContextPOSIX.h"
 
 class ProcessMessage;
 class ProcessMonitor;

Removed: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h?rev=247560&view=auto
==
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX.h (removed)
@@ -1,79 +0,0 @@
-//===-- RegisterContextPOSIX.h *- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#ifndef liblldb_RegisterContextPOSIX_H_
-#define liblldb_RegisterContextPOSIX_H_
-
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
-#include "lldb/Target/RegisterContext.h"
-#include "RegisterInfoInterface.h"
-
-//--
-/// @class POSIXBreakpointProtocol
-///
-/// @brief Extends RegisterClass with a few virtual operations useful on POSIX.
-class POSIXBreakpointProtocol
-{
-public:
-POSIXBreakpointProtocol()
-{ m_watchpoints_initialized = false; }
-virtual ~POSIXBreakpointProtocol() {}
-
-/// Updates the register state of the associated thread after hitting a
-/// breakpoint (if that make sense for the architecture).  Default
-/// implementation simply returns true for architectures which do not
-/// require any update.
-///
-/// @return
-///True if the operation succeeded and false otherwise.
-virtual bool UpdateAfterBreakpoint() = 0;
-
-/// Determines the index in lldb's register file given a kernel byte 
offset.
-virtual unsigned
-GetRegisterIndexFromOffset(unsigned offset) = 0;
-
-// Checks to see if a watchpoint specified by hw_index caused the inferior
-// to stop.
-virtual bool
-IsWatchpointHit (uint32_t hw_index) = 0;
-
-// Resets any watchpoints that have been hit.
-virtual bool
-ClearWatchpointHits () = 0;
-
-// Returns the watchpoint address associated with a watchpoint hardware
-// index.
-virtual lldb::addr_t
-GetWatchpointAddress (uint32_t hw_index) = 0;
-
-virtual bool
-IsWatchpointVacant (uint32_t hw_index) = 0;
-
-virtual bool
-SetHardwareWatchpointWithIndex (lldb::addr_t addr, size_t size,
-bool read, bool write,
-uint32_t hw_index) = 0;
-
-// From lldb_private::RegisterContext
-virtual uint32_t
-NumSupportedHardwareWatchpoints () = 0;
-
-// Force m_watchpoints_initialized to TRUE
-void
-ForceWatchpointsInitialized () {m_watchpoints_initialized = true;}
-
-protected:
-bool m_watchpoints_initialized;
-};
-
-#endif // #ifndef liblldb_RegisterContextPOSIX_H_
-


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


[Lldb-commits] [lldb] r247562 - Remove expectedFailureFreeBSD from passing test_process_list

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:27:05 2015
New Revision: 247562

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

This test passes locally but was marked XFAIL due to failures on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place.

llvm.org/pr23747

Modified:
lldb/trunk/test/functionalities/platform/TestPlatformCommand.py

Modified: lldb/trunk/test/functionalities/platform/TestPlatformCommand.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/platform/TestPlatformCommand.py?rev=247562&r1=247561&r2=247562&view=diff
==
--- lldb/trunk/test/functionalities/platform/TestPlatformCommand.py (original)
+++ lldb/trunk/test/functionalities/platform/TestPlatformCommand.py Mon Sep 14 
09:27:05 2015
@@ -18,7 +18,6 @@ class PlatformCommandTestCase(TestBase):
 self.expect("platform list",
 patterns = ['^Available platforms:'])
 
-@expectedFailureFreeBSD("llvm.org/pr23747 failing on the buildbot")
 def test_process_list(self):
 self.expect("platform process list",
 substrs = ['PID', 'TRIPLE', 'NAME'])


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


[Lldb-commits] [lldb] r247563 - Remove expectedFailureFreeBSD from passing test_with_dwarf_formatters_api

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:31:46 2015
New Revision: 247563

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

llvm.org/pr24282

Modified:
lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py

Modified: lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py?rev=247563&r1=247562&r2=247563&view=diff
==
--- lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py (original)
+++ lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py Mon Sep 14 
09:31:46 2015
@@ -19,7 +19,6 @@ class SBFormattersAPITestCase(TestBase):
 self.setTearDownCleanup()
 self.formatters()
 
-@expectedFailureFreeBSD("llvm.org/pr24282 Empty2 fails")
 @python_api_test
 @dwarf_test
 def test_with_dwarf_formatters_api(self):


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


[Lldb-commits] [lldb] r247564 - Remove expectedFailureFreeBSD from passing test_inferior_asserting_disassemble

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:40:22 2015
New Revision: 247564

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

llvm.org/pr18533

Modified:
lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py

Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=247564&r1=247563&r2=247564&view=diff
==
--- lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py 
(original)
+++ lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Mon 
Sep 14 09:40:22 2015
@@ -38,7 +38,6 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_registers()
 
 @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of 
linux-vdso.so to unwind stacks properly")
-@expectedFailureFreeBSD('llvm.org/pr18533 - PC in __assert frame is 
outside of function')
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
 def test_inferior_asserting_disassemble(self):
 """Test that lldb reliably disassembles frames after asserting 
(command)."""


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


[Lldb-commits] [lldb] r247565 - Enable StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:41:58 2015
New Revision: 247565

URL: http://llvm.org/viewvc/llvm-project?rev=247565&view=rev
Log:
Enable 
StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf 
on FreeBSD

This test passes locally but was disabled due to pexpect issues on the
FreeBSD buildbot. That buildbot has been retired as it was overloaded,
and we will investigate again if this fails once a new buildbot is in
place. Noted by John Wolfe.

llvm.org/pr22784

This re-applies r247013.

Modified:

lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py

Modified: 
lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py?rev=247565&r1=247564&r2=247565&view=diff
==
--- 
lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
 (original)
+++ 
lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
 Mon Sep 14 09:41:58 2015
@@ -23,7 +23,6 @@ class StopHookForMultipleThreadsTestCase
 @expectedFlakeyFreeBSD("llvm.org/pr15037")
 @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to 
fire on Linux
 @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement 
for windows")
-@skipIfFreeBSD # Can cause an indefinite hang in dotest.py on FreeBSD
 def test_stop_hook_multiple_threads_with_dwarf(self):
 """Test that lldb stop-hook works for multiple threads."""
 self.buildDwarf(dictionary=self.d)


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


[Lldb-commits] [lldb] r247566 - Add expectedFlakeyFreeBSD to TestMultithreaded tests

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 09:42:22 2015
New Revision: 247566

URL: http://llvm.org/viewvc/llvm-project?rev=247566&view=rev
Log:
Add expectedFlakeyFreeBSD to TestMultithreaded tests

One or more of these tests failed in 25 of 100 dotest.py runs.

Modified:
lldb/trunk/test/api/multithreaded/TestMultithreaded.py

Modified: lldb/trunk/test/api/multithreaded/TestMultithreaded.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multithreaded/TestMultithreaded.py?rev=247566&r1=247565&r2=247566&view=diff
==
--- lldb/trunk/test/api/multithreaded/TestMultithreaded.py (original)
+++ lldb/trunk/test/api/multithreaded/TestMultithreaded.py Mon Sep 14 09:42:22 
2015
@@ -30,6 +30,7 @@ class SBBreakpointCallbackCase(TestBase)
 
 @skipIfRemote
 @skipIfNoSBHeaders
+@expectedFlakeyFreeBSD
 @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.9"], archs=["x86_64"])
 @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
 def test_sb_api_listener_event_description(self):
@@ -40,6 +41,7 @@ class SBBreakpointCallbackCase(TestBase)
 
 @skipIfRemote
 @skipIfNoSBHeaders
+@expectedFlakeyFreeBSD
 @expectedFlakeyLinux # Driver occasionally returns '1' as exit status
 @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.9"], archs=["x86_64"])
 @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
@@ -54,6 +56,7 @@ class SBBreakpointCallbackCase(TestBase)
 
 @skipIfRemote
 @skipIfNoSBHeaders
+@expectedFlakeyFreeBSD
 @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", 
compiler_version=[">=","4.8"], archs=["x86_64"])
 @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support 
throw or catch
 def test_sb_api_listener_resume(self):


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


[Lldb-commits] [lldb] r247567 - Removed XFAIL marker from passing tests, rdars 18684124, 15367233

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 09:48:53 2015
New Revision: 247567

URL: http://llvm.org/viewvc/llvm-project?rev=247567&view=rev
Log:
Removed XFAIL marker from passing tests, rdars 18684124, 15367233

Related to these two test case classes:
test/driver/batch_mode/TestBatchMode.py
test/functionalities/inferior-assert/TestInferiorAssert.py


Modified:
lldb/trunk/test/driver/batch_mode/TestBatchMode.py
lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py

Modified: lldb/trunk/test/driver/batch_mode/TestBatchMode.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/driver/batch_mode/TestBatchMode.py?rev=247567&r1=247566&r2=247567&view=diff
==
--- lldb/trunk/test/driver/batch_mode/TestBatchMode.py (original)
+++ lldb/trunk/test/driver/batch_mode/TestBatchMode.py Mon Sep 14 09:48:53 2015
@@ -16,7 +16,6 @@ class DriverBatchModeTest (TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
-@unittest2.expectedFailure(", lldb doesn't 
reliably print the prompt when run under pexpect")
 @dsym_test
 def test_driver_batch_mode_with_dsym(self):
 """Test that the lldb driver's batch mode works correctly."""
@@ -24,7 +23,6 @@ class DriverBatchModeTest (TestBase):
 self.setTearDownCleanup()
 self.batch_mode ()
 
-@unittest2.expectedFailure(", lldb doesn't 
reliably print the prompt when run under pexpect")
 @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for 
windows")
 @dwarf_test
 def test_driver_batch_mode_with_dwarf(self):

Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=247567&r1=247566&r2=247567&view=diff
==
--- lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py 
(original)
+++ lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Mon 
Sep 14 09:48:53 2015
@@ -10,14 +10,12 @@ class AssertingInferiorTestCase(TestBase
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
-@unittest2.expectedFailure("rdar://15367233")
 def test_inferior_asserting_dsym(self):
 """Test that lldb reliably catches the inferior asserting (command)."""
 self.buildDsym()
 self.inferior_asserting()
 
 @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of 
linux-vdso.so to unwind stacks properly")
-@expectedFailureDarwin("rdar://15367233")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
 def test_inferior_asserting_dwarf(self):
 """Test that lldb reliably catches the inferior asserting (command)."""
@@ -52,14 +50,12 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_python()
 
 @skipUnlessDarwin
-@unittest2.expectedFailure("rdar://15367233")
 def test_inferior_asserting_expr_dsym(self):
 """Test that the lldb expression interpreter can read from the 
inferior after asserting (command)."""
 self.buildDsym()
 self.inferior_asserting_expr()
 
 @expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of 
linux-vdso.so to unwind stacks properly')
-@unittest2.expectedFailure("rdar://15367233")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
 def test_inferior_asserting_expr_dwarf(self):
 """Test that the lldb expression interpreter can read from the 
inferior after asserting (command)."""
@@ -67,14 +63,12 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_expr()
 
 @skipUnlessDarwin
-@unittest2.expectedFailure("rdar://15367233")
 def test_inferior_asserting_step_dsym(self):
 """Test that lldb functions correctly after stepping through a call to 
assert()."""
 self.buildDsym()
 self.inferior_asserting_step()
 
 @expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of 
linux-vdso.so to unwind stacks properly")
-@expectedFailureDarwin("rdar://15367233")
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
 def test_inferior_asserting_step_dwarf(self):
 """Test that lldb functions correctly after stepping through a call to 
assert()."""


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


[Lldb-commits] Missing enum OMPArraySection case in ClangASTContext::GetEncoding

2015-09-14 Thread Ed Maste via lldb-commits
On 29 June 2015 at 11:17, Ed Maste  wrote:
> On 24 June 2015 at 19:13, Enrico Granata  wrote:
>> Author: enrico
>> Date: Wed Jun 24 18:13:23 2015
>> New Revision: 240606
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=240606&view=rev
>> Log:
>> Handle (or at least don't crash) trying to get the encoding for a bunch of 
>> new builtin types in clang trunk
>
> This introduces a warning now that all enum values are covered in the switch.
>
> ../tools/lldb/source/Symbol/ClangASTType.cpp:2215:13: warning: default
> label in switch which covers all enumeration values
> [-Wcovered-switch-default]
> default: assert(0 && "Unknown builtin type!");

I've been running locally with a patch to remove the default case here
to eliminate the warning, and as a result I see a warning for a newly
added unhandled enum:

../tools/lldb/source/Symbol/ClangASTContext.cpp:4309:21: warning:
enumeration value 'OMPArraySection' not handled in switch [-Wswitch]

My suggestion is that we remove the default when adding the case for
OMPArraySection.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247568 - The pipe2(2) call is supported on NetBSD

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 10:12:49 2015
New Revision: 247568

URL: http://llvm.org/viewvc/llvm-project?rev=247568&view=rev
Log:
The pipe2(2) call is supported on NetBSD

Patch by Kamil Rytarowski.

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

Modified:
lldb/trunk/source/Host/posix/PipePosix.cpp

Modified: lldb/trunk/source/Host/posix/PipePosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/PipePosix.cpp?rev=247568&r1=247567&r2=247568&view=diff
==
--- lldb/trunk/source/Host/posix/PipePosix.cpp (original)
+++ lldb/trunk/source/Host/posix/PipePosix.cpp Mon Sep 14 10:12:49 2015
@@ -36,9 +36,9 @@ int PipePosix::kInvalidDescriptor = -1;
 
 enum PIPES { READ, WRITE }; // Constants 0 and 1 for READ and WRITE
 
-// pipe2 is supported by Linux, FreeBSD v10 and higher.
+// pipe2 is supported by a limited set of platforms
 // TODO: Add more platforms that support pipe2.
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) || 
defined(__NetBSD__)
 #define PIPE2_SUPPORTED 1
 #else
 #define PIPE2_SUPPORTED 0


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


Re: [Lldb-commits] [PATCH] D12746: The pipe2(2) call is supported on NetBSD

2015-09-14 Thread Ed Maste via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247568: The pipe2(2) call is supported on NetBSD (authored 
by emaste).

Changed prior to commit:
  http://reviews.llvm.org/D12746?vs=34512&id=34674#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12746

Files:
  lldb/trunk/source/Host/posix/PipePosix.cpp

Index: lldb/trunk/source/Host/posix/PipePosix.cpp
===
--- lldb/trunk/source/Host/posix/PipePosix.cpp
+++ lldb/trunk/source/Host/posix/PipePosix.cpp
@@ -36,9 +36,9 @@
 
 enum PIPES { READ, WRITE }; // Constants 0 and 1 for READ and WRITE
 
-// pipe2 is supported by Linux, FreeBSD v10 and higher.
+// pipe2 is supported by a limited set of platforms
 // TODO: Add more platforms that support pipe2.
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) || 
defined(__NetBSD__)
 #define PIPE2_SUPPORTED 1
 #else
 #define PIPE2_SUPPORTED 0


Index: lldb/trunk/source/Host/posix/PipePosix.cpp
===
--- lldb/trunk/source/Host/posix/PipePosix.cpp
+++ lldb/trunk/source/Host/posix/PipePosix.cpp
@@ -36,9 +36,9 @@
 
 enum PIPES { READ, WRITE }; // Constants 0 and 1 for READ and WRITE
 
-// pipe2 is supported by Linux, FreeBSD v10 and higher.
+// pipe2 is supported by a limited set of platforms
 // TODO: Add more platforms that support pipe2.
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) || defined(__NetBSD__)
 #define PIPE2_SUPPORTED 1
 #else
 #define PIPE2_SUPPORTED 0
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247571 - Fix a possible SEGV in SymbolFileDWARF

2015-09-14 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Mon Sep 14 10:44:29 2015
New Revision: 247571

URL: http://llvm.org/viewvc/llvm-project?rev=247571&view=rev
Log:
Fix a possible SEGV in SymbolFileDWARF

The iterator pointing to an element of a dense map was used after
the element from was removed from the map what isn't guaranteed to be
valid at that time.

Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=247571&r1=247570&r2=247571&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Sep 14 
10:44:29 2015
@@ -1513,15 +1513,16 @@ SymbolFileDWARF::CompleteType (CompilerT
 // We have already resolved this type...
 return true;
 }
+
+DWARFDebugInfo* debug_info = DebugInfo();
+DWARFDIE dwarf_die = debug_info->GetDIE(die_it->getSecond());
+
 // Once we start resolving this type, remove it from the forward 
declaration
 // map in case anyone child members or other types require this type to 
get resolved.
 // The type will get resolved when all of the calls to 
SymbolFileDWARF::ResolveClangOpaqueTypeDefinition
 // are done.
-GetForwardDeclClangTypeToDie().erase 
(clang_type_no_qualifiers.GetOpaqueQualType());
+GetForwardDeclClangTypeToDie().erase (die_it);
 
-DWARFDebugInfo* debug_info = DebugInfo();
-
-DWARFDIE dwarf_die = debug_info->GetDIE(die_it->getSecond());
 Type *type = GetDIEToType().lookup (dwarf_die.GetDIE());
 
 Log *log 
(LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION));


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


[Lldb-commits] [lldb] r247574 - Skip TestBatchMode for remote platforms

2015-09-14 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Sep 14 11:11:11 2015
New Revision: 247574

URL: http://llvm.org/viewvc/llvm-project?rev=247574&view=rev
Log:
Skip TestBatchMode for remote platforms

the test does not know how to run executables on the remote platform.

Modified:
lldb/trunk/test/driver/batch_mode/TestBatchMode.py

Modified: lldb/trunk/test/driver/batch_mode/TestBatchMode.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/driver/batch_mode/TestBatchMode.py?rev=247574&r1=247573&r2=247574&view=diff
==
--- lldb/trunk/test/driver/batch_mode/TestBatchMode.py (original)
+++ lldb/trunk/test/driver/batch_mode/TestBatchMode.py Mon Sep 14 11:11:11 2015
@@ -16,6 +16,7 @@ class DriverBatchModeTest (TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
+@skipIfRemote # test not remote-ready llvm.org/pr24813
 @dsym_test
 def test_driver_batch_mode_with_dsym(self):
 """Test that the lldb driver's batch mode works correctly."""
@@ -24,6 +25,7 @@ class DriverBatchModeTest (TestBase):
 self.batch_mode ()
 
 @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for 
windows")
+@skipIfRemote # test not remote-ready llvm.org/pr24813
 @dwarf_test
 def test_driver_batch_mode_with_dwarf(self):
 """Test that the lldb driver's batch mode works correctly."""


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


Re: [Lldb-commits] [PATCH] D12791: Complete register kind naming cleanups in lldb -- required touching all register table definitions

2015-09-14 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

I tried out this change and it compiles both on Linux and on arm, but it causes 
2 test failure:
TestLldbGdbServer.LldbGdbServerTestCase.test_qRegisterInfo_returns_all_valid_results_llgs_dwarf
TestLldbGdbServer.LldbGdbServerTestCase.test_qRegisterInfo_returns_one_valid_result_llgs_dwarf


http://reviews.llvm.org/D12791



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


[Lldb-commits] [lldb] r247576 - Cleaned up a few unexpected successes on OS X

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 11:25:34 2015
New Revision: 247576

URL: http://llvm.org/viewvc/llvm-project?rev=247576&view=rev
Log:
Cleaned up a few unexpected successes on OS X

TestCallStdStringFunction
TestCallWithTimeout
TestConstVariables
TestClassTypes

Modified:

lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py

Modified: 
lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py?rev=247576&r1=247575&r2=247576&view=diff
==
--- 
lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py 
(original)
+++ 
lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py 
Mon Sep 14 11:25:34 2015
@@ -20,7 +20,6 @@ class ExprCommandCallFunctionTestCase(Te
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin(16361880) # , we get the 
result correctly, but fail to invoke the Summary formatter.
 def test_with_dsym(self):
 """Test calling std::String member function."""
 self.buildDsym()
@@ -29,7 +28,6 @@ class ExprCommandCallFunctionTestCase(Te
 @dwarf_test
 @expectedFailureFreeBSD('llvm.org/pr17807') # Fails on FreeBSD buildbot
 @expectedFailureIcc # llvm.org/pr14437, fails with ICC 13.1
-@expectedFailureDarwin(16361880) # , we get the 
result correctly, but fail to invoke the Summary formatter.
 @expectedFailureWindows("llvm.org/pr21765")
 def test_with_dwarf(self):
 """Test calling std::String member function."""

Modified: lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py?rev=247576&r1=247575&r2=247576&view=diff
==
--- lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py (original)
+++ lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py Mon Sep 
14 11:25:34 2015
@@ -21,7 +21,6 @@ class ExprCommandWithTimeoutsTestCase(Te
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin # failed 1/134 runs, line 83, value.IsValid() 
 def test_with_dsym(self):
 """Test calling std::String member function."""
 self.buildDsym()

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247576&r1=247575&r2=247576&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
11:25:34 2015
@@ -11,13 +11,12 @@ class ConstVariableTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @dsym_test
-@unittest2.expectedFailure(13314878)
 def test_with_dsym_and_run_command(self):
 """Test interpreted and JITted expressions on constant values."""
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureClang('13314878') # This test works with gcc, but fails 
with newer version of clang on Linux due to a clang issue. Fails for icc as 
well. Bug number TDB.
+@expectedFailureAll(oslist=["linux"], compiler=["clang", "icc"])
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")
 @dwarf_test

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=247576&r1=247575&r2=247576&view=diff
==
--- lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py Mon Sep 14 11:25:34 
2015
@@ -63,7 +63,6 @@ class ClassTypesTestCase(TestBase):
 # rdar://problem/8557478
 # test/class_types test failures: runCmd: expr this->m_c_int
 @dsym_test
-@expectedFailureDarwin(16362674)
 def test_with_dsym_and_constructor_name(self):
 """Test 'frame variable this' and 'expr this' when stopped inside a 
constructor."""
 self.buildDsym()
@@ -73,7 +72,6 @@ class ClassTypesTestCase(TestBase):
 # test/class_types test failures: runCmd: expr this->m_c_int
 @dwarf_test
 @expectedFailureFreeBSD('llvm.org/pr14540')
-@expectedFailureDarwin(16362674)
 def test_with_dw

Re: [Lldb-commits] [PATCH] D12831: Add JUnit/XUnit-formatted output to the lldb test run system

2015-09-14 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/D12831



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


[Lldb-commits] [lldb] r247579 - Use SI_KERNEL on platforms defining it

2015-09-14 Thread Stephane Sezer via lldb-commits
Author: sas
Date: Mon Sep 14 11:51:58 2015
New Revision: 247579

URL: http://llvm.org/viewvc/llvm-project?rev=247579&view=rev
Log:
Use SI_KERNEL on platforms defining it

Summary:
Linux and FreeBSD occasionally send SI_KERNEL codes, nonexistent on other 
platforms.

Problem caught on NetBSD.

Reviewers: joerg, sas

Subscribers: sas, lldb-commits, emaste

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

Change by Kamil Rytarowski 

Modified:
lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp

Modified: lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp?rev=247579&r1=247578&r2=247579&view=diff
==
--- lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp Mon Sep 14 11:51:58 
2015
@@ -28,11 +28,12 @@ GetCrashReasonForSIGSEGV(const siginfo_t
 
 switch (info.si_code)
 {
+#ifdef SI_KERNEL
 case SI_KERNEL:
-// Linux will occasionally send spurious SI_KERNEL codes.
-// (this is poorly documented in sigaction)
+// Some platforms will occasionally send nonstandard spurious 
SI_KERNEL codes.
 // One way to get this is via unaligned SIMD loads.
 return CrashReason::eInvalidAddress; // for lack of anything better
+#endif
 case SEGV_MAPERR:
 return CrashReason::eInvalidAddress;
 case SEGV_ACCERR:


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


Re: [Lldb-commits] [PATCH] D12659: Use SI_KERNEL on platforms defining it

2015-09-14 Thread Stephane Sezer via lldb-commits
sas closed this revision.
sas added a comment.

Committed as r247579.


Repository:
  rL LLVM

http://reviews.llvm.org/D12659



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


Re: [Lldb-commits] [PATCH] D12794: [MIPS] Add support for DT_MIPS_RLD_MAP_REL

2015-09-14 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.


Repository:
  rL LLVM

http://reviews.llvm.org/D12794



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


Re: [Lldb-commits] [PATCH] D12804: Fix several issues around dwo symbol file handling

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

Just can't check for zero in SymbolFileDWARF, other than that it looks good.



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2242-2248
@@ -2241,2 +2241,9 @@
 lldb::addr_t highest_func_addr = func_ranges.GetMaxRangeEnd (0);
+
+// lowest_func_addr is a file address what can't be 0 because at 
address 0 we should have the
+// file header. It is 0 if the linker optimized out the given function 
when we don't want to
+// return an invalid function object.
+if (lowest_func_addr == 0)
+return nullptr;
+
 if (lowest_func_addr != LLDB_INVALID_ADDRESS && lowest_func_addr <= 
highest_func_addr)

This actually can be zero for functions in a .o file. So this must be removed 
or you must fix it in a different way. 


http://reviews.llvm.org/D12804



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


Re: [Lldb-commits] [PATCH] D12804: Fix several issues around dwo symbol file handling

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

I meant can't check for zero function start address in DWARFASTParserClang.cpp.


http://reviews.llvm.org/D12804



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


Re: [Lldb-commits] [PATCH] D12804: Fix several issues around dwo symbol file handling

2015-09-14 Thread Tamas Berghammer via lldb-commits
tberghammer added inline comments.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2242-2248
@@ -2241,2 +2241,9 @@
 lldb::addr_t highest_func_addr = func_ranges.GetMaxRangeEnd (0);
+
+// lowest_func_addr is a file address what can't be 0 because at 
address 0 we should have the
+// file header. It is 0 if the linker optimized out the given function 
when we don't want to
+// return an invalid function object.
+if (lowest_func_addr == 0)
+return nullptr;
+
 if (lowest_func_addr != LLDB_INVALID_ADDRESS && lowest_func_addr <= 
highest_func_addr)

clayborg wrote:
> This actually can be zero for functions in a .o file. So this must be removed 
> or you must fix it in a different way. 
Is there any case when the code is executed from the object file directly and 
not from the shared library? On Linux I am pretty sure it can't happen, but I 
am not sure about OSX.

If the function is executed from the shared library then the lowest_func_addr 
should be already offsetted by the object file base address at this point


http://reviews.llvm.org/D12804



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


[Lldb-commits] [PATCH] D12849: Add support for DW_OP_GNU_const_index to dwarf expression

2015-09-14 Thread Tamas Berghammer via lldb-commits
tberghammer created this revision.
tberghammer added a reviewer: clayborg.
tberghammer added a subscriber: lldb-commits.

Add support for DW_OP_GNU_const_index to dwarf expression

DW_OP_GNU_const_index is a new opcode used when split dwarf is enabled

http://reviews.llvm.org/D12849

Files:
  include/lldb/Expression/DWARFExpression.h
  source/Expression/DWARFExpression.cpp
  source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
  test/lang/c/const_variables/Makefile

Index: test/lang/c/const_variables/Makefile
===
--- test/lang/c/const_variables/Makefile
+++ test/lang/c/const_variables/Makefile
@@ -2,6 +2,6 @@
 
 C_SOURCES := main.c functions.c
 
-CFLAGS ?= -g -O3
+CFLAGS_EXTRAS += -O3
 
 include $(LEVEL)/Makefile.rules
Index: source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
@@ -150,6 +150,7 @@
 case DW_OP_regx:
 size = 128; break;
 case DW_OP_GNU_addr_index:
+case DW_OP_GNU_const_index:
 size = 128; break;
 default:
 s.Printf("UNKNOWN ONE-OPERAND OPCODE, #%u", opcode);
Index: source/Expression/DWARFExpression.cpp
===
--- source/Expression/DWARFExpression.cpp
+++ source/Expression/DWARFExpression.cpp
@@ -199,6 +199,7 @@
 case 0x99: return "DW_OP_call4";
 case 0x9a: return "DW_OP_call_ref";
 case 0xfb: return "DW_OP_GNU_addr_index";
+case 0xfc: return "DW_OP_GNU_const_index";
 //case DW_OP_APPLE_array_ref: return "DW_OP_APPLE_array_ref";
 //case DW_OP_APPLE_extern: return "DW_OP_APPLE_extern";
 case DW_OP_APPLE_uninit: return "DW_OP_APPLE_uninit";
@@ -637,6 +638,9 @@
 case DW_OP_GNU_addr_index:  // 0xfb
 s->Printf("DW_OP_GNU_addr_index(0x%" PRIx64 ")", m_data.GetULEB128(&offset));
 break;
+case DW_OP_GNU_const_index: // 0xfc
+s->Printf("DW_OP_GNU_const_index(0x%" PRIx64 ")", m_data.GetULEB128(&offset));
+break;
 case DW_OP_GNU_push_tls_address:
 s->PutCString("DW_OP_GNU_push_tls_address");  // 0xe0
 break;
@@ -1040,9 +1044,10 @@
 case DW_OP_regx:// 0x90 1 ULEB128 register
 case DW_OP_fbreg:   // 0x91 1 SLEB128 offset
 case DW_OP_piece:   // 0x93 1 ULEB128 size of piece addressed
-case DW_OP_GNU_addr_index: // 0xfb 1 ULEB128 index
+case DW_OP_GNU_addr_index:  // 0xfb 1 ULEB128 index
+case DW_OP_GNU_const_index: // 0xfc 1 ULEB128 index
 data.Skip_LEB128(&offset); 
-return offset - data_offset;   
+return offset - data_offset;
 
 // All opcodes that have a 2 ULEB (signed or unsigned) arguments
 case DW_OP_bregx:   // 0x92 2 ULEB128 register followed by SLEB128 offset
@@ -3022,7 +3027,7 @@
 if (!dwarf_cu)
 {
 if (error_ptr)
-error_ptr->SetErrorString ("DW_OP_GNU_addr_index found without a compile being specified");
+error_ptr->SetErrorString ("DW_OP_GNU_addr_index found without a compile unit being specified");
 return false;
 }
 uint64_t index = opcodes.GetULEB128(&offset);
@@ -3035,6 +3040,43 @@
 }
 break;
 
+//--
+// OPCODE: DW_OP_GNU_const_index
+// OPERANDS: 1
+//  ULEB128: index to the .debug_addr section
+// DESCRIPTION: Pushes an constant with the size of a machine address to
+// the stack from the .debug_addr section with the base address specified
+// by the DW_AT_addr_base attribute and the 0 based index is the ULEB128
+// encoded index.
+//--
+case DW_OP_GNU_const_index:
+{
+if (!dwarf_cu)
+{
+if (error_ptr)
+error_ptr->SetErrorString ("DW_OP_GNU_const_index found without a compile unit being specified");
+return false;
+}
+uint64_t index = opcodes.GetULEB128(&offset);
+uint32_t index_size = dwarf_cu->GetAddressByteSize();
+dw_offset_t addr_base = dwarf_cu->GetAddrBase();
+lldb::offset_t offset = addr_base + index * index_size;
+const DWARFDataExtractor& debug_addr = dwarf_cu->GetSymbolFileDWARF()->get_debug_addr_data();
+switch (index_size)
+  

Re: [Lldb-commits] [PATCH] D12804: Fix several issues around dwo symbol file handling

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

I should clarify: mach-o files do have functions at zero and these are legal 
DWARF and we need to read this DWARF correctly. We might be able to ask the 
SymbolFile's ObjectFile about this address and if it can be a valid function 
address using:

  AddressClass ObjectFile::GetAddressClass (lldb::addr_t file_addr);



Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2243-2247
@@ +2242,7 @@
+
+// lowest_func_addr is a file address what can't be 0 because at 
address 0 we should have the
+// file header. It is 0 if the linker optimized out the given function 
when we don't want to
+// return an invalid function object.
+if (lowest_func_addr == 0)
+return nullptr;
+

We might be able to ask the SymbolFile's ObjectFile if zero can be a valid code 
address. Then this could would become:

```
if (lowest_func_addr == 0 && 
objfile->FileAddressIsValidForCode(lowest_func_addr)
{
}
```

Or we might be able to ask the address class of an address:

```
const AddressClass addr_class = obj_file->GetAddressClass (lowest_func_addr);
if (addr_class != eAddressClassCode && addr_class != 
eAddressClassCodeAlternateISA)
return nullptr;
```

We would need to make sure that an address of zero in a mach-o .o file returns 
eAddressClassCode or eAddressClassCodeAlternateISA type.



http://reviews.llvm.org/D12804



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


Re: [Lldb-commits] [lldb] r247576 - Cleaned up a few unexpected successes on OS X

2015-09-14 Thread Ed Maste via lldb-commits
On 14 September 2015 at 12:25, Todd Fiala via lldb-commits
 wrote:
>
> Author: tfiala
> Date: Mon Sep 14 11:25:34 2015
> New Revision: 247576
>
> URL: http://llvm.org/viewvc/llvm-project?rev=247576&view=rev
> Log:
> Cleaned up a few unexpected successes on OS X
> ...
> -@expectedFailureClang('13314878') # This test works with gcc, but fails 
> with newer version of clang on Linux due to a clang issue. Fails for icc as 
> well. Bug number TDB.
> +@expectedFailureAll(oslist=["linux"], compiler=["clang", "icc"])

I don't think the compiler can be a list (because it also allows for a
compiler version check) -- it needs to be split in two
expectedFailureAll AFAICT.
___
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-14 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

So let me try to understand. When we are asked during expressions to lookup 
some mangled named for "std::string::length()", it doesn't exist in GCC 
binaries. So we want to then find any alternate manglings and we do this by 
asking the symbol file to find alternate manglings for "std::string::length"? 
I.E. we remove the parens and any arguments and lookup just the fully qualified 
function name?

If so, we should just lookup functions using:

  size_t
  Module::FindFunctions (const ConstString &name,
 const CompilerDeclContext *parent_decl_ctx,
 uint32_t name_type_mask, 
 bool symbols_ok,
 bool inlines_ok,
 bool append, 
 SymbolContextList& sc_list);

And then look at all of the symbol contexts in sc_list and find a function that 
we want? I don't really see the need for any of the new 
SymbolFile::GetMangledNamesForFunction() functions.


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] [lldb] r247576 - Cleaned up a few unexpected successes on OS X

2015-09-14 Thread Todd Fiala via lldb-commits
Yep you're right, I just found this and verified it on Linux.  I'll get
that fixed ASAP.

On Mon, Sep 14, 2015 at 11:17 AM, Ed Maste  wrote:

> On 14 September 2015 at 12:25, Todd Fiala via lldb-commits
>  wrote:
> >
> > Author: tfiala
> > Date: Mon Sep 14 11:25:34 2015
> > New Revision: 247576
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=247576&view=rev
> > Log:
> > Cleaned up a few unexpected successes on OS X
> > ...
> > -@expectedFailureClang('13314878') # This test works with gcc, but
> fails with newer version of clang on Linux due to a clang issue. Fails for
> icc as well. Bug number TDB.
> > +@expectedFailureAll(oslist=["linux"], compiler=["clang", "icc"])
>
> I don't think the compiler can be a list (because it also allows for a
> compiler version check) -- it needs to be split in two
> expectedFailureAll AFAICT.
>



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34711.
paulherman added a comment.

Search variables based on clang::DeclContext and clang::Decl tree

I think this fixes the comments. It also adds a cache for clang::decl so that 
there is no memory wasted.


http://reviews.llvm.org/D12658

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerDecl.h
  include/lldb/Symbol/CompilerDeclContext.h
  include/lldb/Symbol/SymbolFile.h
  include/lldb/Symbol/TypeSystem.h
  include/lldb/Symbol/Variable.h
  include/lldb/lldb-forward.h
  source/Expression/ClangASTSource.cpp
  source/Expression/ClangExpressionDeclMap.cpp
  source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  source/Symbol/CMakeLists.txt
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerDecl.cpp
  source/Symbol/CompilerDeclContext.cpp
  source/Symbol/Variable.cpp
  test/lang/cpp/nsimport/TestCppNsImport.py
  test/lang/cpp/nsimport/main.cpp

Index: test/lang/cpp/nsimport/main.cpp
===
--- test/lang/cpp/nsimport/main.cpp
+++ test/lang/cpp/nsimport/main.cpp
@@ -16,13 +16,57 @@
 }
 }
 
-using namespace N;
-using namespace Nested;
+namespace Global
+{
+int global;
+}
+
+namespace Fun
+{
+int fun_var;
+int fun()
+{
+fun_var = 5;
+return 0; // break 1
+}
+}
+
+namespace Single
+{
+int single = 3;
+}
+
+namespace NotImportedBefore
+{
+int not_imported = 45;
+}
+
+using namespace Global;
+
+int not_imported = 35;
+int fun_var = 9;
+
+namespace NotImportedAfter
+{
+int not_imported = 55;
+}
+
+namespace Imported
+{
+int imported = 99;
+}
+
+int imported = 89;
 
 int main()
 {
+using namespace N;
+using namespace Nested;
+using namespace Imported;
+using Single::single;
 n = 1;
 anon = 2;
 nested = 3;
-return 0; // break 0
+global = 4;
+return Fun::fun(); // break 0
 }
Index: test/lang/cpp/nsimport/TestCppNsImport.py
===
--- test/lang/cpp/nsimport/TestCppNsImport.py
+++ test/lang/cpp/nsimport/TestCppNsImport.py
@@ -16,6 +16,8 @@
 self.buildDsym()
 self.check()
 
+# This test is expected to fail because DW_TAG_imported_declaration and DW_TAG_imported_module are not parsed in SymbolFileDWARF
+@expectedFailureAll
 @dwarf_test
 def test_with_dwarf_and_run_command(self):
 """Tests imported namespaces in C++."""
@@ -45,6 +47,8 @@
 # Break on main function
 break_0 = target.BreakpointCreateBySourceRegex("// break 0", src_file_spec)
 self.assertTrue(break_0.IsValid() and break_0.GetNumLocations() >= 1, VALID_BREAKPOINT)
+break_1 = target.BreakpointCreateBySourceRegex("// break 1", src_file_spec)
+self.assertTrue(break_1.IsValid() and break_1.GetNumLocations() >= 1, VALID_BREAKPOINT)
 
 # Launch the process
 args = None
@@ -72,6 +76,35 @@
 test_result = frame.EvaluateExpression("anon")
 self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 2, "anon = 2")
 
+test_result = frame.EvaluateExpression("global")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 4, "global = 4")
+
+test_result = frame.EvaluateExpression("fun_var")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 9, "fun_var = 9")
+
+test_result = frame.EvaluateExpression("not_imported")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 35, "not_imported = 35")
+
+test_result = frame.EvaluateExpression("imported")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "imported = 99")
+
+test_result = frame.EvaluateExpression("single")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 3, "single = 3")
+
+# Continue to second breakpoint
+process.Continue()
+
+# Get the thread of the process
+self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+
+# Get current fream of the thread at the breakpoint
+frame = thread.GetSelectedFrame()
+
+# Test function inside namespace
+test_result = frame.EvaluateExpression("fun_var")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 5, "fun_var = 5")
+
 
 if __name__ == '__main__':
 import atexit
Index: source/Symbol/Variable.cpp
===
--- source/Symbol/Variable.cpp
+++ source/Symbol/Variable.cpp
@@ -15,9 +15,1

[Lldb-commits] [lldb] r247589 - Remove a debugging printf that got left in SymbolFileDWARFDebugMap.

2015-09-14 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Mon Sep 14 13:28:28 2015
New Revision: 247589

URL: http://llvm.org/viewvc/llvm-project?rev=247589&view=rev
Log:
Remove a debugging printf that got left in SymbolFileDWARFDebugMap.

Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=247589&r1=247588&r2=247589&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Mon 
Sep 14 13:28:28 2015
@@ -1574,7 +1574,6 @@ SymbolFileDWARFDebugMap::AddOSOARanges (
 const FileRangeMap::Entry* entry = 
file_range_map.GetEntryAtIndex(idx);
 if (entry)
 {
-printf ("[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", 
entry->GetRangeBase(), entry->GetRangeEnd());
 debug_aranges->AppendRange(dwarf2Data->GetID(), 
entry->GetRangeBase(), entry->GetRangeEnd());
 num_line_entries_added++;
 }


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


Re: [Lldb-commits] [PATCH] D12079: [MIPS] microMIPS breakpoints, disassembly and compressed addresses

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

So everywhere that we want to display a code address for MicroMIPS needs to now 
add code that creates a callable address? I still say that Address::Dump() is 
what should be modified, not DumpAddress if FormatEntity.cpp. I don't want any 
other code anywhere in the debugger to have to make this check. It should be 
just Address::Dump() that knows about this.


Repository:
  rL LLVM

http://reviews.llvm.org/D12079



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


Re: [Lldb-commits] [PATCH] D12849: Add support for DW_OP_GNU_const_index to dwarf expression

2015-09-14 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/D12849



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


[Lldb-commits] [lldb] r247591 - Fix up bad compiler spec on ConstVariableTestCase; fixup two more OS X unexpected successes.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 13:34:36 2015
New Revision: 247591

URL: http://llvm.org/viewvc/llvm-project?rev=247591&view=rev
Log:
Fix up bad compiler spec on ConstVariableTestCase; fixup two more OS X 
unexpected successes.

Modified:
lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py
lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: 
lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py?rev=247591&r1=247590&r2=247591&view=diff
==
--- lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py 
(original)
+++ lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py 
Mon Sep 14 13:34:36 2015
@@ -19,7 +19,6 @@ class Radar9673644TestCase(TestBase):
 self.main_source = "main.c"
 self.line = line_number(self.main_source, '// Set breakpoint here.')
 
-@expectedFailureDarwin(15641319)
 @expectedFailureWindows("llvm.org/pr21765")
 def test_expr_commands(self):
 """The following expression commands should just work."""

Modified: lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py?rev=247591&r1=247590&r2=247591&view=diff
==
--- lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py (original)
+++ lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py Mon Sep 14 
13:34:36 2015
@@ -8,17 +8,24 @@ import lldb
 from lldbtest import *
 import lldbutil
 
+
+def python_leaky_fd_version(test):
+import sys
+# Python random module leaks file descriptors on some versions.
+return sys.version_info >= (2, 7, 8) and sys.version_info < (2, 7, 10)
+
+
 class AvoidsFdLeakTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailure(lambda x: sys.version_info >= (2, 7, 8), 
"bugs.freebsd.org/197376") # python random leaks fd
+@expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
 @skipIfWindows # The check for descriptor leakage needs to be implemented 
differently here.
 @skipIfTargetAndroid() # Android have some other file descriptors open by 
the shell
 def test_fd_leak_basic (self):
 self.do_test([])
 
-@expectedFailure(lambda x: sys.version_info >= (2, 7, 8), 
"bugs.freebsd.org/197376") # python random leaks fd
+@expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
 @skipIfWindows # The check for descriptor leakage needs to be implemented 
differently here.
 @skipIfTargetAndroid() # Android have some other file descriptors open by 
the shell
 def test_fd_leak_log (self):
@@ -40,7 +47,7 @@ class AvoidsFdLeakTestCase(TestBase):
 self.assertTrue(process.GetExitStatus() == 0,
 "Process returned non-zero status. Were incorrect file 
descriptors passed?")
 
-@expectedFailure(lambda x: sys.version_info >= (2, 7, 8), 
"bugs.freebsd.org/197376") # python random leaks fd
+@expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
 @expectedFlakeyLinux
 @skipIfWindows # The check for descriptor leakage needs to be implemented 
differently here.
 @skipIfTargetAndroid() # Android have some other file descriptors open by 
the shell

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247591&r1=247590&r2=247591&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
13:34:36 2015
@@ -16,7 +16,8 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(oslist=["linux"], compiler=["clang", "icc"])
+@expectedFailureAll(oslist=["linux"], compiler="clang")
+@expectedFailureAll(oslist=["linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")
 @dwarf_test


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


Re: [Lldb-commits] [lldb] r247576 - Cleaned up a few unexpected successes on OS X

2015-09-14 Thread Todd Fiala via lldb-commits
The fix for this went in here (with a couple more XPASS cleanups):

Sendingtest/expression_command/radar_9673664/TestExprHelpExamples.py
Sendingtest/functionalities/avoids-fd-leak/TestFdLeak.py
Sendingtest/lang/c/const_variables/TestConstVariables.py
Transmitting file data ...
Committed revision 247591.


On Mon, Sep 14, 2015 at 11:21 AM, Todd Fiala  wrote:

> Yep you're right, I just found this and verified it on Linux.  I'll get
> that fixed ASAP.
>
> On Mon, Sep 14, 2015 at 11:17 AM, Ed Maste  wrote:
>
>> On 14 September 2015 at 12:25, Todd Fiala via lldb-commits
>>  wrote:
>> >
>> > Author: tfiala
>> > Date: Mon Sep 14 11:25:34 2015
>> > New Revision: 247576
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=247576&view=rev
>> > Log:
>> > Cleaned up a few unexpected successes on OS X
>> > ...
>> > -@expectedFailureClang('13314878') # This test works with gcc, but
>> fails with newer version of clang on Linux due to a clang issue. Fails for
>> icc as well. Bug number TDB.
>> > +@expectedFailureAll(oslist=["linux"], compiler=["clang", "icc"])
>>
>> I don't think the compiler can be a list (because it also allows for a
>> compiler version check) -- it needs to be split in two
>> expectedFailureAll AFAICT.
>>
>
>
>
> --
> -Todd
>



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


Re: [Lldb-commits] [lldb] r247589 - Remove a debugging printf that got left in SymbolFileDWARFDebugMap.

2015-09-14 Thread Todd Fiala via lldb-commits
Did this happen *again*?  I think I took that out a few weeks ago...

On Mon, Sep 14, 2015 at 11:28 AM, Jim Ingham via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: jingham
> Date: Mon Sep 14 13:28:28 2015
> New Revision: 247589
>
> URL: http://llvm.org/viewvc/llvm-project?rev=247589&view=rev
> Log:
> Remove a debugging printf that got left in SymbolFileDWARFDebugMap.
>
> Modified:
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
>
> Modified:
> lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=247589&r1=247588&r2=247589&view=diff
>
> ==
> --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
> (original)
> +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
> Mon Sep 14 13:28:28 2015
> @@ -1574,7 +1574,6 @@ SymbolFileDWARFDebugMap::AddOSOARanges (
>  const FileRangeMap::Entry* entry =
> file_range_map.GetEntryAtIndex(idx);
>  if (entry)
>  {
> -printf ("[0x%16.16" PRIx64 " - 0x%16.16" PRIx64
> ")\n", entry->GetRangeBase(), entry->GetRangeEnd());
>  debug_aranges->AppendRange(dwarf2Data->GetID(),
> entry->GetRangeBase(), entry->GetRangeEnd());
>  num_line_entries_added++;
>  }
>
>
> ___
> 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


[Lldb-commits] [lldb] r247594 - Correct XFAIL OS list after r247576

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 13:40:52 2015
New Revision: 247594

URL: http://llvm.org/viewvc/llvm-project?rev=247594&view=rev
Log:
Correct XFAIL OS list after r247576

In ConstVariableTestCase::test_with_dwarf_and_run_command - the test
fails with Clang (and presumably ICC) also on FreeBSD.

Modified:
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247594&r1=247593&r2=247594&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
13:40:52 2015
@@ -16,8 +16,8 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(oslist=["linux"], compiler="clang")
-@expectedFailureAll(oslist=["linux"], compiler="icc")
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")
 @dwarf_test


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

In http://reviews.llvm.org/D12658#243953, @paulherman wrote:

> I believe that the approach of CompilerDeclContext::FindDecls could be 
> better. But then this kind of forces CompilerDeclContext to inherit 
> CompilerDecl (a function is both a DeclContext and a Decl) and I believe that 
> creating a class for each possible entity is an overkill.
>
> I started looking at SymbolFileDWARF. In order to not have "clang::___", I 
> believe that ParseVariableDIE and ParseFunctionBlocks should be moved to 
> DWARFASTParser.


No they don't need to be. You just need to move the clang specific code into a 
function that is then passed through the TypeSystem interface. We don't need to 
make a CompilerDecl for a variable all the time, just when we ask the 
lldb_private::Variable class to get its CompilerDecl. So we could add method to 
Variable:

  CompilerDecl
  Variable::GetDecl();

It could always just call down to the symbol file and have the symbol file get 
the CompilerDecl for the variable. This would mean a new function on TypeSystem:

  CompilerDecl
  DeclGetDeclForVariable (const lldb::VariableSP &var_sp);

And that would eventually get routed down through the DWARFASTParser class...

> I don't really understand what Sean and Jim mean. I believe that 
> ClangASTSource implements the interface ExternalASTSource and 
> ClangExpressionDeclMap (which does the actual search) inherits 
> ClangASTSource, so it should be already alright...?


Yes the lookups currently happen like this and we should just be making 
function calls with any using directives to help fill in the results of this 
call.

> //**EDIT**//

>  I worked on fixing some of the things. However, I always encounter the need 
> to store a map from CompilerDecl to VariableSP since given a 
> CompilerDeclContext (using the solution above) we can get the CompilerDecl. 
> Where do you think it would be best to store this map? I thought about adding 
> it to SymbolFileDWARF and adding a method VariableSP 
> SymbolFileDWARF::GetVariableFromDecl(CompilerDecl decl).


If these are all abstract items, we can store any maps in TypeSystem itself.

> The other solution idea I have is to use StackFrame::GetInScopeVariableList 
> to get the list of variables and search through that list to see if a 
> variable has a decl in the list returned by 
> CompilerDeclContext::FindDeclsByName. This might be better since there 
> already is a call to StackFrame::GetInScopeVariableList so that the variable 
> dies are parsed (is there a better way of doing this?).


Yes, this would involve asking each VariableSP for its Decl using 
Variable::GetDecl() as mentioned above.


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

In http://reviews.llvm.org/D12658#244710, @paulherman wrote:

> [WIP] Search variables based on clang::DeclContext and clang::Decl tree
>
> This revision fixes some of the comments. There are some things I'm not sure 
> about. The problem is that at some point there will be the need to link decls 
> with the object they represent (Function, Variable, CompileUnit, etc). Is the 
> approach of getting the VariableSP from the TypeSystem the right one?


It is fine because each TypeSystem does have a link to its SymbolFile, so yes 
this will work.

> Also, should ParseVariableDIE be moved to DWARFASTParser in order to create 
> the decl there or should there only be a method CreateVariableDecl(VariableSP 
> var)?


No. ParseVariableDIE shouldn't be making the CompilerDecl at all. We should do 
this only when we call the "Variable::GetDecl()". It should then route this 
through the TypeSystem from the variable type and ask the type system for the 
CompilerDecl. This will get routed to the SymbolFile and then to that will get 
routed to the DWARFASTParser (DWARFASTParserClang for this case).


http://reviews.llvm.org/D12658



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


[Lldb-commits] [lldb] r247596 - Remove expectedFailureFreeBSD from now-passing test

2015-09-14 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Sep 14 13:50:23 2015
New Revision: 247596

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

ExprCommandCallUserDefinedFunction::test_with_dwarf

llvm.org/pr20274

Modified:

lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py

Modified: 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py?rev=247596&r1=247595&r2=247596&view=diff
==
--- 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py 
(original)
+++ 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py 
Mon Sep 14 13:50:23 2015
@@ -32,7 +32,6 @@ class ExprCommandCallUserDefinedFunction
 
 @dwarf_test
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
-@expectedFailureFreeBSD("llvm.org/pr20274") # intermittent failure
 def test_with_dwarf(self):
 """Test return values of user defined function calls."""
 self.buildDwarf()


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

In http://reviews.llvm.org/D12658#245466, @clayborg wrote:

> In http://reviews.llvm.org/D12658#244710, @paulherman wrote:
>
> > [WIP] Search variables based on clang::DeclContext and clang::Decl tree
> >
> > This revision fixes some of the comments. There are some things I'm not 
> > sure about. The problem is that at some point there will be the need to 
> > link decls with the object they represent (Function, Variable, CompileUnit, 
> > etc). Is the approach of getting the VariableSP from the TypeSystem the 
> > right one?
>
>
> It is fine because each TypeSystem does have a link to its SymbolFile, so yes 
> this will work.
>
> > Also, should ParseVariableDIE be moved to DWARFASTParser in order to create 
> > the decl there or should there only be a method 
> > CreateVariableDecl(VariableSP var)?
>
>
> No. ParseVariableDIE shouldn't be making the CompilerDecl at all. We should 
> do this only when we call the "Variable::GetDecl()". It should then route 
> this through the TypeSystem from the variable type and ask the type system 
> for the CompilerDecl. This will get routed to the SymbolFile and then to that 
> will get routed to the DWARFASTParser (DWARFASTParserClang for this case).


ParseVariableDIE does need at some point to get the CompilerDecl (but it gets 
it from Variable::GetDecl which calls DWARFASTParser) in order to link the Decl 
to the Variable. Is there a better solution to do this? Also, I think you're 
not looking at the latest diff as most of these have been addressed.


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

I believe you have addressed all of my concerns. Read through my previous 
comments and make sure, and if so, this is good to go. Nice patch, thanks for 
working through the abtracting issues we ran into and for making a great patch.



Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3883-3884
@@ +3882,4 @@
+{
+lldb::user_id_t spec_uid = form_value.Reference();
+if (UserIDMatches(spec_uid))
+{

Per tberghammer's comment we might need to add a way to get a DIERef from a 
DWARFFormValue...


http://reviews.llvm.org/D12658



___
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-14 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

I could very well be missing something obvious. However, let me explain what I 
am trying to solve here. Lets take the example of std::vector::size 
method. The DWARF we get when compiled with GCC is as follows:

  < 3><0x20a3>DW_TAG_subprogram
DW_AT_external  yes(1)
DW_AT_name  "size"
DW_AT_decl_file 0x0003 
/usr/include/c++/4.8/bits/stl_vector.h
DW_AT_decl_line 0x0285
DW_AT_linkage_name  
"_ZNKSt6vectorISsSaISsEE4sizeEv"
DW_AT_type  <0x1eb1>
DW_AT_accessibility DW_ACCESS_public
DW_AT_declaration   yes(1)
DW_AT_object_pointer<0x20bc>
DW_AT_sibling   <0x20c2>

If we demangle the linkage name from here, we get "std::vector >::size() const". So, the m_function_fullname_index 
of SymbolFileDWARF will have entry for this function with this full name.

However, due to missing debug info elsewhere, the IR generated by clang (the 
LLDB compiler), generates a mangled name like this:
"_ZNKSt6vectorISbIcSt17char_traitsSt15allocatorESt82allocator, std::allocator > >E4sizeEv"

This demangles to
"std::vector, 
std::allocator >, std::allocator, std::allocator > > >::size() const"

Since neither the clang generated mangled name is present in the ELF symtab, 
and nor its corresponding demangled name is not present in any of the DWARF 
indices, the existing FindFunctions will not be helpful. Also, only functions 
with debug info (those which have an address specified in the DWARF) are 
indexed.

What I am doing in my change is to use the fact that all methods (and their 
types) are grokked while creating the AST for clang (the LLDB compiler). So, 
when a method is grokked, store a map from its scoped name to its DIE. Even if 
there were any discrepancies in the mangled name in the debug info versus that 
generated by the LLDB compiler, the fully scoped names should be the same. In 
which case, use the fully scoped name to get to the DIE and retrieve its 
"actual" mangled name.


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] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

I think the only concern left might be the call to DeclLinkToObject in 
ParseVariableDIE. It doesn't have anything to do with clang but I feel like 
there should be a way to do this lazily.

Otherwise, I believe that the comments have been addressed.

Thank you!


http://reviews.llvm.org/D12658



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


[Lldb-commits] [lldb] r247601 - OS X unexpected success cleanup

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 14:12:56 2015
New Revision: 247601

URL: http://llvm.org/viewvc/llvm-project?rev=247601&view=rev
Log:
OS X unexpected success cleanup

TestPersistObjCPointeeType and TestObjCNewSyntax marked up to expect
success on clang >= 7.0.0.

TestMultipleDebuggers passed 25/25 times, taking off intermittent.
If this changes, I'll make sure it goes into a flaky/flakey category.

Modified:
lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py

lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py

Modified: lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=247601&r1=247600&r2=247601&view=diff
==
--- lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py Mon Sep 14 
14:12:56 2015
@@ -18,7 +18,6 @@ class TestMultipleSimultaneousDebuggers(
 
 @skipIfi386
 @skipIfNoSBHeaders
-@expectedFailureDarwin("llvm.org/pr20282") # intermittent
 @expectedFailureFreeBSD("llvm.org/pr20282")
 @expectedFailureLinux("llvm.org/pr20282")
 def test_multiple_debuggers(self):

Modified: 
lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py?rev=247601&r1=247600&r2=247601&view=diff
==
--- 
lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
 (original)
+++ 
lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
 Mon Sep 14 14:12:56 2015
@@ -19,7 +19,9 @@ class PersistObjCPointeeType(TestBase):
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin('http://llvm.org/pr23504') # can't compile inferior 
with Xcode 6.1.1 or 6.2
+@expectedFailureAll(
+bugnumber='http://llvm.org/pr23504',
+oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
 def test_with_dsym(self):
 """Test that we can p *objcObject"""
 self.buildDsym()
@@ -27,7 +29,9 @@ class PersistObjCPointeeType(TestBase):
 
 @skipUnlessDarwin
 @dwarf_test
-@expectedFailureDarwin('http://llvm.org/pr23504') # can't compile inferior 
with Xcode 6.1.1 or 6.2
+@expectedFailureAll(
+bugnumber='http://llvm.org/pr23504',
+oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
 def test_with_dwarf(self):
 """Test that we can p *objcObject"""
 self.buildDwarf()
@@ -36,7 +40,7 @@ class PersistObjCPointeeType(TestBase):
 def do_my_test(self):
 def cleanup():
 pass
-
+
 # Execute the cleanup function during test case tear down.
 self.addTearDownHook(cleanup)
 

Modified: lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py?rev=247601&r1=247600&r2=247601&view=diff
==
--- lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py (original)
+++ lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Mon Sep 14 
14:12:56 2015
@@ -16,7 +16,8 @@ class ObjCNewSyntaxTestCase(TestBase):
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin # expr -- @((char*)"Hello world" + 6) cannot box a 
string value because NSString has not been declared
+@expectedFailureAll(
+oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
 def test_expr_with_dsym(self):
 self.buildDsym()
 self.expr()
@@ -25,7 +26,8 @@ class ObjCNewSyntaxTestCase(TestBase):
 @skipIfFreeBSD
 @skipIfLinux
 @skipIfWindows
-@expectedFailureDarwin # expr -- @((char*)"Hello world" + 6) cannot box a 
string value because NSString has not been declared
+@expectedFailureAll(
+oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
 def test_expr_with_dwarf(self):
 self.buildDwarf()
 self.expr()


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


[Lldb-commits] [lldb] r247602 - Another round of macosx unexpected success corrections.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 14:25:22 2015
New Revision: 247602

URL: http://llvm.org/viewvc/llvm-project?rev=247602&view=rev
Log:
Another round of macosx unexpected success corrections.

Modified:
lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py
lldb/trunk/test/functionalities/signal/raise/TestRaise.py
lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py

Modified: lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py?rev=247602&r1=247601&r2=247602&view=diff
==
--- lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py 
(original)
+++ lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py Mon Sep 
14 14:25:22 2015
@@ -119,7 +119,6 @@ class ProcessLaunchTestCase(TestBase):
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin("llvm.org/pr20265")
 def test_set_working_dir_with_dsym (self):
 """Test that '-w dir' sets the working dir when running the 
inferior."""
 self.buildDsym(dictionary=self.d)
@@ -127,7 +126,6 @@ class ProcessLaunchTestCase(TestBase):
 self.my_working_dir_test()
 
 @skipIfFreeBSD # llvm.org/pr16684
-@expectedFailureDarwin("llvm.org/pr20265")
 @expectedFailureLinux("llvm.org/pr20265")
 @dwarf_test
 def test_set_working_dir_with_dwarf (self):

Modified: lldb/trunk/test/functionalities/signal/raise/TestRaise.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/raise/TestRaise.py?rev=247602&r1=247601&r2=247602&view=diff
==
--- lldb/trunk/test/functionalities/signal/raise/TestRaise.py (original)
+++ lldb/trunk/test/functionalities/signal/raise/TestRaise.py Mon Sep 14 
14:25:22 2015
@@ -15,14 +15,12 @@ class RaiseTestCase(TestBase):
 
 @skipUnlessDarwin
 @dsym_test
-@expectedFailureDarwin("llvm.org/pr23610") # process doesn't stop at a 
breakpoint on the third launch
 def test_sigstop_with_dsym(self):
 self.buildDsym()
 self.signal_test('SIGSTOP', False)
 # passing of SIGSTOP is not correctly handled, so not testing that 
scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
 
 @dwarf_test
-@expectedFailureDarwin("llvm.org/pr23610") # process doesn't stop at a 
breakpoint on the third launch
 def test_sigstop_with_dwarf(self):
 self.buildDwarf()
 self.signal_test('SIGSTOP', False)

Modified: lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py?rev=247602&r1=247601&r2=247602&view=diff
==
--- lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py 
(original)
+++ lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py Mon Sep 
14 14:25:22 2015
@@ -11,7 +11,8 @@ class RegisterVariableTestCase(TestBase)
 mydir = TestBase.compute_mydir(__file__)
 
 @dsym_test
-@expectedFailureDarwin("llvm.org/pr20266")
+@expectedFailureAll(
+oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
 def test_with_dsym_and_run_command(self):
 """Test expressions on register values."""
 self.buildDsym()

Modified: lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py?rev=247602&r1=247601&r2=247602&view=diff
==
--- lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py 
(original)
+++ lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py Mon Sep 
14 14:25:22 2015
@@ -11,7 +11,6 @@ class RvalueReferencesTestCase(TestBase)
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
-@expectedFailureClang("rdar://problem/11479676")
 @dsym_test
 def test_with_dsym_and_run_command(self):
 """Test that rvalues are supported in the C++ expression parser"""


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


[Lldb-commits] [lldb] r247605 - Fixes lldb-server commandline test xpass for OS X and Linux; resolves llvm.org/pr20273

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 14:53:00 2015
New Revision: 247605

URL: http://llvm.org/viewvc/llvm-project?rev=247605&view=rev
Log:
Fixes lldb-server commandline test xpass for OS X and Linux; resolves 
llvm.org/pr20273

Modified:
lldb/trunk/test/python_api/target/TestTargetAPI.py
lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py

Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=247605&r1=247604&r2=247605&view=diff
==
--- lldb/trunk/test/python_api/target/TestTargetAPI.py (original)
+++ lldb/trunk/test/python_api/target/TestTargetAPI.py Mon Sep 14 14:53:00 2015
@@ -76,7 +76,6 @@ class TargetAPITestCase(TestBase):
 @skipUnlessDarwin
 @python_api_test
 @dsym_test
-@expectedFailureDarwin("llvm.org/pr20273")
 def test_launch_new_process_and_redirect_stdout_with_dsym(self):
 """Exercise SBTaget.Launch() API."""
 self.buildDsym()
@@ -84,7 +83,6 @@ class TargetAPITestCase(TestBase):
 
 @python_api_test
 @dwarf_test
-@expectedFailureDarwin("llvm.org/pr20273")
 def test_launch_new_process_and_redirect_stdout_with_dwarf(self):
 """Exercise SBTarget.Launch() API."""
 self.buildDwarf()

Modified: lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py?rev=247605&r1=247604&r2=247605&view=diff
==
--- lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py (original)
+++ lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py Mon Sep 14 
14:53:00 2015
@@ -38,7 +38,6 @@ class TestStubSetSIDTestCase(gdbremote_t
 
 @debugserver_test
 @skipIfRemote # --setsid not used on remote platform and currently it is 
also impossible to get the sid of lldb-platform running on a remote target
-@unittest2.expectedFailure() # This is the whole purpose of this feature, 
I would expect it to be the same without --setsid. Investigate.
 def test_sid_is_same_without_setsid_debugserver(self):
 self.init_debugserver_test()
 self.set_inferior_startup_launch()
@@ -46,7 +45,7 @@ class TestStubSetSIDTestCase(gdbremote_t
 
 @llgs_test
 @skipIfRemote # --setsid not used on remote platform and currently it is 
also impossible to get the sid of lldb-platform running on a remote target
-@unittest2.expectedFailure() # This is the whole purpose of this feature, 
I would expect it to be the same without --setsid. Investigate.
+@expectedFailureFreeBSD()
 def test_sid_is_same_without_setsid_llgs(self):
 self.init_llgs_test()
 self.set_inferior_startup_launch()


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

Yes, it would be nice to not have to get a variable's decl right up front. 
Maybe the Variable::GetDecl() could register this mapping if/when the variable 
decl is made the first time is is asked for?


http://reviews.llvm.org/D12658



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


[Lldb-commits] [lldb] r247608 - Final unexpected success cleanup for OS X.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 15:16:34 2015
New Revision: 247608

URL: http://llvm.org/viewvc/llvm-project?rev=247608&view=rev
Log:
Final unexpected success cleanup for OS X.

Top of tree is running with no unexpected successes with this
change, on latest available El Capitan and Xcode betas.

Modified:
lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py

Modified: lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py?rev=247608&r1=247607&r2=247608&view=diff
==
--- lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py 
(original)
+++ lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py Mon 
Sep 14 15:16:34 2015
@@ -13,14 +13,12 @@ class ThreadExitTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
-@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly 
maintained
 @dsym_test
 def test_with_dsym(self):
 """Test thread exit handling."""
 self.buildDsym(dictionary=self.getBuildFlags())
 self.thread_exit_test()
 
-@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly 
maintained
 @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly 
maintained
 @expectedFailureWindows("llvm.org/pr24681")
 @dwarf_test


___
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-14 Thread Sean Callanan via lldb-commits
spyffe requested changes to this revision.
spyffe added a comment.

I LOVE the idea of getting rid of those horrid "alternate manglings."  We knew 
what the mangling was during name lookup, we should be able to recognize them 
later!
As listed in my inline comments, I have some concerns about the scope.  This 
knowledge is built up during expression parsing and used during expression 
parsing – we're done.
Thanks for working on this, Siva.



Comment at: source/Expression/ClangExpressionDeclMap.cpp:661
@@ -603,4 +660,3 @@
 {
-FindCodeSymbolInContext(
-demangled, m_parser_vars->m_sym_ctx, 
eFunctionNameTypeFull, sc_list);
-sc_list_size = sc_list.GetSize();
+ConstString best_alternate_mangled_name = 
FindBestAlternateMangledName(demangled, lang_type, sc);
+if (best_alternate_mangled_name)

This should definitely only be done if we can't find the name the original way. 
 I'm always happy to pay extra runtime to fix an expression that would 
otherwise not work – but expressions that would work (the >90% case) shouldn't 
be paying for this.


Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h:200
@@ -198,1 +199,3 @@
 
+void
+GetMangledNamesForFunction (const std::string &scope_qualified_name,

Why is this attached to the DWARF?  I would want to attach this to the 
ClangExpressionDeclMap because we identify these alternate names during 
function name lookup, and we just need to remember them when resolving the 
references in IR.  After that, they are no longer needed.


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] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

Are you suggesting that the DeclLinkToObject is moved inside the GetDecl call 
and I only remove that? This is the only place where GetDecl is called, so it 
would be equivalent from a computational point of view.


http://reviews.llvm.org/D12658



___
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-14 Thread Siva Chandra via lldb-commits
sivachandra added inline comments.


Comment at: source/Expression/ClangExpressionDeclMap.cpp:661
@@ -603,4 +660,3 @@
 {
-FindCodeSymbolInContext(
-demangled, m_parser_vars->m_sym_ctx, 
eFunctionNameTypeFull, sc_list);
-sc_list_size = sc_list.GetSize();
+ConstString best_alternate_mangled_name = 
FindBestAlternateMangledName(demangled, lang_type, sc);
+if (best_alternate_mangled_name)

spyffe wrote:
> This should definitely only be done if we can't find the name the original 
> way.  I'm always happy to pay extra runtime to fix an expression that would 
> otherwise not work – but expressions that would work (the >90% case) 
> shouldn't be paying for this.
The "original" way is still attempted first at line 643 above. Lines 669 to 674 
below take care of another problem: http://reviews.llvm.org/D12613. Since that 
problem is much more a rare case than that solved in this change, I chose to 
keep this "try" before that "try".


Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h:200
@@ -198,1 +199,3 @@
 
+void
+GetMangledNamesForFunction (const std::string &scope_qualified_name,

spyffe wrote:
> Why is this attached to the DWARF?  I would want to attach this to the 
> ClangExpressionDeclMap because we identify these alternate names during 
> function name lookup, and we just need to remember them when resolving the 
> references in IR.  After that, they are no longer needed.
My thinking was, DWARF is the only thing which knows about the correct mangled 
name, so keep it close to the code dealing with DWARF. Your suggestion also 
makes sense, but might (I have not yet thought enough about it) require us to 
expose DIE info into ClangExpressionDeclMap. I will think more about this 
approach and get back to you.


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] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

In http://reviews.llvm.org/D12658#245547, @paulherman wrote:

> Are you suggesting that the DeclLinkToObject is moved inside the GetDecl call 
> and I only remove that?


Yes, actually you can probably move it into SymbolFileDWARF::GetDeclForUID(). 
there should be a cache in this function right? If the item isn't in the cache 
then we cache it and call DeclLinkToObject().

BTW: DeclLinkToObject() might be able to be moved into the base TypeSystem 
class?

> This is the only place where GetDecl is called, so it would be equivalent 
> from a computational point of view.


Yep, don't care how it happens, I just want it to be lazy and only done if 
someone asks for it.


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

If I move the call to DeclLinkDeclToObject inside any of the GetDeclXXX 
methods, then there is no way to access the VariableSP needed for the call and 
it is probably harder to reconstruct the parameters needed for ParseVariableDIE 
starting from just the DIE itself.

Also, the call is already lazy since ParseVariableDIE is lazy (i.e. whenever 
the VariableSP is needed, the Decl is needed). I don't think there is any way 
to separate the call to DeclLinkDeclToObject from ParseVariableDIE, only to 
make sure that DeclLinkDeclToObject doesn't do any work if it is called with a 
previously encountered variable.


http://reviews.llvm.org/D12658



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


[Lldb-commits] [lldb] r247615 - ClangExpressionDeclMap should only disable the Clang parser-specific state on

2015-09-14 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Mon Sep 14 16:03:44 2015
New Revision: 247615

URL: http://llvm.org/viewvc/llvm-project?rev=247615&view=rev
Log:
ClangExpressionDeclMap should only disable the Clang parser-specific state on
Clang persistent variables.

Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=247615&r1=247614&r2=247615&view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Mon Sep 14 16:03:44 
2015
@@ -144,8 +144,8 @@ ClangExpressionDeclMap::DidParse()
  ++pvar_index)
 {
 ExpressionVariableSP 
pvar_sp(m_parser_vars->m_persistent_vars->GetVariableAtIndex(pvar_index));
-if (pvar_sp)
-
llvm::cast(pvar_sp.get())->DisableParserVars(GetParserID());
+if (ClangExpressionVariable *clang_var = 
llvm::dyn_cast(pvar_sp.get()))
+clang_var->DisableParserVars(GetParserID());
 }
 
 DisableParserVars();


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


Re: [Lldb-commits] [PATCH] D12831: Add JUnit/XUnit-formatted output to the lldb test run system

2015-09-14 Thread Todd Fiala via lldb-commits
tfiala added a comment.

@zturner, how does this look on Windows?

If you need a refresh with recent changes (there was at least one change 
outside to dosep.py), I can update the patch.


http://reviews.llvm.org/D12831



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


Re: [Lldb-commits] [PATCH] D12791: Complete register kind naming cleanups in lldb -- required touching all register table definitions

2015-09-14 Thread Jason Molenda via lldb-commits
jasonmolenda added a comment.

Thanks Tamas.  I'll figure out what's happening there before I commit.


http://reviews.llvm.org/D12791



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


[Lldb-commits] [lldb] r247628 - Fix CMake build.

2015-09-14 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Sep 14 17:39:34 2015
New Revision: 247628

URL: http://llvm.org/viewvc/llvm-project?rev=247628&view=rev
Log:
Fix CMake build.

- Typo: Coca.cpp -> Cocoa.cpp
- Missing include.

Added:
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
  - copied, changed from r247627, 
lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp
Removed:
lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp
Modified:
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp

Removed: lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp?rev=247627&view=auto
==
--- lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Coca.cpp (removed)
@@ -1,1150 +0,0 @@
-//===-- Cocoa.cpp -*- C++ 
-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#include "Cocoa.h"
-
-#include "lldb/Core/DataBufferHeap.h"
-#include "lldb/Core/Error.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/DataFormatters/FormattersHelpers.h"
-#include "lldb/DataFormatters/StringPrinter.h"
-#include "lldb/DataFormatters/TypeSummary.h"
-#include "lldb/Host/Endian.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Target/ObjCLanguageRuntime.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Utility/ProcessStructReader.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::formatters;
-
-bool
-lldb_private::formatters::NSBundleSummaryProvider (ValueObject& valobj, 
Stream& stream, const TypeSummaryOptions& options)
-{
-ProcessSP process_sp = valobj.GetProcessSP();
-if (!process_sp)
-return false;
-
-ObjCLanguageRuntime* runtime = 
(ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
-
-if (!runtime)
-return false;
-
-ObjCLanguageRuntime::ClassDescriptorSP 
descriptor(runtime->GetClassDescriptor(valobj));
-
-if (!descriptor.get() || !descriptor->IsValid())
-return false;
-
-uint32_t ptr_size = process_sp->GetAddressByteSize();
-
-lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
-
-if (!valobj_addr)
-return false;
-
-const char* class_name = descriptor->GetClassName().GetCString();
-
-if (!class_name || !*class_name)
-return false;
-
-if (!strcmp(class_name,"NSBundle"))
-{
-uint64_t offset = 5 * ptr_size;
-ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, 
valobj.GetCompilerType().GetBasicTypeFromAST(lldb::eBasicTypeObjCID), true));
-
-StreamString summary_stream;
-bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), 
summary_stream, options);
-if (was_nsstring_ok && summary_stream.GetSize() > 0)
-{
-stream.Printf("%s",summary_stream.GetData());
-return true;
-}
-}
-// this is either an unknown subclass or an NSBundle that comes from 
[NSBundle mainBundle]
-// which is encoded differently and needs to be handled by running code
-return ExtractSummaryFromObjCExpression(valobj, "NSString*", "bundlePath", 
stream);
-}
-
-bool
-lldb_private::formatters::NSTimeZoneSummaryProvider (ValueObject& valobj, 
Stream& stream, const TypeSummaryOptions& options)
-{
-ProcessSP process_sp = valobj.GetProcessSP();
-if (!process_sp)
-return false;
-
-ObjCLanguageRuntime* runtime = 
(ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
-
-if (!runtime)
-return false;
-
-ObjCLanguageRuntime::ClassDescriptorSP 
descriptor(runtime->GetClassDescriptor(valobj));
-
-if (!descriptor.get() || !descriptor->IsValid())
-return false;
-
-uint32_t ptr_size = process_sp->GetAddressByteSize();
-
-lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
-
-if (!valobj_addr)
-return false;
-
-const char* class_name = descriptor->GetClassName().GetCString();
-
-if (!class_name || !*class_name)
-return false;
-
-if (!strcmp(class_name,"__NSTimeZone"))
-{
-uint64_t offset = ptr_size;
-ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, 
valobj.GetCompilerType(), true));
-StreamString summary_stream;
-bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), 
summary_stream, options);
-if (was_nsstring_ok && summary_stream.GetSize() > 0)
-{
-stream.Pri

[Lldb-commits] [lldb] r247630 - Remove include that isn't needed.

2015-09-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Mon Sep 14 17:56:46 2015
New Revision: 247630

URL: http://llvm.org/viewvc/llvm-project?rev=247630&view=rev
Log:
Remove include that isn't needed.


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=247630&r1=247629&r2=247630&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Sep 14 
17:56:46 2015
@@ -49,7 +49,6 @@
 
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/CompileUnit.h"
-#include "lldb/Symbol/GoASTContext.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolVendor.h"


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


[Lldb-commits] [lldb] r247631 - Fix the Xcode project to compile Cocoa.cpp instead of Coca.cpp.

2015-09-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Mon Sep 14 17:57:25 2015
New Revision: 247631

URL: http://llvm.org/viewvc/llvm-project?rev=247631&view=rev
Log:
Fix the Xcode project to compile Cocoa.cpp instead of Coca.cpp.


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=247631&r1=247630&r2=247631&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Sep 14 17:57:25 2015
@@ -763,7 +763,7 @@
947A1D641616476B0017C8D1 /* CommandObjectPlugin.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 947A1D621616476A0017C8D1 /* 
CommandObjectPlugin.cpp */; };
949ADF031406F648004833E1 /* ValueObjectConstResultImpl.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 949ADF021406F648004833E1 /* 
ValueObjectConstResultImpl.cpp */; };
949EEDA01BA74B6D008C63CF /* CoreMedia.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 949EED9E1BA74B64008C63CF /* CoreMedia.cpp */; 
settings = {ASSET_TAGS = (); }; };
-   949EEDA31BA76577008C63CF /* Coca.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 949EEDA11BA76571008C63CF /* Coca.cpp */; settings = 
{ASSET_TAGS = (); }; };
+   949EEDA31BA76577008C63CF /* Cocoa.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 949EEDA11BA76571008C63CF /* Cocoa.cpp */; settings = 
{ASSET_TAGS = (); }; };
949EEDAE1BA7671C008C63CF /* CF.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 949EEDAC1BA76719008C63CF /* CF.cpp */; settings = 
{ASSET_TAGS = (); }; };
949EEDAF1BA76729008C63CF /* NSArray.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 949EEDA41BA765B5008C63CF /* NSArray.cpp */; settings = 
{ASSET_TAGS = (); }; };
949EEDB11BA7672D008C63CF /* NSDictionary.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 949EEDA51BA765B5008C63CF /* NSDictionary.cpp */; 
settings = {ASSET_TAGS = (); }; };
@@ -2483,7 +2483,7 @@
949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = ValueObjectConstResultImpl.cpp; path = 
source/Core/ValueObjectConstResultImpl.cpp; sourceTree = ""; };
949EED9E1BA74B64008C63CF /* CoreMedia.cpp */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CoreMedia.cpp; 
path = Language/ObjC/CoreMedia.cpp; sourceTree = ""; };
949EED9F1BA74B64008C63CF /* CoreMedia.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CoreMedia.h; path 
= Language/ObjC/CoreMedia.h; sourceTree = ""; };
-   949EEDA11BA76571008C63CF /* Coca.cpp */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Coca.cpp; path 
= Language/ObjC/Coca.cpp; sourceTree = ""; };
+   949EEDA11BA76571008C63CF /* Cocoa.cpp */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Cocoa.cpp; 
path = Language/ObjC/Cocoa.cpp; sourceTree = ""; };
949EEDA21BA76571008C63CF /* Cocoa.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Cocoa.h; path = 
Language/ObjC/Cocoa.h; sourceTree = ""; };
949EEDA41BA765B5008C63CF /* NSArray.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = NSArray.cpp; path = Language/ObjC/NSArray.cpp; sourceTree = ""; };
949EEDA51BA765B5008C63CF /* NSDictionary.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = NSDictionary.cpp; path = Language/ObjC/NSDictionary.cpp; sourceTree = 
""; };
@@ -5303,7 +5303,7 @@
949EEDAD1BA76719008C63CF /* CF.h */,
949EEDAC1BA76719008C63CF /* CF.cpp */,
949EEDA21BA76571008C63CF /* Cocoa.h */,
-   949EEDA11BA76571008C63CF /* Coca.cpp */,
+   949EEDA11BA76571008C63CF /* Cocoa.cpp */,
949EED9F1BA74B64008C63CF /* CoreMedia.h */,
949EED9E1BA74B64008C63CF /* CoreMedia.cpp */,
949EEDA41BA765B5008C63CF /* NSArray.cpp */,
@@ -6362,7 +6362,7 @@
AF1729D6182C907200E0AB97 /* HistoryThread.cpp 
in Sources */,
268900AF13353E5000698AC0 /* UnwindLLDB.cpp in 
Sources */,
268900B013353E5000698AC0 /* 
RegisterContextLLDB.cpp in Sources */,
-   949EEDA31BA76577008C63CF /* Coca.cpp in Sources 
*/,
+   949EEDA31BA76577008C63CF /* Cocoa.cpp in 
Sources */,
3FDFE56C19AF9C44

[Lldb-commits] [lldb] r247633 - Fixup XFAIL marking on TestConstVariables for clang version

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 18:17:15 2015
New Revision: 247633

URL: http://llvm.org/viewvc/llvm-project?rev=247633&view=rev
Log:
Fixup XFAIL marking on TestConstVariables for clang version

Linux/clang on clang 3.6+ is passing this test.  As OS X was
in a similar position, I'm guessing this was fixed by a recent
compiler.  Might work on 3.5/3.4, but it is definitely working
on clang 3.6.  I didn't break out FreeBSD since this appears to
be related to a compiler fix.

Modified:
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247633&r1=247632&r2=247633&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
18:17:15 2015
@@ -16,7 +16,9 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
+@expectedFailureAll(
+oslist=["freebsd", "linux"], compiler="clang",
+compiler_version=['<', '3.6'])
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


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


[Lldb-commits] [lldb] r247638 - Darwin has a debug info format that stores module types in stand alone files and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, just return nul

2015-09-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Mon Sep 14 18:34:26 2015
New Revision: 247638

URL: http://llvm.org/viewvc/llvm-project?rev=247638&view=rev
Log:
Darwin has a debug info format that stores module types in stand alone files 
and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, 
just return null so everything works.


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp?rev=247638&r1=247637&r2=247638&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp Mon Sep 
14 18:34:26 2015
@@ -69,8 +69,11 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWA
 DWARFCompileUnit*
 SymbolFileDWARFDwo::GetCompileUnit()
 {
-assert(GetNumCompileUnits() == 1 && "Only dwo files with 1 compile unit is 
supported");
-return DebugInfo()->GetCompileUnitAtIndex(0);
+// Only dwo files with 1 compile unit is supported
+if (GetNumCompileUnits() == 1)
+return DebugInfo()->GetCompileUnitAtIndex(0);
+else
+return nullptr;
 }
 
 DWARFCompileUnit*


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


[Lldb-commits] [lldb] r247639 - Marked TestEvents test as flakey on Linux.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 18:35:00 2015
New Revision: 247639

URL: http://llvm.org/viewvc/llvm-project?rev=247639&view=rev
Log:
Marked TestEvents test as flakey on Linux.

It's passing all the time for me (50/50), and was passing what
looks like 9/10 times for the originator.

Modified:
lldb/trunk/test/python_api/event/TestEvents.py

Modified: lldb/trunk/test/python_api/event/TestEvents.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/event/TestEvents.py?rev=247639&r1=247638&r2=247639&view=diff
==
--- lldb/trunk/test/python_api/event/TestEvents.py (original)
+++ lldb/trunk/test/python_api/event/TestEvents.py Mon Sep 14 18:35:00 2015
@@ -55,7 +55,7 @@ class EventAPITestCase(TestBase):
 @skipIfFreeBSD # llvm.org/pr21325
 @python_api_test
 @dwarf_test
-@expectedFailureLinux("llvm.org/pr23617") # Flaky, fails ~1/10 cases
+@expectedFlakeyLinux("llvm.org/pr23617")  # Flaky, fails ~1/10 cases
 @expectedFailureWindows("llvm.org/pr24778")
 def test_add_listener_to_broadcaster_with_dwarf(self):
 """Exercise some SBBroadcaster APIs."""


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

I thought about the problem a bit more and I believe that having the call to 
DeclLinkDeclToObject inside ParseVariableDIE makes sense since this gets called 
only when the variable will actually be used in a search together with its 
context. Also, since ParseVariableDIE is lazy, this makes the linking to be 
lazy.

I don't really see how one could do this inside GetClangDeclForDIE or inside 
Variable::GetDecl as there is no access to the VariableSP in there.


http://reviews.llvm.org/D12658



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


[Lldb-commits] [lldb] r247641 - Avoid a crash in the test suite where if we have a ObjC "id" type and we ask it for the PointeeType() we would get a CompilerType with a valid TypeSystem, but invalid o

2015-09-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Mon Sep 14 18:55:01 2015
New Revision: 247641

URL: http://llvm.org/viewvc/llvm-project?rev=247641&view=rev
Log:
Avoid a crash in the test suite where if we have a ObjC "id" type and we ask it 
for the PointeeType() we would get a CompilerType with a valid TypeSystem, but 
invalid opaque type, and ClangASTContext::IsClangType() previously would return 
true saying that it was a valid clang type and it would crash in removing 
qualifiers from a clang::QualType that was constructed with an NULL opaque type.


Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=247641&r1=247640&r2=247641&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Mon Sep 14 18:55:01 2015
@@ -529,7 +529,7 @@ public:
 static bool
 IsClangType (const CompilerType &ct)
 {
-return llvm::dyn_cast_or_null(ct.GetTypeSystem()) != 
nullptr;
+return llvm::dyn_cast_or_null(ct.GetTypeSystem()) != 
nullptr && ct.GetOpaqueQualType() != nullptr;
 }
 
 //--


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

So I don't like it in ParseVariableDIE() because it means we must create the 
decl right away for the variable when parsing it. ParseVariableDIE is used to 
parse all variables everywhere and we don't need the CompilerDecl in order to 
display the Variable, so we don't need to create it right away. We can always 
associate it in the Variable::GetDecl() call.


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

In http://reviews.llvm.org/D12658#245851, @clayborg wrote:

> So I don't like it in ParseVariableDIE() because it means we must create the 
> decl right away for the variable when parsing it. ParseVariableDIE is used to 
> parse all variables everywhere and we don't need the CompilerDecl in order to 
> display the Variable, so we don't need to create it right away. We can always 
> associate it in the Variable::GetDecl() call.


Okay, I understand that. In order to accomplish this, Variable should probably 
inherit from std::enable_shared_from_this so that we only have one SP to the 
variable. Is this acceptable?


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

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

We only really need variable to inherit from std::shared_from_this if we have 
any classes or API that use a "Variable *" as ivars or parameters. If we do, 
feel free to make it inherit from shared_from_this, but I would like to avoid 
it if possible to save on space. Also if you convert to shared_from_this, all 
construction of Variables must be done into shared pointers directly as they 
are constructed or things will crash.


http://reviews.llvm.org/D12658



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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

I just ran a grep through the source. It seems that everywhere it is created as 
a shared_ptr. In a previous attempt I tried storing it in the TypeSystem map 
from decl to object as Variable* instead of VariableSP and it seemed like at 
some point between launching a query and getting the value of a variable there 
were no references so the pointer got deleted. Hence, I guess it is kinda 
needed here.


http://reviews.llvm.org/D12658



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


[Lldb-commits] [PATCH] D12868: Revert "Fixup XFAIL marking on TestConstVariables for clang version"

2015-09-14 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: tfiala.
chaoren added a subscriber: lldb-commits.

Linux with ToT clang (3.8) fails.

This reverts commit r247633.

http://reviews.llvm.org/D12868

Files:
  test/lang/c/const_variables/TestConstVariables.py

Index: test/lang/c/const_variables/TestConstVariables.py
===
--- test/lang/c/const_variables/TestConstVariables.py
+++ test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


Index: test/lang/c/const_variables/TestConstVariables.py
===
--- test/lang/c/const_variables/TestConstVariables.py
+++ test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using platform-specific names like `getpid` in tests")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247647 - Fix error on windows:

2015-09-14 Thread Ryan Brown via lldb-commits
Author: ribrdb
Date: Mon Sep 14 19:50:43 2015
New Revision: 247647

URL: http://llvm.org/viewvc/llvm-project?rev=247647&view=rev
Log:
Fix error on windows:

c:\buildbot\lldb-windows-x86\lldb-windows-x86\llvm\tools\lldb\source\symbol\goastcontext.cpp(906)
 : warning C4715: 'lldb_private::GoASTContext::GetBitSize' : not all control 
paths return a value
c:\buildbot\lldb-windows-x86\lldb-windows-x86\llvm\tools\lldb\source\symbol\goastcontext.cpp(1175)
 : error C4716: 'lldb_private::GoASTContext::ConvertStringToFloatValue' : must 
return a value



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

Modified: lldb/trunk/source/Symbol/GoASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/GoASTContext.cpp?rev=247647&r1=247646&r2=247647&view=diff
==
--- lldb/trunk/source/Symbol/GoASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/GoASTContext.cpp Mon Sep 14 19:50:43 2015
@@ -903,6 +903,7 @@ GoASTContext::GetBitSize(void *type, Exe
 default:
 assert(false);
 }
+return 0;
 }
 
 lldb::Encoding
@@ -1172,6 +1173,7 @@ size_t
 GoASTContext::ConvertStringToFloatValue(void *type, const char *s, uint8_t 
*dst, size_t dst_size)
 {
 assert(false);
+return 0;
 }
 //--
 // Dumping types


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


Re: [Lldb-commits] [PATCH] D12868: Revert "Fixup XFAIL marking on TestConstVariables for clang version"

2015-09-14 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247648: Revert "Fixup XFAIL marking on TestConstVariables 
for clang version" (authored by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D12868?vs=34764&id=34766#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12868

Files:
  lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Index: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
===
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


Index: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
===
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
@@ -16,9 +16,7 @@
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using platform-specific names like `getpid` in tests")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247648 - Revert "Fixup XFAIL marking on TestConstVariables for clang version"

2015-09-14 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Mon Sep 14 19:52:00 2015
New Revision: 247648

URL: http://llvm.org/viewvc/llvm-project?rev=247648&view=rev
Log:
Revert "Fixup XFAIL marking on TestConstVariables for clang version"

Summary:
Linux with ToT clang (3.8) fails.

This reverts commit r247633.

Reviewers: tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247648&r1=247647&r2=247648&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
19:52:00 2015
@@ -16,9 +16,7 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"], compiler="clang",
-compiler_version=['<', '3.6'])
+@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


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


Re: [Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

2015-09-14 Thread Paul Herman via lldb-commits
paulherman updated this revision to Diff 34768.
paulherman added a comment.

Search variables based on clang::DeclContext and clang::Decl tree

Moved the DeclLinkToObject inside Variable::GetDecl.


http://reviews.llvm.org/D12658

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerDecl.h
  include/lldb/Symbol/CompilerDeclContext.h
  include/lldb/Symbol/GoASTContext.h
  include/lldb/Symbol/SymbolFile.h
  include/lldb/Symbol/TypeSystem.h
  include/lldb/Symbol/Variable.h
  include/lldb/lldb-forward.h
  source/Expression/ClangASTSource.cpp
  source/Expression/ClangExpressionDeclMap.cpp
  source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
  source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  source/Symbol/CMakeLists.txt
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerDecl.cpp
  source/Symbol/CompilerDeclContext.cpp
  source/Symbol/Variable.cpp
  test/lang/cpp/nsimport/TestCppNsImport.py
  test/lang/cpp/nsimport/main.cpp

Index: test/lang/cpp/nsimport/main.cpp
===
--- test/lang/cpp/nsimport/main.cpp
+++ test/lang/cpp/nsimport/main.cpp
@@ -16,13 +16,57 @@
 }
 }
 
-using namespace N;
-using namespace Nested;
+namespace Global
+{
+int global;
+}
+
+namespace Fun
+{
+int fun_var;
+int fun()
+{
+fun_var = 5;
+return 0; // break 1
+}
+}
+
+namespace Single
+{
+int single = 3;
+}
+
+namespace NotImportedBefore
+{
+int not_imported = 45;
+}
+
+using namespace Global;
+
+int not_imported = 35;
+int fun_var = 9;
+
+namespace NotImportedAfter
+{
+int not_imported = 55;
+}
+
+namespace Imported
+{
+int imported = 99;
+}
+
+int imported = 89;
 
 int main()
 {
+using namespace N;
+using namespace Nested;
+using namespace Imported;
+using Single::single;
 n = 1;
 anon = 2;
 nested = 3;
-return 0; // break 0
+global = 4;
+return Fun::fun(); // break 0
 }
Index: test/lang/cpp/nsimport/TestCppNsImport.py
===
--- test/lang/cpp/nsimport/TestCppNsImport.py
+++ test/lang/cpp/nsimport/TestCppNsImport.py
@@ -16,6 +16,8 @@
 self.buildDsym()
 self.check()
 
+# This test is expected to fail because DW_TAG_imported_declaration and DW_TAG_imported_module are not parsed in SymbolFileDWARF
+@expectedFailureAll
 @dwarf_test
 def test_with_dwarf_and_run_command(self):
 """Tests imported namespaces in C++."""
@@ -45,6 +47,8 @@
 # Break on main function
 break_0 = target.BreakpointCreateBySourceRegex("// break 0", src_file_spec)
 self.assertTrue(break_0.IsValid() and break_0.GetNumLocations() >= 1, VALID_BREAKPOINT)
+break_1 = target.BreakpointCreateBySourceRegex("// break 1", src_file_spec)
+self.assertTrue(break_1.IsValid() and break_1.GetNumLocations() >= 1, VALID_BREAKPOINT)
 
 # Launch the process
 args = None
@@ -72,6 +76,35 @@
 test_result = frame.EvaluateExpression("anon")
 self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 2, "anon = 2")
 
+test_result = frame.EvaluateExpression("global")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 4, "global = 4")
+
+test_result = frame.EvaluateExpression("fun_var")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 9, "fun_var = 9")
+
+test_result = frame.EvaluateExpression("not_imported")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 35, "not_imported = 35")
+
+test_result = frame.EvaluateExpression("imported")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "imported = 99")
+
+test_result = frame.EvaluateExpression("single")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 3, "single = 3")
+
+# Continue to second breakpoint
+process.Continue()
+
+# Get the thread of the process
+self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+
+# Get current fream of the thread at the breakpoint
+frame = thread.GetSelectedFrame()
+
+# Test function inside namespace
+test_result = frame.EvaluateExpression("fun_var")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 5, "fun_var = 5")
+
 
 if __name__ == '__main__':
 import atexit
Index: source/Symbol/Variable.cpp
===
--- source/Symbol/Variable.cpp
+++ sour

Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

2015-09-14 Thread Dawn Perchik via lldb-commits
dawn added a comment.

In http://reviews.llvm.org/D12115#244049, @zturner wrote:

> The FileSpec is not even used for anything is it?


No, that was a carry over from a previous patch - now deleted.

> If you want to use the

>  RegularExpression, then use llvm's regular expression.  Honestly LLDB's

>  regular expression should be deprecated anyway, there's no reason to have

>  an LLDB regex and an LLVM regex when just one will suffice


I agree.

But for now, I've written a small regex wrapper for lldb-mi based on llvm's C 
regex implementation which uses lldb-mi's string types.  It would be awesome to 
replace lldb-mi's types with those of llvm someday (e.g. have CMIUtilString use 
StringRef instead of std::string, etc), so that it would be easier to use 
llvm's classes.


Repository:
  rL LLVM

http://reviews.llvm.org/D12115



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


Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.

2015-09-14 Thread Dawn Perchik via lldb-commits
dawn updated this revision to Diff 34769.
dawn added a comment.

Patch fixed to remove uses of lldb_private classes.


Repository:
  rL LLVM

http://reviews.llvm.org/D12115

Files:
  test/tools/lldb-mi/symbol/Makefile
  test/tools/lldb-mi/symbol/TestMiSymbol.py
  test/tools/lldb-mi/symbol/main.cpp
  test/tools/lldb-mi/symbol/x.cpp
  test/tools/lldb-mi/symbol/x.h
  tools/lldb-mi/MICmdCmdData.cpp
  tools/lldb-mi/MICmdCmdSymbol.cpp
  tools/lldb-mi/MIUtilParse.cpp
  tools/lldb-mi/MIUtilParse.h
  tools/lldb-mi/MIUtilString.cpp
  tools/lldb-mi/MIUtilString.h

Index: tools/lldb-mi/MIUtilString.h
===
--- tools/lldb-mi/MIUtilString.h
+++ tools/lldb-mi/MIUtilString.h
@@ -43,6 +43,7 @@
 /* ctor */ CMIUtilString();
 /* ctor */ CMIUtilString(const char *vpData);
 /* ctor */ CMIUtilString(const char *const *vpData);
+/* ctor */ CMIUtilString(const char *vpData, size_t nLen);
 //
 bool ExtractNumber(MIint64 &vwrNumber) const;
 CMIUtilString FindAndReplace(const CMIUtilString &vFind, const CMIUtilString &vReplaceWith) const;
Index: tools/lldb-mi/MIUtilString.cpp
===
--- tools/lldb-mi/MIUtilString.cpp
+++ tools/lldb-mi/MIUtilString.cpp
@@ -55,6 +55,20 @@
 }
 
 //++ 
+// Details: CMIUtilString constructor.
+// Type:Method.
+// Args:vpData  - Pointer to UTF8 text data.
+//  nLen- Length of string.
+// Return:  None.
+// Throws:  None.
+//--
+CMIUtilString::CMIUtilString(const char *vpData, size_t nLen)
+: std::string(vpData, nLen)
+{
+}
+
+
+//++ 
 // Details: CMIUtilString assignment operator.
 // Type:Method.
 // Args:vpRhs   - Pointer to UTF8 text data.
Index: tools/lldb-mi/MIUtilParse.h
===
--- tools/lldb-mi/MIUtilParse.h
+++ tools/lldb-mi/MIUtilParse.h
@@ -0,0 +1,93 @@
+//===-- MIUtilParse.h --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+ 
+#pragma once
+ 
+// Third party headers:
+#include "../lib/Support/regex_impl.h"
+
+// In-house headers:
+#include "MIUtilString.h"
+ 
+namespace MIUtilParse
+{
+ 
+//++ 
+// Details: MI common code utility class. Used to parse the output
+//  returned from lldb commands using regex.
+//--
+class CRegexParser
+{
+  public:
+// Helper class for keeping track of regex matches.
+class Match
+{
+friend CRegexParser;
+  public:
+/* ctor */ explicit Match(size_t nmatches)
+: m_matchStrs(nmatches), m_maxMatches(nmatches)
+{
+}
+size_t
+GetMatchCount() const
+{
+return m_matchStrs.size();
+}
+CMIUtilString
+GetMatchAtIndex(size_t i) const
+{
+if (m_matchStrs.size() > i)
+return m_matchStrs[i];
+return CMIUtilString();
+}
+  private:
+CMIUtilString::VecString_t m_matchStrs;
+const size_t m_maxMatches;
+};
+ 
+// Methods:
+// Compile the regular expression.
+/* ctor */ explicit CRegexParser(const char *regexStr);
+ 
+// Free the memory used by the regular expression.
+/* dtor */ ~CRegexParser();
+ 
+// No copies
+CRegexParser(const CRegexParser&) = delete;
+void operator=(CRegexParser&) = delete;
+ 
+// Return the match at the index.
+int
+GetMatchCount(const Match& match) const
+{
+if (m_isValid)
+return match.GetMatchCount();
+return 0;
+}
+ 
+bool
+IsValid() const
+{
+return m_isValid;
+}
+ 
+// Match the input against the regular expression.  Return an error
+// if the number of matches is less than minMatches.  If the default
+// minMatches value of 0 is passed, an error will be returned if
+// the number of matches is less than the maxMatches value used to
+// initialize Match.
+bool
+Execute(const char *input, Match& match, size_t minMatches = 0);
+ 
+  private:
+llvm_regex_t m_emma;
+const bool m_isValid;
+};
+
+}
Index: tools/lldb-mi/MIUtilParse.cpp
===
--- tools/lldb-mi/MIUtilParse.cpp
+++ tools/lldb-mi/MIUtilParse.cpp
@@ -0,0 +1,75 @@
+//===-- MIUtilParse.cpp *- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the Un

[Lldb-commits] [PATCH] D12872: Use uint64_t for GoArray size.

2015-09-14 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: ribrdb, clayborg.
brucem added a subscriber: lldb-commits.

This was int64_t, but all usages of it came from code that was passing
in unsigned values. The usages of the array size, except for one, were
also treating it as an unsigned value.  The usage that treated it as
signed was to try to figure out if it was a complete type or not, but
the callers creating the array didn't seem to be aware of using -1 as
an indicator for an incomplete array.

http://reviews.llvm.org/D12872

Files:
  include/lldb/Symbol/GoASTContext.h
  source/Symbol/GoASTContext.cpp

Index: source/Symbol/GoASTContext.cpp
===
--- source/Symbol/GoASTContext.cpp
+++ source/Symbol/GoASTContext.cpp
@@ -140,20 +140,20 @@
 class GoArray : public GoElem
 {
   public:
-GoArray(const ConstString &name, int64_t length, const CompilerType &elem)
+GoArray(const ConstString &name, uint64_t length, const CompilerType &elem)
 : GoElem(KIND_ARRAY, name, elem)
 , m_length(length)
 {
 }
 
-int64_t
+uint64_t
 GetLength() const
 {
 return m_length;
 }
 
   private:
-int64_t m_length;
+uint64_t m_length;
 GoArray(const GoArray &) = delete;
 const GoArray &operator=(const GoArray &) = delete;
 };
@@ -311,14 +311,7 @@
 GoArray *array = static_cast(type)->GetArray();
 if (array)
 {
-if (array->GetLength() == -1)
-{
-if (is_incomplete)
-{
-*is_incomplete = true;
-}
-}
-else if (size)
+if (size)
 {
 *size = array->GetLength();
 }
@@ -1297,7 +1290,7 @@
 }
 
 CompilerType
-GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length)
+GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length)
 {
 GoType *type = new GoArray(name, length, element_type);
 (*m_types)[name].reset(type);
Index: include/lldb/Symbol/GoASTContext.h
===
--- include/lldb/Symbol/GoASTContext.h
+++ include/lldb/Symbol/GoASTContext.h
@@ -70,7 +70,7 @@
 // Creating Types
 //--
 
-CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length);
+CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length);
 
 CompilerType CreateBaseType(int go_kind, const ConstString 
&type_name_const_str, uint64_t byte_size);
 


Index: source/Symbol/GoASTContext.cpp
===
--- source/Symbol/GoASTContext.cpp
+++ source/Symbol/GoASTContext.cpp
@@ -140,20 +140,20 @@
 class GoArray : public GoElem
 {
   public:
-GoArray(const ConstString &name, int64_t length, const CompilerType &elem)
+GoArray(const ConstString &name, uint64_t length, const CompilerType &elem)
 : GoElem(KIND_ARRAY, name, elem)
 , m_length(length)
 {
 }
 
-int64_t
+uint64_t
 GetLength() const
 {
 return m_length;
 }
 
   private:
-int64_t m_length;
+uint64_t m_length;
 GoArray(const GoArray &) = delete;
 const GoArray &operator=(const GoArray &) = delete;
 };
@@ -311,14 +311,7 @@
 GoArray *array = static_cast(type)->GetArray();
 if (array)
 {
-if (array->GetLength() == -1)
-{
-if (is_incomplete)
-{
-*is_incomplete = true;
-}
-}
-else if (size)
+if (size)
 {
 *size = array->GetLength();
 }
@@ -1297,7 +1290,7 @@
 }
 
 CompilerType
-GoASTContext::CreateArrayType(const ConstString &name, const CompilerType &element_type, int64_t length)
+GoASTContext::CreateArrayType(const ConstString &name, const CompilerType &element_type, uint64_t length)
 {
 GoType *type = new GoArray(name, length, element_type);
 (*m_types)[name].reset(type);
Index: include/lldb/Symbol/GoASTContext.h
===
--- include/lldb/Symbol/GoASTContext.h
+++ include/lldb/Symbol/GoASTContext.h
@@ -70,7 +70,7 @@
 // Creating Types
 //--
 
-CompilerType CreateArrayType(const ConstString &name, const CompilerType &element_type, int64_t length);
+CompilerType CreateArrayType(const ConstString &name, const CompilerType &element_type, uint64_t length);
 
 CompilerType CreateBaseType(int go_kind, const ConstString &type_name_const_str, uint64_t byte_size);
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12872: Use uint64_t for GoArray size.

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

This is meant to fix this warning:

  llvm/tools/lldb/source/Symbol/GoASTContext.cpp:1107:40: warning: comparison 
of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' 
(aka 'long long') [-Wsign-compare]
  if (ignore_array_bounds || idx < a->GetLength())
 ~~~ ^ ~~
  1 warning generated.


http://reviews.llvm.org/D12872



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


Re: [Lldb-commits] [PATCH] D12872: Use uint64_t for GoArray size.

2015-09-14 Thread Ryan Brown via lldb-commits
ribrdb accepted this revision.
ribrdb added a comment.
This revision is now accepted and ready to land.

Looks good


http://reviews.llvm.org/D12872



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


Re: [Lldb-commits] [PATCH] D12872: Use uint64_t for GoArray size.

2015-09-14 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247662: Use uint64_t for GoArray size. (authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D12872?vs=34775&id=34776#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12872

Files:
  lldb/trunk/include/lldb/Symbol/GoASTContext.h
  lldb/trunk/source/Symbol/GoASTContext.cpp

Index: lldb/trunk/source/Symbol/GoASTContext.cpp
===
--- lldb/trunk/source/Symbol/GoASTContext.cpp
+++ lldb/trunk/source/Symbol/GoASTContext.cpp
@@ -140,20 +140,20 @@
 class GoArray : public GoElem
 {
   public:
-GoArray(const ConstString &name, int64_t length, const CompilerType &elem)
+GoArray(const ConstString &name, uint64_t length, const CompilerType &elem)
 : GoElem(KIND_ARRAY, name, elem)
 , m_length(length)
 {
 }
 
-int64_t
+uint64_t
 GetLength() const
 {
 return m_length;
 }
 
   private:
-int64_t m_length;
+uint64_t m_length;
 GoArray(const GoArray &) = delete;
 const GoArray &operator=(const GoArray &) = delete;
 };
@@ -311,14 +311,7 @@
 GoArray *array = static_cast(type)->GetArray();
 if (array)
 {
-if (array->GetLength() == -1)
-{
-if (is_incomplete)
-{
-*is_incomplete = true;
-}
-}
-else if (size)
+if (size)
 {
 *size = array->GetLength();
 }
@@ -1297,7 +1290,7 @@
 }
 
 CompilerType
-GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length)
+GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length)
 {
 GoType *type = new GoArray(name, length, element_type);
 (*m_types)[name].reset(type);
Index: lldb/trunk/include/lldb/Symbol/GoASTContext.h
===
--- lldb/trunk/include/lldb/Symbol/GoASTContext.h
+++ lldb/trunk/include/lldb/Symbol/GoASTContext.h
@@ -70,7 +70,7 @@
 // Creating Types
 //--
 
-CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length);
+CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length);
 
 CompilerType CreateBaseType(int go_kind, const ConstString 
&type_name_const_str, uint64_t byte_size);
 


Index: lldb/trunk/source/Symbol/GoASTContext.cpp
===
--- lldb/trunk/source/Symbol/GoASTContext.cpp
+++ lldb/trunk/source/Symbol/GoASTContext.cpp
@@ -140,20 +140,20 @@
 class GoArray : public GoElem
 {
   public:
-GoArray(const ConstString &name, int64_t length, const CompilerType &elem)
+GoArray(const ConstString &name, uint64_t length, const CompilerType &elem)
 : GoElem(KIND_ARRAY, name, elem)
 , m_length(length)
 {
 }
 
-int64_t
+uint64_t
 GetLength() const
 {
 return m_length;
 }
 
   private:
-int64_t m_length;
+uint64_t m_length;
 GoArray(const GoArray &) = delete;
 const GoArray &operator=(const GoArray &) = delete;
 };
@@ -311,14 +311,7 @@
 GoArray *array = static_cast(type)->GetArray();
 if (array)
 {
-if (array->GetLength() == -1)
-{
-if (is_incomplete)
-{
-*is_incomplete = true;
-}
-}
-else if (size)
+if (size)
 {
 *size = array->GetLength();
 }
@@ -1297,7 +1290,7 @@
 }
 
 CompilerType
-GoASTContext::CreateArrayType(const ConstString &name, const CompilerType &element_type, int64_t length)
+GoASTContext::CreateArrayType(const ConstString &name, const CompilerType &element_type, uint64_t length)
 {
 GoType *type = new GoArray(name, length, element_type);
 (*m_types)[name].reset(type);
Index: lldb/trunk/include/lldb/Symbol/GoASTContext.h
===
--- lldb/trunk/include/lldb/Symbol/GoASTContext.h
+++ lldb/trunk/include/lldb/Symbol/GoASTContext.h
@@ -70,7 +70,7 @@
 // Creating Types
 //--
 
-CompilerType CreateArrayType(const ConstString &name, const CompilerType &element_type, int64_t length);
+CompilerType CreateArrayType(const ConstString &name, const CompilerType &element_type, uint64_t length);
 
 CompilerType CreateBaseType(int go_kind, const ConstString &type_name_const_str, uint64_t byte_size);
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247662 - Use uint64_t for GoArray size.

2015-09-14 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Mon Sep 14 23:33:48 2015
New Revision: 247662

URL: http://llvm.org/viewvc/llvm-project?rev=247662&view=rev
Log:
Use uint64_t for GoArray size.

Summary:
This was int64_t, but all usages of it came from code that was passing
in unsigned values. The usages of the array size, except for one, were
also treating it as an unsigned value.  The usage that treated it as
signed was to try to figure out if it was a complete type or not, but
the callers creating the array didn't seem to be aware of using -1 as
an indicator for an incomplete array.

Reviewers: ribrdb, clayborg

Subscribers: lldb-commits

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

Modified:
lldb/trunk/include/lldb/Symbol/GoASTContext.h
lldb/trunk/source/Symbol/GoASTContext.cpp

Modified: lldb/trunk/include/lldb/Symbol/GoASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/GoASTContext.h?rev=247662&r1=247661&r2=247662&view=diff
==
--- lldb/trunk/include/lldb/Symbol/GoASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/GoASTContext.h Mon Sep 14 23:33:48 2015
@@ -70,7 +70,7 @@ class GoASTContext : public TypeSystem
 // Creating Types
 //--
 
-CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length);
+CompilerType CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length);
 
 CompilerType CreateBaseType(int go_kind, const ConstString 
&type_name_const_str, uint64_t byte_size);
 

Modified: lldb/trunk/source/Symbol/GoASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/GoASTContext.cpp?rev=247662&r1=247661&r2=247662&view=diff
==
--- lldb/trunk/source/Symbol/GoASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/GoASTContext.cpp Mon Sep 14 23:33:48 2015
@@ -140,20 +140,20 @@ class GoElem : public GoType
 class GoArray : public GoElem
 {
   public:
-GoArray(const ConstString &name, int64_t length, const CompilerType &elem)
+GoArray(const ConstString &name, uint64_t length, const CompilerType &elem)
 : GoElem(KIND_ARRAY, name, elem)
 , m_length(length)
 {
 }
 
-int64_t
+uint64_t
 GetLength() const
 {
 return m_length;
 }
 
   private:
-int64_t m_length;
+uint64_t m_length;
 GoArray(const GoArray &) = delete;
 const GoArray &operator=(const GoArray &) = delete;
 };
@@ -311,14 +311,7 @@ GoASTContext::IsArrayType(void *type, Co
 GoArray *array = static_cast(type)->GetArray();
 if (array)
 {
-if (array->GetLength() == -1)
-{
-if (is_incomplete)
-{
-*is_incomplete = true;
-}
-}
-else if (size)
+if (size)
 {
 *size = array->GetLength();
 }
@@ -1297,7 +1290,7 @@ GoASTContext::DumpTypeDescription(void *
 }
 
 CompilerType
-GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, int64_t length)
+GoASTContext::CreateArrayType(const ConstString &name, const CompilerType 
&element_type, uint64_t length)
 {
 GoType *type = new GoArray(name, length, element_type);
 (*m_types)[name].reset(type);


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


[Lldb-commits] [lldb] r247663 - Coding style fix.

2015-09-14 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Mon Sep 14 23:50:56 2015
New Revision: 247663

URL: http://llvm.org/viewvc/llvm-project?rev=247663&view=rev
Log:
Coding style fix.

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

Modified: lldb/trunk/source/Symbol/GoASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/GoASTContext.cpp?rev=247663&r1=247662&r2=247663&view=diff
==
--- lldb/trunk/source/Symbol/GoASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/GoASTContext.cpp Mon Sep 14 23:50:56 2015
@@ -312,9 +312,7 @@ GoASTContext::IsArrayType(void *type, Co
 if (array)
 {
 if (size)
-{
 *size = array->GetLength();
-}
 if (element_type)
 *element_type = array->GetElementType();
 return true;


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


[Lldb-commits] [PATCH] D12873: Return false, not 0, for bools.

2015-09-14 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added a reviewer: clayborg.
brucem added a subscriber: lldb-commits.

http://reviews.llvm.org/D12873

Files:
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerType.cpp

Index: source/Symbol/CompilerType.cpp
===
--- source/Symbol/CompilerType.cpp
+++ source/Symbol/CompilerType.cpp
@@ -78,7 +78,7 @@
 *size = 0;
 if (is_incomplete)
 *is_incomplete = false;
-return 0;
+return false;
 }
 
 bool
Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -2449,7 +2449,7 @@
 *size = 0;
 if (is_incomplete)
 *is_incomplete = false;
-return 0;
+return false;
 }
 
 bool


Index: source/Symbol/CompilerType.cpp
===
--- source/Symbol/CompilerType.cpp
+++ source/Symbol/CompilerType.cpp
@@ -78,7 +78,7 @@
 *size = 0;
 if (is_incomplete)
 *is_incomplete = false;
-return 0;
+return false;
 }
 
 bool
Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -2449,7 +2449,7 @@
 *size = 0;
 if (is_incomplete)
 *is_incomplete = false;
-return 0;
+return false;
 }
 
 bool
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r247664 - Fixed up TestConstVariables for Linux/FreeBSD, take 2.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 14 23:53:14 2015
New Revision: 247664

URL: http://llvm.org/viewvc/llvm-project?rev=247664&view=rev
Log:
Fixed up TestConstVariables for Linux/FreeBSD, take 2.

Marked XFAIL for:
clang - all versions < 3.5.  I verified the first version it passes on Linux is 
3.5.
clang - version 3.7 (verified this fails)
clang - TOT/3.8 (verified this currently fails)

Ideally we dig into why this started failing and (hopefully) get this passing 
again.

Modified:
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=247664&r1=247663&r2=247664&view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Mon Sep 14 
23:53:14 2015
@@ -16,7 +16,15 @@ class ConstVariableTestCase(TestBase):
 self.buildDsym()
 self.const_variable()
 
-@expectedFailureAll(oslist=["freebsd", "linux"], compiler="clang")
+@expectedFailureAll(
+oslist=["freebsd", "linux"],
+compiler="clang", compiler_version=["<", "3.5"])
+@expectedFailureAll(
+oslist=["freebsd", "linux"],
+compiler="clang", compiler_version=["=", "3.7"])
+@expectedFailureAll(
+oslist=["freebsd", "linux"],
+compiler="clang", compiler_version=["=", "3.8"])
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureWindows("llvm.org/pr24489: Name lookup not working 
correctly on Windows")
 @expectedFailureWindows("llvm.org/pr24490: We shouldn't be using 
platform-specific names like `getpid` in tests")


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


Re: [Lldb-commits] [PATCH] D12831: Add JUnit/XUnit-formatted output to the lldb test run system

2015-09-14 Thread Todd Fiala via lldb-commits
tfiala updated this revision to Diff 34779.
tfiala added a comment.

Updated patch against svn r247664.


http://reviews.llvm.org/D12831

Files:
  test/dosep.py
  test/dotest.py
  test/dotest_args.py
  test/dotest_channels.py
  test/settings/TestSettings.py
  test/test_results.py

Index: test/test_results.py
===
--- /dev/null
+++ test/test_results.py
@@ -0,0 +1,778 @@
+"""
+ The LLVM Compiler Infrastructure
+
+This file is distributed under the University of Illinois Open Source
+License. See LICENSE.TXT for details.
+
+Provides classes used by the test results reporting infrastructure
+within the LLDB test suite.
+"""
+
+import argparse
+import cPickle
+import inspect
+import os
+import sys
+import threading
+import time
+import xml.sax.saxutils
+
+
+class EventBuilder(object):
+"""Helper class to build test result event dictionaries."""
+@staticmethod
+def _get_test_name_info(test):
+"""Returns (test-class-name, test-method-name) from a test case instance.
+
+@param test a unittest.TestCase instance.
+
+@return tuple containing (test class name, test method name)
+"""
+test_class_components = test.id().split(".")
+test_class_name = ".".join(test_class_components[:-1])
+test_name = test_class_components[-1]
+return (test_class_name, test_name)
+
+@staticmethod
+def _event_dictionary_common(test, event_type):
+"""Returns an event dictionary setup with values for the given event type.
+
+@param test the unittest.TestCase instance
+
+@param event_type the name of the event type (string).
+
+@return event dictionary with common event fields set.
+"""
+test_class_name, test_name = EventBuilder._get_test_name_info(test)
+return {
+"event": event_type,
+"test_class": test_class_name,
+"test_name": test_name,
+"event_time": time.time()
+}
+
+@staticmethod
+def _error_tuple_class(error_tuple):
+"""Returns the unittest error tuple's error class as a string.
+
+@param error_tuple the error tuple provided by the test framework.
+
+@return the error type (typically an exception) raised by the
+test framework.
+"""
+type_var = error_tuple[0]
+module = inspect.getmodule(type_var)
+if module:
+return "{}.{}".format(module.__name__, type_var.__name__)
+else:
+return type_var.__name__
+
+@staticmethod
+def _error_tuple_message(error_tuple):
+"""Returns the unittest error tuple's error message.
+
+@param error_tuple the error tuple provided by the test framework.
+
+@return the error message provided by the test framework.
+"""
+return str(error_tuple[1])
+
+@staticmethod
+def _event_dictionary_test_result(test, status):
+"""Returns an event dictionary with common test result fields set.
+
+@param test a unittest.TestCase instance.
+
+@param status the status/result of the test
+(e.g. "success", "failure", etc.)
+
+@return the event dictionary
+"""
+event = EventBuilder._event_dictionary_common(test, "test_result")
+event["status"] = status
+return event
+
+@staticmethod
+def _event_dictionary_issue(test, status, error_tuple):
+"""Returns an event dictionary with common issue-containing test result
+fields set.
+
+@param test a unittest.TestCase instance.
+
+@param status the status/result of the test
+(e.g. "success", "failure", etc.)
+
+@param error_tuple the error tuple as reported by the test runner.
+This is of the form (type, error).
+
+@return the event dictionary
+"""
+event = EventBuilder._event_dictionary_test_result(test, status)
+event["issue_class"] = EventBuilder._error_tuple_class(error_tuple)
+event["issue_message"] = EventBuilder._error_tuple_message(error_tuple)
+return event
+
+@staticmethod
+def event_for_start(test):
+"""Returns an event dictionary for the test start event.
+
+@param test a unittest.TestCase instance.
+
+@return the event dictionary
+"""
+return EventBuilder._event_dictionary_common(test, "test_start")
+
+@staticmethod
+def event_for_success(test):
+"""Returns an event dictionary for a successful test.
+
+@param test a unittest.TestCase instance.
+
+@return the event dictionary
+"""
+return EventBuilder._event_dictionary_test_result(test, "success")
+
+@staticmethod
+def event_for_unexpected_success(test, bugnumber):
+"""Returns an event dictionary for a test that succeeded but was
+expected to fail.
+
+@param test a unittest.TestCase instance.
+
+ 

[Lldb-commits] [lldb] r247665 - Mark TestMultipleDebuggers as flakey on Darwin.

2015-09-14 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Sep 15 00:31:27 2015
New Revision: 247665

URL: http://llvm.org/viewvc/llvm-project?rev=247665&view=rev
Log:
Mark TestMultipleDebuggers as flakey on Darwin.

See if this gets us past a few machines that are failing it when
it is expected to pass.

Modified:
lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py

Modified: lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=247665&r1=247664&r2=247665&view=diff
==
--- lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py Tue Sep 15 
00:31:27 2015
@@ -20,6 +20,7 @@ class TestMultipleSimultaneousDebuggers(
 @skipIfNoSBHeaders
 @expectedFailureFreeBSD("llvm.org/pr20282")
 @expectedFailureLinux("llvm.org/pr20282")
+@expectedFlakeyDarwin()
 def test_multiple_debuggers(self):
 env = {self.dylibPath : self.getLLDBLibraryEnvVal()}
 


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


Re: [Lldb-commits] [PATCH] D12079: [MIPS] microMIPS breakpoints, disassembly and compressed addresses

2015-09-14 Thread Jaydeep Patil via lldb-commits
jaydeep updated this revision to Diff 34782.
jaydeep added a comment.

Addressed review comments


Repository:
  rL LLVM

http://reviews.llvm.org/D12079

Files:
  source/Core/Address.cpp
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Target/RegisterContext.cpp
  source/Target/Target.cpp

Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -2092,6 +2092,27 @@
 addr_t code_addr = load_addr;
 switch (m_arch.GetMachine())
 {
+case llvm::Triple::mips:
+case llvm::Triple::mipsel:
+case llvm::Triple::mips64:
+case llvm::Triple::mips64el:
+switch (addr_class)
+{
+case eAddressClassData:
+case eAddressClassDebug:
+return LLDB_INVALID_ADDRESS;
+
+case eAddressClassUnknown:
+case eAddressClassInvalid:
+case eAddressClassCode:
+case eAddressClassCodeAlternateISA:
+case eAddressClassRuntime:
+if ((code_addr & 2ull) || (addr_class == eAddressClassCodeAlternateISA))
+code_addr |= 1ull;
+break;
+}
+break;
+
 case llvm::Triple::arm:
 case llvm::Triple::thumb:
 switch (addr_class)
@@ -2137,6 +2158,10 @@
 addr_t opcode_addr = load_addr;
 switch (m_arch.GetMachine())
 {
+case llvm::Triple::mips:
+case llvm::Triple::mipsel:
+case llvm::Triple::mips64:
+case llvm::Triple::mips64el:
 case llvm::Triple::arm:
 case llvm::Triple::thumb:
 switch (addr_class)
Index: source/Target/RegisterContext.cpp
===
--- source/Target/RegisterContext.cpp
+++ source/Target/RegisterContext.cpp
@@ -20,6 +20,7 @@
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Target/Target.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -103,7 +104,20 @@
 RegisterContext::GetPC(uint64_t fail_value)
 {
 uint32_t reg = ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-return ReadRegisterAsUnsigned (reg, fail_value);
+uint64_t pc = ReadRegisterAsUnsigned (reg, fail_value);
+
+if (pc != fail_value)
+{
+TargetSP target_sp = m_thread.CalculateTarget();
+if (target_sp)
+{
+Target *target = target_sp.get();
+if (target)
+pc = target->GetOpcodeLoadAddress (pc, eAddressClassCode);
+}
+}
+
+return pc;
 }
 
 bool
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1128,6 +1128,7 @@
 {
 LineTable* line_table;
 std::unique_ptr sequence_ap;
+ArchSpec arch;
 };
 
 //--
@@ -1156,8 +1157,20 @@
 info->sequence_ap.reset(line_table->CreateLineSequenceContainer());
 assert(info->sequence_ap.get());
 }
+
+/*
+ * MIPS:
+ * The SymbolContext may not have a valid target, thus we may not be able
+ * to call Address::GetOpcodeLoadAddress() which would clear the bit #0
+ * for MIPS. Use ArchSpec to clear the bit #0.
+*/
+lldb::addr_t file_addr = state.address;
+if (info->arch.GetMachine() == llvm::Triple::mips || info->arch.GetMachine() == llvm::Triple::mipsel
+   || info->arch.GetMachine() == llvm::Triple::mips64 || info->arch.GetMachine() == llvm::Triple::mips64el)
+file_addr = state.address & (~1ull);
+
 line_table->AppendLineEntryToSequence (info->sequence_ap.get(),
-   state.address,
+   file_addr,
state.line,
state.column,
state.file,
@@ -1197,6 +1210,7 @@
 {
 ParseDWARFLineTableCallbackInfo info;
 info.line_table = line_table_ap.get();
+GetObjectFile()->GetArchitecture(info.arch);
 lldb::offset_t offset = cu_line_offset;
 DWARFDebugLine::ParseStatementTable(get_debug_line_data(), &offset, ParseDWARFLineTableCallback, &info);
 if (m_debug_map_symfile)
Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1854,6 +1854,10 @@
 }
 }
 
+#

[Lldb-commits] [lldb] r247666 - [LLDB][MIPS] Add support for DT_MIPS_RLD_MAP_REL

2015-09-14 Thread Bhushan D. Attarde via lldb-commits
Author: bhushan.attarde
Date: Tue Sep 15 00:45:29 2015
New Revision: 247666

URL: http://llvm.org/viewvc/llvm-project?rev=247666&view=rev
Log:
[LLDB][MIPS] Add support for DT_MIPS_RLD_MAP_REL

SUMMARY:
This patch provides support for MIPS specific DT_MIPS_RLD_MAP_REL tag in 
LLDB.
This tag allows debugging of MIPS position independent executables and 
provides access to shared library information.

Reviewers: clayborg
Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
Differential Revision: http://reviews.llvm.org/D12794

Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=247666&r1=247665&r2=247666&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Sep 15 
00:45:29 2015
@@ -1097,16 +1097,35 @@ ObjectFileELF::GetImageInfoAddress(Targe
 addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize();
 return Address(dynsym_section_sp, offset);
 }
-else if (symbol.d_tag == DT_MIPS_RLD_MAP && target)
+// MIPS executables uses DT_MIPS_RLD_MAP_REL to support PIE. 
DT_MIPS_RLD_MAP exists in non-PIE.
+else if ((symbol.d_tag == DT_MIPS_RLD_MAP || symbol.d_tag == 
DT_MIPS_RLD_MAP_REL) && target)
 {
 addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize();
 addr_t dyn_base = dynsym_section_sp->GetLoadBaseAddress(target);
 if (dyn_base == LLDB_INVALID_ADDRESS)
 return Address();
-Address addr;
+
 Error error;
-if (target->ReadPointerFromMemory(dyn_base + offset, false, error, 
addr))
-return addr;
+if (symbol.d_tag == DT_MIPS_RLD_MAP)
+{
+// DT_MIPS_RLD_MAP tag stores an absolute address of the debug 
pointer.
+Address addr;
+if (target->ReadPointerFromMemory(dyn_base + offset, false, 
error, addr))
+return addr;
+}
+if (symbol.d_tag == DT_MIPS_RLD_MAP_REL)
+{
+// DT_MIPS_RLD_MAP_REL tag stores the offset to the debug 
pointer, relative to the address of the tag.
+uint64_t rel_offset;
+rel_offset = target->ReadUnsignedIntegerFromMemory(dyn_base + 
offset, false, GetAddressByteSize(), UINT64_MAX, error);
+if (error.Success() && rel_offset != UINT64_MAX)
+{
+Address addr;
+addr_t debug_ptr_address = dyn_base + (offset - 
GetAddressByteSize()) + rel_offset;
+addr.SetOffset (debug_ptr_address);
+return addr;
+}
+}
 }
 }
 


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


Re: [Lldb-commits] [PATCH] D12794: [MIPS] Add support for DT_MIPS_RLD_MAP_REL

2015-09-14 Thread Bhushan Attarde via lldb-commits
bhushan closed this revision.
bhushan added a comment.

Closed by commit http://reviews.llvm.org/rL247666


Repository:
  rL LLVM

http://reviews.llvm.org/D12794



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


[Lldb-commits] [PATCH] D12876: [MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfo

2015-09-14 Thread Jaydeep Patil via lldb-commits
jaydeep created this revision.
jaydeep added a reviewer: clayborg.
jaydeep added subscribers: lldb-commits, bhushan, sagar, mohit.bhakkad, 
nitesh.jain.
jaydeep set the repository for this revision to rL LLVM.

Refer to  for 
discussion on this topic.

Bare-iron target like YAMON gdb-stub does not support qProcessInfo, qC, 
qfThreadInfo, Hg and Hc packets. Reply from ‘?’ packet is as simple as ‘S05’. 
There is no packet which gives us process or threads information. In such 
cases, assume pid=tid=1.



Repository:
  rL LLVM

http://reviews.llvm.org/D12876

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -3396,6 +3396,17 @@
 m_curr_tid = tid;
 return true;
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have 
support for Hg packet.
+ * The reply from '?' packet could be as simple as 'S05'. There is no 
packet which can
+ * give us pid and/or tid. Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && IsConnected())
+{
+m_curr_tid = 1;
+return true;
+}
 }
 return false;
 }
@@ -3422,6 +3433,17 @@
 m_curr_tid_run = tid;
 return true;
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have 
support for Hc packet.
+ * The reply from '?' packet could be as simple as 'S05'. There is no 
packet which can
+ * give us pid and/or tid. Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && IsConnected())
+{
+m_curr_tid_run = 1;
+return true;
+}
 }
 return false;
 }
@@ -3547,6 +3569,17 @@
 } while (ch == ',');// Make sure we got a comma 
separator
 }
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have 
support for
+ * qProcessInfo, qC and qfThreadInfo packets. The reply from '?' 
packet could
+ * be as simple as 'S05'. There is no packet which can give us pid 
and/or tid.
+ * Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && thread_ids.size() == 0 && 
IsConnected())
+{
+thread_ids.push_back (1);
+}
 }
 else
 {


Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -3396,6 +3396,17 @@
 m_curr_tid = tid;
 return true;
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have support for Hg packet.
+ * The reply from '?' packet could be as simple as 'S05'. There is no packet which can
+ * give us pid and/or tid. Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && IsConnected())
+{
+m_curr_tid = 1;
+return true;
+}
 }
 return false;
 }
@@ -3422,6 +3433,17 @@
 m_curr_tid_run = tid;
 return true;
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have support for Hc packet.
+ * The reply from '?' packet could be as simple as 'S05'. There is no packet which can
+ * give us pid and/or tid. Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && IsConnected())
+{
+m_curr_tid_run = 1;
+return true;
+}
 }
 return false;
 }
@@ -3547,6 +3569,17 @@
 } while (ch == ',');// Make sure we got a comma separator
 }
 }
+
+/*
+ * Connected bare-iron target (like YAMON gdb-stub) may not have support for
+ * qProcessInfo, qC and qfThreadInfo packets. The reply from '?' packet could
+ * be as simple as 'S05'. There is no packet which can give us pid and/or tid.
+ * Assume pid=tid=1 in such cases.
+*/
+if (!response.IsNormalResponse() && thread_ids.size() == 0 && IsConnected())
+{
+thread_ids.push_back (1);
+}
 }
 else
 {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12877: [LLDB] Switch to assembly view if source is moved

2015-09-14 Thread Mohit Bhakkad via lldb-commits
mohit.bhakkad created this revision.
mohit.bhakkad added a reviewer: clayborg.
mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, 
lldb-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.

Repository:
  rL LLVM

http://reviews.llvm.org/D12877

Files:
  source/Target/StackFrame.cpp

Index: source/Target/StackFrame.cpp
===
--- source/Target/StackFrame.cpp
+++ source/Target/StackFrame.cpp
@@ -1503,12 +1503,15 @@
 have_source = true;
 if (source_lines_before > 0 || source_lines_after > 0)
 {
-
target->GetSourceManager().DisplaySourceLinesWithLineNumbers 
(m_sc.line_entry.file,
+size_t num_lines = 
target->GetSourceManager().DisplaySourceLinesWithLineNumbers 
(m_sc.line_entry.file,

   m_sc.line_entry.line,

   source_lines_before,

   source_lines_after,

   "->",

   &strm);
+/* Source might have been moved or removed. If no lines 
are displayed then switch to assembly view */
+if (num_lines == 0)
+have_source = false;
 }
 }
 switch (disasm_display)


Index: source/Target/StackFrame.cpp
===
--- source/Target/StackFrame.cpp
+++ source/Target/StackFrame.cpp
@@ -1503,12 +1503,15 @@
 have_source = true;
 if (source_lines_before > 0 || source_lines_after > 0)
 {
-target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_entry.file,
+size_t num_lines = target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_entry.file,
   m_sc.line_entry.line,
   source_lines_before,
   source_lines_after,
   "->",
   &strm);
+/* Source might have been moved or removed. If no lines are displayed then switch to assembly view */
+if (num_lines == 0)
+have_source = false;
 }
 }
 switch (disasm_display)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits