Re: [Lldb-commits] [PATCH] D11947: Improve instruction emulation based stack unwinding

2015-08-18 Thread Tamas Berghammer via lldb-commits
tberghammer updated this revision to Diff 32395.
tberghammer added a comment.

Fix incorrect assert


http://reviews.llvm.org/D11947

Files:
  source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
  source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
  source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp

Index: source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
===
--- source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -580,8 +580,17 @@
 const uint32_t generic_regnum = reg_info-kinds[eRegisterKindGeneric];
 if (reg_num != LLDB_INVALID_REGNUM  generic_regnum != LLDB_REGNUM_GENERIC_SP)
 {
-m_curr_row-SetRegisterLocationToSame (reg_num, /*must_replace*/ false);
-m_curr_row_modified = true;
+if (context.info_type == EmulateInstruction::eInfoTypeAddress)
+{
+if (m_pushed_regs.find (reg_num) != m_pushed_regs.end () 
+context.info.address == m_pushed_regs[reg_num])
+{
+m_curr_row-SetRegisterLocationToSame (reg_num, /*must_replace*/ false);
+m_curr_row_modified = true;
+}
+}
+else
+assert (!unhandled case, add code to handle this!);
 }
 }
 }
Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
===
--- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -768,8 +768,6 @@
 Context context_t;
 Context context_t2;
 
-context_t.SetRegisterToRegisterPlusOffset (reg_info_Rt, reg_info_base, 0);
-context_t2.SetRegisterToRegisterPlusOffset (reg_info_Rt2, reg_info_base, size);
 uint8_t buffer [RegisterValue::kMaxRegisterByteSize];
 Error error;
 
@@ -787,6 +785,8 @@
 context_t.type = eContextRegisterStore;
 context_t2.type = eContextRegisterStore;
 }
+context_t.SetRegisterToRegisterPlusOffset (reg_info_Rt, reg_info_base, 0);
+context_t2.SetRegisterToRegisterPlusOffset (reg_info_Rt2, reg_info_base, size);
 
 if (!ReadRegister (reg_info_Rt, data_Rt))
 return false;
@@ -820,6 +820,8 @@
 context_t.type = eContextRegisterLoad;
 context_t2.type = eContextRegisterLoad;
 }
+context_t.SetAddress(address);
+context_t2.SetAddress(address + size);
 
 if (rt_unknown)
 memset (buffer, 'U', reg_info_Rt.byte_size);
@@ -950,15 +952,14 @@
 return false;
 
 Context context;
-context.SetRegisterToRegisterPlusOffset (reg_info_Rt, reg_info_base, postindex ? 0 : offset);
-
 switch (memop)
 {
 case MemOp_STORE:
 if (n == 31 || n == GetFramePointerRegisterNumber()) // if this store is based off of the sp or fp register
 context.type = eContextPushRegisterOnStack;
 else
 context.type = eContextRegisterStore;
+context.SetRegisterToRegisterPlusOffset (reg_info_Rt, reg_info_base, postindex ? 0 : offset);
 
 if (!ReadRegister (reg_info_Rt, data_Rt))
 return false;
@@ -975,6 +976,7 @@
 context.type = eContextPopRegisterOffStack;
 else
 context.type = eContextRegisterLoad;
+context.SetAddress(address);
 
 if (!ReadMemory (context, address, buffer, reg_info_Rt.byte_size))
 return false;
Index: source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
===
--- source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -578,7 +578,7 @@
 {
 if (BitIsSet (registers, i))
 {
-context.SetRegisterPlusOffset (sp_reg, addr - sp);
+context.SetAddress(addr);
 data = MemARead(context, addr, 4, 0, success);
 if (!success)
 return false;
@@ -2214,7 +2214,7 @@
 for (i=0; iregs; ++i)
 {
 GetRegisterInfo (eRegisterKindDWARF, start_reg + d + i, dwarf_reg);
-context.SetRegisterPlusOffset (sp_reg, addr - sp);
+context.SetAddress(addr);
 data = MemARead(context, addr, reg_byte_size, 0, success);
 if (!success)
   

Re: [Lldb-commits] [lldb] r245216 - [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue

2015-08-18 Thread Pavel Labath via lldb-commits
Hi all,

This commit was reverted in r245222 as it was causing failures on the
linux build-bot. It has a number of issues
http://reviews.llvm.org/rL245216 and I would prefer if it were not
merged until these are resolved. And in any case, this doesn't seem
like a critical bug fix suitable for merge in Testing Phase II.

pl


On 17 August 2015 at 21:29, Greg Clayton via lldb-commits
lldb-commits@lists.llvm.org wrote:
 Ok to merge.
 On Aug 17, 2015, at 1:27 PM, Hans Wennborg h...@chromium.org wrote:

 +lldb-commits

 On Mon, Aug 17, 2015 at 1:25 PM, Hans Wennborg h...@chromium.org wrote:
 I'm OK with it if Greg approves.

 - Hans

 On Mon, Aug 17, 2015 at 7:06 AM,  sagar.tha...@imgtec.com wrote:
 Hi Hans,

 Could you please merge r245216 in the release branch?

 Thanks,
 Sagar

 -Original Message-
 From: lldb-commits [mailto:lldb-commits-boun...@lists.llvm.org] On Behalf 
 Of
 Sagar Thakur via lldb-commits
 Sent: 17 August 2015 17:36
 To: lldb-commits@lists.llvm.org
 Subject: [Lldb-commits] [lldb] r245216 - [LLDB] Use llvm::APInt and
 llvm::APFloat in Scalar and RegisterValue

 Author: slthakur
 Date: Mon Aug 17 07:05:31 2015
 New Revision: 245216

 URL: http://llvm.org/viewvc/llvm-project?rev=245216view=rev
 Log:
 [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue

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


Re: [Lldb-commits] [lldb] r245217 - [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support

2015-08-18 Thread via lldb-commits

Hi Hans,

The file RegisterContext_mips64.h was replaced with 
RegisterContext_mips.h in master branch.

In the release branch, the file RegisterContext_mips64.h still exists.
Could you please delete RegisterContext_mips64.h from the release branch ?

Regards,
Sagar

On Tuesday 18 August 2015 02:47 AM, Hans Wennborg wrote:

Merged to 3.7 in r245240. There was a conflicts because r245141 isn't
on the branch. Please check that I got it right:
http://llvm.org/viewvc/llvm-project?rev=245240view=rev

Thanks,
Hans

On Mon, Aug 17, 2015 at 1:28 PM, Greg Clayton clayb...@gmail.com wrote:

Ok to merge.

On Aug 17, 2015, at 1:26 PM, Hans Wennborg h...@chromium.org wrote:

I'm OK with it if Greg approves.

- Hans

On Mon, Aug 17, 2015 at 7:07 AM,  sagar.tha...@imgtec.com wrote:

Hi Hans,

Could you please also merge r245217 in the release branch.

Thanks,
Sagar

-Original Message-
From: lldb-commits [mailto:lldb-commits-boun...@lists.llvm.org] On Behalf Of
Sagar Thakur via lldb-commits
Sent: 17 August 2015 19:10
To: lldb-commits@lists.llvm.org
Subject: [Lldb-commits] [lldb] r245217 - [LLDB][MIPS] Fix offsets of all
register sets and add MSA regset and FRE=1 mode support

Author: slthakur
Date: Mon Aug 17 08:40:17 2015
New Revision: 245217

URL: http://llvm.org/viewvc/llvm-project?rev=245217view=rev
Log:
[LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1
mode support


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


Re: [Lldb-commits] [PATCH] D12083: [LLGS] Avoid misrepresenting log lines as inferior output

2015-08-18 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL245272: [LLGS] Avoid misrepresenting log lines as inferior 
output (authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D12083?vs=32298id=32383#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12083

Files:
  lldb/trunk/source/Core/Log.cpp
  lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Index: lldb/trunk/source/Core/Log.cpp
===
--- lldb/trunk/source/Core/Log.cpp
+++ lldb/trunk/source/Core/Log.cpp
@@ -449,7 +449,7 @@
 {
 CallbackMap callback_map = GetCallbackMap ();
 CallbackMapIter pos, end = callback_map.end();
-const char *categories[1] = {NULL};
+const char *categories[] = {all, nullptr};
 
 for (pos = callback_map.begin(); pos != end; ++pos)
 pos-second.disable (categories, feedback_strm);
Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
===
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -560,8 +560,11 @@
 // Child process.
 if (pid == 0)
 {
+// First, make sure we disable all logging. If we are logging to 
stdout, our logs can be
+// mistaken for inferior output.
+Log::DisableAllLogChannels(nullptr);
 // FIXME consider opening a pipe between parent/child and have this 
forked child
-// send log info to parent re: launch status, in place of the log 
lines removed here.
+// send log info to parent re: launch status.
 
 // Start tracing this child that is about to exec.
 error = PtraceWrapper(PTRACE_TRACEME, 0);


Index: lldb/trunk/source/Core/Log.cpp
===
--- lldb/trunk/source/Core/Log.cpp
+++ lldb/trunk/source/Core/Log.cpp
@@ -449,7 +449,7 @@
 {
 CallbackMap callback_map = GetCallbackMap ();
 CallbackMapIter pos, end = callback_map.end();
-const char *categories[1] = {NULL};
+const char *categories[] = {all, nullptr};
 
 for (pos = callback_map.begin(); pos != end; ++pos)
 pos-second.disable (categories, feedback_strm);
Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
===
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -560,8 +560,11 @@
 // Child process.
 if (pid == 0)
 {
+// First, make sure we disable all logging. If we are logging to stdout, our logs can be
+// mistaken for inferior output.
+Log::DisableAllLogChannels(nullptr);
 // FIXME consider opening a pipe between parent/child and have this forked child
-// send log info to parent re: launch status, in place of the log lines removed here.
+// send log info to parent re: launch status.
 
 // Start tracing this child that is about to exec.
 error = PtraceWrapper(PTRACE_TRACEME, 0);
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r245319 - [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration

2015-08-18 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Tue Aug 18 12:56:06 2015
New Revision: 245319

URL: http://llvm.org/viewvc/llvm-project?rev=245319view=rev
Log:
[ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration

Summary:
Returns the declaration of the parent (non-synthetic or static) value.


Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

Modified:
lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py

Modified: lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h?rev=245319r1=245318r2=245319view=diff
==
--- lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h Tue Aug 18 12:56:06 
2015
@@ -85,7 +85,7 @@ public:
 {
 return m_parent-GetSP();
 }
-
+
 void
 SetOwningSP (lldb::ValueObjectSP owning_sp)
 {
@@ -105,6 +105,9 @@ public:
 virtual TypeImpl
 GetTypeImpl ();
 
+virtual bool
+GetDeclaration (Declaration decl);
+
 protected:
 virtual bool
 UpdateValue ();

Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=245319r1=245318r2=245319view=diff
==
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Tue Aug 18 
12:56:06 2015
@@ -152,6 +152,9 @@ public:
 virtual void
 SetFormat (lldb::Format format);
 
+virtual bool
+GetDeclaration (Declaration decl);
+
 protected:
 virtual bool
 UpdateValue ();

Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=245319r1=245318r2=245319view=diff
==
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Tue Aug 18 12:56:06 2015
@@ -421,3 +421,12 @@ ValueObjectDynamicValue::SetData (DataEx
 SetNeedsUpdate();
 return ret_val;
 }
+
+bool
+ValueObjectDynamicValue::GetDeclaration (Declaration decl)
+{
+if (m_parent)
+return m_parent-GetDeclaration(decl);
+
+return ValueObject::GetDeclaration(decl);
+}

Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=245319r1=245318r2=245319view=diff
==
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Tue Aug 18 12:56:06 
2015
@@ -314,3 +314,12 @@ ValueObjectSynthetic::SetFormat (lldb::F
 this-ValueObject::SetFormat(format);
 this-ClearUserVisibleData(eClearUserVisibleDataItemsAll);
 }
+
+bool
+ValueObjectSynthetic::GetDeclaration (Declaration decl)
+{
+if (m_parent)
+return m_parent-GetDeclaration(decl);
+
+return ValueObject::GetDeclaration(decl);
+}

Modified: lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py?rev=245319r1=245318r2=245319view=diff
==
--- lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py (original)
+++ lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py Tue Aug 18 
12:56:06 2015
@@ -169,6 +169,7 @@ class SBFormattersAPITestCase(TestBase):
 
 foo_var = 
self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('foo')
 self.assertTrue(foo_var.IsValid(), 'could not find foo')
+self.assertTrue(foo_var.GetDeclaration().IsValid(), 'foo declaration 
is invalid')
 
 self.assertTrue(foo_var.GetNumChildren() == 2, 'synthetic value has 
wrong number of child items (synth)')
 
self.assertTrue(foo_var.GetChildMemberWithName('X').GetValueAsUnsigned() == 1, 
'foo_synth.X has wrong value (synth)')


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


Re: [Lldb-commits] [PATCH] D12092: [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration

2015-08-18 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

Committed. Test suite is clean.


http://reviews.llvm.org/D12092



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


Re: [Lldb-commits] [PATCH] D12100: [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue

2015-08-18 Thread Oleksiy Vyalov via lldb-commits
ovyalov accepted this revision.


Comment at: include/lldb/Core/RegisterValue.h:51
@@ -51,2 +50,3 @@
 {
+m_scalar = (unsigned long)0;
 }

Nit: you can initialize m_scalar within initializer list.


Comment at: include/lldb/Core/RegisterValue.h:185
@@ -190,1 +184,3 @@
+llvm::APInt
+GetAsUInt128 (llvm::APInt fail_value, bool *success_ptr = NULL) const;
 

Could you pass fail_value as a const reference?


Repository:
  rL LLVM

http://reviews.llvm.org/D12100



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


Re: [Lldb-commits] [lldb] r245020 - [MIPS]Handle floating point and aggregate return types in SysV-mips [32 bit] ABI

2015-08-18 Thread Hans Wennborg via lldb-commits
Greg: ping?

On Fri, Aug 14, 2015 at 11:06 AM, Hans Wennborg h...@chromium.org wrote:
 Sure, if Greg approves.

 Thanks,
 Hans

 On Thu, Aug 13, 2015 at 11:25 PM, Bhushan Attarde
 bhushan.atta...@imgtec.com wrote:
 Hi Hans,

 Could you please merge this to the release branch?

 Thanks
 Bhushan


 -Original Message-
 From: lldb-commits [mailto:lldb-commits-boun...@lists.llvm.org] On Behalf Of 
 Bhushan D. Attarde via lldb-commits
 Sent: 14 August 2015 09:11
 To: lldb-commits@lists.llvm.org
 Subject: [Lldb-commits] [lldb] r245020 - [MIPS]Handle floating point and 
 aggregate return types in SysV-mips [32 bit] ABI

 Author: bhushan.attarde
 Date: Thu Aug 13 22:40:31 2015
 New Revision: 245020

 URL: http://llvm.org/viewvc/llvm-project?rev=245020view=rev
 Log:
 [MIPS]Handle floating point and aggregate return types in SysV-mips [32 bit] 
 ABI

 SUMMARY:
 This patch adds support of floating point and aggregate return types in 
 GetReturnValueObjectImpl() for mips32

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

 Modified:
 lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp

 Modified: lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
 URL: 
 http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp?rev=245020r1=245019r2=245020view=diff
 ==
 --- lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp (original)
 +++ lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp Thu Aug 13 
 22:40:31 2015
 @@ -423,15 +423,16 @@ ABISysV_mips::GetReturnValueObjectImpl (
  if (!reg_ctx)
  return return_valobj_sp;

 -bool is_signed;
 +bool is_signed = false;
 +bool is_complex = false;
 +uint32_t count = 0;

  // In MIPS register r2 (v0) holds the integer function return values
  const RegisterInfo *r2_reg_info = reg_ctx-GetRegisterInfoByName(r2, 
 0);
 +size_t bit_width = return_clang_type.GetBitSize(thread);

  if (return_clang_type.IsIntegerType (is_signed))
  {
 -size_t bit_width = return_clang_type.GetBitSize(thread);
 -
  switch (bit_width)
  {
  default:
 @@ -473,6 +474,52 @@ ABISysV_mips::GetReturnValueObjectImpl (
  uint32_t ptr = 
 thread.GetRegisterContext()-ReadRegisterAsUnsigned(r2_reg_info, 0)  
 UINT32_MAX;
  value.GetScalar() = ptr;
  }
 +else if (return_clang_type.IsAggregateType ())
 +{
 +// Structure/Vector is always passed in memory and pointer to that 
 memory is passed in r2.
 +uint64_t mem_address = 
 reg_ctx-ReadRegisterAsUnsigned(reg_ctx-GetRegisterInfoByName(r2, 0), 0);
 +// We have got the address. Create a memory object out of it
 +return_valobj_sp = ValueObjectMemory::Create (thread,
 +  ,
 +  Address (mem_address, 
 NULL),
 +  return_clang_type);
 +return return_valobj_sp;
 +}
 +else if (return_clang_type.IsFloatingPointType (count, is_complex))
 +{
 +const RegisterInfo *f0_info = reg_ctx-GetRegisterInfoByName(f0, 
 0);
 +const RegisterInfo *f1_info = reg_ctx-GetRegisterInfoByName(f1, 
 0);
 +
 +if (count == 1  !is_complex)
 +{
 +switch (bit_width)
 +{
 +default:
 +return return_valobj_sp;
 +case 64:
 +{
 +static_assert(sizeof(double) == sizeof(uint64_t), );
 +uint64_t raw_value;
 +raw_value = reg_ctx-ReadRegisterAsUnsigned(f0_info, 0) 
  UINT32_MAX;
 +raw_value |= 
 ((uint64_t)(reg_ctx-ReadRegisterAsUnsigned(f1_info, 0)  UINT32_MAX))  32;
 +value.GetScalar() = 
 *reinterpret_castdouble*(raw_value);
 +break;
 +}
 +case 32:
 +{
 +static_assert(sizeof(float) == sizeof(uint32_t), );
 +uint32_t raw_value = 
 reg_ctx-ReadRegisterAsUnsigned(f0_info, 0)  UINT32_MAX;
 +value.GetScalar() = 
 *reinterpret_castfloat*(raw_value);
 +break;
 +}
 +}
 +}
 +else
 +{
 +// not handled yet
 +return return_valobj_sp;
 +}
 +}
  else
  {
  // not handled yet


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

Re: [Lldb-commits] [PATCH] D11962: Mark TestCModules as XFAIL on OSX

2015-08-18 Thread Greg Clayton via lldb-commits
clayborg added a comment.

No need to wait for Sean.


http://reviews.llvm.org/D11962



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


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

2015-08-18 Thread Zachary Turner via lldb-commits
Rather than all of this ugly error-prone code, can we instead use
llvm::sys::fs::root_name to check whether the path contains a drive letter?

On Tue, Aug 18, 2015 at 1:52 PM Dawn Perchik via lldb-commits 
lldb-commits@lists.llvm.org wrote:

 dawn created this revision.
 dawn added reviewers: abidh, ki.stfu, brucem.
 dawn added a subscriber: lldb-commits.
 dawn set the repository for this revision to rL LLVM.

 This fixes -data-info-line to parse the filename and line correctly when
 LineEntry doesn't have the optional column number and the filename contains
 a Windows drive letter.

 Repository:
   rL LLVM

 http://reviews.llvm.org/D12115

 Files:
   tools/lldb-mi/MICmdCmdData.cpp

 Index: tools/lldb-mi/MICmdCmdData.cpp
 ===
 --- tools/lldb-mi/MICmdCmdData.cpp
 +++ tools/lldb-mi/MICmdCmdData.cpp
 @@ -1754,8 +1754,15 @@
  const size_t nFileStartPos = rLine.find_first_not_of(' ',
 nEndAddressEndPos + 2);
  const size_t nFileOrLineEndPos = rLine.rfind(':');
  const size_t nFileOrLineStartPos = rLine.rfind(':',
 nFileOrLineEndPos - 1);
 -const size_t nFileEndPos = nFileStartPos 
 nFileOrLineStartPos ? nFileOrLineStartPos : nFileOrLineEndPos;
 -const size_t nFileLen = nFileEndPos - nFileStartPos;
 +size_t nFileEndPos = nFileStartPos  nFileOrLineStartPos ?
 nFileOrLineStartPos : nFileOrLineEndPos;
 +size_t nFileLen = nFileEndPos - nFileStartPos;
 +if ((nFileLen == 1)  ((rLine.at(nFileEndPos + 1) == '\\')
 || (rLine.at(nFileEndPos + 1) == '/')))
 +{
 +// The filename contains a Windows drive letter;
 recalculate
 +// nFileEndPos and nFileLen to account for it.
 +nFileEndPos = nFileOrLineEndPos;
 +nFileLen = nFileEndPos - nFileStartPos;
 +}
  const CMIUtilString strFile(rLine.substr(nFileStartPos,
 nFileLen).c_str());
  const CMICmnMIValueConst miValueConst3(strFile);
  const CMICmnMIValueResult miValueResult3(file,
 miValueConst3);


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

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


Re: [Lldb-commits] [PATCH] D11962: Mark TestCModules as XFAIL on OSX

2015-08-18 Thread Chaoren Lin via lldb-commits
chaoren added a subscriber: chaoren.
chaoren added a comment.

Ping? It's been a week, and the buildbot is still red because of this: 
http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/4923


http://reviews.llvm.org/D11962



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


[Lldb-commits] [lldb] r245338 - [Windows] XFAIL tests that depend on expression name lookup.

2015-08-18 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Aug 18 15:01:28 2015
New Revision: 245338

URL: http://llvm.org/viewvc/llvm-project?rev=245338view=rev
Log:
[Windows] XFAIL tests that depend on expression name lookup.

Name lookup doesn't work properly with Windows targets.  This is
most likely due to issues with name mangling, although there is at
least one set of debug info related issues as well, since some of
the name lookup requests appear to be failing on types rather than
symbols.

Specifically, this patch XFAILS the following set of tests:

TestChar1632T.py
TestRdar12991846.py
TestConstVariables.py
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestCallUserDefinedFunction.py
TestCModules.py
TestCPPThis.py
TestExprs2.py
TestOverloadedFunctions.py
TestRvalueReferences.py

And fixing the underlying issue is tracked in http://llvm.org/pr24489

Modified:
lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py

lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py
lldb/trunk/test/expression_command/test/TestExprs2.py
lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
lldb/trunk/test/lang/c/modules/TestCModules.py
lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py
lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py
lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py
lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
lldb/trunk/test/lang/cpp/this/TestCPPThis.py

Modified: 
lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py?rev=245338r1=245337r2=245338view=diff
==
--- lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py 
(original)
+++ lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py 
Tue Aug 18 15:01:28 2015
@@ -30,6 +30,7 @@ class ExprCommandCallStopContinueTestCas
 
 @dwarf_test
 @expectedFlakeyDarwin(llvm.org/pr20274)
+@expectedFailureWindows(llvm.org/pr24489: Name lookup not working 
correctly on Windows)
 def test_with_dwarf(self):
 Test gathering result from interrupted function call.
 self.buildDwarf()

Modified: 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py?rev=245338r1=245337r2=245338view=diff
==
--- 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py 
(original)
+++ 
lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py 
Tue Aug 18 15:01:28 2015
@@ -31,6 +31,7 @@ class ExprCommandCallUserDefinedFunction
 self.call_function()
 
 @dwarf_test
+@expectedFailureWindows(llvm.org/pr24489: Name lookup not working 
correctly on Windows)
 @expectedFailureFreeBSD(llvm.org/pr20274) # intermittent failure
 def test_with_dwarf(self):
 Test return values of user defined function calls.

Modified: lldb/trunk/test/expression_command/test/TestExprs2.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs2.py?rev=245338r1=245337r2=245338view=diff
==
--- lldb/trunk/test/expression_command/test/TestExprs2.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs2.py Tue Aug 18 15:01:28 
2015
@@ -19,6 +19,7 @@ class ExprCommands2TestCase(TestBase):
 self.line = line_number('main.cpp',
 '// Please test many expressions while stopped 
at this line:')
 
+@expectedFailureWindows(llvm.org/pr24489: Name lookup not working 
correctly on Windows)
 def test_more_expr_commands(self):
 Test some more expression commands.
 self.buildDefault()

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=245338r1=245337r2=245338view=diff
==
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Tue Aug 18 
15:01:28 2015
@@ -18,6 +18,8 @@ class ConstVariableTestCase(TestBase):
 self.const_variable()
 
 @expectedFailureClang('13314878') # This test works with gcc, but fails 
with newer version of clang on Linux due to a clang issue. Fails for icc as 
well. Bug number TDB.
+@expectedFailureWindows(llvm.org/pr24489: Name lookup not working 
correctly on Windows)
+

[Lldb-commits] [lldb] r245357 - Mark TestCModules as XFAIL on OSX.

2015-08-18 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Tue Aug 18 16:20:25 2015
New Revision: 245357

URL: http://llvm.org/viewvc/llvm-project?rev=245357view=rev
Log:
Mark TestCModules as XFAIL on OSX.

http://reviews.llvm.org/D11962


Modified:
lldb/trunk/test/lang/c/modules/TestCModules.py

Modified: lldb/trunk/test/lang/c/modules/TestCModules.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/modules/TestCModules.py?rev=245357r1=245356r2=245357view=diff
==
--- lldb/trunk/test/lang/c/modules/TestCModules.py (original)
+++ lldb/trunk/test/lang/c/modules/TestCModules.py Tue Aug 18 16:20:25 2015
@@ -16,12 +16,14 @@ class CModulesTestCase(TestBase):
 
 @skipUnlessDarwin
 @dsym_test
+@expectedFailureDarwin('http://llvm.org/pr24302')
 def test_expr_with_dsym(self):
 self.buildDsym()
 self.expr()
 
 @dwarf_test
 @skipIfFreeBSD
+@expectedFailureDarwin('http://llvm.org/pr24302')
 @expectedFailureLinux('http://llvm.org/pr23456') # 'fopen' has unknown 
return type
 @expectedFailureWindows(llvm.org/pr24489: Name lookup not working 
correctly on Windows)
 def test_expr_with_dwarf(self):


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


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

2015-08-18 Thread Dawn Perchik via lldb-commits
dawn added a comment.

In http://reviews.llvm.org/D12115#227241, @brucem wrote:

 ... this needs a test as well  if possible.


Since the lldb-mi tests don't run on Windows, I don't see how that would be 
possible.


Repository:
  rL LLVM

http://reviews.llvm.org/D12115



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


[Lldb-commits] [lldb] r245407 - XFAIL TestCppChainedCalls for GCC.

2015-08-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Aug 18 21:55:33 2015
New Revision: 245407

URL: http://llvm.org/viewvc/llvm-project?rev=245407view=rev
Log:
XFAIL TestCppChainedCalls for GCC.

Modified:
lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py

Modified: lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py?rev=245407r1=245406r2=245407view=diff
==
--- lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py (original)
+++ lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py Tue Aug 18 
21:55:33 2015
@@ -12,6 +12,7 @@ class TestCppChainedCalls(TestBase):
 self.buildDsym()
 self.check()
 
+@expectedFailureGcc
 @dwarf_test
 def test_with_dwarf_and_run_command(self):
 self.buildDwarf()


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


[Lldb-commits] [lldb] r245412 - Fix TestCppNsImport and TestCppScope for remote tests.

2015-08-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Aug 18 23:08:56 2015
New Revision: 245412

URL: http://llvm.org/viewvc/llvm-project?rev=245412view=rev
Log:
Fix TestCppNsImport and TestCppScope for remote tests.

Modified:
lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
lldb/trunk/test/lang/cpp/scope/TestCppScope.py

Modified: lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py?rev=245412r1=245411r2=245412view=diff
==
--- lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py (original)
+++ lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py Tue Aug 18 23:08:56 
2015
@@ -6,9 +6,9 @@ from lldbtest import *
 import lldbutil
 
 class TestCppNsImport(TestBase):
-
+
 mydir = TestBase.compute_mydir(__file__)
-
+
 @skipUnlessDarwin
 @dsym_test
 def test_with_dsym_and_run_command(self):
@@ -32,12 +32,12 @@ class TestCppNsImport(TestBase):
 src_file = main.cpp
 src_file_spec = lldb.SBFileSpec(src_file)
 self.assertTrue(src_file_spec.IsValid(), Main source file)
-
+
 # Get the path of the executable
-cwd = os.getcwd() 
+cwd = os.getcwd()
 exe_file = a.out
 exe_path  = os.path.join(cwd, exe_file)
-
+
 # Load the executable
 target = self.dbg.CreateTarget(exe_path)
 self.assertTrue(target.IsValid(), VALID_TARGET)
@@ -49,20 +49,20 @@ class TestCppNsImport(TestBase):
 # Launch the process
 args = None
 env = None
-process = target.LaunchSimple(args, env, cwd)
+process = target.LaunchSimple(args, env, 
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)
 
-# Get current fream of the thread at the breakpoint 
+# Get current fream of the thread at the breakpoint
 frame = thread.GetSelectedFrame()
 
 # Test imported namespaces
 test_result = frame.EvaluateExpression(x)
 self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 11, x = 11)
-
+
 test_result = frame.EvaluateExpression(xx)
 self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 22, xx = 22)
 

Modified: lldb/trunk/test/lang/cpp/scope/TestCppScope.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/scope/TestCppScope.py?rev=245412r1=245411r2=245412view=diff
==
--- lldb/trunk/test/lang/cpp/scope/TestCppScope.py (original)
+++ lldb/trunk/test/lang/cpp/scope/TestCppScope.py Tue Aug 18 23:08:56 2015
@@ -6,9 +6,9 @@ from lldbtest import *
 import lldbutil
 
 class TestCppScopes(TestBase):
-
+
 mydir = TestBase.compute_mydir(__file__)
-
+
 @skipUnlessDarwin
 @dsym_test
 def test_with_dsym_and_run_command(self):
@@ -28,12 +28,12 @@ class TestCppScopes(TestBase):
 src_file = main.cpp
 src_file_spec = lldb.SBFileSpec(src_file)
 self.assertTrue(src_file_spec.IsValid(), Main source file)
-
+
 # Get the path of the executable
-cwd = os.getcwd() 
+cwd = os.getcwd()
 exe_file = a.out
 exe_path  = os.path.join(cwd, exe_file)
-
+
 # Load the executable
 target = self.dbg.CreateTarget(exe_path)
 self.assertTrue(target.IsValid(), VALID_TARGET)
@@ -45,20 +45,20 @@ class TestCppScopes(TestBase):
 # Launch the process
 args = None
 env = None
-process = target.LaunchSimple(args, env, cwd)
+process = target.LaunchSimple(args, env, 
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)
 
-# Get current fream of the thread at the breakpoint 
+# Get current fream of the thread at the breakpoint
 frame = thread.GetSelectedFrame()
 
-# Test result for scopes of variables 
+# Test result for scopes of variables
 
 global_variables = frame.GetVariables(True, True, True, False)
-global_variables_assert = { 
+global_variables_assert = {
 'A::a': ,
 'B::a': ,
 'C::a': ,
@@ -68,7 +68,7 @@ class TestCppScopes(TestBase):
 
 self.assertTrue(global_variables.GetSize() == 4, target variable 
returns all variables)
 for variable in global_variables:
-name = 

Re: [Lldb-commits] [PATCH] D11947: Improve instruction emulation based stack unwinding

2015-08-18 Thread Jason Molenda via lldb-commits
jasonmolenda accepted this revision.
jasonmolenda added a comment.
This revision is now accepted and ready to land.

Looks good to me.


http://reviews.llvm.org/D11947



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


Re: [Lldb-commits] [PATCH] D11543: Fix evaluation of global operators in C++

2015-08-18 Thread Chaoren Lin via lldb-commits
chaoren added a subscriber: chaoren.


Comment at: test/lang/cpp/global_operators/TestCppGlobalOperators.py:9
@@ +8,3 @@
+class TestCppGlobalOperators(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)

Please be careful of trailing whitespaces.


Comment at: test/lang/cpp/global_operators/TestCppGlobalOperators.py:48
@@ +47,3 @@
+env = None
+process = target.LaunchSimple(args, env, cwd)
+self.assertTrue(process.IsValid(), PROCESS_IS_VALID)

Please use `self.get_process_working_directory()` instead of `cwd`, so that 
this works for remote targets.


http://reviews.llvm.org/D11543



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


Re: [Lldb-commits] [PATCH] D11962: Mark TestCModules as XFAIL on OSX

2015-08-18 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.

Please commit.


http://reviews.llvm.org/D11962



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


[Lldb-commits] [PATCH] D12113: [LLDB-MI] Add (gdb) prompt after =breakpoint-modified and =breakpoint-created.

2015-08-18 Thread Dawn Perchik via lldb-commits
dawn created this revision.
dawn added reviewers: abidh, ki.stfu, brucem.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.

This patch causes lldb-mi to print the (gdb) prompt after =breakpoint-modified 
and =breakpoint-created notifications.  This makes it clear to the user and 
IDEs that lldb is done and ready for input.

Repository:
  rL LLVM

http://reviews.llvm.org/D12113

Files:
  tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp

Index: tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
===
--- tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
+++ tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
@@ -351,7 +351,8 @@
 
 const CMICmnMIValueResult miValueResultC(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord 
miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, 
miValueResultC);
-const bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 
 return bOk;
 }
@@ -440,6 +441,7 @@
 const CMICmnMIValueResult miValueResult(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord 
miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, 
miValueResult);
 bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 }
 else
 {
@@ -462,6 +464,7 @@
 const CMICmnMIValueResult miValueResult(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord 
miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated, 
miValueResult);
 bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 }
 
 return bOk;


Index: tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
===
--- tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
+++ tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
@@ -351,7 +351,8 @@
 
 const CMICmnMIValueResult miValueResultC(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResultC);
-const bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 
 return bOk;
 }
@@ -440,6 +441,7 @@
 const CMICmnMIValueResult miValueResult(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResult);
 bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 }
 else
 {
@@ -462,6 +464,7 @@
 const CMICmnMIValueResult miValueResult(bkpt, miValueTuple);
 const CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated, miValueResult);
 bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+bOk = bOk  CMICmnStreamStdout::WritePrompt();
 }
 
 return bOk;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12025: Make LLDB URLs to support hex encoding for special symbols

2015-08-18 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.
This revision is now accepted and ready to land.

I see your point. I am still not too happy with this approach but I don't have 
any better idea to solve it. I am fine with committing it in in this format and 
we can improve it later if we find a better approach.


http://reviews.llvm.org/D12025



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


[Lldb-commits] [lldb] r245380 - Test chaned function calls and imported namespaces in C++

2015-08-18 Thread Paul Herman via lldb-commits
Author: paulherman
Date: Tue Aug 18 17:43:37 2015
New Revision: 245380

URL: http://llvm.org/viewvc/llvm-project?rev=245380view=rev
Log:
Test chaned function calls and imported namespaces in C++

Added:
lldb/trunk/test/lang/cpp/chained-calls/
lldb/trunk/test/lang/cpp/chained-calls/Makefile
lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py
lldb/trunk/test/lang/cpp/chained-calls/main.cpp
lldb/trunk/test/lang/cpp/nsimport/
lldb/trunk/test/lang/cpp/nsimport/Makefile
lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
lldb/trunk/test/lang/cpp/nsimport/main.cpp

Added: lldb/trunk/test/lang/cpp/chained-calls/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/chained-calls/Makefile?rev=245380view=auto
==
--- lldb/trunk/test/lang/cpp/chained-calls/Makefile (added)
+++ lldb/trunk/test/lang/cpp/chained-calls/Makefile Tue Aug 18 17:43:37 2015
@@ -0,0 +1,5 @@
+LEVEL = ../../../make
+
+CXX_SOURCES := main.cpp
+
+include $(LEVEL)/Makefile.rules

Added: lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py?rev=245380view=auto
==
--- lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py (added)
+++ lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py Tue Aug 18 
17:43:37 2015
@@ -0,0 +1,94 @@
+import lldb
+from lldbtest import *
+import lldbutil
+
+class TestCppChainedCalls(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@skipUnlessDarwin
+@dsym_test
+def test_with_dsym_and_run_command(self):
+self.buildDsym()
+self.check()
+
+@dwarf_test
+def test_with_dwarf_and_run_command(self):
+self.buildDwarf()
+self.check()
+
+def setUp(self):
+TestBase.setUp(self)
+
+def check(self):
+# Get main source file
+src_file = main.cpp
+src_file_spec = lldb.SBFileSpec(src_file)
+self.assertTrue(src_file_spec.IsValid(), Main source file)
+
+# Get the path of the executable
+cwd = os.getcwd() 
+exe_file = a.out
+exe_path  = os.path.join(cwd, exe_file)
+
+# Load the executable
+target = self.dbg.CreateTarget(exe_path)
+self.assertTrue(target.IsValid(), VALID_TARGET)
+
+# Break on main function
+main_breakpoint = target.BreakpointCreateBySourceRegex(Break here, 
src_file_spec)
+self.assertTrue(main_breakpoint.IsValid() and 
main_breakpoint.GetNumLocations() = 1, VALID_BREAKPOINT)
+
+# Launch the process
+args = None
+env = None
+process = target.LaunchSimple(args, env, cwd)
+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)
+
+# Get frame for current thread 
+frame = thread.GetSelectedFrame()
+
+# Test chained calls
+test_result = frame.EvaluateExpression(g(f(12345)))
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 12345, g(f(12345)) = 12345)
+
+test_result = frame.EvaluateExpression(q(p()).a)
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 12345678, q(p()).a = 12345678)
+
+test_result = frame.EvaluateExpression((p() + r()).a)
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 22345678, (p() + r()).a = 22345678)
+
+test_result = frame.EvaluateExpression(q(p() + r()).a)
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 22345678, q(p() + r()).a = 22345678)
+
+test_result = frame.EvaluateExpression(g(f(6700) + f(89)))
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 6789, g(f(6700) + f(89)) = 6789)
+
+test_result = frame.EvaluateExpression(g(f(g(f(300) + f(40))) + 
f(5)))
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 345, g(f(g(f(300) + f(40))) + f(5)) = 345)
+
+test_result = frame.EvaluateExpression(getb(makeb(), 789))
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 789, getb(makeb(), 789) = 789)
+
+test_result = frame.EvaluateExpression((*c).a)
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 5678, (*c).a = 5678)
+
+test_result = frame.EvaluateExpression((*c + *c).a)
+self.assertTrue(test_result.IsValid() and 
test_result.GetValueAsSigned() == 11356, (*c + *c).a = 11356)
+
+test_result = frame.EvaluateExpression(q(*c + 

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

2015-08-18 Thread Dawn Perchik via lldb-commits
dawn added a comment.

 Are you saying that there is a situation where you are given a path, and you 
 have no idea whether it is a posix path or a windows path?


Yes.  For example, in lldb on OSX, we can be debugging an app that was built on 
OSX, or an app that was built on Windows targeting OSX.  More likely, we would 
be debugging an app that was built on Windows but links with libraries that 
were built on OSX.

I've thought of various ways to fit this into lldb...
One idea was to add:

  settings set target.pathsyntax [posix|windows|any|native] #default=native

and a FileSpec::ePathSyntaxAny enum which would be set if the user chose any.
But that doesn't solve the problem for llvm, whose path handling appears to be 
controlled by the define LLVM_ON_WIN32.

Ideas?


Repository:
  rL LLVM

http://reviews.llvm.org/D12115



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


[Lldb-commits] [lldb] r245398 - Update to r245397.

2015-08-18 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Tue Aug 18 20:24:57 2015
New Revision: 245398

URL: http://llvm.org/viewvc/llvm-project?rev=245398view=rev
Log:
Update to r245397.

`ast_transformer` could be null, in which case we should initialize
`m_code_generator` with the ASTContext.

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

Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=245398r1=245397r2=245398view=diff
==
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Tue Aug 18 20:24:57 
2015
@@ -410,15 +410,20 @@ ClangExpressionParser::Parse (Stream st
 diag_buf-BeginSourceFile(m_compiler-getLangOpts(), 
m_compiler-getPreprocessor());
 
 ASTConsumer *ast_transformer = 
m_expr.ASTTransformer(m_code_generator.get());
-ast_transformer-Initialize(m_compiler-getASTContext());
 
 if (ClangExpressionDeclMap *decl_map = m_expr.DeclMap())
 decl_map-InstallCodeGenerator(m_code_generator.get());
-
+
 if (ast_transformer)
+{
+ast_transformer-Initialize(m_compiler-getASTContext());
 ParseAST(m_compiler-getPreprocessor(), ast_transformer, 
m_compiler-getASTContext());
+}
 else
+{
+m_code_generator-Initialize(m_compiler-getASTContext());
 ParseAST(m_compiler-getPreprocessor(), m_code_generator.get(), 
m_compiler-getASTContext());
+}
 
 diag_buf-EndSourceFile();
 


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


Re: [Lldb-commits] [PATCH] D12126: Read exception records from Windows mini dump

2015-08-18 Thread Adrian McCarthy via lldb-commits
amccarth updated this revision to Diff 32475.
amccarth marked an inline comment as done.
amccarth added a comment.

Addresses some of Zach's comments.


http://reviews.llvm.org/D12126

Files:
  source/Plugins/Process/Windows/ExceptionRecord.h
  source/Plugins/Process/win-minidump/ProcessWinMiniDump.cpp
  source/Plugins/Process/win-minidump/ProcessWinMiniDump.h

Index: source/Plugins/Process/win-minidump/ProcessWinMiniDump.h
===
--- source/Plugins/Process/win-minidump/ProcessWinMiniDump.h
+++ source/Plugins/Process/win-minidump/ProcessWinMiniDump.h
@@ -97,6 +97,15 @@
 lldb_private::ArchSpec
 DetermineArchitecture();
 
+void
+ReadExceptionRecord();
+
+// A thin wrapper around WinAPI's MiniDumpReadDumpStream to avoid redundant
+// checks.  If there's a failure (e.g., if the requested stream doesn't exist),
+// the function returns nullptr and sets *size_out to 0.
+void *
+FindDumpStream(unsigned stream_number, size_t *size_out);
+
 // Isolate the data to keep Windows-specific types out of this header.  Can't
 // use the typical pimpl idiom because the implementation of this class also
 // needs access to public and protected members of the base class.
Index: source/Plugins/Process/win-minidump/ProcessWinMiniDump.cpp
===
--- source/Plugins/Process/win-minidump/ProcessWinMiniDump.cpp
+++ source/Plugins/Process/win-minidump/ProcessWinMiniDump.cpp
@@ -24,11 +24,15 @@
 #include lldb/Core/State.h
 #include lldb/Core/DataBufferHeap.h
 #include lldb/Core/Log.h
+#include lldb/Target/StopInfo.h
 #include lldb/Target/Target.h
 #include lldb/Target/DynamicLoader.h
 #include lldb/Target/UnixSignals.h
+#include llvm/Support/Format.h
+#include llvm/Support/raw_ostream.h
 #include Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h
 
+#include ../windows/ExceptionRecord.h  // TODO(amccarth):  move this file to a common location
 #include ThreadWinMiniDump.h
 
 using namespace lldb_private;
@@ -45,6 +49,7 @@
 HANDLE m_dump_file;  // handle to the open minidump file
 HANDLE m_mapping;  // handle to the file mapping for the minidump file
 void * m_base_addr;  // base memory address of the minidump
+std::shared_ptrExceptionRecord m_exception_sp;
 };
 
 ConstString
@@ -129,7 +134,8 @@
 
 m_target.SetArchitecture(DetermineArchitecture());
 // TODO(amccarth):  Build the module list.
-// TODO(amccarth):  Read the exeception record.
+
+ReadExceptionRecord();
 
 return error;
 
@@ -146,21 +152,12 @@
 bool
 ProcessWinMiniDump::UpdateThreadList(ThreadList old_thread_list, ThreadList new_thread_list)
 {
-assert(m_data_up != nullptr);
-assert(m_data_up-m_base_addr != 0);
-
-MINIDUMP_DIRECTORY *dir = nullptr;
-void *ptr = nullptr;
-ULONG size = 0;
-if (::MiniDumpReadDumpStream(m_data_up-m_base_addr, ThreadListStream, dir, ptr, size))
+size_t size = 0;
+auto thread_list_ptr = static_castconst MINIDUMP_THREAD_LIST *(FindDumpStream(ThreadListStream, size));
+if (thread_list_ptr)
 {
-assert(dir-StreamType == ThreadListStream);
-assert(size == dir-Location.DataSize);
-assert(ptr == static_castvoid*(static_castchar*(m_data_up-m_base_addr) + dir-Location.Rva));
-auto thread_list_ptr = static_castconst MINIDUMP_THREAD_LIST *(ptr);
 const ULONG32 thread_count = thread_list_ptr-NumberOfThreads;
-assert(thread_count  std::numeric_limitsint::max());
-for (int i = 0; i  thread_count; ++i) {
+for (ULONG32 i = 0; i  thread_count; ++i) {
 std::shared_ptrThreadWinMiniDump thread_sp(new ThreadWinMiniDump(*this, thread_list_ptr-Threads[i].ThreadId));
 new_thread_list.AddThread(thread_sp);
 }
@@ -172,6 +169,20 @@
 void
 ProcessWinMiniDump::RefreshStateAfterStop()
 {
+if (m_data_up) return;
+if (m_data_up-m_exception_sp) return;
+
+auto active_exception = m_data_up-m_exception_sp;
+std::string desc;
+llvm::raw_string_ostream desc_stream(desc);
+desc_stream  Exception 
+ llvm::format_hex(active_exception-GetExceptionCode(), 8)
+  encountered at address 
+ llvm::format_hex(active_exception-GetExceptionAddress(), 8);
+m_thread_list.SetSelectedThreadByID(active_exception-GetThreadID());
+auto stop_thread = m_thread_list.GetSelectedThread();
+auto stop_info = StopInfo::CreateStopReasonWithException(*stop_thread, desc_stream.str().c_str());
+stop_thread-SetStopInfo(stop_info);
 }
 
 Error
@@ -302,18 +313,10 @@
 ArchSpec
 ProcessWinMiniDump::DetermineArchitecture()
 {
-assert(m_data_up != nullptr);
-assert(m_data_up-m_base_addr != 0);
-
-MINIDUMP_DIRECTORY *dir = nullptr;
-void *ptr = nullptr;
-ULONG size = 0;
-if (::MiniDumpReadDumpStream(m_data_up-m_base_addr, SystemInfoStream, dir, ptr, size))
+

Re: [Lldb-commits] [lldb] r245141 - A messy bit of cleanup: Move towards more descriptive names

2015-08-18 Thread Ed Maste via lldb-commits
On 18 August 2015 at 13:16, Ed Maste ema...@freebsd.org wrote:
 On 15 August 2015 at 01:21, Jason Molenda via lldb-commits
 lldb-commits@lists.llvm.org wrote:

 Author: jmolenda
 Date: Fri Aug 14 20:21:01 2015
 New Revision: 245141

 URL: http://llvm.org/viewvc/llvm-project?rev=245141view=rev
 Log:
 A messy bit of cleanup: Move towards more descriptive names
 for eh_frame and stabs register numberings.  This is not
 complete but it's a step in the right direction.  It's almost
 entirely mechanical.

 This change broke all tests on FreeBSD, like so:

 Command invoked: timeout -s QUIT 4m /usr/local/bin/python2.7
 /tank/emaste/src/llvm/tools/lldb/test/dotest.py -q --arch=x86_64
 --executable /tank/emaste/src/llvm/build-nodebug/bin/lldb -s
 /tank/emaste/src/llvm/build-nodebug/lldb-test-traces -u CXXFLAGS -u
 CFLAGS -C /usr/bin/clang -p TestGdbRemoteProcessInfo.py
 /tank/emaste/src/llvm/tools/lldb/test/tools/lldb-server
 362 out of 388 test suites processed - TestGdbRemoteProcessInfo.py
 Traceback (most recent call last):
   File /tank/emaste/src/llvm/tools/lldb/test/dotest.py, line 1242, in 
 module
 setupSysPath()
   File /tank/emaste/src/llvm/tools/lldb/test/dotest.py, line 1061,
 in setupSysPath
 print   4) The executable '%s' could not be found.  Please check
  % lldbExecutable
 NameError: global name 'lldbExecutable' is not defined

Oops, nevermind -- finish_swig didn't run after the build.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12100: [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue

2015-08-18 Thread Greg Clayton via lldb-commits
clayborg added a comment.

Looks good.


Repository:
  rL LLVM

http://reviews.llvm.org/D12100



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