Re: [Lldb-commits] [PATCH] D12356: [MIPS64] Emulate MSA branch instructions

2015-08-31 Thread Sagar Thakur via lldb-commits
sagar updated this revision to Diff 33567.
sagar added a comment.

Addressed review commenst


Repository:
  rL LLVM

http://reviews.llvm.org/D12356

Files:
  source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
  source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h

Index: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
===
--- source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
+++ source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
@@ -302,6 +302,42 @@
 Emulate_BC1ANY4T  (llvm::MCInst& insn);
 
 bool
+Emulate_BNZB  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZH  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZW  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZD  (llvm::MCInst& insn);
+
+bool
+Emulate_BZB  (llvm::MCInst& insn);
+
+bool
+Emulate_BZH  (llvm::MCInst& insn);
+
+bool
+Emulate_BZW  (llvm::MCInst& insn);
+
+bool
+Emulate_BZD  (llvm::MCInst& insn);
+
+bool
+Emulate_MSA_Branch_DF (llvm::MCInst& insn, int element_byte_size, bool bnz);
+
+bool
+Emulate_BNZV  (llvm::MCInst& insn);
+
+bool
+Emulate_BZV  (llvm::MCInst& insn);
+
+bool
+Emulate_MSA_Branch_V (llvm::MCInst& insn, bool bnz);
+
+bool
 nonvolatile_reg_p (uint64_t regnum);
 
 const char *
Index: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
===
--- source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
+++ source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
@@ -256,6 +256,41 @@
 case gcc_dwarf_f29_mips64: return "f29";
 case gcc_dwarf_f30_mips64: return "f30";
 case gcc_dwarf_f31_mips64: return "f31";
+case gcc_dwarf_w0_mips64:  return "w0";
+case gcc_dwarf_w1_mips64:  return "w1";
+case gcc_dwarf_w2_mips64:  return "w2";
+case gcc_dwarf_w3_mips64:  return "w3";
+case gcc_dwarf_w4_mips64:  return "w4";
+case gcc_dwarf_w5_mips64:  return "w5";
+case gcc_dwarf_w6_mips64:  return "w6";
+case gcc_dwarf_w7_mips64:  return "w7";
+case gcc_dwarf_w8_mips64:  return "w8";
+case gcc_dwarf_w9_mips64:  return "w9";
+case gcc_dwarf_w10_mips64: return "w10";
+case gcc_dwarf_w11_mips64: return "w11";
+case gcc_dwarf_w12_mips64: return "w12";
+case gcc_dwarf_w13_mips64: return "w13";
+case gcc_dwarf_w14_mips64: return "w14";
+case gcc_dwarf_w15_mips64: return "w15";
+case gcc_dwarf_w16_mips64: return "w16";
+case gcc_dwarf_w17_mips64: return "w17";
+case gcc_dwarf_w18_mips64: return "w18";
+case gcc_dwarf_w19_mips64: return "w19";
+case gcc_dwarf_w20_mips64: return "w20";
+case gcc_dwarf_w21_mips64: return "w21";
+case gcc_dwarf_w22_mips64: return "w22";
+case gcc_dwarf_w23_mips64: return "w23";
+case gcc_dwarf_w24_mips64: return "w24";
+case gcc_dwarf_w25_mips64: return "w25";
+case gcc_dwarf_w26_mips64: return "w26";
+case gcc_dwarf_w27_mips64: return "w27";
+case gcc_dwarf_w28_mips64: return "w28";
+case gcc_dwarf_w29_mips64: return "w29";
+case gcc_dwarf_w30_mips64: return "w30";
+case gcc_dwarf_w31_mips64: return "w31";
+case gcc_dwarf_mir_mips64: return "mir";
+case gcc_dwarf_mcsr_mips64: return "mcsr";
+case gcc_dwarf_config5_mips64: return "config5";
 default:
 break;
 }
@@ -336,6 +371,41 @@
 case gcc_dwarf_f31_mips64:  return "f31";
 case gcc_dwarf_fcsr_mips64: return "fcsr";
 case gcc_dwarf_fir_mips64:  return "fir";
+case gcc_dwarf_w0_mips64:   return "w0";
+case gcc_dwarf_w1_mips64:   return "w1";
+case gcc_dwarf_w2_mips64:   return "w2";
+case gcc_dwarf_w3_mips64:   return "w3";
+case gcc_dwarf_w4_mips64:   return "w4";
+case gcc_dwarf_w5_mips64:   return "w5";
+case gcc_dwarf_w6_mips64:   return "w6";
+case gcc_dwarf_w7_mips64:   return "w7";
+case gcc_dwarf_w8_mips64:   return "w8";
+case gcc_dwarf_w9_mips64:   return "w9";
+case gcc_dwarf_w10_mips64:  return "w10";
+case gcc_dwarf_w11_mips64:  return "w11";
+case gcc_dwarf_w12_mips64:  return "w12";
+case gcc_dwarf_w13_mips64:  return "w13";
+case gcc_dwarf_w14_mips64:  return "w14";
+case gcc_dwarf_w15_mips64:  return "w15";
+case gcc_dwarf_w16_mips64:  return "w16";
+case gcc_dwarf_w17_mips64:  return "w17";
+case gcc_dwarf_w18_mips64:  return "

Re: [Lldb-commits] [PATCH] D12356: [MIPS64] Emulate MSA branch instructions

2015-08-31 Thread Sagar Thakur via lldb-commits
sagar marked 7 inline comments as done.


Comment at: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:3160
@@ +3159,3 @@
+if((*ptr == 0 && bnz) || (*ptr != 0 && !bnz) )
+branch_hit = false;
+break;

The former one is more readable.


Comment at: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:3187
@@ +3186,3 @@
+context.type = eContextRelativeBranchImmediate;
+
+if (!WriteRegisterUnsigned (context, eRegisterKindDWARF, 
gcc_dwarf_pc_mips64, target))

I have set the type to eContextRelativeBranchImmediate for now we are using 
these instructions for single stepping only.


Comment at: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:3230
@@ +3229,3 @@
+else
+target = pc + 8;
+

The former one is more readable.


Comment at: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:3236
@@ +3235,3 @@
+if (!WriteRegisterUnsigned (context, eRegisterKindDWARF, 
gcc_dwarf_pc_mips64, target))
+return false;
+

I have set the type to eContextRelativeBranchImmediate for now we are using 
these instructions for single stepping only.


Repository:
  rL LLVM

http://reviews.llvm.org/D12356



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


[Lldb-commits] [PATCH] D12485: NetBSD ships with paccept(2), a superset of accept4(2)

2015-08-31 Thread Kamil Rytarowski via lldb-commits
krytarowski created this revision.
krytarowski added a reviewer: joerg.
krytarowski added a subscriber: lldb-commits.
krytarowski set the repository for this revision to rL LLVM.

accept4(2) and paccept(2) are nonstandard extensions.

Repository:
  rL LLVM

http://reviews.llvm.org/D12485

Files:
  source/Host/common/Socket.cpp

Index: source/Host/common/Socket.cpp
===
--- source/Host/common/Socket.cpp
+++ source/Host/common/Socket.cpp
@@ -93,7 +93,11 @@
 if (!child_processes_inherit) {
 flags |= SOCK_CLOEXEC;
 }
+#if defined(__NetBSD__)
+return ::paccept (sockfd, addr, addrlen, NULL, flags);
+#else
 return ::accept4 (sockfd, addr, addrlen, flags);
+#endif
 #else
 return ::accept (sockfd, addr, addrlen);
 #endif
@@ -790,5 +794,3 @@
 }
 return "";
 }
-
-


Index: source/Host/common/Socket.cpp
===
--- source/Host/common/Socket.cpp
+++ source/Host/common/Socket.cpp
@@ -93,7 +93,11 @@
 if (!child_processes_inherit) {
 flags |= SOCK_CLOEXEC;
 }
+#if defined(__NetBSD__)
+return ::paccept (sockfd, addr, addrlen, NULL, flags);
+#else
 return ::accept4 (sockfd, addr, addrlen, flags);
+#endif
 #else
 return ::accept (sockfd, addr, addrlen);
 #endif
@@ -790,5 +794,3 @@
 }
 return "";
 }
-
-
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12416: Parse dotest.py/dosep.py output, providing general stats and skip reason breakdown by counts.

2015-08-31 Thread Greg Clayton via lldb-commits

> On Aug 28, 2015, at 9:36 AM, Zachary Turner  wrote:
> 
> 
> 
> On Fri, Aug 28, 2015 at 8:41 AM Todd Fiala  wrote:
> tfiala added a comment.
> 
> In http://reviews.llvm.org/D12416#235112, @labath wrote:
> 
> > Same question as Zachary. This sounds like a very useful feature and it 
> > would be nice to have it integrated into the current test system,
> 
> 
> Well, I'd be happy to do that in dosep.py.  There are a couple of challenges:
> 
> 1. It requires information that is only provided when parsable output mode is 
> invoked in dotest.py.  So it mandates a particular output style that is not 
> necessarily what everyone wants to see.
> One solution to this that I've thought of is to have a way to launch dotest 
> in IPC mode.  Piping stdin and stdout is slow because it results in having to 
> parse text which was not printed with fast consumption in mind.  If dosep 
> could could launch dotest with an option like --pipe=dotest_pipe_instance_1 
> or something, then they could communicate over that pipe in a structured 
> format like json that is easy to parse.

On unix pipes and files are about the same speed so I don't see the need to do 
any fancy piping. Is it different on windows? I would like to avoid any 
complicated mechanisms like pipes or other special things so that we don't need 
any special python modules. I would like to stick to STDIO unless there is a 
really compelling reason.

>  
> > Parsing the output like this is likely to break the script due to random 
> > changes in the other parts.
> 
> 
> That probably cuts both ways.  Changing output of a test script (the output 
> I'm adding) seems quite plausible to break other scripts that parse the 
> output of the test infrastructure.
> The pipe issue would solve that, but another way to at least alleviate the 
> pain associated with that is to agree that we print all summary information 
> at the end, and we try to keep the summary information as stable as possible. 
>  We still might have to change stuff sometimes, but the benefit of doing 
> things this way is that we can then agree that everything EXCEPT the summary 
> information can change for any reason at all, or no reason at all, and it 
> won't break anyone.  The summary informatino could be printed in a nice 
> structured format with 1 result on each line, so that new information could 
> simply be appended, and the only time you'd break something is if you deleted 
> a statistic.

With JSON, as long as you don't remove anything, everything will still work. 
Adding new key/value pairs is additive and won't affect things. Text scraping 
is definitely not what we want even if we try to keep it consistent.
>  
> Thoughts?  It might be more work to do things this way, but I kind of feel 
> like the complexity of dosep and dotest is getting to the point where it 
> might be worth considering putting some extra time in to think about things 
> like this.

The one reason the IPC would be nice is to communicate individual packets, but 
we could still do the same thing with STDIO. 

It would be nice to have individual packets that would:
1 - communicate when a dotest.py invocation is started and what tests it plans 
to run
2 - communicate status on each test as it starts
3 - communicate status on each test as it finishes with the status
4 - if a dotest.py crashes, we should know which test was running and know that 
it crashed and should be able to run the remaining tests that we didn't get to 
since we know what was supposed to run from step 1 and we know what started and 
finished due to step 2 and 3

I think right know if dotest crashes, we just lose any tests that weren't 
executed before it crashed...
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12416: Parse dotest.py/dosep.py output, providing general stats and skip reason breakdown by counts.

2015-08-31 Thread Zachary Turner via lldb-commits
It doesn't necessarily have to be through fancy pipes, I guess the point is
just that right now we use stdio as a way to print stuff that a person will
read, so naturally it's formatted differently than if we were trying to
produce something that would be consumed by a machine.

But you're probably right, that instead of having an option to print
machine-consumable output to a special pipe, the option could just print
machine consumable output to stdio.  No problems with that on Windows.

On Mon, Aug 31, 2015 at 11:03 AM Greg Clayton  wrote:

>
> > On Aug 28, 2015, at 9:36 AM, Zachary Turner  wrote:
> >
> >
> >
> > On Fri, Aug 28, 2015 at 8:41 AM Todd Fiala  wrote:
> > tfiala added a comment.
> >
> > In http://reviews.llvm.org/D12416#235112, @labath wrote:
> >
> > > Same question as Zachary. This sounds like a very useful feature and
> it would be nice to have it integrated into the current test system,
> >
> >
> > Well, I'd be happy to do that in dosep.py.  There are a couple of
> challenges:
> >
> > 1. It requires information that is only provided when parsable output
> mode is invoked in dotest.py.  So it mandates a particular output style
> that is not necessarily what everyone wants to see.
> > One solution to this that I've thought of is to have a way to launch
> dotest in IPC mode.  Piping stdin and stdout is slow because it results in
> having to parse text which was not printed with fast consumption in mind.
> If dosep could could launch dotest with an option like
> --pipe=dotest_pipe_instance_1 or something, then they could communicate
> over that pipe in a structured format like json that is easy to parse.
>
> On unix pipes and files are about the same speed so I don't see the need
> to do any fancy piping. Is it different on windows? I would like to avoid
> any complicated mechanisms like pipes or other special things so that we
> don't need any special python modules. I would like to stick to STDIO
> unless there is a really compelling reason.
>
> >
> > > Parsing the output like this is likely to break the script due to
> random changes in the other parts.
> >
> >
> > That probably cuts both ways.  Changing output of a test script (the
> output I'm adding) seems quite plausible to break other scripts that parse
> the output of the test infrastructure.
> > The pipe issue would solve that, but another way to at least alleviate
> the pain associated with that is to agree that we print all summary
> information at the end, and we try to keep the summary information as
> stable as possible.  We still might have to change stuff sometimes, but the
> benefit of doing things this way is that we can then agree that everything
> EXCEPT the summary information can change for any reason at all, or no
> reason at all, and it won't break anyone.  The summary informatino could be
> printed in a nice structured format with 1 result on each line, so that new
> information could simply be appended, and the only time you'd break
> something is if you deleted a statistic.
>
> With JSON, as long as you don't remove anything, everything will still
> work. Adding new key/value pairs is additive and won't affect things. Text
> scraping is definitely not what we want even if we try to keep it
> consistent.
> >
> > Thoughts?  It might be more work to do things this way, but I kind of
> feel like the complexity of dosep and dotest is getting to the point where
> it might be worth considering putting some extra time in to think about
> things like this.
>
> The one reason the IPC would be nice is to communicate individual packets,
> but we could still do the same thing with STDIO.
>
> It would be nice to have individual packets that would:
> 1 - communicate when a dotest.py invocation is started and what tests it
> plans to run
> 2 - communicate status on each test as it starts
> 3 - communicate status on each test as it finishes with the status
> 4 - if a dotest.py crashes, we should know which test was running and know
> that it crashed and should be able to run the remaining tests that we
> didn't get to since we know what was supposed to run from step 1 and we
> know what started and finished due to step 2 and 3
>
> I think right know if dotest crashes, we just lose any tests that weren't
> executed before it crashed...
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12420: Make ProcessGDBRemote get a //copy// of platform Unix signals.

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

We do want processes to have individual copies that are copied from the 
platform. Does this actually make a copy? I don't see the copy.


http://reviews.llvm.org/D12420



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


Re: [Lldb-commits] [PATCH] D12485: NetBSD ships with paccept(2), a superset of accept4(2)

2015-08-31 Thread Stephane Sezer via lldb-commits
sas added a subscriber: sas.
sas accepted this revision.
sas added a reviewer: sas.
sas added a comment.
This revision is now accepted and ready to land.

Looks like accept4(2) is linux-only.


Repository:
  rL LLVM

http://reviews.llvm.org/D12485



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


Re: [Lldb-commits] [PATCH] D12485: NetBSD ships with paccept(2), a superset of accept4(2)

2015-08-31 Thread Ed Maste via lldb-commits
emaste added a subscriber: emaste.
emaste added a comment.

In http://reviews.llvm.org/D12485#236538, @sas wrote:

> Looks like accept4(2) is linux-only.


And FreeBSD -- from the man page `The accept4() system call appeared in FreeBSD 
10.0.`


Repository:
  rL LLVM

http://reviews.llvm.org/D12485



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


Re: [Lldb-commits] [PATCH] D12420: Make ProcessGDBRemote get a //copy// of platform Unix signals.

2015-08-31 Thread Chaoren Lin via lldb-commits
chaoren added inline comments.


Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:2910
@@ +2909,3 @@
+{
+Process::SetUnixSignals(std::make_shared(signals_sp));
+}

Here's the copy.


http://reviews.llvm.org/D12420



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


[Lldb-commits] [lldb] r246488 - Stop objects from keeping a strong reference to the process when they should have a weak reference.

2015-08-31 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Mon Aug 31 16:25:45 2015
New Revision: 246488

URL: http://llvm.org/viewvc/llvm-project?rev=246488&view=rev
Log:
Stop objects from keeping a strong reference to the process when they should 
have a weak reference.


Modified:

lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp

lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h

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

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h

Modified: 
lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp?rev=246488&r1=246487&r2=246488&view=diff
==
--- 
lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
 Mon Aug 31 16:25:45 2015
@@ -66,9 +66,11 @@ AddressSanitizerRuntime::GetTypeStatic()
 AddressSanitizerRuntime::AddressSanitizerRuntime(const ProcessSP &process_sp) :
 m_is_active(false),
 m_runtime_module(),
-m_process(process_sp),
+m_process_wp(),
 m_breakpoint_id(0)
 {
+if (process_sp)
+m_process_wp = process_sp;
 }
 
 AddressSanitizerRuntime::~AddressSanitizerRuntime()
@@ -161,7 +163,11 @@ t
 StructuredData::ObjectSP
 AddressSanitizerRuntime::RetrieveReportData()
 {
-ThreadSP thread_sp = m_process->GetThreadList().GetSelectedThread();
+ProcessSP process_sp = GetProcessSP();
+if (!process_sp)
+return StructuredData::ObjectSP();
+
+ThreadSP thread_sp = process_sp->GetThreadList().GetSelectedThread();
 StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
 
 if (!frame_sp)
@@ -175,7 +181,7 @@ AddressSanitizerRuntime::RetrieveReportD
 options.SetTimeoutUsec(RETRIEVE_REPORT_DATA_FUNCTION_TIMEOUT_USEC);
 
 ValueObjectSP return_value_sp;
-if 
(m_process->GetTarget().EvaluateExpression(address_sanitizer_retrieve_report_data_command,
 frame_sp.get(), return_value_sp, options) != eExpressionCompleted)
+if 
(process_sp->GetTarget().EvaluateExpression(address_sanitizer_retrieve_report_data_command,
 frame_sp.get(), return_value_sp, options) != eExpressionCompleted)
 return StructuredData::ObjectSP();
 
 int present = 
return_value_sp->GetValueForExpressionPath(".present")->GetValueAsUnsigned(0);
@@ -193,7 +199,7 @@ AddressSanitizerRuntime::RetrieveReportD
 addr_t description_ptr = 
return_value_sp->GetValueForExpressionPath(".description")->GetValueAsUnsigned(0);
 std::string description;
 Error error;
-m_process->ReadCStringFromMemory(description_ptr, description, error);
+process_sp->ReadCStringFromMemory(description_ptr, description, error);
 
 StructuredData::Dictionary *dict = new StructuredData::Dictionary();
 dict->AddStringItem("instrumentation_class", "AddressSanitizer");
@@ -249,27 +255,31 @@ AddressSanitizerRuntime::NotifyBreakpoin
 assert (baton && "null baton");
 if (!baton)
 return false;
-
+
 AddressSanitizerRuntime *const instance = 
static_cast(baton);
-
+
 StructuredData::ObjectSP report = instance->RetrieveReportData();
 std::string description;
 if (report) {
 description = instance->FormatDescription(report);
 }
-ThreadSP thread = context->exe_ctx_ref.GetThreadSP();
-
thread->SetStopInfo(InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(*thread,
 description.c_str(), report));
-
-if (instance->m_process)
+ProcessSP process_sp = instance->GetProcessSP();
+// Make sure this is the right process
+if (process_sp && process_sp == context->exe_ctx_ref.GetProcessSP())
 {
-StreamFileSP stream_sp 
(instance->m_process->GetTarget().GetDebugger().GetOutputFile());
+ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP();
+if (thread_sp)
+
thread_sp->SetStopInfo(InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(*thread_sp,
 description.c_str(), report));
+
+StreamFileSP stream_sp 
(process_sp->GetTarget().GetDebugger().GetOutputFile());
 if (stream_sp)
 {
 stream_sp->Printf ("AddressSanitizer report breakpoint hit. Use 
'thread info -s' to get extended information about the report.\n");
 }
+return true;// Return true to stop the target
 }
-// Return true to stop the target, false to just let the target run.
-re

[Lldb-commits] [lldb] r246490 - Remove expectedFailureFreeBSD for passing pexpect tests

2015-08-31 Thread Ed Maste via lldb-commits
Author: emaste
Date: Mon Aug 31 16:37:15 2015
New Revision: 246490

URL: http://llvm.org/viewvc/llvm-project?rev=246490&view=rev
Log:
Remove expectedFailureFreeBSD for passing pexpect tests

These tests work when run locally. They had been occasionally failing
on the FreeBSD buildbot due to pexpect issues. That buildbot is
currently down, and I expect the replacement will not have this issue.

llvm.org/pr22784

Modified:
lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py
lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py
lldb/trunk/test/functionalities/format/TestFormats.py

lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py

Modified: lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py?rev=246490&r1=246489&r2=246490&view=diff
==
--- lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py (original)
+++ lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py Mon Aug 
31 16:37:15 2015
@@ -11,7 +11,6 @@ class CommandRegexTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD 
buildbot")
 @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement 
for windows")
 def test_command_regex(self):
 """Test a simple scenario of 'command regex' invocation and subsequent 
use."""

Modified: lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py?rev=246490&r1=246489&r2=246490&view=diff
==
--- lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py 
(original)
+++ lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py Mon Aug 
31 16:37:15 2015
@@ -12,7 +12,6 @@ class ConnectRemoteTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD 
buildbot")
 @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

Modified: lldb/trunk/test/functionalities/format/TestFormats.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/format/TestFormats.py?rev=246490&r1=246489&r2=246490&view=diff
==
--- lldb/trunk/test/functionalities/format/TestFormats.py (original)
+++ lldb/trunk/test/functionalities/format/TestFormats.py Mon Aug 31 16:37:15 
2015
@@ -11,7 +11,6 @@ class TestFormats(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD 
buildbot")
 @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement 
for windows")
 def test_formats(self):
 """Test format string functionality."""

Modified: 
lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py?rev=246490&r1=246489&r2=246490&view=diff
==
--- 
lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
 (original)
+++ 
lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
 Mon Aug 31 16:37:15 2015
@@ -22,7 +22,6 @@ class SingleQuoteInCommandLineTestCase(T
 except:
 pass
 
-@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD 
buildbot")
 @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement 
for windows")
 def test_lldb_invocation_with_single_quote_in_filename(self):
 """Test that 'lldb my_file_name' works where my_file_name is a string 
with a single quote char in it."""


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


[Lldb-commits] [PATCH] D12507: Implement DoReadMemory for Windows mini dumps

2015-08-31 Thread Adrian McCarthy via lldb-commits
amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

Implements DoReadMemory for Windows mini dumps.  The dumps can use two slightly 
different methods for capturing ranges of memory, so I abstracted away the 
search for a range from the actual reading of the range.

Also a trivial fix to avoid the warning that quitting the debugging will 
terminate the process.

http://reviews.llvm.org/D12507

Files:
  source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
  source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h

Index: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
===
--- source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
+++ source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
@@ -70,6 +70,9 @@
 bool
 IsAlive() override;
 
+bool
+WarnBeforeDetach () const override;
+
 size_t
 ReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Error &error) override;
 
@@ -91,6 +94,19 @@
  lldb_private::ThreadList &new_thread_list) override;
 
 private:
+// Describes a range of memory captured in the mini dump.
+struct Range {
+  lldb::addr_t start;  // virtual address of the beginning of the range
+  size_t size; // size of the range in bytes
+  const uint8_t *ptr;  // absolute pointer to the first byte of the range
+};
+
+// If the mini dump has a memory range that contains the desired address, it
+// returns true with the details of the range in *range_out.  Otherwise, it
+// returns false.
+bool
+FindMemoryRange(lldb::addr_t addr, Range *range_out) const;
+
 lldb_private::Error
 MapMiniDumpIntoMemory(const char *file);
 
@@ -107,7 +123,7 @@
 // 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);
+FindDumpStream(unsigned stream_number, size_t *size_out) const;
 
 // 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
Index: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
===
--- source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
+++ source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
@@ -227,19 +227,42 @@
 return true;
 }
 
+bool
+ProcessWinMiniDump::WarnBeforeDetach () const
+{
+// Since this is post-mortem debugging, there's no need to warn the user
+// that quitting the debugger will terminate the process.
+return false;
+}
+
 size_t
 ProcessWinMiniDump::ReadMemory(lldb::addr_t addr, void *buf, size_t size, Error &error)
 {
 // Don't allow the caching that lldb_private::Process::ReadMemory does
-// since in core files we have it all cached our our core file anyway.
+// since we have it all cached our our dump file anyway.
 return DoReadMemory(addr, buf, size, error);
 }
 
 size_t
 ProcessWinMiniDump::DoReadMemory(lldb::addr_t addr, void *buf, size_t size, Error &error)
 {
-// TODO
-return 0;
+// I don't have a sense of how frequently this is called or how many memory
+// ranges a mini dump typically has, so I'm not sure if searching for the
+// appropriate range linearly each time is stupid.  Perhaps we should build
+// an index for faster lookups.
+Range range = {0};
+if (!FindMemoryRange(addr, &range))
+{
+return 0;
+}
+
+// There's at least some overlap between the beginning of the desired range
+// (addr) and the current range.  Figure out where the overlap begins and
+// how much overlap there is, then copy it to the destination buffer.
+const size_t offset = range.start - addr;
+const size_t overlap = std::min(size, range.size - offset);
+std::memcpy(buf, range.ptr + offset, overlap);
+return overlap;
 }
 
 void
@@ -307,6 +330,54 @@
 }
 }
 
+bool
+ProcessWinMiniDump::FindMemoryRange(lldb::addr_t addr, Range *range_out) const
+{
+size_t stream_size = 0;
+auto mem_list_stream = static_cast(FindDumpStream(MemoryListStream, &stream_size));
+if (mem_list_stream)
+{
+for (ULONG32 i = 0; i < mem_list_stream->NumberOfMemoryRanges; ++i) {
+const MINIDUMP_MEMORY_DESCRIPTOR &mem_desc = mem_list_stream->MemoryRanges[i];
+const MINIDUMP_LOCATION_DESCRIPTOR &loc_desc = mem_desc.Memory;
+const lldb::addr_t range_start = mem_desc.StartOfMemoryRange;
+const size_t range_size = loc_desc.DataSize;
+if (range_start <= addr && addr < range_start + range_size)
+{
+range_out->start = range_start;
+range_out->size = range_size;
+ 

[Lldb-commits] [lldb] r246512 - Make FormatEntity be a little bit smarter when printing function arguments

2015-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Mon Aug 31 19:19:35 2015
New Revision: 246512

URL: http://llvm.org/viewvc/llvm-project?rev=246512&view=rev
Log:
Make FormatEntity be a little bit smarter when printing function arguments


Modified:
lldb/trunk/source/Core/FormatEntity.cpp

Modified: lldb/trunk/source/Core/FormatEntity.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=246512&r1=246511&r2=246512&view=diff
==
--- lldb/trunk/source/Core/FormatEntity.cpp (original)
+++ lldb/trunk/source/Core/FormatEntity.cpp Mon Aug 31 19:19:35 2015
@@ -20,6 +20,7 @@
 #include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/DataFormatters/DataVisualization.h"
 #include "lldb/DataFormatters/FormatManager.h"
+#include "lldb/DataFormatters/ValueObjectPrinter.h"
 #include "lldb/Expression/ClangExpressionVariable.h"
 #include "lldb/Host/FileSpec.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
@@ -1785,20 +1786,34 @@ FormatEntity::Format (const Entry &entry
 
 VariableSP var_sp (args.GetVariableAtIndex 
(arg_idx));
 ValueObjectSP var_value_sp 
(ValueObjectVariable::Create (exe_scope, var_sp));
+StreamString ss;
 const char *var_representation = nullptr;
 const char *var_name = 
var_value_sp->GetName().GetCString();
-if 
(var_value_sp->GetCompilerType().IsAggregateType() &&
-
DataVisualization::ShouldPrintAsOneLiner(*var_value_sp.get()))
+if (var_value_sp->GetCompilerType().IsValid())
 {
-static StringSummaryFormat 
format(TypeSummaryImpl::Flags()
-  
.SetHideItemNames(false)
-  
.SetShowMembersOneLiner(true),
-  "");
-format.FormatObject(var_value_sp.get(), 
buffer, TypeSummaryOptions());
-var_representation = buffer.c_str();
+if (var_value_sp && 
exe_scope->CalculateTarget())
+var_value_sp = 
var_value_sp->GetQualifiedRepresentationIfAvailable(exe_scope->CalculateTarget()->TargetProperties::GetPreferDynamicValue(),
+   

exe_scope->CalculateTarget()->TargetProperties::GetEnableSyntheticValue());
+if 
(var_value_sp->GetCompilerType().IsAggregateType() &&
+
DataVisualization::ShouldPrintAsOneLiner(*var_value_sp.get()))
+{
+static StringSummaryFormat 
format(TypeSummaryImpl::Flags()
+  
.SetHideItemNames(false)
+  
.SetShowMembersOneLiner(true),
+  "");
+
format.FormatObject(var_value_sp.get(), buffer, TypeSummaryOptions());
+var_representation = buffer.c_str();
+}
+else
+
var_value_sp->DumpPrintableRepresentation(ss,
+   
   
ValueObject::ValueObjectRepresentationStyle::eValueObjectRepresentationStyleSummary,
+   
   eFormatDefault,
+   
   
ValueObject::PrintableRepresentationSpecialCases::ePrintableRepresentationSpecialCasesAllow,
+   
   false);
 }
-else
-var_representation = 
var_value_sp->GetValueAsCString();
+
+if (ss.GetData() && ss.GetSize())
+var_representation = ss.GetData();
 if (arg_idx > 0)
 s.PutCString (", ");
 if (var_value_sp->GetError().Success())


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

[Lldb-commits] [lldb] r246515 - Add support for language plugins to provide data formatters

2015-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Mon Aug 31 20:01:48 2015
New Revision: 246515

URL: http://llvm.org/viewvc/llvm-project?rev=246515&view=rev
Log:
Add support for language plugins to provide data formatters

Historically, data formatters all exist in a global repository (the category 
map)
On top of that, some formatters can be "hardcoded" when the conditions under 
which they apply are not expressible as a typename (or typename regex)

This change paves the way to move formatters into per-language buckets such 
that the C++ plugin is responsible for ownership of the C++ formatters, and so 
on
The advantages of this are:
a) language formatters only get created when they might apply
b) formatters for a language are clearly owned by the matching language plugin

The current model is one of static instantiation, that is a language knows the 
full set of formatters it vends and that is only asked-for once, and then 
handed off to the FormatManager
In a future revision it might be interesting to add similar ability to the 
language runtimes, and monitor for certain shared library events to add even 
more library-specific formatters

No formatters are moved as part of this change, so practically speaking this is 
NFC


Added:
lldb/trunk/include/lldb/DataFormatters/LanguageCategory.h
lldb/trunk/source/DataFormatters/LanguageCategory.cpp
Modified:
lldb/trunk/include/lldb/DataFormatters/FormatManager.h
lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h
lldb/trunk/include/lldb/Target/Language.h
lldb/trunk/include/lldb/lldb-forward.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/SystemInitializerFull.cpp
lldb/trunk/source/DataFormatters/CMakeLists.txt
lldb/trunk/source/DataFormatters/FormatManager.cpp
lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
lldb/trunk/source/Target/Language.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/FormatManager.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormatManager.h?rev=246515&r1=246514&r2=246515&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormatManager.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormatManager.h Mon Aug 31 20:01:48 
2015
@@ -21,11 +21,13 @@
 #include "lldb/DataFormatters/FormatCache.h"
 #include "lldb/DataFormatters/FormatClasses.h"
 #include "lldb/DataFormatters/FormattersContainer.h"
+#include "lldb/DataFormatters/LanguageCategory.h"
 #include "lldb/DataFormatters/TypeCategory.h"
 #include "lldb/DataFormatters/TypeCategoryMap.h"
 
 #include 
 #include 
+#include 
 
 namespace lldb_private {
 
@@ -48,6 +50,8 @@ public:
 template 
 using HardcodedFormatterFinders = 
std::vector>;
 
+typedef std::map 
LanguageCategories;
+
 typedef TypeCategoryMap::CallbackType CategoryCallback;
 
 FormatManager ();
@@ -123,11 +127,8 @@ public:
 }
 
 void
-LoopThroughCategories (CategoryCallback callback, void* param)
-{
-m_categories_map.LoopThrough(callback, param);
-}
-
+LoopThroughCategories (CategoryCallback callback, void* param);
+
 lldb::TypeCategoryImplSP
 GetCategory (const char* category_name = NULL,
  bool can_create = true)
@@ -258,6 +259,9 @@ public:
 true);
 return matches;
 }
+
+static ConstString
+GetTypeForCache (ValueObject&, lldb::DynamicValueType);
 
 private:
 
@@ -272,10 +276,14 @@ private:
 bool did_strip_typedef,
 bool root_level = false);
 
+LanguageCategory*
+GetCategoryForLanguage (lldb::LanguageType lang_type);
+
 FormatCache m_format_cache;
 NamedSummariesMap m_named_summaries_map;
 std::atomic m_last_revision;
 TypeCategoryMap m_categories_map;
+LanguageCategories m_language_categories_map;
 
 ConstString m_default_category_name;
 ConstString m_system_category_name;

Added: lldb/trunk/include/lldb/DataFormatters/LanguageCategory.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/LanguageCategory.h?rev=246515&view=auto
==
--- lldb/trunk/include/lldb/DataFormatters/LanguageCategory.h (added)
+++ lldb/trunk/include/lldb/DataFormatters/LanguageCategory.h Mon Aug 31 
20:01:48 2015
@@ -0,0 +1,67 @@
+//===-- LanguageCategory.h*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef lldb_LanguageCategory_h_
+#define lldb_LanguageCategory_h_
+
+// C Includes
+// C++ Include

[Lldb-commits] [lldb] r246519 - And of course, typos

2015-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Mon Aug 31 20:23:22 2015
New Revision: 246519

URL: http://llvm.org/viewvc/llvm-project?rev=246519&view=rev
Log:
And of course, typos

Modified:
lldb/trunk/source/Plugins/Language/CMakeLists.txt

Modified: lldb/trunk/source/Plugins/Language/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CMakeLists.txt?rev=246519&r1=246518&r2=246519&view=diff
==
--- lldb/trunk/source/Plugins/Language/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Language/CMakeLists.txt Mon Aug 31 20:23:22 2015
@@ -1,3 +1,3 @@
 add_subdirectory(CPlusPlus)
 add_subdirectory(ObjC)
-add_subdirectory(ObjCPlusLus)
+add_subdirectory(ObjCPlusPlus)


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


[Lldb-commits] [lldb] r246518 - Attempt at fixing the CMake build

2015-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Mon Aug 31 20:23:02 2015
New Revision: 246518

URL: http://llvm.org/viewvc/llvm-project?rev=246518&view=rev
Log:
Attempt at fixing the CMake build

Modified:
lldb/trunk/cmake/LLDBDependencies.cmake
lldb/trunk/source/Plugins/Language/CMakeLists.txt

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=246518&r1=246517&r2=246518&view=diff
==
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Mon Aug 31 20:23:02 2015
@@ -20,6 +20,10 @@ set( LLDB_USED_LIBS
   lldbPluginDynamicLoaderPosixDYLD
   lldbPluginDynamicLoaderHexagonDYLD
   lldbPluginDynamicLoaderWindowsDYLD
+  
+  lldbPluginCPlusPlusLanguage
+  lldbPluginObjCLanguage
+  lldbPluginObjCPlusPlusLanguage
 
   lldbPluginObjectFileELF
   lldbPluginObjectFileJIT

Modified: lldb/trunk/source/Plugins/Language/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CMakeLists.txt?rev=246518&r1=246517&r2=246518&view=diff
==
--- lldb/trunk/source/Plugins/Language/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Language/CMakeLists.txt Mon Aug 31 20:23:02 2015
@@ -1,2 +1,3 @@
 add_subdirectory(CPlusPlus)
 add_subdirectory(ObjC)
+add_subdirectory(ObjCPlusLus)


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


Re: [Lldb-commits] [lldb] r246518 - Attempt at fixing the CMake build

2015-08-31 Thread Enrico Granata via lldb-commits

> On Aug 31, 2015, at 6:23 PM, Enrico Granata via lldb-commits 
>  wrote:
> 
> Author: enrico
> Date: Mon Aug 31 20:23:02 2015
> New Revision: 246518
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=246518&view=rev
> Log:
> Attempt at fixing the CMake build
> 
> Modified:
>lldb/trunk/cmake/LLDBDependencies.cmake
>lldb/trunk/source/Plugins/Language/CMakeLists.txt
> 
> Modified: lldb/trunk/cmake/LLDBDependencies.cmake
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=246518&r1=246517&r2=246518&view=diff
> ==
> --- lldb/trunk/cmake/LLDBDependencies.cmake (original)
> +++ lldb/trunk/cmake/LLDBDependencies.cmake Mon Aug 31 20:23:02 2015
> @@ -20,6 +20,10 @@ set( LLDB_USED_LIBS
>   lldbPluginDynamicLoaderPosixDYLD
>   lldbPluginDynamicLoaderHexagonDYLD
>   lldbPluginDynamicLoaderWindowsDYLD
> +  
> +  lldbPluginCPlusPlusLanguage
> +  lldbPluginObjCLanguage
> +  lldbPluginObjCPlusPlusLanguage
> 
>   lldbPluginObjectFileELF
>   lldbPluginObjectFileJIT
> 
> Modified: lldb/trunk/source/Plugins/Language/CMakeLists.txt
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CMakeLists.txt?rev=246518&r1=246517&r2=246518&view=diff
> ==
> --- lldb/trunk/source/Plugins/Language/CMakeLists.txt (original)
> +++ lldb/trunk/source/Plugins/Language/CMakeLists.txt Mon Aug 31 20:23:02 2015
> @@ -1,2 +1,3 @@
> add_subdirectory(CPlusPlus)
> add_subdirectory(ObjC)
> +add_subdirectory(ObjCPlusLus)
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

This commit - and the next - are my best guess at fixing the CMake build after 
my formatter changes in r 246515
If they were to prove insufficient, I would appreciate somebody with more 
CMake-fu than myself pointing me in the right direction

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

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


[Lldb-commits] [PATCH] D12515: Use -Wno-vla-extension globally.

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

This was previously only established within debugserver, but
there is a use of the VLA extension in source/Host/macosx/Symbols.cpp,
so ignore this warning globally.

http://reviews.llvm.org/D12515

Files:
  cmake/modules/LLDBConfig.cmake
  tools/debugserver/source/CMakeLists.txt

Index: tools/debugserver/source/CMakeLists.txt
===
--- tools/debugserver/source/CMakeLists.txt
+++ tools/debugserver/source/CMakeLists.txt
@@ -16,12 +16,6 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} 
-Wno-gnu-zero-variadic-macro-arguments")
 endif ()
 
-check_cxx_compiler_flag("-Wno-vla-extension"
-CXX_SUPPORTS_NO_VLA_EXTENSION)
-if (CXX_SUPPORTS_NO_VLA_EXTENSION)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
-endif ()
-
 check_cxx_compiler_flag("-Wno-zero-length-array"
 CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
 if (CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -114,6 +114,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
 endif ()
 
+check_cxx_compiler_flag("-Wno-vla-extension"
+CXX_SUPPORTS_NO_VLA_EXTENSION)
+if (CXX_SUPPORTS_NO_VLA_EXTENSION)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
+endif ()
+
 # Disable MSVC warnings
 if( MSVC )
   add_definitions(


Index: tools/debugserver/source/CMakeLists.txt
===
--- tools/debugserver/source/CMakeLists.txt
+++ tools/debugserver/source/CMakeLists.txt
@@ -16,12 +16,6 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
 endif ()
 
-check_cxx_compiler_flag("-Wno-vla-extension"
-CXX_SUPPORTS_NO_VLA_EXTENSION)
-if (CXX_SUPPORTS_NO_VLA_EXTENSION)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
-endif ()
-
 check_cxx_compiler_flag("-Wno-zero-length-array"
 CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
 if (CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY)
Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -114,6 +114,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
 endif ()
 
+check_cxx_compiler_flag("-Wno-vla-extension"
+CXX_SUPPORTS_NO_VLA_EXTENSION)
+if (CXX_SUPPORTS_NO_VLA_EXTENSION)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
+endif ()
+
 # Disable MSVC warnings
 if( MSVC )
   add_definitions(
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12517: [lldb-mi] Use find, not find_first_of, for "--".

2015-08-31 Thread Bruce Mitchener via lldb-commits
brucem created this revision.
brucem added reviewers: ki.stfu, abidh.
brucem added a subscriber: lldb-commits.

find_first_of will look for any of the characters, not the full
string passed in. When looking for "--" then, we must use find
and not find_first_of.

http://reviews.llvm.org/D12517

Files:
  tools/lldb-mi/MICmdArgValFile.cpp
  tools/lldb-mi/MICmdArgValOptionLong.cpp

Index: tools/lldb-mi/MICmdArgValOptionLong.cpp
===
--- tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ tools/lldb-mi/MICmdArgValOptionLong.cpp
@@ -254,7 +254,7 @@
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
-const size_t nPos = vrTxt.find_first_of("--");
+const size_t nPos = vrTxt.find("--");
 if (nPos != 0)
 return false;
 
Index: tools/lldb-mi/MICmdArgValFile.cpp
===
--- tools/lldb-mi/MICmdArgValFile.cpp
+++ tools/lldb-mi/MICmdArgValFile.cpp
@@ -146,7 +146,7 @@
 const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != 
std::string::npos);
 
 // Look for --someLongOption
-size_t nPos = vrFileNamePath.find_first_of("--");
+size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;


Index: tools/lldb-mi/MICmdArgValOptionLong.cpp
===
--- tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ tools/lldb-mi/MICmdArgValOptionLong.cpp
@@ -254,7 +254,7 @@
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
-const size_t nPos = vrTxt.find_first_of("--");
+const size_t nPos = vrTxt.find("--");
 if (nPos != 0)
 return false;
 
Index: tools/lldb-mi/MICmdArgValFile.cpp
===
--- tools/lldb-mi/MICmdArgValFile.cpp
+++ tools/lldb-mi/MICmdArgValFile.cpp
@@ -146,7 +146,7 @@
 const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != std::string::npos);
 
 // Look for --someLongOption
-size_t nPos = vrFileNamePath.find_first_of("--");
+size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246529 - [lldb-mi] Use find, not find_first_of, for "--".

2015-08-31 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Mon Aug 31 23:36:54 2015
New Revision: 246529

URL: http://llvm.org/viewvc/llvm-project?rev=246529&view=rev
Log:
[lldb-mi] Use find, not find_first_of, for "--".

Summary:
find_first_of will look for any of the characters, not the full
string passed in. When looking for "--" then, we must use find
and not find_first_of.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

Modified:
lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp

Modified: lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp?rev=246529&r1=246528&r2=246529&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp Mon Aug 31 23:36:54 2015
@@ -146,7 +146,7 @@ CMICmdArgValFile::IsFilePath(const CMIUt
 const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != 
std::string::npos);
 
 // Look for --someLongOption
-size_t nPos = vrFileNamePath.find_first_of("--");
+size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;

Modified: lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp?rev=246529&r1=246528&r2=246529&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp Mon Aug 31 23:36:54 2015
@@ -254,7 +254,7 @@ CMICmdArgValOptionLong::IsArgLongOption(
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
-const size_t nPos = vrTxt.find_first_of("--");
+const size_t nPos = vrTxt.find("--");
 if (nPos != 0)
 return false;
 


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


Re: [Lldb-commits] [PATCH] D12517: [lldb-mi] Use find, not find_first_of, for "--".

2015-08-31 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246529: [lldb-mi] Use find, not find_first_of, for "--". 
(authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D12517?vs=33662&id=33663#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12517

Files:
  lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
  lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp

Index: lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
@@ -254,7 +254,7 @@
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
-const size_t nPos = vrTxt.find_first_of("--");
+const size_t nPos = vrTxt.find("--");
 if (nPos != 0)
 return false;
 
Index: lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
@@ -146,7 +146,7 @@
 const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != 
std::string::npos);
 
 // Look for --someLongOption
-size_t nPos = vrFileNamePath.find_first_of("--");
+size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;


Index: lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp
@@ -254,7 +254,7 @@
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
-const size_t nPos = vrTxt.find_first_of("--");
+const size_t nPos = vrTxt.find("--");
 if (nPos != 0)
 return false;
 
Index: lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
+++ lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp
@@ -146,7 +146,7 @@
 const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != std::string::npos);
 
 // Look for --someLongOption
-size_t nPos = vrFileNamePath.find_first_of("--");
+size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12518: Simplify find_first_of & find_last_of on single char.

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

When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.

http://reviews.llvm.org/D12518

Files:
  source/Core/FormatEntity.cpp
  source/Host/common/FileSpec.cpp
  source/Host/common/ThisThread.cpp
  
source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
  
source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  source/Utility/UriParser.cpp
  tools/lldb-mi/MICmdArgValFile.cpp
  tools/lldb-mi/MICmdArgValOptionLong.cpp
  tools/lldb-mi/MICmdArgValString.cpp
  tools/lldb-mi/MICmdArgValThreadGrp.cpp
  tools/lldb-mi/MICmdCmdBreak.cpp

Index: tools/lldb-mi/MICmdCmdBreak.cpp
===
--- tools/lldb-mi/MICmdCmdBreak.cpp
+++ tools/lldb-mi/MICmdCmdBreak.cpp
@@ -118,10 +118,10 @@
 {
 // Full paths in windows can have ':' after a drive letter, so we
 // search backwards, taking care to skip C++ namespace tokens '::'.
-size_t n = x.find_last_of(':');
+size_t n = x.rfind(':');
 while (n != std::string::npos && n > 1 && x[n-1] == ':')
 {
-n = x.find_last_of(':', n - 2);
+n = x.rfind(':', n - 2);
 }
 return n;
 }
Index: tools/lldb-mi/MICmdArgValThreadGrp.cpp
===
--- tools/lldb-mi/MICmdArgValThreadGrp.cpp
+++ tools/lldb-mi/MICmdArgValThreadGrp.cpp
@@ -117,7 +117,7 @@
 CMICmdArgValThreadGrp::IsArgThreadGrp(const CMIUtilString &vrTxt) const
 {
 // Look for i1 i2 i3
-const MIint nPos = vrTxt.find_first_of("i");
+const MIint nPos = vrTxt.find('i');
 if (nPos != 0)
 return false;
 
Index: tools/lldb-mi/MICmdArgValString.cpp
===
--- tools/lldb-mi/MICmdArgValString.cpp
+++ tools/lldb-mi/MICmdArgValString.cpp
@@ -220,8 +220,8 @@
 if (!m_bHandleDirPaths)
 {
 // Look for directory file paths, if found reject
-const bool bHavePosSlash = (vrTxt.find_first_of("/") != std::string::npos);
-const bool bHaveBckSlash = (vrTxt.find_first_of("\\") != std::string::npos);
+const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos);
+const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos);
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 }
Index: tools/lldb-mi/MICmdArgValOptionLong.cpp
===
--- tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ tools/lldb-mi/MICmdArgValOptionLong.cpp
@@ -249,8 +249,8 @@
 bool
 CMICmdArgValOptionLong::IsArgLongOption(const CMIUtilString &vrTxt) const
 {
-const bool bHavePosSlash = (vrTxt.find_first_of("/") != std::string::npos);
-const bool bHaveBckSlash = (vrTxt.find_first_of("\\") != std::string::npos);
+const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos);
+const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos);
 if (bHavePosSlash || bHaveBckSlash)
 return false;
 
Index: tools/lldb-mi/MICmdArgValFile.cpp
===
--- tools/lldb-mi/MICmdArgValFile.cpp
+++ tools/lldb-mi/MICmdArgValFile.cpp
@@ -142,23 +142,23 @@
 if (vrFileNamePath.empty())
 return false;
 
-const bool bHavePosSlash = (vrFileNamePath.find_first_of("/") != std::string::npos);
-const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != std::string::npos);
+const bool bHavePosSlash = (vrFileNamePath.find('/') != std::string::npos);
+const bool bHaveBckSlash = (vrFileNamePath.find('\\') != std::string::npos);
 
 // Look for --someLongOption
 size_t nPos = vrFileNamePath.find("--");
 const bool bLong = (nPos == 0);
 if (bLong)
 return false;
 
 // Look for -f type short parameters
-nPos = vrFileNamePath.find_first_of("-");
+nPos = vrFileNamePath.find('-');
 const bool bShort = (nPos == 0);
 if (bShort)
 return false;
 
 // Look for i1 i2 i3
-nPos = vrFileNamePath.find_first_of("i");
+nPos = vrFileNamePath.find('i');
 const bool bFoundI1 = ((nPos == 0) && (::isdigit(vrFileNamePath[1])));
 if (bFoundI1)
 return false;
Index: source/Utility/UriParser.cpp
===
--- source/Utility/UriParser.cpp
+++ source/Utility/UriParser.cpp
@@ -40,7 +40,7 @@
 // Extract path.
 tmp_scheme = uri.substr(0, pos);
 auto host_pos = pos + strlen(kSchemeSep);
-auto path_pos = uri.find_first_of("/", host_pos);
+auto path_pos = uri.find('/', host_pos);
 if (path_pos != std::string::npos)
 tmp_path = uri.substr(path_pos);
 else
Index: source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderSc

Re: [Lldb-commits] [PATCH] D12518: Simplify find_first_of & find_last_of on single char.

2015-08-31 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

This touches random files across the tree, including lldb-mi. I wasn't sure how 
best this should be reviewed or by who (despite it being pretty mechanical).


http://reviews.llvm.org/D12518



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


[Lldb-commits] [lldb] r246530 - A few small comment fixups with terminology "gcc" -> "eh_frame", "gdb" -> "stabs".

2015-08-31 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Tue Sep  1 00:17:01 2015
New Revision: 246530

URL: http://llvm.org/viewvc/llvm-project?rev=246530&view=rev
Log:
A few small comment fixups with terminology "gcc" -> "eh_frame", "gdb" -> 
"stabs".
Just noticed these while reading through some code.

Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=246530&r1=246529&r2=246530&view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Sep  
1 00:17:01 2015
@@ -585,12 +585,12 @@ ProcessGDBRemote::BuildDynamicRegisterIn
 0,// byte size
 reg_offset,   // offset
 eEncodingUint,// encoding
-eFormatHex,   // formate
+eFormatHex,   // format
 {
-LLDB_INVALID_REGNUM, // GCC reg num
+LLDB_INVALID_REGNUM, // eh_frame reg num
 LLDB_INVALID_REGNUM, // DWARF reg num
 LLDB_INVALID_REGNUM, // generic reg num
-reg_num, // GDB reg num
+reg_num, // stabs reg num
 reg_num   // native register number
 },
 NULL,
@@ -4279,12 +4279,12 @@ ParseRegisters (XMLNode feature_node, Gd
 0,// byte size
 reg_offset,   // offset
 eEncodingUint,// encoding
-eFormatHex,   // formate
+eFormatHex,   // format
 {
-LLDB_INVALID_REGNUM, // GCC reg num
+LLDB_INVALID_REGNUM, // eh_frame reg num
 LLDB_INVALID_REGNUM, // DWARF reg num
 LLDB_INVALID_REGNUM, // generic reg num
-prev_reg_num,// GDB reg num
+prev_reg_num,// stabs reg num
 prev_reg_num // native register number
 },
 NULL,


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


[Lldb-commits] [PATCH] D12519: [debugserver] Fix sign comparison warning.

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

Comparing m_page_size against kInvalidPageSize was resulting in
a warning about comparing integers with different signs. Since
kInvalidPageSize isn't used anywhere outside of MachVMMemory.cpp,
we can readily transform it into a static const vm_size_t with
the correct value to avoid the sign comparison warnings.

http://reviews.llvm.org/D12519

Files:
  tools/debugserver/source/MacOSX/MachVMMemory.cpp
  tools/debugserver/source/MacOSX/MachVMMemory.h

Index: tools/debugserver/source/MacOSX/MachVMMemory.h
===
--- tools/debugserver/source/MacOSX/MachVMMemory.h
+++ tools/debugserver/source/MacOSX/MachVMMemory.h
@@ -21,7 +21,6 @@
 class MachVMMemory
 {
 public:
-enum { kInvalidPageSize = ~0 };
 MachVMMemory();
 ~MachVMMemory();
 nub_size_t Read(task_t task, nub_addr_t address, void *data, nub_size_t 
data_count);
Index: tools/debugserver/source/MacOSX/MachVMMemory.cpp
===
--- tools/debugserver/source/MacOSX/MachVMMemory.cpp
+++ tools/debugserver/source/MacOSX/MachVMMemory.cpp
@@ -19,6 +19,8 @@
 #include 
 #include 
 
+static const vm_size_t kInvalidPageSize = ~0;
+
 MachVMMemory::MachVMMemory() :
 m_page_size(kInvalidPageSize),
 m_err(0)


Index: tools/debugserver/source/MacOSX/MachVMMemory.h
===
--- tools/debugserver/source/MacOSX/MachVMMemory.h
+++ tools/debugserver/source/MacOSX/MachVMMemory.h
@@ -21,7 +21,6 @@
 class MachVMMemory
 {
 public:
-enum { kInvalidPageSize = ~0 };
 MachVMMemory();
 ~MachVMMemory();
 nub_size_t Read(task_t task, nub_addr_t address, void *data, nub_size_t data_count);
Index: tools/debugserver/source/MacOSX/MachVMMemory.cpp
===
--- tools/debugserver/source/MacOSX/MachVMMemory.cpp
+++ tools/debugserver/source/MacOSX/MachVMMemory.cpp
@@ -19,6 +19,8 @@
 #include 
 #include 
 
+static const vm_size_t kInvalidPageSize = ~0;
+
 MachVMMemory::MachVMMemory() :
 m_page_size(kInvalidPageSize),
 m_err(0)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12356: [MIPS64] Emulate MSA branch instructions

2015-08-31 Thread Sagar Thakur via lldb-commits
sagar updated this revision to Diff 33668.
sagar marked 4 inline comments as done.
sagar added a comment.

Corrected code indent and initialized wr_val correctly.


Repository:
  rL LLVM

http://reviews.llvm.org/D12356

Files:
  source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
  source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h

Index: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
===
--- source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
+++ source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
@@ -302,6 +302,42 @@
 Emulate_BC1ANY4T  (llvm::MCInst& insn);
 
 bool
+Emulate_BNZB  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZH  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZW  (llvm::MCInst& insn);
+
+bool
+Emulate_BNZD  (llvm::MCInst& insn);
+
+bool
+Emulate_BZB  (llvm::MCInst& insn);
+
+bool
+Emulate_BZH  (llvm::MCInst& insn);
+
+bool
+Emulate_BZW  (llvm::MCInst& insn);
+
+bool
+Emulate_BZD  (llvm::MCInst& insn);
+
+bool
+Emulate_MSA_Branch_DF (llvm::MCInst& insn, int element_byte_size, bool bnz);
+
+bool
+Emulate_BNZV  (llvm::MCInst& insn);
+
+bool
+Emulate_BZV  (llvm::MCInst& insn);
+
+bool
+Emulate_MSA_Branch_V (llvm::MCInst& insn, bool bnz);
+
+bool
 nonvolatile_reg_p (uint64_t regnum);
 
 const char *
Index: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
===
--- source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
+++ source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
@@ -221,41 +221,76 @@
 {
 switch (reg_num)
 {
-case gcc_dwarf_sp_mips64:  return "r29"; 
-case gcc_dwarf_r30_mips64: return "r30"; 
-case gcc_dwarf_ra_mips64:  return "r31";
-case gcc_dwarf_f0_mips64:  return "f0";
-case gcc_dwarf_f1_mips64:  return "f1";
-case gcc_dwarf_f2_mips64:  return "f2";
-case gcc_dwarf_f3_mips64:  return "f3";
-case gcc_dwarf_f4_mips64:  return "f4";
-case gcc_dwarf_f5_mips64:  return "f5";
-case gcc_dwarf_f6_mips64:  return "f6";
-case gcc_dwarf_f7_mips64:  return "f7";
-case gcc_dwarf_f8_mips64:  return "f8";
-case gcc_dwarf_f9_mips64:  return "f9";
-case gcc_dwarf_f10_mips64: return "f10";
-case gcc_dwarf_f11_mips64: return "f11";
-case gcc_dwarf_f12_mips64: return "f12";
-case gcc_dwarf_f13_mips64: return "f13";
-case gcc_dwarf_f14_mips64: return "f14";
-case gcc_dwarf_f15_mips64: return "f15";
-case gcc_dwarf_f16_mips64: return "f16";
-case gcc_dwarf_f17_mips64: return "f17";
-case gcc_dwarf_f18_mips64: return "f18";
-case gcc_dwarf_f19_mips64: return "f19";
-case gcc_dwarf_f20_mips64: return "f20";
-case gcc_dwarf_f21_mips64: return "f21";
-case gcc_dwarf_f22_mips64: return "f22";
-case gcc_dwarf_f23_mips64: return "f23";
-case gcc_dwarf_f24_mips64: return "f24";
-case gcc_dwarf_f25_mips64: return "f25";
-case gcc_dwarf_f26_mips64: return "f26";
-case gcc_dwarf_f27_mips64: return "f27";
-case gcc_dwarf_f28_mips64: return "f28";
-case gcc_dwarf_f29_mips64: return "f29";
-case gcc_dwarf_f30_mips64: return "f30";
-case gcc_dwarf_f31_mips64: return "f31";
+case gcc_dwarf_sp_mips64:  return "r29"; 
+case gcc_dwarf_r30_mips64: return "r30"; 
+case gcc_dwarf_ra_mips64:  return "r31";
+case gcc_dwarf_f0_mips64:  return "f0";
+case gcc_dwarf_f1_mips64:  return "f1";
+case gcc_dwarf_f2_mips64:  return "f2";
+case gcc_dwarf_f3_mips64:  return "f3";
+case gcc_dwarf_f4_mips64:  return "f4";
+case gcc_dwarf_f5_mips64:  return "f5";
+case gcc_dwarf_f6_mips64:  return "f6";
+case gcc_dwarf_f7_mips64:  return "f7";
+case gcc_dwarf_f8_mips64:  return "f8";
+case gcc_dwarf_f9_mips64:  return "f9";
+case gcc_dwarf_f10_mips64: return "f10";
+case gcc_dwarf_f11_mips64: return "f11";
+case gcc_dwarf_f12_mips64: return "f12";
+case gcc_dwarf_f13_mips64: return "f13";
+case gcc_dwarf_f14_mips64: return "f14";
+case gcc_dwarf_f15_mips64: return "f15";
+case gcc_dwarf_f16_mips64: return "f16";
+case gcc_dwarf_f17_mips64: return "f17";
+case gcc_dwarf_f18_mips64: return "f18";
+case gcc_dwarf_f19_mips64: return "f19";
+