[Lldb-commits] [PATCH] D13493: [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints

2015-10-07 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/D13493

Files:
  source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp

Index: source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
===
--- source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
+++ source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
@@ -546,6 +546,9 @@
 { "LWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "LWR   rt, offset(base)" },
 { "LWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LWRE  rt, offset(base)" },
 { "LWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  "LWXC1 fd, index (base)" },
+{ "LLX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLX   rt, offset(base)" },
+{ "LLXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLXE  rt, offset(base)" },
+{ "LLDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLDX  rt, offset(base)" },
 
 { "SB", &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SBrt, offset(base)" },
 { "SBE",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SBE   rt, offset(base)" },
@@ -569,6 +572,21 @@
 { "SWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SWR   rt, offset(base)" },
 { "SWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SWRE  rt, offset(base)" },
 { "SWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  "SWXC1 fs, index (base)" },
+{ "SCX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCX   rt, offset(base)" },
+{ "SCXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCXE  rt, offset(base)" },
+{ "SCDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCDX  rt, offset(base)" },
+
+//--
+// MicroMIPS Load/Store instructions
+//--
+{ "LBU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LBU16 rt, decoded_offset(base)"   },
+{ "LHU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LHU16 rt, left_shifted_offset(base)"  },
+{ "LW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LW16  rt, left_shifted_offset(base)"  },
+{ "LWGP_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LWGP  rt, left_shifted_offset(gp)"},
+{ "SH16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SH16  rt, left_shifted_offset(base)"  },
+{ "SW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SW16  rt, left_shifted_offset(base)"  },
+{ "SW_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SWSP  rt, left_shifted_offset(base)"  },
+{ "SB16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SB16  rt, offset(base)"   },
 
 //--
 // Branch instructions
@@ -1097,29 +1115,37 @@
 bool success = false;
 uint32_t imm5 = insn.getOperand(2).getImm();
 uint32_t src, base;
+Context bad_vaddr_context;
+uint32_t address;
 
 src = m_reg_info->getEncodingValue (insn.getOperand(0).getReg());
 base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg());
 
+RegisterInfo reg_info_base;
+
+if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, reg_info_base))
+return false;
+
+// read base register
+address = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_zero_mips + base, 0, &success);
+if (!success)
+return false;
+
+// destination address
+address = address + imm5;
+
+// We use bad_vaddr_context to store base address which is used by H/W watchpoint
+// Set the bad_vaddr register with base address used in the instruction
+bad_vaddr_context.type = eContextInvalid;
+WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, dwarf_bad_mips, address);
+
 // We look for sp based non-volatile register stores.
 if (base == dwarf_sp_mips && nonvolatile_reg_p (src))
 {
 uint32_t address;
 RegisterInfo reg_info_base;
 RegisterInfo reg_info_src;
 
-if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, reg_info_base)
-|| !GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + src, reg_info_src))
-return false;
-
-// read SP
-address = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_zero_mips + base, 0, &success);
-if (!success)
-

Re: [Lldb-commits] [lldb] r249379 - Bug 25050: X87 FPU Special Purpose Registers

2015-10-07 Thread Aggarwal, Abhishek A via lldb-commits
Sure. Thanks a lot for suggesting this.

Thanks & Regards
Abhishek Aggarwal

From: Zachary Turner [mailto:ztur...@google.com]
Sent: Tuesday, October 6, 2015 6:01 PM
To: Aggarwal, Abhishek A; lldb-commits@lists.llvm.org
Subject: Re: [Lldb-commits] [lldb] r249379 - Bug 25050: X87 FPU Special Purpose 
Registers

I see.  In the future in this kind of situation could you mention in the commit 
message what test this fixes.  For example, "This fixes TestRegisters.py on 
FreeBSD".


On Tue, Oct 6, 2015 at 7:59 AM Aggarwal, Abhishek A 
mailto:abhishek.a.aggar...@intel.com>> wrote:
I had submitted a patch for the Bug 24457 which is similar kind of bug but on 
Linux x86_64 Platform. There, I had submitted a new test to reproduce this 
issue. The test is already there in public repository. Since, the same test 
goes for FreeBSD also therefore I didn’t need to write a new one.

-Thanks


From: Zachary Turner [mailto:ztur...@google.com]
Sent: Tuesday, October 6, 2015 4:53 PM
To: Aggarwal, Abhishek A; 
lldb-commits@lists.llvm.org
Subject: Re: [Lldb-commits] [lldb] r249379 - Bug 25050: X87 FPU Special Purpose 
Registers

Please don't submit CLs like this without a test in the future.  This should be 
testable by writing some assembly to move a value into an FPU register, setting 
a breakpoint, then querying the register values.  Can you submit this as a 
followup?

On Tue, Oct 6, 2015 at 12:05 AM Abhishek Aggarwal via lldb-commits 
mailto:lldb-commits@lists.llvm.org>> wrote:
Author: abhishek
Date: Tue Oct  6 02:04:03 2015
New Revision: 249379

URL: http://llvm.org/viewvc/llvm-project?rev=249379&view=rev
Log:
Bug 25050: X87 FPU Special Purpose Registers

Summary:
  - For x86_64-FreeBSD Platform:
-- LLDB now provides correct values of X87 FPU
   Special Purpose Registers like fstat, ftag, fctrl etc..

Signed-off-by: Abhishek Aggarwal 
mailto:abhishek.a.aggar...@intel.com>>

Reviewers: emaste, mikesart, clayborg

Subscribers: emaste

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

Modified:

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp

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

Modified: 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp?rev=249379&r1=249378&r2=249379&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
 Tue Oct  6 02:04:03 2015
@@ -58,6 +58,9 @@ RegisterContextPOSIXProcessMonitor_x86_6

  lldb_private::RegisterInfoInterface *register_info)
 : RegisterContextPOSIX_x86(thread, concrete_frame_idx, register_info)
 {
+// Store byte offset of fctrl (i.e. first register of FPR) wrt 'UserArea'
+const RegisterInfo *reg_info_fctrl = GetRegisterInfoByName("fctrl");
+m_fctrl_offset_in_userarea = reg_info_fctrl->byte_offset;
 }

 ProcessMonitor &
@@ -254,8 +257,15 @@ RegisterContextPOSIXProcessMonitor_x86_6
 }

 // Get pointer to m_fpr.xstate.fxsave variable and set the data from it.
-assert (reg_info->byte_offset < sizeof(m_fpr));
-uint8_t *src = (uint8_t *)&m_fpr + reg_info->byte_offset;
+// Byte offsets of all registers are calculated wrt 'UserArea' structure.
+// However, ReadFPR() reads fpu registers {using ptrace(PT_GETFPREGS,..)}
+// and stores them in 'm_fpr' (of type FPR structure). To extract values 
of fpu
+// registers, m_fpr should be read at byte offsets calculated wrt to FPR 
structure.
+
+// Since, FPR structure is also one of the member of UserArea structure.
+// byte_offset(fpu wrt FPR) = byte_offset(fpu wrt UserArea) - 
byte_offset(fctrl wrt UserArea)
+assert ( (reg_info->byte_offset - m_fctrl_offset_in_userarea) < 
sizeof(m_fpr));
+uint8_t *src = (uint8_t *)&m_fpr + reg_info->byte_offset - 
m_fctrl_offset_in_userarea;
 switch (reg_info->byte_size)
 {
 case 2:
@@ -308,8 +318,15 @@ RegisterContextPOSIXProcessMonitor_x86_6
 else
 {
 // Get pointer to m_fpr.xstate.fxsave variable and set the data to 
it.
-assert (reg_info->byte_offset < sizeof(m_fpr));
-uint8_t *dst = (uint8_t *)&m_fpr + reg_info->byte_offset;
+// Byte offsets of all registers are calculated wrt 'UserArea' 
structure.
+// However, WriteFPR() takes m_fpr (of type FPR structure) and 
writes only fpu
+// registers using ptrace(PT_SETFPREGS,..) API. Hence fpu 
registers should
+// be written in m_fpr at byte offsets calculated wrt FPR

Re: [Lldb-commits] [PATCH] D13503: commands: Use override instead of virtual.

2015-10-07 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Looks good. You can also fix a couple of style issues, if you feel like it (or 
just keep it in mind for next time).



Comment at: source/Commands/CommandObjectMemory.cpp:381
@@ -380,3 +380,3 @@
 
-virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t 
index)
+const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) 
override
 {

You might as well reformat this when you are touching it (line break after the 
type).


Comment at: source/Commands/CommandObjectMemory.cpp:1719
@@ -1718,3 +1718,3 @@
 
-virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t 
index)
+const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) 
override
 {

same here


Comment at: source/Commands/CommandObjectProcess.cpp:179
@@ -178,3 +178,3 @@
 
-virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t 
index)
+const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) 
override
 {

and here


http://reviews.llvm.org/D13503



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


[Lldb-commits] [lldb] r249530 - Run tests with dwo symbol files

2015-10-07 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Wed Oct  7 05:02:17 2015
New Revision: 249530

URL: http://llvm.org/viewvc/llvm-project?rev=249530&view=rev
Log:
Run tests with dwo symbol files

dwo symbol files are generated when code compiled with the "-gsplit-dwarf"
command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies
the test system to run tests with inferiors compile with the "-gsplit-dwarf"

Differential revision: http://reviews.llvm.org/D13300

Modified:
lldb/trunk/test/dotest.py
lldb/trunk/test/dotest_args.py
lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py
lldb/trunk/test/lldbtest.py
lldb/trunk/test/make/Makefile.rules
lldb/trunk/test/plugins/builder_base.py

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=249530&r1=249529&r2=249530&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Oct  7 05:02:17 2015
@@ -112,6 +112,7 @@ just_do_benchmarks_test = False
 
 dont_do_dsym_test = False
 dont_do_dwarf_test = False
+dont_do_dwo_test = False
 
 # The blacklist is optional (-b blacklistFile) and allows a central place to 
skip
 # testclass's and/or testclass.testmethod's.
@@ -469,6 +470,7 @@ def parseOptionsAndInitTestdirs():
 global just_do_benchmarks_test
 global dont_do_dsym_test
 global dont_do_dwarf_test
+global dont_do_dwo_test
 global blacklist
 global blacklistConfig
 global categoriesList
@@ -599,6 +601,8 @@ def parseOptionsAndInitTestdirs():
 # argparse makes sure we have correct options
 if args.N == 'dwarf':
 dont_do_dwarf_test = True
+elif args.N == 'dwo':
+dont_do_dwo_test = True
 elif args.N == 'dsym':
 dont_do_dsym_test = True
 

Modified: lldb/trunk/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest_args.py?rev=249530&r1=249529&r2=249530&view=diff
==
--- lldb/trunk/test/dotest_args.py (original)
+++ lldb/trunk/test/dotest_args.py Wed Oct  7 05:02:17 2015
@@ -60,7 +60,7 @@ def create_parser():
 
 # Test filtering options
 group = parser.add_argument_group('Test filtering options')
-group.add_argument('-N', choices=['dwarf', 'dsym'], help="Don't do test 
cases marked with the @dsym decorator by passing 'dsym' as the option arg, or 
don't do test cases marked with the @dwarf decorator by passing 'dwarf' as the 
option arg")
+group.add_argument('-N', choices=['dwarf', 'dwo', 'dsym'], help="Don't do 
test cases marked with the @dsym_test/@dwarf_test/@dwo_test decorator by 
passing dsym/dwarf/dwo as the option arg")
 X('-a', "Don't do lldb Python API tests")
 X('+a', "Just do lldb Python API tests. Do not specify along with '-a'", 
dest='plus_a')
 X('+b', 'Just do benchmark tests', dest='plus_b')

Modified: lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py?rev=249530&r1=249529&r2=249530&view=diff
==
--- lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py (original)
+++ lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py Wed Oct  7 
05:02:17 2015
@@ -13,6 +13,7 @@ class DeadStripTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureWindows("llvm.org/pr24778")
+@expectedFailureDwo("llvm.org/pr25087")
 @skipIfFreeBSD # The -dead_strip linker option isn't supported on FreeBSD 
versions of ld.
 def test(self):
 """Test breakpoint works correctly with dead-code stripping."""

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249530&r1=249529&r2=249530&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct  7 05:02:17 2015
@@ -567,6 +567,23 @@ def dwarf_test(func):
 wrapper.__dwarf_test__ = True
 return wrapper
 
+def dwo_test(func):
+"""Decorate the item as a dwo test."""
+if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+raise Exception("@dwo_test can only be used to decorate a test method")
+@wraps(func)
+def wrapper(self, *args, **kwargs):
+try:
+if lldb.dont_do_dwo_test:
+self.skipTest("dwo tests")
+except AttributeError:
+pass
+return func(self, *args, **kwargs)
+
+# Mark this function as such to separate them from the regular tests.
+wrapper.__dwo_test__ = True
+return wrapper
+
 def debugserver_test(func):
 """Decorate the item as a debugserver test."""
 if isinstance(func, type) and issubclass(func, unittest2.TestCase):
@@ -65

[Lldb-commits] [lldb] r249531 - [Go] Fix inconsistent-missing-override warnings.

2015-10-07 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Wed Oct  7 05:02:24 2015
New Revision: 249531

URL: http://llvm.org/viewvc/llvm-project?rev=249531&view=rev
Log:
[Go] Fix inconsistent-missing-override warnings.

Modified:
lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h

Modified: lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h?rev=249531&r1=249530&r2=249531&view=diff
==
--- lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h Wed Oct  7 
05:02:24 2015
@@ -78,11 +78,11 @@ namespace lldb_private {
 //--
 // PluginInterface protocol
 //--
-virtual lldb_private::ConstString
-GetPluginName();
+lldb_private::ConstString
+GetPluginName() override;
 
-virtual uint32_t
-GetPluginVersion();
+uint32_t
+GetPluginVersion() override;
 
 private:
 GoLanguageRuntime(Process *process) : 
lldb_private::LanguageRuntime(process) { } // Call CreateInstance instead.


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


Re: [Lldb-commits] [PATCH] D13300: Run tests with dwo symbol files

2015-10-07 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249530: Run tests with dwo symbol files (authored by 
tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D13300?vs=36114&id=36723#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13300

Files:
  lldb/trunk/test/dotest.py
  lldb/trunk/test/dotest_args.py
  lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py
  lldb/trunk/test/lldbtest.py
  lldb/trunk/test/make/Makefile.rules
  lldb/trunk/test/plugins/builder_base.py

Index: lldb/trunk/test/dotest.py
===
--- lldb/trunk/test/dotest.py
+++ lldb/trunk/test/dotest.py
@@ -112,6 +112,7 @@
 
 dont_do_dsym_test = False
 dont_do_dwarf_test = False
+dont_do_dwo_test = False
 
 # The blacklist is optional (-b blacklistFile) and allows a central place to skip
 # testclass's and/or testclass.testmethod's.
@@ -469,6 +470,7 @@
 global just_do_benchmarks_test
 global dont_do_dsym_test
 global dont_do_dwarf_test
+global dont_do_dwo_test
 global blacklist
 global blacklistConfig
 global categoriesList
@@ -599,6 +601,8 @@
 # argparse makes sure we have correct options
 if args.N == 'dwarf':
 dont_do_dwarf_test = True
+elif args.N == 'dwo':
+dont_do_dwo_test = True
 elif args.N == 'dsym':
 dont_do_dsym_test = True
 
Index: lldb/trunk/test/plugins/builder_base.py
===
--- lldb/trunk/test/plugins/builder_base.py
+++ lldb/trunk/test/plugins/builder_base.py
@@ -113,6 +113,17 @@
 # True signifies that we can handle building dwarf.
 return True
 
+def buildDwo(sender=None, architecture=None, compiler=None, dictionary=None, clean=True):
+"""Build the binaries with dwarf debug info."""
+commands = []
+if clean:
+commands.append([getMake(), "clean", getCmdLine(dictionary)])
+commands.append([getMake(), "MAKE_DSYM=NO", "MAKE_DWO=YES", getArchSpec(architecture), getCCSpec(compiler), getCmdLine(dictionary)])
+
+lldbtest.system(commands, sender=sender)
+# True signifies that we can handle building dwo.
+return True
+
 def cleanup(sender=None, dictionary=None):
 """Perform a platform-specific cleanup after the test."""
 #import traceback
Index: lldb/trunk/test/make/Makefile.rules
===
--- lldb/trunk/test/make/Makefile.rules
+++ lldb/trunk/test/make/Makefile.rules
@@ -185,6 +185,10 @@
 	CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(TRIPLE_CFLAGS)
 endif
 
+ifeq "$(MAKE_DWO)" "YES"
+	CFLAGS += -gsplit-dwarf
+endif
+
 CXXFLAGS += -std=c++11
 CXXFLAGS += $(CFLAGS)
 LD = $(CC)
Index: lldb/trunk/test/dotest_args.py
===
--- lldb/trunk/test/dotest_args.py
+++ lldb/trunk/test/dotest_args.py
@@ -60,7 +60,7 @@
 
 # Test filtering options
 group = parser.add_argument_group('Test filtering options')
-group.add_argument('-N', choices=['dwarf', 'dsym'], help="Don't do test cases marked with the @dsym decorator by passing 'dsym' as the option arg, or don't do test cases marked with the @dwarf decorator by passing 'dwarf' as the option arg")
+group.add_argument('-N', choices=['dwarf', 'dwo', 'dsym'], help="Don't do test cases marked with the @dsym_test/@dwarf_test/@dwo_test decorator by passing dsym/dwarf/dwo as the option arg")
 X('-a', "Don't do lldb Python API tests")
 X('+a', "Just do lldb Python API tests. Do not specify along with '-a'", dest='plus_a')
 X('+b', 'Just do benchmark tests', dest='plus_b')
Index: lldb/trunk/test/lldbtest.py
===
--- lldb/trunk/test/lldbtest.py
+++ lldb/trunk/test/lldbtest.py
@@ -567,6 +567,23 @@
 wrapper.__dwarf_test__ = True
 return wrapper
 
+def dwo_test(func):
+"""Decorate the item as a dwo test."""
+if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+raise Exception("@dwo_test can only be used to decorate a test method")
+@wraps(func)
+def wrapper(self, *args, **kwargs):
+try:
+if lldb.dont_do_dwo_test:
+self.skipTest("dwo tests")
+except AttributeError:
+pass
+return func(self, *args, **kwargs)
+
+# Mark this function as such to separate them from the regular tests.
+wrapper.__dwo_test__ = True
+return wrapper
+
 def debugserver_test(func):
 """Decorate the item as a debugserver test."""
 if isinstance(func, type) and issubclass(func, unittest2.TestCase):
@@ -657,10 +674,13 @@
 return expectedFailure(fn, bugnumber)
 
 def expectedFailureDwarf(bugnumber=None):
-return expectedFailureAll(bugnumber==bugnumber, debug_info="dwarf")
+return expectedFailureAll(bugnumber=bugnumber, debug_info="dwarf")
+
+def expectedFailureD

Re: [Lldb-commits] [PATCH] D13300: Run tests with dwo symbol files

2015-10-07 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

I committed in this CL in its current state (with fixing the issues raised by 
Pavel).

If you see any of the newly added dwo test failing on your platform then please 
skip/xfail them accordingly or let me know so I can take a look.

If you have to disable the running of all dwo related tests on a platform then 
you can do it with setting dont_do_dwo_test to True with the correct condition 
(see the setting of dont_do_dsym_test in dotest.py:1520)


Repository:
  rL LLVM

http://reviews.llvm.org/D13300



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


[Lldb-commits] [lldb] r249533 - Fix minor typos in comments.

2015-10-07 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Wed Oct  7 05:11:10 2015
New Revision: 249533

URL: http://llvm.org/viewvc/llvm-project?rev=249533&view=rev
Log:
Fix minor typos in comments.

Modified:
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=249533&r1=249532&r2=249533&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Wed Oct  7 05:11:10 
2015
@@ -302,7 +302,7 @@ CommandObjectExpression::EvaluateExpress
 
 // If the language was not specified in the expression command,
 // set it to the language in the target's properties if
-// specified, else default to the langage for the frame.
+// specified, else default to the language for the frame.
 if (m_command_options.language != eLanguageTypeUnknown)
 options.SetLanguage(m_command_options.language);
 else if (target->GetLanguage() != eLanguageTypeUnknown)

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=249533&r1=249532&r2=249533&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Oct  7 05:11:10 2015
@@ -401,7 +401,7 @@ protected:
 
 if (process_sp)
 {
-// Seems wierd that we Launch a core file, but 
that is
+// Seems weird that we Launch a core file, but 
that is
 // what we do!
 error = process_sp->LoadCore();
 
@@ -1290,7 +1290,7 @@ protected:
 if (target)
 {
 size_t argc = command.GetArgumentCount();
-// check for at least 3 arguments and an odd nubmer of parameters
+// check for at least 3 arguments and an odd number of parameters
 if (argc >= 3 && argc & 1)
 {
 bool success = false;

Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=249533&r1=249532&r2=249533&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Wed Oct  7 05:11:10 
2015
@@ -104,7 +104,7 @@ CommandObjectMultiwordWatchpoint::Verify
 std::pair Pair;
 size_t i;
 int32_t idx;
-// Go through the argments and make a canonical form of arg list containing
+// Go through the arguments and make a canonical form of arg list 
containing
 // only numbers with possible "-" in between.
 for (i = 0; i < args.GetArgumentCount(); ++i) {
 llvm::StringRef Arg(args.GetArgumentAtIndex(i));


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


[Lldb-commits] [PATCH] D13506: Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: clayborg, jingham, jhibbits, emaste.
brucem added a subscriber: lldb-commits.

The StackUsesFrames and FunctionCallsChangeCFA virtual functions
aren't used anywhere and aren't overridden by anything.

They were introduced when the ABISysV_ppc* code was added and weren't
used at the time. The review for the commit that added them can be
found at http://reviews.llvm.org/D5988

The commit comment notes that backtraces don't yet work:

Backtraces don't work. This is due to PowerPC ABI using a
backchain pointer in memory, instead of a dedicated frame
pointer register for the backchain.

So there is a possibility these were added with the intent of using
them in the future.

http://reviews.llvm.org/D13506

Files:
  source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
  source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h

Index: source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
===
--- source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
+++ source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
Index: source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
===
--- source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--


Index: source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
===
--- source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
+++ source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
Index: source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
===
--- source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


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

2015-10-07 Thread Jaydeep Patil via lldb-commits
jaydeep added a comment.

Hi Dawn,

Could you please provide more details on this?

Thanks,
Jaydeep


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247773



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


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

2015-10-07 Thread Jaydeep Patil via lldb-commits
jaydeep added a comment.

Hi Dawn,

Could you please provide more details on this?

Thanks,
Jaydeep


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247968



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


[Lldb-commits] [lldb] r249539 - XFAIL new dwo test failing with totclang on linux i386

2015-10-07 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Wed Oct  7 06:40:10 2015
New Revision: 249539

URL: http://llvm.org/viewvc/llvm-project?rev=249539&view=rev
Log:
XFAIL new dwo test failing with totclang on linux i386

Modified:

lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py

Modified: 
lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py?rev=249539&r1=249538&r2=249539&view=diff
==
--- 
lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
 (original)
+++ 
lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
 Wed Oct  7 06:40:10 2015
@@ -13,6 +13,7 @@ class BreakpointLocationsTestCase(TestBa
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureWindows("llvm.org/pr24528")
+@expectedFailureAll(oslist=["linux"], compiler="clang", 
compiler_version=["=", "3.8"], archs=["i386"], debug_info="dwo")
 def test(self):
 """Test breakpoint enable/disable for a breakpoint ID with multiple 
locations."""
 self.build()


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


[Lldb-commits] [lldb] r249541 - Remove working directory from remote platform in the test suite

2015-10-07 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Wed Oct  7 07:38:29 2015
New Revision: 249541

URL: http://llvm.org/viewvc/llvm-project?rev=249541&view=rev
Log:
Remove working directory from remote platform in the test suite

Previously we haven't cleaned up the working directory we created on
the remote platform and because of it we run out of storage on some
android device/emulator (caused by the 2x increase of the number of
test cases because of dwo).

Modified:
lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249541&r1=249540&r2=249541&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct  7 07:38:29 2015
@@ -2472,6 +2472,13 @@ class TestBase(Base):
 error = lldb.remote_platform.MakeDirectory(remote_test_dir, 0700)
 if error.Success():
 lldb.remote_platform.SetWorkingDirectory(remote_test_dir)
+
+def remove_working_dir():
+# TODO: Make it working on Windows when we need it for 
remote debugging support
+# TODO: Add a command to SBPlatform/Platform to remove a 
(non empty) directory
+shell_cmd = lldb.SBPlatformShellCommand("rm -rf %s" % 
remote_test_dir)
+lldb.remote_platform.Run(shell_cmd)
+self.addTearDownHook(remove_working_dir)
 else:
 print "error: making remote directory '%s': %s" % 
(remote_test_dir, error)
 


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


Re: [Lldb-commits] [PATCH] D13503: commands: Use override instead of virtual.

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem marked 2 inline comments as done.
brucem added a comment.

http://reviews.llvm.org/D13503



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


Re: [Lldb-commits] [PATCH] D13506: Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Justin Hibbits via lldb-commits
jhibbits added a comment.

Backtraces do work now, for ppc at least (ppc64 IIRC still has issues dealing 
with the function descriptors, but traversing the backchain does work).  I can 
test this after I get my system set up from my move, but if you've tested it 
either natively or on a core then I'll greenlight it.


http://reviews.llvm.org/D13506



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


Re: [Lldb-commits] [PATCH] D13506: Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

There's nothing to test here short of "Does it compile?" as these functions 
aren't actually used anywhere. I'm cleaning out dead virtuals in various 
patches.


http://reviews.llvm.org/D13506



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


Re: [Lldb-commits] [PATCH] D13506: Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Justin Hibbits via lldb-commits
jhibbits accepted this revision.
jhibbits added a comment.
This revision is now accepted and ready to land.

In http://reviews.llvm.org/D13506#261638, @brucem wrote:

> There's nothing to test here short of "Does it compile?" as these functions 
> aren't actually used anywhere. I'm cleaning out dead virtuals in various 
> patches.


Ah okay.  I think when I added this ABI plugin, those came along for the ride 
when I copied the SysV-x86_64 plugin, I don't remember adding these myself, so 
they must be just plain old leftovers.


http://reviews.llvm.org/D13506



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


[Lldb-commits] [lldb] r249549 - Fix race condition in the working directory cleanup code

2015-10-07 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Wed Oct  7 09:52:16 2015
New Revision: 249549

URL: http://llvm.org/viewvc/llvm-project?rev=249549&view=rev
Log:
Fix race condition in the working directory cleanup code

Modified:
lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249549&r1=249548&r2=249549&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct  7 09:52:16 2015
@@ -2473,12 +2473,17 @@ class TestBase(Base):
 if error.Success():
 lldb.remote_platform.SetWorkingDirectory(remote_test_dir)
 
-def remove_working_dir():
+# This function removes all files from the current working 
directory while leaving
+# the directories in place. The cleaup is required to reduce 
the disk space required
+# by the test suit while leaving the directories untached is 
neccessary because
+# sub-directories might belong to an other test
+def clean_working_directory():
 # TODO: Make it working on Windows when we need it for 
remote debugging support
-# TODO: Add a command to SBPlatform/Platform to remove a 
(non empty) directory
-shell_cmd = lldb.SBPlatformShellCommand("rm -rf %s" % 
remote_test_dir)
+# TODO: Replace the heuristic to remove the files with a 
logic what collects the
+# list of files we have to remove during test runs.
+shell_cmd = lldb.SBPlatformShellCommand("rm %s/*" % 
remote_test_dir)
 lldb.remote_platform.Run(shell_cmd)
-self.addTearDownHook(remove_working_dir)
+self.addTearDownHook(clean_working_directory)
 else:
 print "error: making remote directory '%s': %s" % 
(remote_test_dir, error)
 


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


[Lldb-commits] [lldb] r249554 - Resumbit "Fix race condition during process detach"

2015-10-07 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Oct  7 10:11:11 2015
New Revision: 249554

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

This is a resubmission of r248371. It also incorporates the process event 
hijack patch by Kyrill
Lapshin in D12968.

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

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=249554&r1=249553&r2=249554&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Oct  7 10:11:11 2015
@@ -3494,7 +3494,7 @@ protected:
 }
 
 Error
-HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp);
+StopForDestroyOrDetach(lldb::EventSP &exit_event_sp);
 
 bool
 StateChangedIsExternallyHijacked();

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

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

2015-10-07 Thread Pavel Labath via lldb-commits
labath added a comment.

I have committed http://reviews.llvm.org/D13056 with the event hijacking 
portion from your patch. I think your use case should be working now. I am 
planning to return to this later, as I believe there are still some edge cases 
lurking here.


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


Re: [Lldb-commits] [PATCH] D13224: [DWARFASTParserClang] Strengthen incomplete type handling.

2015-10-07 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

I will use an example to explain the problem that this patch is trying to solve.

class.h:

  class C
  {
  public:
  C () {
  c = 0;
  }
  
  virtual int method();
  
  private:
  int c;
  };

class.cpp:

  #include "class.h"
  
  int
  C::method ()
  {
  return c;
  }

main.cpp:

  #include "class.h"
  
  int
  main ()
  {
C c;
  
return c.method();
  }

Compile as follows:

  g++|clang++ -g class.cpp main.cpp # on mac you will require -flimit-debug-info

The interesting DWARF for the CU main.cpp is here:

  < 1><0x0029>DW_TAG_class_type
  DW_AT_name  "C"
  DW_AT_declaration   yes(1)
  DW_AT_sibling   <0x0041>
  < 2><0x0030>  DW_TAG_subprogram
DW_AT_external  yes(1)
DW_AT_name  "C"
DW_AT_decl_file 0x0001 class.h
DW_AT_decl_line 0x0005
DW_AT_accessibility DW_ACCESS_public
DW_AT_declaration   yes(1)
DW_AT_object_pointer<0x003a>
  < 3><0x003a>DW_TAG_formal_parameter
  DW_AT_type  <0x0041>
  DW_AT_artificialyes(1)

As you can see, there is a method declaration under a class declaration (not 
definition). The same CU also has subprogram DIEs as follows:

  < 1><0x0047>DW_TAG_subprogram
  DW_AT_specification <0x0030>
  DW_AT_inlineDW_INL_declared_not_inlined
  DW_AT_object_pointer<0x0055>
  DW_AT_sibling   <0x005f>
  < 2><0x0055>  DW_TAG_formal_parameter
DW_AT_name  "this"
DW_AT_type  <0x005f>
DW_AT_artificialyes(1)
  < 1><0x005f>DW_TAG_const_type
  DW_AT_type  <0x0041>
  < 1><0x0064>DW_TAG_subprogram
  DW_AT_abstract_origin   <0x0047>
  DW_AT_linkage_name  "_ZN1CC2Ev"
  DW_AT_low_pc0x00400640
  DW_AT_high_pc   32
  DW_AT_frame_baselen 0x0001: 9c: 
DW_OP_call_frame_cfa
  DW_AT_object_pointer<0x0087>
  DW_AT_GNU_all_call_sitesyes(1)
  DW_AT_sibling   <0x0090>
  < 2><0x0087>  DW_TAG_formal_parameter
DW_AT_abstract_origin   <0x0055>
DW_AT_location  len 0x0002: 9168: 
DW_OP_fbreg -24

The DWARF for the CU class.cpp has the full definition of the class (with all 
its methods), but does not have subprogram DIEs which refer to the methods in 
the class definition. So, when stopped in C::C, the context resolves to an 
incomplete class for which a full definition also exists. This patch is 
essentially saying, "use the complete definition of the class when you find its 
incomplete definition."


http://reviews.llvm.org/D13224



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


[Lldb-commits] [lldb] r249558 - Fix a linking issue on lib lldb linking with the new Go support

2015-10-07 Thread Sylvestre Ledru via lldb-commits
Author: sylvestre
Date: Wed Oct  7 11:13:10 2015
New Revision: 249558

URL: http://llvm.org/viewvc/llvm-project?rev=249558&view=rev
Log:
Fix a linking issue on lib lldb linking with the new Go support

Modified:
lldb/trunk/lib/Makefile

Modified: lldb/trunk/lib/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=249558&r1=249557&r2=249558&view=diff
==
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Wed Oct  7 11:13:10 2015
@@ -61,6 +61,7 @@ USEDLIBS = lldbAPI.a \
lldbPluginRenderScriptRuntime.a \
lldbPluginMemoryHistoryASan.a \
lldbPluginCPlusPlusLanguage.a \
+   lldbPluginLanguageRuntimeGo.a \
lldbPluginObjCLanguage.a \
lldbPluginObjCPlusPlusLanguage.a \
lldbPluginObjectContainerBSDArchive.a \


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


[Lldb-commits] [lldb] r249561 - Add expectedFailureFreeBSD for Go runtime test

2015-10-07 Thread Ed Maste via lldb-commits
Author: emaste
Date: Wed Oct  7 11:21:43 2015
New Revision: 249561

URL: http://llvm.org/viewvc/llvm-project?rev=249561&view=rev
Log:
Add expectedFailureFreeBSD for Go runtime test

AssertionError: False is not True : No thread stopped at our breakpoint.

llvm.org/pr24895

Modified:
lldb/trunk/test/lang/go/runtime/TestGoASTContext.py

Modified: lldb/trunk/test/lang/go/runtime/TestGoASTContext.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/go/runtime/TestGoASTContext.py?rev=249561&r1=249560&r2=249561&view=diff
==
--- lldb/trunk/test/lang/go/runtime/TestGoASTContext.py (original)
+++ lldb/trunk/test/lang/go/runtime/TestGoASTContext.py Wed Oct  7 11:21:43 2015
@@ -11,6 +11,7 @@ class TestGoLanguageRuntime(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @python_api_test
+@expectedFailureFreeBSD('llvm.org/pr24895')
 @skipIfRemote # Not remote test suite ready
 @skipUnlessGoInstalled
 def test_with_dsym_and_python_api(self):


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


Re: [Lldb-commits] [PATCH] D13224: [DWARFASTParserClang] Strengthen incomplete type handling.

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

Thanks for the info, now the patch makes more sense. That is some really lame 
DWARF I must say, but alas we must deal with it. Looks good.


http://reviews.llvm.org/D13224



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


Re: [Lldb-commits] [PATCH] D13506: Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249563: Remove unused virtuals from ABISysV_ppc* (authored 
by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D13506?vs=36726&id=36753#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13506

Files:
  lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
  lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h

Index: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
===
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
Index: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
===
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--


Index: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
===
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
Index: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
===
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -62,12 +62,6 @@
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r249563 - Remove unused virtuals from ABISysV_ppc*

2015-10-07 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Wed Oct  7 11:48:33 2015
New Revision: 249563

URL: http://llvm.org/viewvc/llvm-project?rev=249563&view=rev
Log:
Remove unused virtuals from ABISysV_ppc*

Summary:
The StackUsesFrames and FunctionCallsChangeCFA virtual functions
aren't used anywhere and aren't overridden by anything.

They were introduced when the ABISysV_ppc* code was added and weren't
used at the time. The review for the commit that added them can be
found at http://reviews.llvm.org/D5988

The commit comment notes that backtraces don't yet work:

Backtraces don't work. This is due to PowerPC ABI using a
backchain pointer in memory, instead of a dedicated frame
pointer register for the backchain.

So there is a possibility these were added with the intent of using
them in the future.

Reviewers: clayborg, jingham, jhibbits, emaste

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h

Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h?rev=249563&r1=249562&r2=249563&view=diff
==
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h Wed Oct  7 11:48:33 
2015
@@ -62,12 +62,6 @@ public:
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@ public:
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--

Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h?rev=249563&r1=249562&r2=249563&view=diff
==
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h Wed Oct  7 
11:48:33 2015
@@ -62,12 +62,6 @@ public:
 virtual bool
 RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info);
 
-virtual bool
-StackUsesFrames ()
-{
-return true;
-}
-
 // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
 // When there is a trap handler on the stack, e.g. _sigtramp in userland
 // code, we've seen that the stack pointer is often not aligned properly
@@ -97,12 +91,6 @@ public:
 return true;
 }
 
-virtual bool
-FunctionCallsChangeCFA ()
-{
-return true;
-}
-
 virtual const lldb_private::RegisterInfo *
 GetRegisterInfoArray (uint32_t &count);
 //--


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


Re: [Lldb-commits] [PATCH] D13333: Reduce header inclusion in Expression.

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem updated this revision to Diff 36760.
brucem added a comment.

Rebase forward.


http://reviews.llvm.org/D1

Files:
  include/lldb/Expression/ExpressionParser.h
  include/lldb/Expression/ExpressionVariable.h
  include/lldb/Expression/FunctionCaller.h
  include/lldb/Expression/IRInterpreter.h
  include/lldb/Expression/Materializer.h
  include/lldb/Expression/UserExpression.h
  source/Expression/UtilityFunction.cpp
  source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
  source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
  source/Plugins/ExpressionParser/Clang/ClangUserExpression.h

Index: source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
===
--- source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
+++ source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
@@ -32,7 +32,6 @@
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Expression/UserExpression.h"
 #include "lldb/Expression/Materializer.h"
-#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/ExecutionContext.h"
 
 namespace lldb_private
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
@@ -16,8 +16,6 @@
 #include "lldb/Core/Error.h"
 #include "lldb/Expression/ExpressionParser.h"
 
-#include "IRForTarget.h"
-
 #include 
 #include 
 
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -14,6 +14,7 @@
 #include "ClangExpressionDeclMap.h"
 #include "ClangModulesDeclVendor.h"
 #include "ClangPersistentVariables.h"
+#include "IRForTarget.h"
 
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBufferHeap.h"
Index: source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
===
--- source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
+++ source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
@@ -12,7 +12,7 @@
 
 #include "clang/Sema/SemaConsumer.h"
 #include "lldb/Core/ClangForward.h"
-#include "lldb/Symbol/TaggedASTType.h"
+#include "lldb/Target/Target.h"
 
 namespace lldb_private {
 
Index: source/Expression/UtilityFunction.cpp
===
--- source/Expression/UtilityFunction.cpp
+++ source/Expression/UtilityFunction.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Expression/IRExecutionUnit.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Target/ExecutionContext.h"
+#include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb_private;
Index: include/lldb/Expression/UserExpression.h
===
--- include/lldb/Expression/UserExpression.h
+++ include/lldb/Expression/UserExpression.h
@@ -16,18 +16,13 @@
 #include 
 #include 
 
-// Other libraries and framework includes
-
-#include "llvm/ADT/ArrayRef.h"
-
 // Project includes
 
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-private.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Expression/Expression.h"
 #include "lldb/Expression/Materializer.h"
-#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/ExecutionContext.h"
 
 namespace lldb_private
Index: include/lldb/Expression/Materializer.h
===
--- include/lldb/Expression/Materializer.h
+++ include/lldb/Expression/Materializer.h
@@ -13,8 +13,7 @@
 #include "lldb/lldb-private-types.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Expression/IRMemoryMap.h"
-#include "lldb/Host/Mutex.h"
-#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/StackFrame.h"
 
 #include 
Index: include/lldb/Expression/IRInterpreter.h
===
--- include/lldb/Expression/IRInterpreter.h
+++ include/lldb/Expression/IRInterpreter.h
@@ -13,7 +13,6 @@
 #include "lldb/lldb-public.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Stream.h"
-#include "lldb/Symbol/TaggedASTType.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/Pass.h"
 
Index: include/lldb/Expression/FunctionCaller.h
===
--- include/lldb/Expression/FunctionCaller.h
+++ include/lldb/Expression/FunctionCaller.h
@@ -17,19 +17,14 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectList.h"
 #include

[Lldb-commits] [lldb] r249570 - Reduce header inclusion in Expression.

2015-10-07 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Wed Oct  7 12:22:54 2015
New Revision: 249570

URL: http://llvm.org/viewvc/llvm-project?rev=249570&view=rev
Log:
Reduce header inclusion in Expression.

Reviewers: spyffe

Subscribers: lldb-commits

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

Modified:
lldb/trunk/include/lldb/Expression/ExpressionParser.h
lldb/trunk/include/lldb/Expression/ExpressionVariable.h
lldb/trunk/include/lldb/Expression/FunctionCaller.h
lldb/trunk/include/lldb/Expression/IRInterpreter.h
lldb/trunk/include/lldb/Expression/Materializer.h
lldb/trunk/include/lldb/Expression/UserExpression.h
lldb/trunk/source/Expression/UtilityFunction.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h

Modified: lldb/trunk/include/lldb/Expression/ExpressionParser.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionParser.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/ExpressionParser.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionParser.h Wed Oct  7 12:22:54 
2015
@@ -11,12 +11,8 @@
 #define liblldb_ExpressionParser_h_
 
 #include "lldb/lldb-public.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Error.h"
 
-#include 
-#include 
-
 namespace lldb_private
 {
 

Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Wed Oct  7 12:22:54 
2015
@@ -10,11 +10,6 @@
 #ifndef liblldb_ExpressionVariable_h_
 #define liblldb_ExpressionVariable_h_
 
-// C Includes
-#include 
-#include 
-#include 
-
 // C++ Includes
 #include 
 

Modified: lldb/trunk/include/lldb/Expression/FunctionCaller.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/FunctionCaller.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/FunctionCaller.h (original)
+++ lldb/trunk/include/lldb/Expression/FunctionCaller.h Wed Oct  7 12:22:54 2015
@@ -17,19 +17,14 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectList.h"
 #include "lldb/Expression/Expression.h"
 #include "lldb/Expression/ExpressionParser.h"
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Target/Process.h"
 
 namespace lldb_private
 {
 
-class ClangExpressionParser;
-
 //--
 /// @class FunctionCaller FunctionCaller.h "lldb/Expression/FunctionCaller.h"
 /// @brief Encapsulates a function that can be called.

Modified: lldb/trunk/include/lldb/Expression/IRInterpreter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/IRInterpreter.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/IRInterpreter.h (original)
+++ lldb/trunk/include/lldb/Expression/IRInterpreter.h Wed Oct  7 12:22:54 2015
@@ -13,7 +13,6 @@
 #include "lldb/lldb-public.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Stream.h"
-#include "lldb/Symbol/TaggedASTType.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/Pass.h"
 

Modified: lldb/trunk/include/lldb/Expression/Materializer.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/Materializer.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/Materializer.h (original)
+++ lldb/trunk/include/lldb/Expression/Materializer.h Wed Oct  7 12:22:54 2015
@@ -13,8 +13,7 @@
 #include "lldb/lldb-private-types.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Expression/IRMemoryMap.h"
-#include "lldb/Host/Mutex.h"
-#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/StackFrame.h"
 
 #include 

Modified: lldb/trunk/include/lldb/Expression/UserExpression.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/UserExpression.h?rev=249570&r1=249569&r2=249570&view=diff
==
--- lldb/trunk/include/lldb/Expression/UserExpression.h

Re: [Lldb-commits] [PATCH] D13333: Reduce header inclusion in Expression.

2015-10-07 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249570: Reduce header inclusion in Expression. (authored by 
brucem).

Changed prior to commit:
  http://reviews.llvm.org/D1?vs=36760&id=36762#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D1

Files:
  lldb/trunk/include/lldb/Expression/ExpressionParser.h
  lldb/trunk/include/lldb/Expression/ExpressionVariable.h
  lldb/trunk/include/lldb/Expression/FunctionCaller.h
  lldb/trunk/include/lldb/Expression/IRInterpreter.h
  lldb/trunk/include/lldb/Expression/Materializer.h
  lldb/trunk/include/lldb/Expression/UserExpression.h
  lldb/trunk/source/Expression/UtilityFunction.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h

Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
===
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
@@ -16,8 +16,6 @@
 #include "lldb/Core/Error.h"
 #include "lldb/Expression/ExpressionParser.h"
 
-#include "IRForTarget.h"
-
 #include 
 #include 
 
Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -14,6 +14,7 @@
 #include "ClangExpressionDeclMap.h"
 #include "ClangModulesDeclVendor.h"
 #include "ClangPersistentVariables.h"
+#include "IRForTarget.h"
 
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBufferHeap.h"
Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
===
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
@@ -32,7 +32,6 @@
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Expression/UserExpression.h"
 #include "lldb/Expression/Materializer.h"
-#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/ExecutionContext.h"
 
 namespace lldb_private
Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
===
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
@@ -12,7 +12,7 @@
 
 #include "clang/Sema/SemaConsumer.h"
 #include "lldb/Core/ClangForward.h"
-#include "lldb/Symbol/TaggedASTType.h"
+#include "lldb/Target/Target.h"
 
 namespace lldb_private {
 
Index: lldb/trunk/source/Expression/UtilityFunction.cpp
===
--- lldb/trunk/source/Expression/UtilityFunction.cpp
+++ lldb/trunk/source/Expression/UtilityFunction.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Expression/IRExecutionUnit.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Target/ExecutionContext.h"
+#include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb_private;
Index: lldb/trunk/include/lldb/Expression/Materializer.h
===
--- lldb/trunk/include/lldb/Expression/Materializer.h
+++ lldb/trunk/include/lldb/Expression/Materializer.h
@@ -13,8 +13,7 @@
 #include "lldb/lldb-private-types.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Expression/IRMemoryMap.h"
-#include "lldb/Host/Mutex.h"
-#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/StackFrame.h"
 
 #include 
Index: lldb/trunk/include/lldb/Expression/FunctionCaller.h
===
--- lldb/trunk/include/lldb/Expression/FunctionCaller.h
+++ lldb/trunk/include/lldb/Expression/FunctionCaller.h
@@ -17,19 +17,14 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectList.h"
 #include "lldb/Expression/Expression.h"
 #include "lldb/Expression/ExpressionParser.h"
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Target/Process.h"
 
 namespace lldb_private
 {
 
-class ClangExpressionParser;
-
 //--
 /// @class FunctionCaller FunctionCaller.h "lldb/Expression/FunctionCaller.h"
 /// @brief Encapsulates a function that can be called.
Index: lldb/trunk/include/lldb/Expression/ExpressionVariable.h
==

[Lldb-commits] [PATCH] D13520: Make CMake display more readable paths to Python binaries on Windows

2015-10-07 Thread Vadim Macagon via lldb-commits
enlight created this revision.
enlight added reviewers: zturner, brucem.
enlight added a subscriber: lldb-commits.
enlight set the repository for this revision to rL LLVM.

Previously CMake would display messages like these:

```
-- LLDB Found PythonExecutable: 
$<$:C:/Projects/Python-2.7.9-bin/x64/python_d.exe>$<$>:C:/Projects/Python-2.7.9-bin/x64/python.exe>
-- LLDB Found PythonLibs: 
$<$:C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib>$<$>:C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib>
-- LLDB Found PythonDLL: 
$<$:C:/Projects/Python-2.7.9-bin/x64/python27_d.dll>$<$>:C:/Projects/Python-2.7.9-bin/x64/python27.dll>
```

This patch makes the messages look like this:

```
-- LLDB Found PythonExecutable: C:/Projects/Python-2.7.9-bin/x64/python.exe and 
C:/Projects/Python-2.7.9-bin/x64/python_d.exe
-- LLDB Found PythonLibs: C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib 
and C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib
-- LLDB Found PythonDLL: C:/Projects/Python-2.7.9-bin/x64/python27.dll and 
C:/Projects/Python-2.7.9-bin/x64/python27_d.dll
```

I've also added checks to ensure the messages are actually accurate, as in 
check that the files actually exist before claiming they've been found. If any 
of the files are missing Python integration will be disabled for the build.

Repository:
  rL LLVM

http://reviews.llvm.org/D13520

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -82,6 +82,42 @@
   file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE)
   file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" 
PYTHON_RELEASE_LIB)
   file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" 
PYTHON_RELEASE_DLL)
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_EXE})
+message("Unable to find ${PYTHON_DEBUG_EXE}")
+unset(PYTHON_DEBUG_EXE)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_RELEASE_EXE})
+message("Unable to find ${PYTHON_RELEASE_EXE}")
+unset(PYTHON_RELEASE_EXE)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_LIB})
+message("Unable to find ${PYTHON_DEBUG_LIB}")
+unset(PYTHON_DEBUG_LIB)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_RELEASE_LIB})
+message("Unable to find ${PYTHON_RELEASE_LIB}")
+unset(PYTHON_RELEASE_LIB)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_DLL})
+message("Unable to find ${PYTHON_DEBUG_DLL}")
+unset(PYTHON_DEBUG_DLL)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_RELEASE_DLL})
+message("Unable to find ${PYTHON_RELEASE_DLL}")
+unset(PYTHON_RELEASE_DLL)
+  endif()
+  
+  if (NOT (PYTHON_DEBUG_EXE AND PYTHON_RELEASE_EXE AND PYTHON_DEBUG_LIB AND 
PYTHON_RELEASE_LIB AND PYTHON_DEBUG_DLL AND PYTHON_RELEASE_DLL))
+message("Python installation is corrupt. Python support will be disabled 
for this build.")
+set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+return()
+  endif()
 
   # Generator expressions are evaluated in the context of each build 
configuration generated
   # by CMake. Here we use the $:VALUE logical generator 
expression to ensure
@@ -113,9 +149,9 @@
   set (PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
   set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} PARENT_SCOPE)
 
-  message("-- LLDB Found PythonExecutable: ${PYTHON_EXECUTABLE}")
-  message("-- LLDB Found PythonLibs: ${PYTHON_LIBRARY}")
-  message("-- LLDB Found PythonDLL: ${PYTHON_DLL}")
+  message("-- LLDB Found PythonExecutable: ${PYTHON_RELEASE_EXE} and 
${PYTHON_DEBUG_EXE}")
+  message("-- LLDB Found PythonLibs: ${PYTHON_RELEASE_LIB} and 
${PYTHON_DEBUG_LIB}")
+  message("-- LLDB Found PythonDLL: ${PYTHON_RELEASE_DLL} and 
${PYTHON_DEBUG_DLL}")
   message("-- LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIRS}")
 endfunction(find_python_libs_windows)
 


Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -82,6 +82,42 @@
   file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE)
   file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_RELEASE_LIB)
   file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_RELEASE_DLL)
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_EXE})
+message("Unable to find ${PYTHON_DEBUG_EXE}")
+unset(PYTHON_DEBUG_EXE)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_RELEASE_EXE})
+message("Unable to find ${PYTHON_RELEASE_EXE}")
+unset(PYTHON_RELEASE_EXE)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_LIB})
+message("Unable to find ${PYTHON_DEBUG_LIB}")
+unset(PYTHON_DEBUG_LIB)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_RELEASE_LIB})
+message("Unable to find ${PYTHON_RELEASE_LIB}")
+unset(PYTHON_RELEASE_LIB)
+  endif()
+  
+  if (NOT EXISTS ${PYTHON_DEBUG_DLL})
+message("Unable to find ${PYTHON_DEBUG_DLL}")
+unset(PYTHON_DEBUG_DLL)
+  endif()
+  
+  if (NOT

Re: [Lldb-commits] [PATCH] D13520: Make CMake display more readable paths to Python binaries on Windows

2015-10-07 Thread Zachary Turner via lldb-commits
zturner added a comment.

Looks good, thanks.


Repository:
  rL LLVM

http://reviews.llvm.org/D13520



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


[Lldb-commits] [lldb] r249585 - Revert commit -r249558 as it is not fixing the issue :/

2015-10-07 Thread Sylvestre Ledru via lldb-commits
Author: sylvestre
Date: Wed Oct  7 13:26:29 2015
New Revision: 249585

URL: http://llvm.org/viewvc/llvm-project?rev=249585&view=rev
Log:
Revert commit -r249558 as it is not fixing the issue :/

Modified:
lldb/trunk/lib/Makefile

Modified: lldb/trunk/lib/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=249585&r1=249584&r2=249585&view=diff
==
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Wed Oct  7 13:26:29 2015
@@ -61,7 +61,6 @@ USEDLIBS = lldbAPI.a \
lldbPluginRenderScriptRuntime.a \
lldbPluginMemoryHistoryASan.a \
lldbPluginCPlusPlusLanguage.a \
-   lldbPluginLanguageRuntimeGo.a \
lldbPluginObjCLanguage.a \
lldbPluginObjCPlusPlusLanguage.a \
lldbPluginObjectContainerBSDArchive.a \


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


[Lldb-commits] [lldb] r249587 - This is the work I was building up to with my patches yesterday

2015-10-07 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Oct  7 13:36:53 2015
New Revision: 249587

URL: http://llvm.org/viewvc/llvm-project?rev=249587&view=rev
Log:
This is the work I was building up to with my patches yesterday

Introduce the notion of Language-based formatter prefix/suffix
This is meant for languages that share certain data types but present them in 
syntatically different ways, such that LLDB can now have language-based 
awareness of which of the syntax variations it has to present to the user when 
formatting those values

This is goodness for new languages and interoperability, but is NFC for 
existing languages. As such, existing tests cover this


Modified:
lldb/trunk/include/lldb/Target/Language.h
lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSString.h
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h
lldb/trunk/source/Target/Language.cpp

lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py

lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py

lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/main.m

lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py

lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py

Modified: lldb/trunk/include/lldb/Target/Language.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Language.h?rev=249587&r1=249586&r2=249587&view=diff
==
--- lldb/trunk/include/lldb/Target/Language.h (original)
+++ lldb/trunk/include/lldb/Target/Language.h Wed Oct  7 13:36:53 2015
@@ -79,7 +79,7 @@ public:
 virtual lldb::LanguageType
 GetLanguageType () const = 0;
 
-bool
+virtual bool
 IsTopLevelFunction (Function& function);
 
 virtual lldb::TypeCategoryImplSP
@@ -106,6 +106,13 @@ public:
 virtual std::unique_ptr
 GetTypeScavenger ();
 
+// if an individual data formatter can apply to several types and cross a 
language boundary
+// it makes sense for individual languages to want to customize the 
printing of values of that
+// type by appending proper prefix/suffix information in language-specific 
ways
+virtual bool
+GetFormatterPrefixSuffix (ValueObject& valobj, ConstString type_hint,
+  std::string& prefix, std::string& suffix);
+
 // These are accessors for general information about the Languages lldb 
knows about:
 
 static lldb::LanguageType

Modified: lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/CF.cpp?rev=249587&r1=249586&r2=249587&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/CF.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/CF.cpp Wed Oct  7 13:36:53 2015
@@ -17,6 +17,7 @@
 #include "lldb/DataFormatters/FormattersHelpers.h"
 #include "lldb/Host/Endian.h"
 #include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Target/Language.h"
 #include "lldb/Target/ObjCLanguageRuntime.h"
 #include "lldb/Target/Target.h"
 
@@ -42,6 +43,8 @@ lldb_private::formatters::CFAbsoluteTime
 bool
 lldb_private::formatters::CFBagSummaryProvider (ValueObject& valobj, Stream& 
stream, const TypeSummaryOptions& options)
 {
+static ConstString g_TypeHint("CFBag");
+
 ProcessSP process_sp = valobj.GetProcessSP();
 if (!process_sp)
 return false;
@@ -84,7 +87,9 @@ lldb_private::formatters::CFBagSummaryPr
 ValueObjectSP count_sp;
 StreamString expr;
 expr.Printf("(int)CFBagGetCount((void*)0x%" PRIx64 
")",valobj.GetPointerValue());
-if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), 
frame_sp.get(), count_sp) != eExpressionCompleted)
+EvaluateExpressionOptions options;
+options.SetResultIsInternal(true);
+if (process_sp->GetTarget().EvaluateExpression(expr.GetData(), 
frame_sp.get(), count_sp, options) != eExpressionCompleted)
 return false;
 if (!count_sp)
 return false;
@@ -98,8 +103,21 @@ lldb_private::formatters::CFBagSummaryPr
 if (error.Fail())
 return false;
 }
-stream.Printf("@\"%u value%s\"",
-  

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

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment.

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

> I have committed http://reviews.llvm.org/D13056 with the event hijacking 
> portion from your patch. I think your use case should be working now. I am 
> planning to return to this later, as I believe there are still some edge 
> cases lurking here.


Yes, of course - hijacked listener setup solves (or hides) issue.

Problem on my side (if no hijacking listener used and without your patch for 
race condition) is - halt listener often just got timeout (10 secs), then 
target process killed without crash. Or may work without timeout - this is 
really threads conflict issue - m_listener in process object unusable because 
operates with invalid data - I even saw strings in log belongs to RSP module - 
just random memory areas, memory corrupted. If you set hijacked listener - no 
problem because it looks has non-shared m_events collection.

Again - this is remote debugging issue only. Also I checked on Linux host 
debugging - process killed just fine.

I will try pure public lldb build with your patch and will see then, thanks.


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


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

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment.

In http://reviews.llvm.org/D12968#259931, @clayborg wrote:

> This can't be the real fix for this. We must be able to trust the empty() 
> function call. We must have someone playing with the collection without 
> locking the mutex. Please find the real bug.


Hello @clayborg,

I will continue investigation why it works unstable without hijacked listener 
setup.


Repository:
  rL LLVM

http://reviews.llvm.org/D12968



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


[Lldb-commits] [lldb] r249597 - [lldb-mi] Fix evaluation of strings containing characters from non-ascii range

2015-10-07 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Wed Oct  7 14:55:33 2015
New Revision: 249597

URL: http://llvm.org/viewvc/llvm-project?rev=249597&view=rev
Log:
[lldb-mi] Fix evaluation of strings containing characters from non-ascii range

If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes.  This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available.  This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.

Based on patch from evgeny.levi...@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058

Modified:
lldb/trunk/include/lldb/API/SBTypeSummary.h
lldb/trunk/source/API/SBTypeSummary.cpp
lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
lldb/trunk/test/tools/lldb-mi/variable/main.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h

Modified: lldb/trunk/include/lldb/API/SBTypeSummary.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeSummary.h?rev=249597&r1=249596&r2=249597&view=diff
==
--- lldb/trunk/include/lldb/API/SBTypeSummary.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeSummary.h Wed Oct  7 14:55:33 2015
@@ -126,6 +126,9 @@ namespace lldb {
 operator = (const lldb::SBTypeSummary &rhs);
 
 bool
+DoesPrintValue (lldb::SBValue value);
+
+bool
 IsEqualTo (lldb::SBTypeSummary &rhs);
 
 bool

Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=249597&r1=249596&r2=249597&view=diff
==
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Wed Oct  7 14:55:33 2015
@@ -8,9 +8,8 @@
 
//===--===//
 
 #include "lldb/API/SBTypeSummary.h"
-
 #include "lldb/API/SBStream.h"
-
+#include "lldb/API/SBValue.h"
 #include "lldb/DataFormatters/DataVisualization.h"
 
 using namespace lldb;
@@ -284,6 +283,15 @@ SBTypeSummary::GetDescription (lldb::SBS
 }
 }
 
+bool
+SBTypeSummary::DoesPrintValue (lldb::SBValue value)
+{
+if (!IsValid())
+return false;
+lldb::ValueObjectSP value_sp = value.GetSP();
+return m_opaque_sp->DoesPrintValue(value_sp.get());
+}
+
 lldb::SBTypeSummary &
 SBTypeSummary::operator = (const lldb::SBTypeSummary &rhs)
 {

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py?rev=249597&r1=249596&r2=249597&view=diff
==
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py Wed Oct  7 
14:55:33 2015
@@ -1,3 +1,4 @@
+#coding=utf8
 """
 Test lldb-mi -gdb-set and -gdb-show commands for 'print option-name'.
 """
@@ -10,6 +11,17 @@ class MiGdbSetShowTestCase(lldbmi_testca
 
 mydir = TestBase.compute_mydir(__file__)
 
+# evaluates array when char-array-as-string is off
+def eval_and_check_array(self, var, typ, length):
+self.runCmd("-var-create - * %s" % var)
+
self.expect('\^done,name="var\d+",numchild="%d",value="\[%d\]",type="%s 
\[%d\]",thread-id="1",has_more="0"' % (length, length, typ, length))
+
+# evaluates any type which can be represented as string of characters
+def eval_and_match_string(self, var, value, typ):
+value=value.replace("\\", "").replace("\"", "\\\"")
+self.runCmd("-var-create - * " + var)
+
self.expect('\^done,name="var\d+",numchild="[0-9]+",value="%s",type="%s",thread-id="1",has_more="0"'
 % (value, typ))
+
 @lldbmi_test
 @skipIfWindows #llvm.org/pr24452: Get lldb-mi working on Windows
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
@@ -35,29 +47,23 @@ class MiGdbSetShowTestCase(lldbmi_testca
 self.runCmd("-gdb-show print char-array-as-string")
 self.expect("\^done,value=\"off\"")
 
-# Test that an char* is expanded to string when print 
char-array-as-string is "off"
-self.runCmd("-var-create - * cp")
-self.expect("\^done,name=\"var\d+\",numchild=\"1\",value=\"0x[0-9a-f]+ 
\\\"t\"hello\"n\\\"\",type=\"const
 char \*\",thread-id=\"1\",has_more=\"0\"")
-
-# Test that an char[] isn't expanded to string when print 
char-ar

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

2015-10-07 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249597: [lldb-mi] Fix evaluation of strings containing 
characters from non-ascii range (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13058?vs=36341&id=36782#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13058

Files:
  lldb/trunk/include/lldb/API/SBTypeSummary.h
  lldb/trunk/source/API/SBTypeSummary.cpp
  lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
  lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
  lldb/trunk/test/tools/lldb-mi/variable/main.cpp
  lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
  lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h

Index: lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h
===
--- lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h
@@ -55,6 +55,7 @@
 CMIUtilString GetSimpleValueCStringPointer() const;
 CMIUtilString GetSimpleValueCStringArray() const;
 bool GetCompositeValue(const bool vbPrintFieldNames, CMICmnMIValueTuple &vwrMiValueTuple, const MIuint vnDepth = 1) const;
+CMIUtilString GetValueSummary() const;
 
 // Statics:
   private:
Index: lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
@@ -9,6 +9,7 @@
 
 // Third party headers:
 #include 
+#include "lldb/API/SBTypeSummary.h"
 
 // In-house headers:
 #include "MICmnLLDBUtilSBValue.h"
@@ -165,6 +166,14 @@
 return MIstatus::success;
 }
 }
+else
+{
+// Treat composite value which has registered summary
+// (for example with AddCXXSummary) as simple value
+vwrValue = GetValueSummary();
+if (!vwrValue.empty())
+return MIstatus::success;
+}
 
 // Composite variable type i.e. struct
 return MIstatus::failure;
@@ -180,6 +189,10 @@
 CMIUtilString
 CMICmnLLDBUtilSBValue::GetSimpleValueChar() const
 {
+const CMIUtilString& summary = GetValueSummary();
+if (!summary.empty())
+return summary;
+
 const uint64_t value = m_rValue.GetValueAsUnsigned();
 if (value == 0)
 {
@@ -223,6 +236,10 @@
 CMIUtilString
 CMICmnLLDBUtilSBValue::GetSimpleValueCStringPointer() const
 {
+const CMIUtilString& summary = GetValueSummary();
+if (!summary.empty())
+return summary;
+
 const char *value = m_rValue.GetValue();
 if (value == nullptr)
 return m_pUnkwn;
@@ -266,6 +283,10 @@
 CMIUtilString
 CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray() const
 {
+const CMIUtilString& summary = GetValueSummary();
+if (!summary.empty())
+return summary;
+
 const MIuint nChildren = m_rValue.GetNumChildren();
 lldb::SBValue child = m_rValue.GetChildAtIndex(0);
 const lldb::BasicType eType = child.GetType().GetBasicType();
@@ -347,6 +368,30 @@
 return MIstatus::success;
 }
 
+CMIUtilString
+CMICmnLLDBUtilSBValue::GetValueSummary() const
+{
+CMIUtilString valSummary;
+if (m_rValue.IsValid())
+{
+const char *c_str = m_rValue.GetSummary();
+if (c_str && c_str[0])
+{
+valSummary = c_str;
+lldb::SBTypeSummary summary = m_rValue.GetTypeSummary();
+if (summary.IsValid() && summary.DoesPrintValue(m_rValue))
+{
+c_str = m_rValue.GetValue();
+if (c_str && c_str[0])
+{
+valSummary.insert(0, std::string(c_str) + " ");
+}
+}
+}
+}
+return valSummary;
+}
+
 //++ 
 // Details: Check that basic type is a char type. Char type can be signed or unsigned.
 // Type:Static.
Index: lldb/trunk/source/API/SBTypeSummary.cpp
===
--- lldb/trunk/source/API/SBTypeSummary.cpp
+++ lldb/trunk/source/API/SBTypeSummary.cpp
@@ -8,9 +8,8 @@
 //===--===//
 
 #include "lldb/API/SBTypeSummary.h"
-
 #include "lldb/API/SBStream.h"
-
+#include "lldb/API/SBValue.h"
 #include "lldb/DataFormatters/DataVisualization.h"
 
 using namespace lldb;
@@ -284,6 +283,15 @@
 }
 }
 
+bool
+SBTypeSummary::DoesPrintValue (lldb::SBValue value)
+{
+if (!IsValid())
+return false;
+lldb::ValueObjectSP value_sp = value.GetSP();
+return m_opaque_sp->DoesPrintValue(value_sp.get());
+}
+
 lldb::SBTypeSummary &
 SBTypeSummary::operator = (const lldb::SBTypeSummary &rhs)
 {
Index: lldb/trunk/include/lldb/API/SBTypeSummary.h
===
--- lldb/trunk/include/lldb/API/SBTypeSummary.h
+++ lldb/trunk/include/lldb/API/S

[Lldb-commits] [lldb] r249600 - Fixed up some first responder issues and added menubar support that isn't in use yet.

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 15:00:28 2015
New Revision: 249600

URL: http://llvm.org/viewvc/llvm-project?rev=249600&view=rev
Log:
Fixed up some first responder issues and added menubar support that isn't in 
use yet.


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

Modified: lldb/trunk/test/curses_results.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/curses_results.py?rev=249600&r1=249599&r2=249600&view=diff
==
--- lldb/trunk/test/curses_results.py (original)
+++ lldb/trunk/test/curses_results.py Wed Oct  7 15:00:28 2015
@@ -29,7 +29,6 @@ class Curses(test_results.ResultsFormatt
 self.jobs = [None] * 64
 self.job_tests = [None] * 64
 self.results = list()
-self.saved_first_responder = None
 try:
 self.main_window = lldbcurses.intialize_curses() 
 self.main_window.add_key_action('\t', 
self.main_window.select_next_first_responder, "Switch between views that can 
respond to keyboard input")
@@ -82,8 +81,7 @@ class Curses(test_results.ResultsFormatt
 else:
 self.info_panel.show()
 
-self.saved_first_responder = self.main_window.first_responder  
-self.main_window.set_first_responder(self.info_panel)
+self.main_window.push_first_responder(self.info_panel)
 test_start = self.results[selected_idx][0]
 test_result = self.results[selected_idx][1]
 self.info_panel.set_line(0, "File: %s" % 
(test_start['test_filename']))
@@ -92,9 +90,8 @@ class Curses(test_results.ResultsFormatt
 self.info_panel.set_line(3, "Status: %s" % (test_result['status']))
 
 def hide_info_panel(self):
-self.info_panel.resign_first_responder(remove_from_parent=True, 
new_first_responder=self.saved_first_responder)
+self.main_window.pop_first_responder(self.info_panel)
 self.info_panel.hide()
-self.saved_first_responder = None
 self.main_window.refresh()
 
 def toggle_status(self, status):

Modified: lldb/trunk/test/lldbcurses.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbcurses.py?rev=249600&r1=249599&r2=249600&view=diff
==
--- lldb/trunk/test/lldbcurses.py (original)
+++ lldb/trunk/test/lldbcurses.py Wed Oct  7 15:00:28 2015
@@ -63,7 +63,7 @@ class Window(object):
 self.parent = None
 self.delegate = delegate
 self.children = list()
-self.first_responder = None
+self.first_responders = list()
 self.can_become_first_responder = can_become_first_responder
 self.key_actions = dict()
 
@@ -92,56 +92,106 @@ class Window(object):

 def remove_child(self, window):
 self.children.remove(window)
-
+
+def get_first_responder(self):
+if len(self.first_responders):
+return self.first_responders[-1]
+else:
+return None
+
 def set_first_responder(self, window):
 if window.can_become_first_responder:
 if callable(getattr(window, "hidden", None)) and window.hidden():
 return False
 if not window in self.children:
 self.add_child(window)
-self.first_responder = window
+# See if we have a current first responder, and if we do, let it 
know that
+# it will be resigning as first responder  
+first_responder = self.get_first_responder()
+if first_responder:
+first_responder.relinquish_first_responder()
+# Now set the first responder to "window"
+if len(self.first_responders) == 0:
+self.first_responders.append(window)
+else:
+self.first_responders[-1] = window
 return True
 else:
 return False
 
-def resign_first_responder(self, remove_from_parent, new_first_responder): 
  
-success = False
-if self.parent:
-if self.is_first_responder():
-self.parent.first_responder = None
-success = True
-if remove_from_parent:
-self.parent.remove_child(self)
-if new_first_responder:
-self.parent.set_first_responder(new_first_responder)
-else:
-self.parent.select_next_first_responder()
-return success
+def push_first_responder(self, window):
+# Only push the window as the new first responder if the window isn't 
already the first responder
+if window != self.get_first_responder():
+self.first_responders.append(window)
+
+def pop_first_responder(self, window): 
   

[Lldb-commits] [lldb] r249601 - Fix a test that should only be run with a dSYM file by adding @skipIfDwarf and using a new @skipIfDWO.

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 15:01:13 2015
New Revision: 249601

URL: http://llvm.org/viewvc/llvm-project?rev=249601&view=rev
Log:
Fix a test that should only be run with a dSYM file by adding @skipIfDwarf and 
using a new @skipIfDWO.


Modified:
lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py?rev=249601&r1=249600&r2=249601&view=diff
==
--- lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py 
(original)
+++ lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py Wed 
Oct  7 15:01:13 2015
@@ -18,6 +18,8 @@ class TestObjCIvarStripped(TestBase):
 self.stop_line = line_number(self.main_source, '// Set breakpoint 
here.')
 
 @skipUnlessDarwin
+@skipIfDwarf# This test requires a stripped binary and a dSYM
+@skipIfDWO  # This test requires a stripped binary and a dSYM
 @python_api_test
 def test_with_python_api(self):
 """Test that we can find stripped Objective-C ivars in the runtime"""

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249601&r1=249600&r2=249601&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct  7 15:01:13 2015
@@ -1099,6 +1099,9 @@ def skipIf(bugnumber=None, oslist=None,
 def skipIfDebugInfo(bugnumber=None, debug_info=None):
 return skipIf(bugnumber=bugnumber, debug_info=debug_info)
 
+def skipIfDWO(bugnumber=None):
+return skipIfDebugInfo(bugnumber, ["dwo"])
+
 def skipIfDwarf(bugnumber=None):
 return skipIfDebugInfo(bugnumber, ["dwarf"])
 


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


[Lldb-commits] [lldb] r249604 - More fixes for binaries that we strip. When we strip a binary we can't do Dwarf or DWO.

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 15:06:45 2015
New Revision: 249604

URL: http://llvm.org/viewvc/llvm-project?rev=249604&view=rev
Log:
More fixes for binaries that we strip. When we strip a binary we can't do Dwarf 
or DWO.


Modified:
lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py

Modified: lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py?rev=249604&r1=249603&r2=249604&view=diff
==
--- lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py (original)
+++ lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py Wed Oct  7 
15:06:45 2015
@@ -22,6 +22,8 @@ class HiddenIvarsTestCase(TestBase):
 self.shlib_names = ["InternalDefiner"]
 
 @skipUnlessDarwin
+@skipIfDwarf# This test requires a stripped binary and a dSYM
+@skipIfDWO  # This test requires a stripped binary and a dSYM
 def test_expr_stripped(self):
 if self.getArchitecture() == 'i386':
 self.skipTest("requires modern objc runtime")
@@ -38,6 +40,8 @@ class HiddenIvarsTestCase(TestBase):
 self.expr(False)
 
 @skipUnlessDarwin
+@skipIfDwarf# This test requires a stripped binary and a dSYM
+@skipIfDWO  # This test requires a stripped binary and a dSYM
 def test_frame_variable_stripped(self):
 if self.getArchitecture() == 'i386':
 self.skipTest("requires modern objc runtime")


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


[Lldb-commits] [lldb] r249605 - Another stripped test that requires darwin and a dSYM (no Dwarf or DWO).

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 15:08:26 2015
New Revision: 249605

URL: http://llvm.org/viewvc/llvm-project?rev=249605&view=rev
Log:
Another stripped test that requires darwin and a dSYM (no Dwarf or DWO).

Modified:

lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py

Modified: 
lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py?rev=249605&r1=249604&r2=249605&view=diff
==
--- 
lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
 (original)
+++ 
lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
 Wed Oct  7 15:08:26 2015
@@ -19,6 +19,8 @@ class TestObjCStaticMethodStripped(TestB
 
 @skipUnlessDarwin
 @python_api_test
+@skipIfDwarf# This test requires a stripped binary and a dSYM
+@skipIfDWO  # This test requires a stripped binary and a dSYM
 #
 def test_with_python_api(self):
 """Test calling functions in static methods with a stripped binary."""


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


[Lldb-commits] [lldb] r249613 - This test is useless. It doesn't work and it fails on MacOSX. Removing it.

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 15:38:20 2015
New Revision: 249613

URL: http://llvm.org/viewvc/llvm-project?rev=249613&view=rev
Log:
This test is useless. It doesn't work and it fails on MacOSX. Removing it.


Removed:
lldb/trunk/test/functionalities/connect_remote/EchoServer.py
lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py

Removed: lldb/trunk/test/functionalities/connect_remote/EchoServer.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/connect_remote/EchoServer.py?rev=249612&view=auto
==
--- lldb/trunk/test/functionalities/connect_remote/EchoServer.py (original)
+++ lldb/trunk/test/functionalities/connect_remote/EchoServer.py (removed)
@@ -1,28 +0,0 @@
-#!/usr/bin/env python 
-
-""" 
-A simple echo server.
-Taken from http://docs.python.org/library/socket.html#example.
-"""
-
-import socket
-
-HOST = 'localhost'# Symbolic name meaning local interfaces
-PORT = 0  # Let the system give us a random free port
-s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-s.bind((HOST, PORT))
-PORT = s.getsockname()[1]
-print 'Listening on %s:%d' % (HOST, PORT)
-s.listen(1)
-conn, addr = s.accept()
-print 'Connected by', addr
-while 1:
-data = conn.recv(1024)
-if data: 
-print 'Received:', data
-# Don't response to acks that are sent to us
-if data != '+':
-conn.send("+$#00")
-else:
-break
-conn.close()

Removed: lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py?rev=249612&view=auto
==
--- lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py 
(original)
+++ lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py 
(removed)
@@ -1,50 +0,0 @@
-"""
-Test lldb 'process connect' command.
-"""
-
-import os
-import unittest2
-import lldb
-import re
-from lldbtest import *
-
-class ConnectRemoteTestCase(TestBase):
-
-mydir = TestBase.compute_mydir(__file__)
-
-@expectedFailureFreeBSD("llvm.org/pr24896") # No stop reply packet on 
FreeBSD
-@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for 
windows")
-@expectedFailureLinux("llvm.org/pr23475") # Test occasionally times out on 
the Linux build bot
-@skipIfLinux  # Test occasionally times out on 
the Linux build bot
-@no_debug_info_test
-def test_connect_remote(self):
-"""Test "process connect connect:://localhost:[port]"."""
-
-import pexpect
-# First, we'll start a fake debugserver (a simple echo server).
-fakeserver = pexpect.spawn('./EchoServer.py')
-
-# Turn on logging for what the child sends back.
-if self.TraceOn():
-fakeserver.logfile_read = sys.stdout
-
-# Schedule the fake debugserver to be shutting down during teardown.
-def shutdown_fakeserver():
-fakeserver.close()
-self.addTearDownHook(shutdown_fakeserver)
-
-# Wait until we receive the server ready message before continuing.
-line = fakeserver.readline()
-self.assertTrue(line.startswith("Listening on localhost:"))
-port = int(re.match('Listening on localhost:([0-9]+)', line).group(1))
-self.assertTrue(port > 0)
-
-# Connect to the fake server
-self.runCmd("process connect -p gdb-remote connect://localhost:" + 
str(port))
-
-
-if __name__ == '__main__':
-import atexit
-lldb.SBDebugger.Initialize()
-atexit.register(lambda: lldb.SBDebugger.Terminate())
-unittest2.main()


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


Re: [Lldb-commits] [Diffusion] rL249434: Fix Darwin build of lldb-server.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

Users:
  sas (Author)

http://reviews.llvm.org/rL249434



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


Re: [Lldb-commits] [Diffusion] rL249434: Fix Darwin build of lldb-server.

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

This broke the lldb build on OSX using cmake.  After this commit, we get:

  CMake Error at cmake/modules/AddLLVM.cmake:401 (add_library):
Cannot find source file:
  
  
/Users/testuser/build/workspace/LLDB_master_release_OSX_git-hash/llvm/build_ninja/tools/lldb/source/LLDB_vers.c
  
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
  Call Stack (most recent call first):
tools/lldb/cmake/modules/AddLLDB.cmake:59 (llvm_add_library)
tools/lldb/source/API/CMakeLists.txt:9 (add_lldb_library)


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL249434



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


[Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn created this revision.
dawn added reviewers: sas, clayborg, zturner.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.

This fixes the cmake build on OSX when building in a new workspace.   It 
reverts r249434 and instead fixes the issue as proposed in lldb-dev in message 
'cmake question and [PATCH] for Undefined symbol "_liblldb_coreVersionString"'. 
 It gets the warning:
ninja: warning: multiple rules generate tools/lldb/source/LLDB_vers.c. 
builds involving this target will not be correct; continuing anyway
(which no one was able to suggest a fix for in lldb-dev), but at least it fixes 
the problem without breaking the entire build :)

Repository:
  rL LLVM

http://reviews.llvm.org/D13535

Files:
  cmake/LLDBDependencies.cmake
  source/CMakeLists.txt
  tools/lldb-server/CMakeLists.txt

Index: tools/lldb-server/CMakeLists.txt
===
--- tools/lldb-server/CMakeLists.txt
+++ tools/lldb-server/CMakeLists.txt
@@ -35,9 +35,14 @@
 lldb-server.cpp
 LLDBServerUtilities.cpp
 ../../source/lldb.cpp
+${LLDB_VERS_GENERATED_FILE}
 )
 
-  # The Darwin linker doesn't understand --start-group/--end-group.
+  if (LLDB_VERS_GENERATED_FILE)
+add_dependencies(lldb-server swig_wrapper)
+  endif()
+
+# The Darwin linker doesn't understand --start-group/--end-group.
   if (LLDB_LINKER_SUPPORTS_GROUPS)
 target_link_libraries(lldb-server
   -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
Index: source/CMakeLists.txt
===
--- source/CMakeLists.txt
+++ source/CMakeLists.txt
@@ -14,19 +14,8 @@
   )
 endif ()
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
-  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
-  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
-COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
-> ${LLDB_VERS_GENERATED_FILE})
-
-  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 
1)
-endif ()
-
 add_lldb_library(lldbBase
   lldb.cpp
-   ${LLDB_VERS_GENERATED_FILE}
   )
 
 add_subdirectory(Breakpoint)
Index: cmake/LLDBDependencies.cmake
===
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -104,6 +104,13 @@
 
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
+  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
+COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
+> ${LLDB_VERS_GENERATED_FILE})
+
+  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 
1)
   list(APPEND LLDB_USED_LIBS
 lldbPluginDynamicLoaderDarwinKernel
 lldbPluginObjectFileMachO


Index: tools/lldb-server/CMakeLists.txt
===
--- tools/lldb-server/CMakeLists.txt
+++ tools/lldb-server/CMakeLists.txt
@@ -35,9 +35,14 @@
 lldb-server.cpp
 LLDBServerUtilities.cpp
 ../../source/lldb.cpp
+${LLDB_VERS_GENERATED_FILE}
 )
 
-  # The Darwin linker doesn't understand --start-group/--end-group.
+  if (LLDB_VERS_GENERATED_FILE)
+add_dependencies(lldb-server swig_wrapper)
+  endif()
+
+# The Darwin linker doesn't understand --start-group/--end-group.
   if (LLDB_LINKER_SUPPORTS_GROUPS)
 target_link_libraries(lldb-server
   -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
Index: source/CMakeLists.txt
===
--- source/CMakeLists.txt
+++ source/CMakeLists.txt
@@ -14,19 +14,8 @@
   )
 endif ()
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
-  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
-  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
-COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
-> ${LLDB_VERS_GENERATED_FILE})
-
-  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
-endif ()
-
 add_lldb_library(lldbBase
   lldb.cpp
-   ${LLDB_VERS_GENERATED_FILE}
   )
 
 add_subdirectory(Breakpoint)
Index: cmake/LLDBDependencies.cmake
===
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -104,6 +104,13 @@
 
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
+  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
+COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pb

Re: [Lldb-commits] [Diffusion] rL249434: Fix Darwin build of lldb-server.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a comment.

See http://reviews.llvm.org/D13535 for a workaround.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL249434



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


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Zachary Turner via lldb-commits
zturner added a comment.

I can't verify that this works on MacOSX at the moment.  Did you verify that 
this works on other platforms as well?


Repository:
  rL LLVM

http://reviews.llvm.org/D13535



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


[Lldb-commits] [lldb] r249624 - Decide on the expression language inside UserExpression

2015-10-07 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Wed Oct  7 17:01:12 2015
New Revision: 249624

URL: http://llvm.org/viewvc/llvm-project?rev=249624&view=rev
Log:
Decide on the expression language inside UserExpression

When the target settings are consulted to decide the expression language
is decided in CommandObjectExpression, this doesn't help if you're running
SBFrame::EvaluateExpression().  Moving the logic into UserExpression fixes
this.

Based on patch from scalla...@apple.com
Reviewed by: dawn
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13267

Modified:
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Expression/UserExpression.cpp

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=249624&r1=249623&r2=249624&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Wed Oct  7 17:01:12 
2015
@@ -299,16 +299,7 @@ CommandObjectExpression::EvaluateExpress
 options.SetUseDynamic(m_varobj_options.use_dynamic);
 options.SetTryAllThreads(m_command_options.try_all_threads);
 options.SetDebug(m_command_options.debug);
-
-// If the language was not specified in the expression command,
-// set it to the language in the target's properties if
-// specified, else default to the language for the frame.
-if (m_command_options.language != eLanguageTypeUnknown)
-options.SetLanguage(m_command_options.language);
-else if (target->GetLanguage() != eLanguageTypeUnknown)
-options.SetLanguage(target->GetLanguage());
-else if (frame)
-options.SetLanguage(frame->GetLanguage());
+options.SetLanguage(m_command_options.language);
 
 // If there is any chance we are going to stop and want to see
 // what went wrong with our expression, we should generate debug info

Modified: lldb/trunk/source/Expression/UserExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=249624&r1=249623&r2=249624&view=diff
==
--- lldb/trunk/source/Expression/UserExpression.cpp (original)
+++ lldb/trunk/source/Expression/UserExpression.cpp Wed Oct  7 17:01:12 2015
@@ -470,7 +470,7 @@ UserExpression::Evaluate (ExecutionConte
 Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | 
LIBLLDB_LOG_STEP));
 
 lldb_private::ExecutionPolicy execution_policy = 
options.GetExecutionPolicy();
-const lldb::LanguageType language = options.GetLanguage();
+lldb::LanguageType language = options.GetLanguage();
 const ResultType desired_type = options.DoesCoerceToId() ? 
UserExpression::eResultTypeId : UserExpression::eResultTypeAny;
 lldb::ExpressionResults execution_results = lldb::eExpressionSetupError;
 
@@ -515,6 +515,17 @@ UserExpression::Evaluate (ExecutionConte
 else
 full_prefix = option_prefix;
 
+// If the language was not specified in the expression command,
+// set it to the language in the target's properties if
+// specified, else default to the langage for the frame.
+if (language == lldb::eLanguageTypeUnknown)
+{
+if (target->GetLanguage() != lldb::eLanguageTypeUnknown)
+language = target->GetLanguage();
+else if (StackFrame *frame = exe_ctx.GetFramePtr())
+language = frame->GetLanguage();
+}
+
 lldb::UserExpressionSP 
user_expression_sp(target->GetUserExpressionForLanguage (expr_cstr,

 full_prefix,

 language,


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


Re: [Lldb-commits] [PATCH] D13267: Decide on the expression language inside UserExpression

2015-10-07 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249624: Decide on the expression language inside 
UserExpression (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13267?vs=36029&id=36803#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13267

Files:
  lldb/trunk/source/Commands/CommandObjectExpression.cpp
  lldb/trunk/source/Expression/UserExpression.cpp

Index: lldb/trunk/source/Commands/CommandObjectExpression.cpp
===
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp
@@ -299,16 +299,7 @@
 options.SetUseDynamic(m_varobj_options.use_dynamic);
 options.SetTryAllThreads(m_command_options.try_all_threads);
 options.SetDebug(m_command_options.debug);
-
-// If the language was not specified in the expression command,
-// set it to the language in the target's properties if
-// specified, else default to the language for the frame.
-if (m_command_options.language != eLanguageTypeUnknown)
-options.SetLanguage(m_command_options.language);
-else if (target->GetLanguage() != eLanguageTypeUnknown)
-options.SetLanguage(target->GetLanguage());
-else if (frame)
-options.SetLanguage(frame->GetLanguage());
+options.SetLanguage(m_command_options.language);
 
 // If there is any chance we are going to stop and want to see
 // what went wrong with our expression, we should generate debug info
Index: lldb/trunk/source/Expression/UserExpression.cpp
===
--- lldb/trunk/source/Expression/UserExpression.cpp
+++ lldb/trunk/source/Expression/UserExpression.cpp
@@ -470,7 +470,7 @@
 Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | 
LIBLLDB_LOG_STEP));
 
 lldb_private::ExecutionPolicy execution_policy = 
options.GetExecutionPolicy();
-const lldb::LanguageType language = options.GetLanguage();
+lldb::LanguageType language = options.GetLanguage();
 const ResultType desired_type = options.DoesCoerceToId() ? 
UserExpression::eResultTypeId : UserExpression::eResultTypeAny;
 lldb::ExpressionResults execution_results = lldb::eExpressionSetupError;
 
@@ -515,6 +515,17 @@
 else
 full_prefix = option_prefix;
 
+// If the language was not specified in the expression command,
+// set it to the language in the target's properties if
+// specified, else default to the langage for the frame.
+if (language == lldb::eLanguageTypeUnknown)
+{
+if (target->GetLanguage() != lldb::eLanguageTypeUnknown)
+language = target->GetLanguage();
+else if (StackFrame *frame = exe_ctx.GetFramePtr())
+language = frame->GetLanguage();
+}
+
 lldb::UserExpressionSP 
user_expression_sp(target->GetUserExpressionForLanguage (expr_cstr,

 full_prefix,

 language,


Index: lldb/trunk/source/Commands/CommandObjectExpression.cpp
===
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp
@@ -299,16 +299,7 @@
 options.SetUseDynamic(m_varobj_options.use_dynamic);
 options.SetTryAllThreads(m_command_options.try_all_threads);
 options.SetDebug(m_command_options.debug);
-
-// If the language was not specified in the expression command,
-// set it to the language in the target's properties if
-// specified, else default to the language for the frame.
-if (m_command_options.language != eLanguageTypeUnknown)
-options.SetLanguage(m_command_options.language);
-else if (target->GetLanguage() != eLanguageTypeUnknown)
-options.SetLanguage(target->GetLanguage());
-else if (frame)
-options.SetLanguage(frame->GetLanguage());
+options.SetLanguage(m_command_options.language);
 
 // If there is any chance we are going to stop and want to see
 // what went wrong with our expression, we should generate debug info
Index: lldb/trunk/source/Expression/UserExpression.cpp
===
--- lldb/trunk/source/Expression/UserExpression.cpp
+++ lldb/trunk/source/Expression/UserExpression.cpp
@@ -470,7 +470,7 @@
 Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
 
 lldb_private::ExecutionPolicy execution_policy = options.GetExecutionPolicy();
-const lldb::LanguageType language = options.GetLanguage();
+lldb::LanguageType language = opt

[Lldb-commits] [lldb] r249625 - Don't do DWO tests on darwin as they aren't supported. If this is an error and they are supported, we need to add support _only_ if the clang compiler that is being use

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 17:06:08 2015
New Revision: 249625

URL: http://llvm.org/viewvc/llvm-project?rev=249625&view=rev
Log:
Don't do DWO tests on darwin as they aren't supported. If this is an error and 
they are supported, we need to add support _only_ if the clang compiler that is 
being used supports the compiler option for DWO stuff as right now I just get 
an error saying "warning: unused option -gsplit-dwarf". So unless we can 
successfully test if "-gsplit-dwarf" is truly supported, I am going to disable 
it on darwin for now so we don't get test suite failures.


Modified:
lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=249625&r1=249624&r2=249625&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Oct  7 17:06:08 2015
@@ -112,7 +112,7 @@ just_do_benchmarks_test = False
 
 dont_do_dsym_test = False
 dont_do_dwarf_test = False
-dont_do_dwo_test = False
+dont_do_dwo_test = sys.platform == 'darwin'
 
 # The blacklist is optional (-b blacklistFile) and allows a central place to 
skip
 # testclass's and/or testclass.testmethod's.


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


[Lldb-commits] [lldb] r249626 - Fix the TestCppNsImport test case for DWARF. It was failing for DWARF in .o files because SymbolFileDWARFDebugMap didn't implement the following function:

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 17:07:33 2015
New Revision: 249626

URL: http://llvm.org/viewvc/llvm-project?rev=249626&view=rev
Log:
Fix the TestCppNsImport test case for DWARF. It was failing for DWARF in .o 
files because SymbolFileDWARFDebugMap didn't implement the following function:

void
ParseDeclsForContext (lldb_private::CompilerDeclContext decl_ctx) override;
   
Now it does and the test works.


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

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=249626&r1=249625&r2=249626&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Wed 
Oct  7 17:07:33 2015
@@ -1459,6 +1459,15 @@ SymbolFileDWARFDebugMap::GetDeclContextC
 return CompilerDeclContext();
 }
 
+void
+SymbolFileDWARFDebugMap::ParseDeclsForContext 
(lldb_private::CompilerDeclContext decl_ctx)
+{
+ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
+oso_dwarf->ParseDeclsForContext (decl_ctx);
+return true; // Keep iterating
+});
+}
+
 bool
 SymbolFileDWARFDebugMap::AddOSOFileRange (CompileUnitInfo *cu_info,
   lldb::addr_t exe_file_addr,

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=249626&r1=249625&r2=249626&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Wed 
Oct  7 17:07:33 2015
@@ -72,6 +72,8 @@ public:
 lldb_private::Type* ResolveTypeUID (lldb::user_id_t type_uid) override;
 lldb_private::CompilerDeclContext GetDeclContextForUID (lldb::user_id_t 
uid) override;
 lldb_private::CompilerDeclContext GetDeclContextContainingUID 
(lldb::user_id_t uid) override;
+void ParseDeclsForContext (lldb_private::CompilerDeclContext decl_ctx) 
override;
+
 boolCompleteType (lldb_private::CompilerType& compiler_type) 
override;
 uint32_tResolveSymbolContext (const lldb_private::Address& 
so_addr, uint32_t resolve_scope, lldb_private::SymbolContext& sc) override;
 uint32_tResolveSymbolContext (const lldb_private::FileSpec& 
file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, 
lldb_private::SymbolContextList& sc_list) override;


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


Re: [Lldb-commits] [PATCH] D13224: [DWARFASTParserClang] Strengthen incomplete type handling.

2015-10-07 Thread Siva Chandra via lldb-commits
sivachandra updated this revision to Diff 36805.
sivachandra added a comment.

Rebase.


http://reviews.llvm.org/D13224

Files:
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  test/lang/cpp/limit-debug-info/Makefile
  test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
  test/lang/cpp/limit-debug-info/base.cpp
  test/lang/cpp/limit-debug-info/base.h
  test/lang/cpp/limit-debug-info/derived.cpp
  test/lang/cpp/limit-debug-info/derived.h
  test/lang/cpp/limit-debug-info/main.cpp
  test/make/Makefile.rules

Index: test/make/Makefile.rules
===
--- test/make/Makefile.rules
+++ test/make/Makefile.rules
@@ -170,6 +170,11 @@
 	endif
 endif
 
+LIMIT_DEBUG_INFO_FLAGS =
+ifneq (,$(findstring clang,$(CC)))
+   LIMIT_DEBUG_INFO_FLAGS += -flimit-debug-info
+endif
+
 CFLAGS ?= -g -O0 -fno-builtin
 ifeq "$(OS)" "Darwin"
 	CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
Index: test/lang/cpp/limit-debug-info/main.cpp
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/main.cpp
@@ -0,0 +1,7 @@
+#include "derived.h"
+
+int main() {
+Foo f; // break here
+f.bar();
+return f.baz();
+}
Index: test/lang/cpp/limit-debug-info/derived.h
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/derived.h
@@ -0,0 +1,13 @@
+#include "base.h"
+
+class Foo : public FooNS
+{
+public:
+Foo() {
+a = 12345;
+}
+
+char baz() override;
+int a;
+};
+
Index: test/lang/cpp/limit-debug-info/derived.cpp
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/derived.cpp
@@ -0,0 +1,6 @@
+#include "derived.h"
+
+char Foo::baz() {
+return (char)(x&0xff);
+}
+
Index: test/lang/cpp/limit-debug-info/base.h
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/base.h
@@ -0,0 +1,10 @@
+class FooNS
+{
+public:
+virtual void bar();
+virtual char baz() = 0;
+
+protected:
+int x;
+};
+
Index: test/lang/cpp/limit-debug-info/base.cpp
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/base.cpp
@@ -0,0 +1,6 @@
+#include "base.h"
+
+void FooNS::bar() {
+x = 54321;
+}
+
Index: test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
@@ -0,0 +1,48 @@
+import lldb
+from lldbtest import *
+import lldbutil
+
+class TestWithLimitDebugInfo(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@dwarf_test
+def test_with_dwarf(self):
+self.buildDwarf()
+
+cwd = os.getcwd()
+
+src_file = os.path.join(cwd, "main.cpp")
+src_file_spec = lldb.SBFileSpec(src_file)
+self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
+
+# Get the path of the executable
+exe_path  = os.path.join(cwd, 'a.out')
+
+# Load the executable
+target = self.dbg.CreateTarget(exe_path)
+self.assertTrue(target.IsValid(), VALID_TARGET)
+
+# Break on main function
+breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec)
+self.assertTrue(breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+
+# Launch the process
+process = target.LaunchSimple(None, None, self.get_process_working_directory())
+self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
+
+# Get the thread of the process
+self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+thread.StepInto()
+
+# Get frame for current thread
+frame = thread.GetSelectedFrame()
+
+v1 = frame.EvaluateExpression("1")
+self.assertTrue(v1.IsValid(), "'expr 1' results in a valid SBValue object")
+self.assertTrue(v1.GetError().Success(), "'expr 1' succeeds without an error.")
+
+v2 = frame.EvaluateExpression("this")
+self.assertTrue(v2.IsValid(), "'expr this' results in a valid SBValue object")
+self.assertTrue(v2.GetError().Success(), "'expr this' succeeds without an error.")
Index: test/lang/cpp/limit-debug-info/Makefile
===
--- /dev/null
+++ test/lang/cpp/limit-debug-info/Makefile
@@ -0,0 +1,7 @@
+LEVEL = ../../../make
+
+CXX_SOURCES = main.cpp derived.cpp base.cpp
+
+CFLAGS_EXTRAS += $(LIMIT_DEBUG_INFO_FLAGS)
+
+include $(LEVEL)/Makefile.rules
Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===
--- source/Plugins/Symbol

[Lldb-commits] [lldb] r249629 - [DWARFASTParserClang] Strengthen incomplete type handling.

2015-10-07 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Wed Oct  7 17:11:52 2015
New Revision: 249629

URL: http://llvm.org/viewvc/llvm-project?rev=249629&view=rev
Log:
[DWARFASTParserClang] Strengthen incomplete type handling.

Summary: This change fixes pr24916. As associated test has been added.

Reviewers: clayborg

Subscribers: zturner, lldb-commits

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

Added:
lldb/trunk/test/lang/cpp/limit-debug-info/
lldb/trunk/test/lang/cpp/limit-debug-info/Makefile
lldb/trunk/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
lldb/trunk/test/lang/cpp/limit-debug-info/base.cpp
lldb/trunk/test/lang/cpp/limit-debug-info/base.h
lldb/trunk/test/lang/cpp/limit-debug-info/derived.cpp
lldb/trunk/test/lang/cpp/limit-debug-info/derived.h
lldb/trunk/test/lang/cpp/limit-debug-info/main.cpp
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=249629&r1=249628&r2=249629&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Wed Oct  
7 17:11:52 2015
@@ -615,6 +615,10 @@ DWARFASTParserClang::ParseTypeFromDWARF
 // so lets use it and cache the fact that we found
 // a complete type for this die
 dwarf->GetDIEToType()[die.GetDIE()] = 
type_sp.get();
+clang::DeclContext *defn_decl_ctx = 
GetCachedClangDeclContextForDIE(
+
dwarf->DebugInfo()->GetDIE(DIERef(type_sp->GetID(;
+if (defn_decl_ctx)
+LinkDeclContextToDIE(defn_decl_ctx, die);
 return type_sp;
 }
 }
@@ -1101,8 +1105,11 @@ DWARFASTParserClang::ParseTypeFromDWARF
 Type *class_type = dwarf->ResolveType 
(decl_ctx_die);
 if (class_type)
 {
+bool alternate_defn = false;
 if (class_type->GetID() != 
decl_ctx_die.GetID())
 {
+alternate_defn = true;
+
 // We uniqued the parent class of this 
function to another class
 // so we now need to associate all 
dies under "decl_ctx_die" to
 // DIEs in the DIE for "class_type"...
@@ -1193,13 +1200,8 @@ DWARFASTParserClang::ParseTypeFromDWARF
 CompilerType class_opaque_type = 
class_type->GetForwardCompilerType ();
 if 
(ClangASTContext::IsCXXClassType(class_opaque_type))
 {
-if 
(class_opaque_type.IsBeingDefined ())
+if 
(class_opaque_type.IsBeingDefined () || alternate_defn)
 {
-// Neither GCC 4.2 nor clang++ 
currently set a valid accessibility
-// in the DWARF for C++ 
methods... Default to public for now...
-if (accessibility == 
eAccessNone)
-accessibility = 
eAccessPublic;
-
 if (!is_static && 
!die.HasChildren())
 {
 // We have a C++ member 
function with no children (this pointer!)
@@ -1209,52 +1211,87 @@ DWARFASTParserClang::ParseTypeFromDWARF
 }
 else
 {
-clang::CXXMethodDecl 
*cxx_method_decl;
-// REMOVE THE CRASH 
DESCRIPTION BELOW
-
Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a 
method %s to class %s in DIE 0x%8.8" PRIx64 " from %s",
-   
  type_name_cstr,
-   
  class_type->GetName().GetCString(),
- 

[Lldb-commits] [PATCH] D13537: Port native Python API to support 3.x

2015-10-07 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added reviewers: clayborg, granata.enrico.
zturner added a subscriber: lldb-commits.

With this change, liblldb is 95% of the way towards being able
to work under both Python 2.x and Python 3.x.  This should
introduce no functional change for Python 2.x, but for Python
3.x there are some important changes.  Primarily, these are:

1) PyString doesn't exist in Python 3.  Everything is a PyUnicode.
   To account for this, PythonString now stores a PyBytes instead
   of a PyString.
2) PyInt doesn't exist in Python 3.  Everything is a PyLong.  To
   account for this, PythonInteger stores a PyLong instead of a
   PyInt.  In Python 2.x, this requires doing a conversion to
   PyLong when creating a PythonInteger from a PyInt.  In 3.x,
   there is no PyInt anyway, so we can assume everything is a
   PyLong.
3) PyFile_FromFile doesn't exist in Python 3.  Instead there is a
   PyFile_FromFd.  This is not addressed in this patch because it
   will require quite a large change to plumb fd's all the way
   through the system into the ScriptInterpreter.  This is the only
   remaining piece of the puzzle to get LLDB supporting Python 3.x.

Being able to run the test suite is not addressed in this patch.
After the extension module can compile and you can enter an embedded
3.x interpreter, the test suite will be addressed in a followup.

http://reviews.llvm.org/D13537

Files:
  source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
  source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
  source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  unittests/CMakeLists.txt
  unittests/ScriptInterpreter/CMakeLists.txt
  unittests/ScriptInterpreter/Python/CMakeLists.txt
  unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

Index: unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
===
--- /dev/null
+++ unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -0,0 +1,411 @@
+//===-- PythonDataObjectsTests.cpp --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "gtest/gtest.h"
+
+#include "lldb/Host/HostInfo.h"
+#include "Plugins/ScriptInterpreter/Python/lldb-python.h"
+#include "Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
+#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
+
+using namespace lldb_private;
+
+class PythonDataObjectsTest : public testing::Test
+{
+  public:
+void
+SetUp() override
+{
+HostInfoBase::Initialize();
+// ScriptInterpreterPython::Initialize() depends on things like HostInfo being initialized
+// so it can compute the python directory etc, so we need to do this after
+// SystemInitializerCommon::Initialize().
+ScriptInterpreterPython::Initialize();
+}
+
+void
+TearDown() override
+{
+ScriptInterpreterPython::Terminate();
+}
+};
+
+TEST_F(PythonDataObjectsTest, TestPythonInteger)
+{
+// Test that integers behave correctly when wrapped by a PythonInteger.
+
+#if PY_MAJOR_VERSION < 3
+// Verify that `PythonInt` works correctly when given a PyInt object.
+// Note that PyInt doesn't exist in Python 3.x, so this is only for 2.x
+PyObject *py_int = PyInt_FromLong(12);
+EXPECT_TRUE(PythonInteger::Check(py_int));
+PythonInteger python_int(py_int);
+
+EXPECT_EQ(PyObjectType::Integer, python_int.GetObjectType());
+EXPECT_EQ(12, python_int.GetInteger());
+#endif
+
+// Verify that `PythonInt` works correctly when given a PyLong object.
+PyObject *py_long = PyLong_FromLong(12);
+EXPECT_TRUE(PythonInteger::Check(py_long));
+PythonInteger python_long(py_long);
+EXPECT_EQ(PyObjectType::Integer, python_long.GetObjectType());
+
+// Verify that you can reset the value and that it is reflected properly.
+python_long.SetInteger(40);
+EXPECT_EQ(40, python_long.GetInteger());
+}
+
+TEST_F(PythonDataObjectsTest, TestPythonString)
+{
+// Test that strings behave correctly when wrapped by a PythonString.
+
+static const char *test_string = "PythonDataObjectsTest::TestPythonString";
+static const char *test_string2 = "PythonDataObjectsTest::TestPythonString";
+
+#if PY_MAJOR_VERSION < 3
+// Verify that `PythonString` works correctly when given a PyString object.
+// Note that PyString doesn't exist in Python 3.x, so this is only for 2.x
+PyObject *py_string = PyString_FromString(test_string);
+EXPECT_TRUE(PythonString::Check(py_string));
+PythonString python_string(py_string);
+
+EXPECT_EQ(PyObjectType::String, python_string.GetObjectType());
+EXPECT_STREQ(test_string, python_string.GetString().data());
+#

Re: [Lldb-commits] [PATCH] D13537: Port native Python API to support 3.x

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

Few minor changes.



Comment at: 
source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1183
@@ +1182,3 @@
+llvm::StringRef value_str(str.GetString());
+error.SetErrorStringWithFormat("%s\n%s", value_str.data(), 
bt.c_str());
+}

"value_str.data()" might not be NULL terminate. Either use 
value_str.str().c_str() or use "%*s":

```
error.SetErrorStringWithFormat("%*s\n%s", (int)value_str.size(), 
value_str.data(), bt.c_str());
```


Comment at: unittests/ScriptInterpreter/CMakeLists.txt:4
@@ +3,1 @@
+endif()
\ No newline at end of file


add newline


Comment at: unittests/ScriptInterpreter/Python/CMakeLists.txt:6
@@ +5,1 @@
+  target_link_libraries(ScriptInterpreterPythonTests 
lldbPluginScriptInterpreterPython ${PYTHON_LIBRARY})
\ No newline at end of file


add newline


http://reviews.llvm.org/D13537



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


[Lldb-commits] [lldb] r249631 - Expected fail this test and supplied the radar number that is tracking the fix.

2015-10-07 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Wed Oct  7 17:36:52 2015
New Revision: 249631

URL: http://llvm.org/viewvc/llvm-project?rev=249631&view=rev
Log:
Expected fail this test and supplied the radar number that is tracking the fix.


Modified:
lldb/trunk/test/macosx/queues/TestQueues.py

Modified: lldb/trunk/test/macosx/queues/TestQueues.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/queues/TestQueues.py?rev=249631&r1=249630&r2=249631&view=diff
==
--- lldb/trunk/test/macosx/queues/TestQueues.py (original)
+++ lldb/trunk/test/macosx/queues/TestQueues.py Wed Oct  7 17:36:52 2015
@@ -11,7 +11,8 @@ class TestQueues(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipUnlessDarwin
-@python_api_test
+@python_api_test  
+@unittest2.expectedFailure("rdar://22531180")
 def test_with_python_api(self):
 """Test queues inspection SB APIs."""
 self.build()


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


Re: [Lldb-commits] [PATCH] D13537: Port native Python API to support 3.x

2015-10-07 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 36806.
zturner added a comment.

Do you mind giving this a run on MacOSX and verifying it still compiles and 
test suite passes?


http://reviews.llvm.org/D13537

Files:
  source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
  source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
  source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  unittests/CMakeLists.txt
  unittests/ScriptInterpreter/CMakeLists.txt
  unittests/ScriptInterpreter/Python/CMakeLists.txt
  unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

Index: unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
===
--- /dev/null
+++ unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -0,0 +1,411 @@
+//===-- PythonDataObjectsTests.cpp --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "gtest/gtest.h"
+
+#include "lldb/Host/HostInfo.h"
+#include "Plugins/ScriptInterpreter/Python/lldb-python.h"
+#include "Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
+#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
+
+using namespace lldb_private;
+
+class PythonDataObjectsTest : public testing::Test
+{
+  public:
+void
+SetUp() override
+{
+HostInfoBase::Initialize();
+// ScriptInterpreterPython::Initialize() depends on things like HostInfo being initialized
+// so it can compute the python directory etc, so we need to do this after
+// SystemInitializerCommon::Initialize().
+ScriptInterpreterPython::Initialize();
+}
+
+void
+TearDown() override
+{
+ScriptInterpreterPython::Terminate();
+}
+};
+
+TEST_F(PythonDataObjectsTest, TestPythonInteger)
+{
+// Test that integers behave correctly when wrapped by a PythonInteger.
+
+#if PY_MAJOR_VERSION < 3
+// Verify that `PythonInt` works correctly when given a PyInt object.
+// Note that PyInt doesn't exist in Python 3.x, so this is only for 2.x
+PyObject *py_int = PyInt_FromLong(12);
+EXPECT_TRUE(PythonInteger::Check(py_int));
+PythonInteger python_int(py_int);
+
+EXPECT_EQ(PyObjectType::Integer, python_int.GetObjectType());
+EXPECT_EQ(12, python_int.GetInteger());
+#endif
+
+// Verify that `PythonInt` works correctly when given a PyLong object.
+PyObject *py_long = PyLong_FromLong(12);
+EXPECT_TRUE(PythonInteger::Check(py_long));
+PythonInteger python_long(py_long);
+EXPECT_EQ(PyObjectType::Integer, python_long.GetObjectType());
+
+// Verify that you can reset the value and that it is reflected properly.
+python_long.SetInteger(40);
+EXPECT_EQ(40, python_long.GetInteger());
+}
+
+TEST_F(PythonDataObjectsTest, TestPythonString)
+{
+// Test that strings behave correctly when wrapped by a PythonString.
+
+static const char *test_string = "PythonDataObjectsTest::TestPythonString";
+static const char *test_string2 = "PythonDataObjectsTest::TestPythonString";
+
+#if PY_MAJOR_VERSION < 3
+// Verify that `PythonString` works correctly when given a PyString object.
+// Note that PyString doesn't exist in Python 3.x, so this is only for 2.x
+PyObject *py_string = PyString_FromString(test_string);
+EXPECT_TRUE(PythonString::Check(py_string));
+PythonString python_string(py_string);
+
+EXPECT_EQ(PyObjectType::String, python_string.GetObjectType());
+EXPECT_STREQ(test_string, python_string.GetString().data());
+#endif
+
+// Verify that `PythonString` works correctly when given a PyUnicode object.
+PyObject *py_unicode = PyUnicode_FromString(test_string);
+EXPECT_TRUE(PythonString::Check(py_unicode));
+PythonString python_unicode(py_unicode);
+
+EXPECT_EQ(PyObjectType::String, python_unicode.GetObjectType());
+EXPECT_STREQ(test_string, python_unicode.GetString().data());
+
+// Verify that you can reset the value and that it is reflected properly.
+python_unicode.SetString(test_string2);
+EXPECT_STREQ(test_string2, python_unicode.GetString().data());
+}
+
+TEST_F(PythonDataObjectsTest, TestPythonListPrebuilt)
+{
+// Test that a list which is built through the native
+// Python API behaves correctly when wrapped by a PythonList.
+static const int list_size = 2;
+static const long long_idx0 = 5;
+static const char *const string_idx1 = "String Index 1";
+
+PyObject *list_items[list_size];
+
+PyObject *py_list = PyList_New(2);
+list_items[0] = PyLong_FromLong(long_idx0);
+list_items[1] = PyString_FromString(string_idx1);
+
+for (int i = 0; i < list_size; ++i)
+PyList_SetItem(py_list, i, list_items[i]);
+
+EXPECT_TRUE(Pyt

Re: [Lldb-commits] [PATCH] D13537: Port native Python API to support 3.x

2015-10-07 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: unittests/ScriptInterpreter/CMakeLists.txt:4
@@ +3,1 @@
+endif()
\ No newline at end of file


Missed this one in my updated patch, but I fixed it locally.  Don't want to 
update a 3rd revision just for a newline though.


http://reviews.llvm.org/D13537



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


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a comment.

In http://reviews.llvm.org/D13535#262225, @zturner wrote:

> I can't verify that this works on MacOSX at the moment.  Did you verify that 
> this works on other platforms as well?


I've confirmed it works on MacOSX - I'll try to test Linux later today if no 
one beats me to it.


Repository:
  rL LLVM

http://reviews.llvm.org/D13535



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


Re: [Lldb-commits] [PATCH] D12611: [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/JITLoader, Language, LanguageRuntime and Process; unify closing inclusion guards

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem accepted this revision.
brucem added a comment.
This revision is now accepted and ready to land.

I can land this for you. I'd like it to go in as I have another patch myself 
that addresses almost all of the Plugins directory, so if I land this, I'll 
rebase on top of it and submit mine for review. And then I have a couple of 
things to go in after that ...


Repository:
  rL LLVM

http://reviews.llvm.org/D12611



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


Re: [Lldb-commits] [PATCH] D12611: [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/JITLoader, Language, LanguageRuntime and Process; unify closing inclusion guards

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem requested changes to this revision.
brucem added a comment.
This revision now requires changes to proceed.

Could you rebase this forward so that it applies cleanly?


Repository:
  rL LLVM

http://reviews.llvm.org/D12611



___
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-10-07 Thread Siva Chandra via lldb-commits
sivachandra updated this revision to Diff 36818.
sivachandra added a comment.

Rebase.


http://reviews.llvm.org/D12809

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerDeclContext.h
  include/lldb/Symbol/SymbolFile.h
  include/lldb/Symbol/TypeSystem.h
  include/lldb/Target/CPPLanguageRuntime.h
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
  source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
  
source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
  
source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
  source/Plugins/SymbolFile/DWARF/DIERef.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerDeclContext.cpp
  source/Symbol/SymbolFile.cpp

Index: source/Symbol/SymbolFile.cpp
===
--- source/Symbol/SymbolFile.cpp
+++ source/Symbol/SymbolFile.cpp
@@ -134,6 +134,12 @@
 return 0;
 }
 
+void
+SymbolFile::GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector &mangled_names)
+{
+return;
+}
+
 uint32_t
 SymbolFile::FindTypes (const SymbolContext& sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, TypeList& types)
 {
Index: source/Symbol/CompilerDeclContext.cpp
===
--- source/Symbol/CompilerDeclContext.cpp
+++ source/Symbol/CompilerDeclContext.cpp
@@ -42,6 +42,15 @@
 return ConstString();
 }
 
+ConstString
+CompilerDeclContext::GetScopeQualifiedName () const
+{
+if (IsValid())
+return m_type_system->DeclContextGetScopeQualifiedName(m_opaque_decl_ctx);
+else
+return ConstString();
+}
+
 bool
 CompilerDeclContext::IsStructUnionOrClass () const
 {
Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -9050,6 +9050,18 @@
 return ConstString();
 }
 
+ConstString
+ClangASTContext::DeclContextGetScopeQualifiedName (void *opaque_decl_ctx)
+{
+if (opaque_decl_ctx)
+{
+clang::NamedDecl *named_decl = llvm::dyn_cast((clang::DeclContext *)opaque_decl_ctx);
+if (named_decl)
+return ConstString(llvm::StringRef(named_decl->getQualifiedNameAsString()));
+}
+return ConstString();
+}
+
 bool
 ClangASTContext::DeclContextIsClassMethod (void *opaque_decl_ctx,
lldb::LanguageType *language_ptr,
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 // Other libraries and framework includes
@@ -201,6 +202,10 @@
bool append,
lldb_private::SymbolContextList& sc_list) override;
 
+void
+GetMangledNamesForFunction (const std::string &scope_qualified_name,
+std::vector &mangled_names) override;
+
 uint32_t
 FindTypes (const lldb_private::SymbolContext& sc,
const lldb_private::ConstString &name,
@@ -583,6 +588,9 @@
 m_fetched_external_modules:1;
 lldb_private::LazyBool  m_supports_DW_AT_APPLE_objc_complete_type;
 
+typedef std::shared_ptr > DIERefSetSP;
+typedef std::unordered_map NameToOffsetMap;
+NameToOffsetMap m_function_scope_qualified_name_map;
 std::unique_ptr m_ranges;
 UniqueDWARFASTTypeMap m_unique_ast_type_map;
 DIEToTypePtr m_die_to_type;
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2834,6 +2834,24 @@
 return sc_list.GetSize() - original_size;
 }
 
+void
+SymbolFileDWARF::GetMangledNamesForFunction (const std::string &scope_qualified_name,
+ std::vector &mangled_names)
+{
+NameToOffsetMap::iterator iter = m_function_scope_qualified_name_map.find(scope_qualified_name);
+if (iter == m_function_scope_qualified_name_map.end())
+return;
+
+DIERefSetSP set_sp = (*iter).second;
+std::set::iterator set_iter;
+for (set_iter = set_sp->begin(); set_iter != set_sp->end(); set_iter++)
+{
+DWARFDIE die = DebugInfo()->GetDIE (*set_iter);
+mangled_names.push_back(ConstString(die.GetMangledName()));
+}
+}
+
+
 uint32_t
 Symb

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

2015-10-07 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

Another friendly ping.


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] D12606: [LLDB] Fix Clang-tidy modernize-use-override warnings in remaining files in include/lldb/Core and Target, source/Plugins/SymbolFile and tools/lldb-mi, unify closing

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem requested changes to this revision.
brucem added a comment.
This revision now requires changes to proceed.

This doesn't currently apply. (Probably true of your others as well.) Please 
update.


Repository:
  rL LLVM

http://reviews.llvm.org/D12606



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


Re: [Lldb-commits] [PATCH] D12250: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in source/Plugins, unify closing inclusion guards and code layout

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem requested changes to this revision.
brucem added a comment.
This revision now requires changes to proceed.

There are a number of places where you've changed spaces to tabs ... Also the 
GetShortPluginName has already been removed. Please rebase forward and correct 
the whitespace issues.



Comment at: source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h:100
@@ -107,1 +99,3 @@
+   uint32_t reg_num, 
+   lldb_private::RegisterInfo ®_info) override;
 

This looks like a whitespace error. Why introduce tabs here?


Repository:
  rL LLVM

http://reviews.llvm.org/D12250



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


Re: [Lldb-commits] [PATCH] D12220: [LLDB] Fix Clang-tidy misc-use-override warnings in source/Plugins/ABI, unify closing inclusion guards, protected members position

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem requested changes to this revision.
brucem added a comment.
This revision now requires changes to proceed.

This also has the whitespace changes and needs rebasing forward. (And a 
question for someone about the nature of one of the changes.)



Comment at: source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h:25
@@ -24,3 +24,3 @@
 public:
-~ABIMacOSX_arm64() { }
+~ABIMacOSX_arm64() override = default;
 

@clayborg et al: Is this sort of change desired? (I lost track of whether or 
not these 2 constructs are the same in modern C++.)


Repository:
  rL LLVM

http://reviews.llvm.org/D12220



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


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a comment.

Works fine on Linux too.


Repository:
  rL LLVM

http://reviews.llvm.org/D13535



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


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Zachary Turner via lldb-commits
Ok, lgtm then.

On Wed, Oct 7, 2015 at 7:25 PM Dawn Perchik  wrote:

> dawn added a comment.
>
> Works fine on Linux too.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D13535
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a comment.

Can someone accept this patch so I can commit please?


Repository:
  rL LLVM

http://reviews.llvm.org/D13535



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


Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Zachary Turner via lldb-commits
lgtm is just as good as hitting accept in Phabricator, I just can't login
to Phab right now so I'm using email.  Feel free to commit

On Wed, Oct 7, 2015 at 8:24 PM Dawn Perchik  wrote:

> dawn added a comment.
>
> Can someone accept this patch so I can commit please?
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D13535
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


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

2015-10-07 Thread Dawn Perchik via lldb-commits
dawn added a comment.

What other details are you looking for?


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247773



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


[Lldb-commits] [lldb] r249651 - [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints

2015-10-07 Thread Mohit K. Bhakkad via lldb-commits
Author: mohit.bhakkad
Date: Wed Oct  7 22:34:11 2015
New Revision: 249651

URL: http://llvm.org/viewvc/llvm-project?rev=249651&view=rev
Log:
[LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints

Reviewers: clayborg.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D13493

Modified:
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp

Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=249651&r1=249650&r2=249651&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Wed 
Oct  7 22:34:11 2015
@@ -546,6 +546,9 @@ EmulateInstructionMIPS::GetOpcodeForInst
 { "LWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  
"LWR   rt, offset(base)" },
 { "LWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"LWRE  rt, offset(base)" },
 { "LWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  
"LWXC1 fd, index (base)" },
+{ "LLX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  
"LLX   rt, offset(base)" },
+{ "LLXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"LLXE  rt, offset(base)" },
+{ "LLDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"LLDX  rt, offset(base)" },
 
 { "SB", &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SBrt, offset(base)" },
 { "SBE",&EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SBE   rt, offset(base)" },
@@ -569,6 +572,21 @@ EmulateInstructionMIPS::GetOpcodeForInst
 { "SWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SWR   rt, offset(base)" },
 { "SWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SWRE  rt, offset(base)" },
 { "SWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  
"SWXC1 fs, index (base)" },
+{ "SCX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SCX   rt, offset(base)" },
+{ "SCXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SCXE  rt, offset(base)" },
+{ "SCDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  
"SCDX  rt, offset(base)" },
+
+
//--
+// MicroMIPS Load/Store instructions
+
//--
+{ "LBU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"LBU16 rt, decoded_offset(base)"   },
+{ "LHU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"LHU16 rt, left_shifted_offset(base)"  },
+{ "LW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"LW16  rt, left_shifted_offset(base)"  },
+{ "LWGP_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"LWGP  rt, left_shifted_offset(gp)"},
+{ "SH16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"SH16  rt, left_shifted_offset(base)"  },
+{ "SW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"SW16  rt, left_shifted_offset(base)"  },
+{ "SW_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"SWSP  rt, left_shifted_offset(base)"  },
+{ "SB16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   
"SB16  rt, offset(base)"   },
 
 
//--
 // Branch instructions
@@ -1097,10 +1115,30 @@ EmulateInstructionMIPS::Emulate_SWSP (ll
 bool success = false;
 uint32_t imm5 = insn.getOperand(2).getImm();
 uint32_t src, base;
+Context bad_vaddr_context;
+uint32_t address;
 
 src = m_reg_info->getEncodingValue (insn.getOperand(0).getReg());
 base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg());
 
+RegisterInfo reg_info_base;
+
+if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, 
reg_info_base))
+return false;
+
+// read base register
+address = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_zero_mips + 
base, 0, &success);
+if (!success)
+return false;
+
+// destination address
+address = address + imm5;
+
+// We use bad_vaddr_context to store base address which is used by H/W 
watchpoint
+// Set the bad_vaddr register with base address used in the instruction
+bad_vaddr_context.type = eContextInvalid;
+WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, 
dwarf_bad_mips, address);
+
 // We look for sp based non-volatile register stores.
 if (base == dwarf_sp_mips && nonvol

Re: [Lldb-commits] [PATCH] D13493: [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints

2015-10-07 Thread Mohit Bhakkad via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249651: [LLDB][MIPS] microMIPS load/store instruction 
emulation for hardware watchpoints (authored by mohit.bhakkad).

Changed prior to commit:
  http://reviews.llvm.org/D13493?vs=36704&id=36824#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13493

Files:
  lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp

Index: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
===
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
@@ -546,6 +546,9 @@
 { "LWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "LWR   rt, offset(base)" },
 { "LWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LWRE  rt, offset(base)" },
 { "LWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  "LWXC1 fd, index (base)" },
+{ "LLX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLX   rt, offset(base)" },
+{ "LLXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLXE  rt, offset(base)" },
+{ "LLDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "LLDX  rt, offset(base)" },
 
 { "SB", &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SBrt, offset(base)" },
 { "SBE",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SBE   rt, offset(base)" },
@@ -569,6 +572,21 @@
 { "SWR",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SWR   rt, offset(base)" },
 { "SWRE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SWRE  rt, offset(base)" },
 { "SWXC1",  &EmulateInstructionMIPS::Emulate_LDST_Reg,  "SWXC1 fs, index (base)" },
+{ "SCX",&EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCX   rt, offset(base)" },
+{ "SCXE",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCXE  rt, offset(base)" },
+{ "SCDX",   &EmulateInstructionMIPS::Emulate_LDST_Imm,  "SCDX  rt, offset(base)" },
+
+//--
+// MicroMIPS Load/Store instructions
+//--
+{ "LBU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LBU16 rt, decoded_offset(base)"   },
+{ "LHU16_MM",  &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LHU16 rt, left_shifted_offset(base)"  },
+{ "LW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LW16  rt, left_shifted_offset(base)"  },
+{ "LWGP_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "LWGP  rt, left_shifted_offset(gp)"},
+{ "SH16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SH16  rt, left_shifted_offset(base)"  },
+{ "SW16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SW16  rt, left_shifted_offset(base)"  },
+{ "SW_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SWSP  rt, left_shifted_offset(base)"  },
+{ "SB16_MM",   &EmulateInstructionMIPS::Emulate_LDST_Imm,   "SB16  rt, offset(base)"   },
 
 //--
 // Branch instructions
@@ -1097,29 +1115,37 @@
 bool success = false;
 uint32_t imm5 = insn.getOperand(2).getImm();
 uint32_t src, base;
+Context bad_vaddr_context;
+uint32_t address;
 
 src = m_reg_info->getEncodingValue (insn.getOperand(0).getReg());
 base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg());
 
+RegisterInfo reg_info_base;
+
+if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, reg_info_base))
+return false;
+
+// read base register
+address = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_zero_mips + base, 0, &success);
+if (!success)
+return false;
+
+// destination address
+address = address + imm5;
+
+// We use bad_vaddr_context to store base address which is used by H/W watchpoint
+// Set the bad_vaddr register with base address used in the instruction
+bad_vaddr_context.type = eContextInvalid;
+WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, dwarf_bad_mips, address);
+
 // We look for sp based non-volatile register stores.
 if (base == dwarf_sp_mips && nonvolatile_reg_p (src))
 {
 uint32_t address;
 RegisterInfo reg_info_base;
 RegisterInfo reg_info_src;
 
-if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, reg_info_base)
-|| !GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + src, reg_info_src))
-return false;
-
-// read SP
-address =

Re: [Lldb-commits] [PATCH] D13535: Fix cmake build on OSX after r249434.

2015-10-07 Thread Bruce Mitchener via lldb-commits
brucem added a subscriber: brucem.


Comment at: tools/lldb-server/CMakeLists.txt:42
@@ +41,3 @@
+  if (LLDB_VERS_GENERATED_FILE)
+add_dependencies(lldb-server swig_wrapper)
+  endif()

Why is this needed?


Repository:
  rL LLVM

http://reviews.llvm.org/D13535



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


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

2015-10-07 Thread Jaydeep Patil via lldb-commits
jaydeep added a comment.

Hi Dwan,

Could you please try  http://reviews.llvm.org/rL247968 and let me know if the 
issue persist?

Thanks,
Jaydeep


Users:
  jaydeep (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL247773



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