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

2015-08-26 Thread Sagar Thakur via lldb-commits
sagar created this revision.
sagar added reviewers: jaydeep, clayborg.
sagar added subscribers: bhushan, mohit.bhakkad, nitesh.jain, lldb-commits.
sagar set the repository for this revision to rL LLVM.

This patch adds MSA branch instruction emulation for MIPS64.

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,36 @@
 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_BNZV  (llvm::MCInst& insn);
+
+ bool
+Emulate_BZV  (llvm::MCInst& insn);
+
+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,38 @@
 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";
 default:
 break;
 }
@@ -336,6 +368,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 "w18";
+case gcc_dwarf_w19_mips64:  return "w19";
+case gcc_dwarf_w20_mips64:  return "w20";
+case gcc_dwarf_w21_mips64:  return

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

2015-08-26 Thread Jaydeep Patil via lldb-commits
jaydeep requested changes to this revision.
This revision now requires changes to proceed.


Comment at: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp:3117
@@ +3116,3 @@
+else
+target = pc + 4;
+

This should be pc + 8. If branch is not taken then we need to skip the delay 
slot.



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


Re: [Lldb-commits] [PATCH] D12303: Fix for dotest.py ERRORs on OSX caused by svn rev.237053.

2015-08-26 Thread Dawn Perchik via lldb-commits
dawn abandoned this revision.
dawn added a comment.

This patch works on a small set of tests but fails in the same way that r237053 
does when dotest is run on the entire set of lldb tests.  Please accept 
http://reviews.llvm.org/D12329 until someone can investigate this further and 
provide a proper fix.  Thanks!


http://reviews.llvm.org/D12303



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


Re: [Lldb-commits] [PATCH] D12328: Error checking correction in AArch64 hardware watchpoint code

2015-08-26 Thread Tamas Berghammer via lldb-commits
tberghammer added inline comments.


Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:469
@@ -457,1 +468,3 @@
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 

This should be "return false"


Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:490
@@ +489,3 @@
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
+

This should be "return false"


Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:618
@@ -583,1 +617,3 @@
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 

This should be "return false"


http://reviews.llvm.org/D12328



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


Re: [Lldb-commits] [lldb] r246004 - In SendContinuePacketAndWaitForResponse there is a special bit of

2015-08-26 Thread Pavel Labath via lldb-commits
On 26 August 2015 at 05:07, Jason Molenda via lldb-commits
 wrote:
> There's a timeout where we wait to get this second stop reply packet
> in SendContinuePacketAndWaitForResponse, currently 1ms.  For a slow
> remote target, it may take longer than that to send the second stop
> reply packet.  If that happens, then lldb will use that second stop
> reply packet as the response for the next packet request it makes
> to the remote stub.  The two will be out of sync by one packet for
> the rest of the debug session and it's going to go badly from then on.


Hi,

this does not concern your change directly, but I have been looking at
this code lately (checking how hard it would be to change the format
of the stop-reply), and I have a question/suggestion about this piece
of code.

I am not sure if debugserver is correct in sending the second stop
reply packet here. The gdb-remote documentation

says that "Interrupts received while the program is stopped are
discarded". To me this means that in this corner case (interrupting a
process while it comes to a stop naturally) the server should send
just one stop-reply, and the client does not need do to anything fancy
here. In fact, LLGS behaves this way already, so this part of code is
not needed for LLGS. If we could fix the debugserver to behave the
same way, then this whole hack could go away. (*)

(*) Unless we need to maintain backwards compatibility with old
debugserver or other remote stubs. But even if that is true, I think
it would be worth fixing the debugserver, if we agree the bug is
there. Based on my investigations it should be easy: just removing the
extra send command in HandlePacket_stop_process  (RNBRemote.cpp:4429)
seemed to do the trick. The tests  did not seem to be affected in any
way...

What do you think?

pl
___
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-26 Thread Tamas Berghammer via lldb-commits
tberghammer added a subscriber: tberghammer.
tberghammer added a comment.

You added 10 new function to the emulator where the first 8 functions and the 
last 2 functions are almost identical. I know that the rest of the MIPS64 
instruction emulator is having the same issue but I would like to see these 
functions to be merged into a smaller number of functions to remove code 
duplication.

I see 2 different approach to do it and I am not sure which one is better in 
this case, but both of them improves the situation by a lot.

- Write only 2 function (first 8, last 2) and that function then reads out the 
condition and the sizes from the MCInst object. I would prefer this approach, 
but I am not sure how difficult it is to read out data from an MCInst
- Keep the 10 function for the 10 different instruction, but make these 
functions to call a function (one for the first 8 and one for the last 2) with 
passing in the constants required by the specific instruction.

Both approach would reduce the amount of code in this class and help a lot in 
reducing the maintenance cost with removing a lot of duplicated code.


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] D12360: RenderScript pending kernel breakpoints.

2015-08-26 Thread Ewan Crawford via lldb-commits
EwanCrawford created this revision.
EwanCrawford added reviewers: clayborg, jingham.
EwanCrawford added subscribers: lldb-commits, domipheus, ADodds.
EwanCrawford set the repository for this revision to rL LLVM.

Currently the RS breakpoint command can only find a kernel if it's in an 
already loaded RS module.
This patch allows users to set pending breakpoints on RenderScript kernels 
which will be loaded in the future.

To maintain these breakpoints the command 'renderscript kernel breakpoint' is 
split into 3 separate sub-commands.
'renderscript kernel breakpoint set', 'renderscript kernel breakpoint list', 
and 'renderscript kernel breakpoint delete'.

Repository:
  rL LLVM

http://reviews.llvm.org/D12360

Files:
  
source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  
source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h

Index: source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
===
--- source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -147,8 +147,12 @@
 
 void DumpKernels(Stream &strm) const;
 
+void DumpBreakpoints(Stream &strm) const;
+
 void AttemptBreakpointAtKernelName(Stream &strm, const char *name, Error &error);
 
+void DeleteBreakpoint(Stream &strm, const char* name);
+
 void Status(Stream &strm) const;
 
 virtual size_t GetAlternateManglings(const ConstString &mangled, std::vector &alternates) {
@@ -206,6 +210,8 @@
 std::map m_scriptMappings;
 std::map m_runtimeHooks;
 
+std::map m_kernel_breakpoints; // BreakpointSP is null if breakpoint is pending
+
 bool m_initiated;
 bool m_debuggerPresentFlagged;
 static const HookDefn s_runtimeHookDefns[];
@@ -225,6 +231,9 @@
 void CaptureAllocationInit1(RuntimeHook* hook_info, ExecutionContext& context);
 void CaptureSetGlobalVar1(RuntimeHook* hook_info, ExecutionContext& context);
 
+void CheckModuleForPendingBreakpoints(const RSModuleDescriptorSP& module_desc);
+bool ResolveKernelBreakpoint(ConstString kernel_name, const RSModuleDescriptorSP& module,
+ Error& error, lldb::BreakpointSP& bp, Stream* strm = nullptr);
 };
 
 } // namespace lldb_private
Index: source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
===
--- source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -28,6 +28,8 @@
 
 #include "lldb/Symbol/VariableList.h"
 
+#include 
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -496,7 +498,12 @@
 for (const auto &rs_module : m_rsmodules)
 {
 if (rs_module->m_module == module_sp)
+{
+// The dynamic loader can update the loaded sections
+// after we have already seen the module.
+CheckModuleForPendingBreakpoints(rs_module);
 return false;
+}
 }
 bool module_loaded = false;
 switch (GetModuleKind(module_sp))
@@ -507,6 +514,7 @@
 module_desc.reset(new RSModuleDescriptor(module_sp));
 if (module_desc->ParseRSInfo())
 {
+CheckModuleForPendingBreakpoints(module_desc);
 m_rsmodules.push_back(module_desc);
 module_loaded = true;
 }
@@ -767,72 +775,189 @@
 strm.IndentLess();
 }
 
-void 
-RenderScriptRuntime::AttemptBreakpointAtKernelName(Stream &strm, const char* name, Error& error)
+void
+RenderScriptRuntime::DumpBreakpoints(Stream &strm) const
 {
-if (!name) 
+strm.Printf("RenderScript Kernel Breakpoints:");
+strm.EOL();
+strm.IndentMore();
+for (const auto &bp_pair : m_kernel_breakpoints)
 {
-error.SetErrorString("invalid kernel name");
-return;
+   strm.Printf("\t%s  - ", bp_pair.first.AsCString());
+   if (bp_pair.second == nullptr)
+   strm.Printf("Pending on RS module load");
+   else
+   bp_pair.second->GetDescription(&strm, lldb::eDescriptionLevelBrief, false);
+
+   strm.EOL();
 }
+strm.IndentLess();
+}
 
-bool kernels_found = false;
+void
+RenderScriptRuntime::DeleteBreakpoint(Stream &strm, const char* name)
+{
 ConstString kernel_name(name);
-for (const auto &module : m_rsmodules)
+auto match = m_kernel_breakpoints.find(kernel_name);
+
+if (match != m_kernel_breakpoints.end())
 {
-for (const auto &kernel : module->m_kernels)
+BreakpointSP bp = match->second;
+if (bp != nullptr)
+GetProcess()->GetTarget().RemoveBreak

[Lldb-commits] [PATCH] D12363: Read module list from mini dump

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

http://reviews.llvm.org/D12363

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
@@ -100,6 +100,9 @@
 void
 ReadExceptionRecord();
 
+void
+ReadModuleList();
+
 // 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.
Index: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
===
--- source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
+++ source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
@@ -37,6 +37,36 @@
 
 using namespace lldb_private;
 
+namespace
+{
+
+// Getting a string out of a mini dump is a chore.  You're usually given a
+// relative virtual address (RVA), which points to a counted string that's in
+// Windows Unicode (UTF-16).  This wrapper handles all the redirection and
+// returns a UTF-8 copy of the string.
+std::string
+GetMiniDumpString(const void *base_addr, const RVA rva)
+{
+std::string result;
+if (!base_addr)
+{
+return result;
+}
+auto md_string = reinterpret_cast(static_cast(base_addr) + rva);
+const auto length_required =
+::WideCharToMultiByte(CP_UTF8, 0, md_string->Buffer, md_string->Length,
+  nullptr, 0, nullptr, nullptr);
+result.resize(length_required);
+const auto actual_length =
+::WideCharToMultiByte(CP_UTF8, 0, md_string->Buffer, md_string->Length,
+  &result[0], static_cast(result.size()),
+  nullptr, nullptr);
+result.resize(actual_length);
+return result;
+}
+
+}  // anonymous namespace
+
 // Encapsulates the private data for ProcessWinMiniDump.
 // TODO(amccarth):  Determine if we need a mutex for access.
 class ProcessWinMiniDump::Data
@@ -133,8 +163,7 @@
 }
 
 m_target.SetArchitecture(DetermineArchitecture());
-// TODO(amccarth):  Build the module list.
-
+ReadModuleList();
 ReadExceptionRecord();
 
 return error;
@@ -341,6 +370,31 @@
 }
 }
 
+void
+ProcessWinMiniDump::ReadModuleList() {
+size_t size = 0;
+auto module_list_ptr = 
static_cast(FindDumpStream(ModuleListStream, &size));
+if (!module_list_ptr || module_list_ptr->NumberOfModules == 0)
+{
+return;
+}
+
+for (ULONG32 i = 0; i < module_list_ptr->NumberOfModules; ++i)
+{
+const auto &module = module_list_ptr->Modules[i];
+const auto file_name = GetMiniDumpString(m_data_up->m_base_addr, 
module.ModuleNameRva);
+ModuleSpec module_spec = FileSpec(file_name, true);
+
+lldb::ModuleSP module_sp = GetTarget().GetSharedModule(module_spec);
+if (!module_sp)
+{
+continue;
+}
+bool load_addr_changed = false;
+module_sp->SetLoadAddress(GetTarget(), module.BaseOfImage, false, 
load_addr_changed);
+}
+}
+
 void *
 ProcessWinMiniDump::FindDumpStream(unsigned stream_number, size_t *size_out) {
 void *stream = nullptr;


Index: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
===
--- source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
+++ source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
@@ -100,6 +100,9 @@
 void
 ReadExceptionRecord();
 
+void
+ReadModuleList();
+
 // 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.
Index: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
===
--- source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
+++ source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
@@ -37,6 +37,36 @@
 
 using namespace lldb_private;
 
+namespace
+{
+
+// Getting a string out of a mini dump is a chore.  You're usually given a
+// relative virtual address (RVA), which points to a counted string that's in
+// Windows Unicode (UTF-16).  This wrapper handles all the redirection and
+// returns a UTF-8 copy of the string.
+std::string
+GetMiniDumpString(const void *base_addr, const RVA rva)
+{
+std::string result;
+if (!base_addr)
+{
+return result;
+}
+auto md_string = reinterpret_cast

Re: [Lldb-commits] [PATCH] D12327: Treat cleanup errors separately from test failures

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

Looks good.


http://reviews.llvm.org/D12327



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


Re: [Lldb-commits] [PATCH] D12158: Fix typo in lldb --help

2015-08-26 Thread Greg Clayton via lldb-commits
clayborg resigned from this revision.
clayborg removed a reviewer: clayborg.
clayborg added a comment.

I'll defer to Jim since he added this option.


http://reviews.llvm.org/D12158



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


Re: [Lldb-commits] [PATCH] D12303: Fix for dotest.py ERRORs on OSX caused by svn rev.237053.

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

Isn't fixing this as simple as having the TestDisassemble_VST1_64.py restore 
the platform correctly?


http://reviews.llvm.org/D12303



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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

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

This test passes fine when running dosep.py so I would prefer to set this to 
expected failure


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

2015-08-26 Thread Ted Woodward via lldb-commits
ted added a comment.

The error also happens on Linux; this test should be turned off everywhere.


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12328: Error checking correction in AArch64 hardware watchpoint code

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

Fix the incorrect bool return values and this will be good to go.


http://reviews.llvm.org/D12328



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

I will defer to MIPS experts here. You might thing about adding tberghammer as 
a reviewer.


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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

2015-08-26 Thread Ted Woodward via lldb-commits
ted added a comment.

The problem with this test is it gets python in a bad state, so after it's run, 
all tests after error out. It runs fine on its own, but something like:
dotest.py python_api/

will give a lot of errors after this test runs.


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12303: Fix for dotest.py ERRORs on OSX caused by svn rev.237053.

2015-08-26 Thread Ted Woodward via lldb-commits
ted added a comment.

I tried deleting the target and setting the platform to the host platform at 
the end of the test in TestDisassemble_VST1_64.py, but that didn't solve the 
problem.


http://reviews.llvm.org/D12303



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


Re: [Lldb-commits] [PATCH] D12360: RenderScript pending kernel breakpoints.

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

Looks good for now, but we should add a way so that plug-ins can extend the 
"breakpoint set", "breakpoint delete", and other breakpoint commands so we 
don't have a bunch of fragmented extra commands.

One idea for a future patch: allow plugins to define static functions callbacks 
that can add new options to breakpoint commands and have the command routed to 
the plug-in when these special commands are specified. Lets say you set a 
renderscript kernel breakpoint by installing a new --renderscript-kernel option:

  (lldb) breakpoint set --renderscript-kernel ...

The arguments would get parsed up and passed to a plug-in static function when 
the breakpoint gets requested to be made. We might not have a renderscript 
runtime loaded yet because we haven't detected the renderscript shared library 
yet, so we would need to hold off on resolving the breakpoint until the 
RenderScriptRuntime plug-in is loaded, and as soon as it is, the breakpoint 
could resolve itself.

We have a desire for this with the Objective C runtime to do special 
breakpoints like:

  (lldb) breakpoint set --objc-class NString


Repository:
  rL LLVM

http://reviews.llvm.org/D12360



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


Re: [Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

2015-08-26 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

I though a bit more about the abstraction you plan to introduce (DWARFDIE) and 
I started to believe we don't need it at all. If we use lldb::user_id_t in the 
NameToDIE indexes where the first 4 byte is the compile unit offset (for dwo) 
or the compile unit index (for debug map) and the last 4 byte is the die offset 
then we will have all of the information we need.

In this setup DWARFCompileUnit::Index have to be changed to index the dwo dwarf 
files also and all function of DWARFDebugInfoEntry have to be changed to check 
if it was given the compile unit belongs to the actual DIE or it got a pointer 
to the DIE in the main object file. In the second case it re-calls itself with 
the correct SymbolFileDwarf and DWARCompileUnit objects. I think this approach 
will keep the dwo file handling in the DWARFCompileUnit and in the 
DWARFDebugInfoEntry classes.

What do you think?


http://reviews.llvm.org/D12291



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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

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

Greg, please reconsider.  There are many options which dosep.py does not 
support, and the only way to get that functionality is by running dotest.py.  
There is no workaround.  Thank you for understanding.


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

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

In http://reviews.llvm.org/D12291#233274, @tberghammer wrote:

> I though a bit more about the abstraction you plan to introduce (DWARFDIE) 
> and I started to believe we don't need it at all. If we use lldb::user_id_t 
> in the NameToDIE indexes where the first 4 byte is the compile unit offset 
> (for dwo) or the compile unit index (for debug map) and the last 4 byte is 
> the die offset then we will have all of the information we need.


Even if we don't need it to implement the DWO feature, we still need it. There 
are many places where we pass around a DWARFCompileUnit and a 
DWARFDebugInfoEntry as two arguments and there are many places where the wrong 
DWARFCompileUnit might be being used for a DWARFDebugInfoEntry. So even if this 
doesn't help the DWO stuff, I really want to get this change in so this kind of 
error doesn't happen.

We should still pull the CU index + DWARF offset tricks you mention for sure.

> In this setup DWARFCompileUnit::Index have to be changed to index the dwo 
> dwarf files also and all function of DWARFDebugInfoEntry have to be changed 
> to check if it was given the compile unit belongs to the actual DIE or it got 
> a pointer to the DIE in the main object file. In the second case it re-calls 
> itself with the correct SymbolFileDwarf and DWARCompileUnit objects. I think 
> this approach will keep the dwo file handling in the DWARFCompileUnit and in 
> the DWARFDebugInfoEntry classes.


Sounds good, but lets build this on top of my DWARFDIE stuff so we can 
guarantee that we can hand out a DWARFDIE and always have the right 
DWARFCompileUnit and DWARFDebugInfoEntry. I am almost done with my DWARFDIE 
changes. Should be later today.


http://reviews.llvm.org/D12291



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


[Lldb-commits] LLVM buildmaster will be restarted tonight

2015-08-26 Thread Galina Kistanova via lldb-commits
Hello everyone,

LLVM buildmaster will be restarted after 6 PM Pacific time today.

Thanks

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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

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

Ah expected failing it won't help the tests pass. My bad. Check this in for now 
until we can fix it properly.


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12158: Fix typo in lldb --help

2015-08-26 Thread Jim Ingham via lldb-commits
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.

This is fine.  This is an obvious grammar fix, those don't really need 
reviewing.


http://reviews.llvm.org/D12158



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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

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

Thanks Greg!



Comment at: test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py:15
@@ -14,2 +14,3 @@
 
+@skipIfDarwin # llvm.org/pr24575: all ERRORs in dotest.py on OSX after this
 @python_api_test

FYI - I will change this to:
@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after 
this
as per Ted's recommendation.


Repository:
  rL LLVM

http://reviews.llvm.org/D12329



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


Re: [Lldb-commits] [PATCH] D12360: RenderScript pending kernel breakpoints.

2015-08-26 Thread Jim Ingham via lldb-commits
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

So there are two issues I see here.

The first is that you seem to have invented a parallel mechanism to the 
breakpoint resolver mechanism to handle re-resolving breakpoints on shared 
library loads.  That seems unfortunate.  You should have been able to add a 
special RSBreakpointResolver that will get called by the ordinary mechanism for 
breakpoints on new module load and then just make new "RS Kernel" breakpoints 
with that resolver.  I would want a good reason why that wasn't possible before 
I would feel good about adding this side mechanism.

The second issue, which Greg pointed out, is that there's no way for a plugin 
to specify a new breakpoint resolver kind that it has added to the breakpoint 
system.  Since that doesn't currently exist, and is a decent bit of work which 
it isn't fair to gate this patch on, I don't mind for the nonce adding a 
special command to set them.  But the breakpoint's resolver describes the 
breakpoints in a resolver agnostic way, so once added there is no need for 
"list" or "delete" commands.


Repository:
  rL LLVM

http://reviews.llvm.org/D12360



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


[Lldb-commits] [PATCH] D12374: Code cleanup in preparation of adding split dwarf support

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

Code cleanup in preparation of adding split dwarf support

* Remove some unused code
* Remove usage of DWARFDebugInfoEntry::Attributes where usage isn't reasonable
* Cleanup DWARFMappedHash with separating it to header and implementation file 
and fixing the visibility of the functions

http://reviews.llvm.org/D12374

Files:
  source/Plugins/SymbolFile/DWARF/CMakeLists.txt
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
  source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
  source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Symbol/ClangASTContext.cpp

Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -9029,7 +9029,6 @@
  DW_TAG_value_to_name(tag),
  type->GetName().AsCString());
 assert (clang_type);
-DWARFDebugInfoEntry::Attributes attributes;
 
 switch (tag)
 {
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1604,11 +1604,7 @@
   DW_TAG_value_to_name(die->Tag()),
   type->GetName().AsCString());
 assert (clang_type);
-DWARFDebugInfoEntry::Attributes attributes;
-
-
 TypeSystem *type_system = GetTypeSystemForLanguage(dwarf_cu->GetLanguageType());
-
 if (type_system)
 return type_system->CompleteTypeFromDWARF (this, dwarf_cu, die, type, clang_type);
 
@@ -2550,30 +2546,19 @@
 // we can pull out the mips linkage name attribute:
 
 Mangled best_name;
-DWARFDebugInfoEntry::Attributes attributes;
-DWARFFormValue form_value;
-die->GetAttributes(this, dwarf_cu, DWARFFormValue::FixedFormSizes(), attributes);
-uint32_t idx = attributes.FindAttributeIndex(DW_AT_MIPS_linkage_name);
-if (idx == UINT32_MAX)
-idx = attributes.FindAttributeIndex(DW_AT_linkage_name);
-if (idx != UINT32_MAX)
-{
-if (attributes.ExtractFormValueAtIndex(this, idx, form_value))
-{
-const char *mangled_name = form_value.AsCString(this);
-if (mangled_name)
-best_name.SetValue (ConstString(mangled_name), true);
-}
-}
+const char* name = nullptr;
+
+name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_MIPS_linkage_name, nullptr);
+if (name == nullptr)
+name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_linkage_name, nullptr);
+if (name != nullptr)
+best_name.SetValue(ConstString(name), true);
 
 if (!best_name)
 {
-idx = attributes.FindAttributeIndex(DW_AT_name);
-if (idx != UINT32_MAX && attributes.ExtractFormValueAtIndex(this, idx, form_value))
-{
-const char *name = form_value.AsCString(this);
-best_name.SetValue (ConstString(name), false);
-}
+name = die->GetAttributeValueAsString(this, dwarf_cu, DW_AT_name, nullptr);
+if (name != nullptr)
+best_name.SetValue(ConstString(name), false);
 }
 
 const LanguageType cu_language = const_cast(dwarf_cu)->GetLanguageType();
Index: source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
===
--- source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
+++ source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
@@ -12,923 +12,209 @@
 
 #include 
 
-#include "DWARFDefines.h"
-#include "DWARFFormValue.h"
-
 #include "lldb/lldb-defines.h"
 #include "lldb/Core/dwarf.h"
 #include "lldb/Core/RegularExpression.h"
 #include "lldb/Core/MappedHash.h"
 
+#include "DWARFDefines.h"
+#include "DWARFFormValue.h"
+#include "NameToDIE.h"
 
 class SymbolFileDWARF;
 class DWARFCompileUnit;
 class DWARFDebugInfoEntry;
 
-struct DWARFMappedHash
+class DWARFMappedHash
 {
-struct DIEInfo
-{
-dw_offset_t offset;  // The DIE offset
-dw_tag_t tag;
-uint32_t type_flags; // Any flags for this DIEInfo
-uint32_t qualified_name_hash; // A 32 bit hash of 

[Lldb-commits] [lldb] r246043 - Skip test which is causing ERRORs in dotest.py after r237053

2015-08-26 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Wed Aug 26 13:16:45 2015
New Revision: 246043

URL: http://llvm.org/viewvc/llvm-project?rev=246043&view=rev
Log:
Skip test which is causing ERRORs in dotest.py after r237053

This test runs fine on its own, but leaves python in a bad state to
where all tests that run after it error out.  See llvm.org/pr24575.
This resolves the concerns raised in http://reviews.llvm.org/rL237053.

Reviewed by: clayborg, ted
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12329

Modified:
lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py

Modified: 
lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py?rev=246043&r1=246042&r2=246043&view=diff
==
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py 
(original)
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py 
Wed Aug 26 13:16:45 2015
@@ -12,6 +12,7 @@ class Disassemble_VST1_64(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after 
this
 @python_api_test
 def test_disassemble_invalid_vst_1_64_raw_data(self):
 """Test disassembling invalid vst1.64 raw bytes with the API."""


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


Re: [Lldb-commits] [PATCH] D12329: Skip test which is causing ERRORs in dotest.py on OSX after r237053

2015-08-26 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246043: Skip test which is causing ERRORs in dotest.py after 
r237053 (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D12329?vs=33101&id=33229#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12329

Files:
  lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py

Index: 
lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
===
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
@@ -12,6 +12,7 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after 
this
 @python_api_test
 def test_disassemble_invalid_vst_1_64_raw_data(self):
 """Test disassembling invalid vst1.64 raw bytes with the API."""


Index: lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
===
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
@@ -12,6 +12,7 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after this
 @python_api_test
 def test_disassemble_invalid_vst_1_64_raw_data(self):
 """Test disassembling invalid vst1.64 raw bytes with the API."""
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL237053: Fix selecting the Platform in TargetList::CreateTargetInternal()

2015-08-26 Thread Dawn Perchik via lldb-commits
dawn accepted this commit.
dawn added a comment.

While it is still unknown why this change triggered the dotest ERRORs as 
reported in llvm.org/pr24575, we're assuming the problem lies in the python API 
and not this change.  The offending test was skipped in r246043 as a workaround.


Users:
  ted (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL237053



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


Re: [Lldb-commits] [PATCH] D12328: Error checking correction in AArch64 hardware watchpoint code

2015-08-26 Thread Muhammad Omair Javaid via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246045: Error checking correction in AArch64 hardware 
watchpoint code (authored by omjavaid).

Changed prior to commit:
  http://reviews.llvm.org/D12328?vs=33099&id=33230#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12328

Files:
  lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
===
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -391,10 +391,15 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
 
-uint32_t control_value, bp_index;
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
+
+uint32_t control_value = 0, bp_index = 0;
 
 // Check if size has a valid hardware breakpoint length.
 if (size != 4)
@@ -436,7 +441,10 @@
 m_hbr_regs[bp_index].refcount = 1;
 
 // PTRACE call to set corresponding hardware breakpoint register.
-WriteHardwareDebugRegs(eDREGTypeBREAK);
+error = WriteHardwareDebugRegs(eDREGTypeBREAK);
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 }
 else
 m_hbr_regs[bp_index].refcount++;
@@ -452,8 +460,13 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return false;
 
 if (hw_idx >= m_max_hbp_supported)
 return false;
@@ -472,6 +485,11 @@
 
 // PTRACE call to clear corresponding hardware breakpoint register.
 WriteHardwareDebugRegs(eDREGTypeBREAK);
+
+if (error.Fail())
+return false;
+
+return true;
 }
 
 return false;
@@ -485,8 +503,13 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 
 return m_max_hwp_supported;
 }
@@ -499,10 +522,15 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 		
-uint32_t control_value, wp_index;
+uint32_t control_value = 0, wp_index = 0;
 
 // Check if we are setting watchpoint other than read/write/access
 // Also update watchpoint flag to match AArch64 write-read bit configuration.
@@ -562,7 +590,10 @@
 m_hwp_regs[wp_index].refcount = 1;
 
 // PTRACE call to set corresponding watchpoint register.
-WriteHardwareDebugRegs(eDREGTypeWATCH);
+error = WriteHardwareDebugRegs(eDREGTypeWATCH);
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 }
 else
 m_hwp_regs[wp_index].refcount++;
@@ -578,8 +609,13 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return false;
 
 if (wp_index >= m_max_hwp_supported)
 return false;
@@ -598,7 +634,11 @@
 m_hwp_regs[wp_index].refcount = 0;
 
 // Ptrace call to update hardware debug registers
-WriteHardwareDebugRegs(eDREGTypeWATCH);
+error = WriteHardwareDebugRegs(eDREGTypeWATCH);
+
+if (error.Fail())
+return false;
+
 return true;
 }
 
@@ -613,8 +653,13 @@
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return error;
 
 for (uint32_t i = 0; i < m_max_hwp_supported; i++)
 {
@@ -626,7 +671,10 @@
 m_hwp_regs[i].refcount = 0;
 
 // Ptrace call to update hardware debug registers
-WriteHardwareDebugRegs(eDREGTypeWATCH);
+error = WriteHardwareDebugRegs(eDREGTypeWATCH);
+
+if (error.Fail())
+return error;
 }
 }
 
@@ -730,12 +778,19 @@
 i

[Lldb-commits] [lldb] r246045 - Error checking correction in AArch64 hardware watchpoint code

2015-08-26 Thread Omair Javaid via lldb-commits
Author: omjavaid
Date: Wed Aug 26 13:23:27 2015
New Revision: 246045

URL: http://llvm.org/viewvc/llvm-project?rev=246045&view=rev
Log:
Error checking correction in AArch64 hardware watchpoint code

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


Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Modified: 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=246045&r1=246044&r2=246045&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
Wed Aug 26 13:23:27 2015
@@ -391,10 +391,15 @@ NativeRegisterContextLinux_arm64::SetHar
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
 
-uint32_t control_value, bp_index;
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
+
+uint32_t control_value = 0, bp_index = 0;
 
 // Check if size has a valid hardware breakpoint length.
 if (size != 4)
@@ -436,7 +441,10 @@ NativeRegisterContextLinux_arm64::SetHar
 m_hbr_regs[bp_index].refcount = 1;
 
 // PTRACE call to set corresponding hardware breakpoint register.
-WriteHardwareDebugRegs(eDREGTypeBREAK);
+error = WriteHardwareDebugRegs(eDREGTypeBREAK);
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 }
 else
 m_hbr_regs[bp_index].refcount++;
@@ -452,8 +460,13 @@ NativeRegisterContextLinux_arm64::ClearH
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return false;
 
 if (hw_idx >= m_max_hbp_supported)
 return false;
@@ -472,6 +485,11 @@ NativeRegisterContextLinux_arm64::ClearH
 
 // PTRACE call to clear corresponding hardware breakpoint register.
 WriteHardwareDebugRegs(eDREGTypeBREAK);
+
+if (error.Fail())
+return false;
+
+return true;
 }
 
 return false;
@@ -485,8 +503,13 @@ NativeRegisterContextLinux_arm64::NumSup
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 
 return m_max_hwp_supported;
 }
@@ -499,10 +522,15 @@ NativeRegisterContextLinux_arm64::SetHar
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;

-uint32_t control_value, wp_index;
+uint32_t control_value = 0, wp_index = 0;
 
 // Check if we are setting watchpoint other than read/write/access
 // Also update watchpoint flag to match AArch64 write-read bit 
configuration.
@@ -562,7 +590,10 @@ NativeRegisterContextLinux_arm64::SetHar
 m_hwp_regs[wp_index].refcount = 1;
 
 // PTRACE call to set corresponding watchpoint register.
-WriteHardwareDebugRegs(eDREGTypeWATCH);
+error = WriteHardwareDebugRegs(eDREGTypeWATCH);
+
+if (error.Fail())
+return LLDB_INVALID_INDEX32;
 }
 else
 m_hwp_regs[wp_index].refcount++;
@@ -578,8 +609,13 @@ NativeRegisterContextLinux_arm64::ClearH
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware breakpoint and watchpoint information.
-ReadHardwareDebugInfo ();
+error = ReadHardwareDebugInfo ();
+
+if (error.Fail())
+return false;
 
 if (wp_index >= m_max_hwp_supported)
 return false;
@@ -598,7 +634,11 @@ NativeRegisterContextLinux_arm64::ClearH
 m_hwp_regs[wp_index].refcount = 0;
 
 // Ptrace call to update hardware debug registers
-WriteHardwareDebugRegs(eDREGTypeWATCH);
+error = WriteHardwareDebugRegs(eDREGTypeWATCH);
+
+if (error.Fail())
+return false;
+
 return true;
 }
 
@@ -613,8 +653,13 @@ NativeRegisterContextLinux_arm64::ClearA
 if (log)
 log->Printf ("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
+Error error;
+
 // Read hardware b

[Lldb-commits] [lldb] r246061 - XFAIL environment variable setting test on Windows.

2015-08-26 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 26 14:44:36 2015
New Revision: 246061

URL: http://llvm.org/viewvc/llvm-project?rev=246061&view=rev
Log:
XFAIL environment variable setting test on Windows.

Fixing this is tracked by https://llvm.org/pr24579

Modified:
lldb/trunk/test/settings/TestSettings.py

Modified: lldb/trunk/test/settings/TestSettings.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=246061&r1=246060&r2=246061&view=diff
==
--- lldb/trunk/test/settings/TestSettings.py (original)
+++ lldb/trunk/test/settings/TestSettings.py Wed Aug 26 14:44:36 2015
@@ -207,6 +207,7 @@ class SettingsCommandTestCase(TestBase):
 self.pass_run_args_and_env_vars()
 
 @dwarf_test
+@expectedFailureWindows("llvm.org/pr24579")
 def test_run_args_and_env_vars_with_dwarf(self):
 """Test that run-args and env-vars are passed to the launched 
process."""
 self.buildDwarf()


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


[Lldb-commits] [lldb] r246062 - On Windows, use 'del' instead of 'rm' to delete the test executable.

2015-08-26 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 26 14:44:45 2015
New Revision: 246062

URL: http://llvm.org/viewvc/llvm-project?rev=246062&view=rev
Log:
On Windows, use 'del' instead of 'rm' to delete the test executable.

This is a nasty hack to work around the issue described in
https://llvm.org/pr24589

Modified:
lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=246062&r1=246061&r2=246062&view=diff
==
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Wed Aug 26 14:44:45 2015
@@ -533,7 +533,7 @@ endif
 dsym:  $(DSYM)
 all:   $(EXE) $(DSYM)
 clean::
-   $(RM) "$(EXE)" $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) 
$(ARCHIVE_NAME) $(ARCHIVE_OBJECTS)
+   $(RM) $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(ARCHIVE_NAME) 
$(ARCHIVE_OBJECTS)
 ifneq "$(DYLIB_NAME)" ""
$(RM) -r $(DYLIB_FILENAME).dSYM
$(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) 
$(DYLIB_FILENAME) $(DYLIB_FILENAME).debug
@@ -542,10 +542,14 @@ ifneq "$(DSYM)" ""
$(RM) -r "$(DSYM)"
 endif
 ifeq "$(OS)" "Windows_NT"
+# http://llvm.org/pr24589
+   IF EXIST "$(EXE)" del "$(EXE)"
$(RM) $(wildcard *.manifest *.pdb *.ilk)
-  ifneq "$(DYLIB_NAME)" ""
+ifneq "$(DYLIB_NAME)" ""
$(RM) $(DYLIB_NAME).lib $(DYLIB_NAME).exp
-  endif
+endif
+else
+   $(RM) "$(EXE)"
 endif
 
 #--


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


[Lldb-commits] [lldb] r246063 - Don't throw an exception when module cleanup fails.

2015-08-26 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 26 14:44:56 2015
New Revision: 246063

URL: http://llvm.org/viewvc/llvm-project?rev=246063&view=rev
Log:
Don't throw an exception when module cleanup fails.

Just because one test fails to clean up correctly, it should not
prevent other tests from attempting to run.

Modified:
lldb/trunk/test/dotest.py
lldb/trunk/test/lldbtest.py
lldb/trunk/test/unittest2/case.py
lldb/trunk/test/unittest2/result.py

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=246063&r1=246062&r2=246063&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Aug 26 14:44:56 2015
@@ -1685,6 +1685,17 @@ for ia in range(len(archs) if iterArchs
 if parsable:
 self.stream.write("FAIL: LLDB (%s) :: %s\n" % 
(self._config_string(test), str(test)))
 
+def addCleanupError(self, test, err):
+global sdir_has_content
+global parsable
+sdir_has_content = True
+super(LLDBTestResult, self).addCleanupError(test, err)
+method = getattr(test, "markCleanupError", None)
+if method:
+method()
+if parsable:
+self.stream.write("CLEANUP ERROR: LLDB (%s) :: %s\n" % 
(self._config_string(test), str(test)))
+
 def addFailure(self, test, err):
 global sdir_has_content
 global failuresPerCategory

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=246063&r1=246062&r2=246063&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Aug 26 14:44:56 2015
@@ -1195,8 +1195,7 @@ class Base(unittest2.TestCase):
 if doCleanup and not lldb.skip_build_and_cleanup:
 # First, let's do the platform-specific cleanup.
 module = builder_module()
-if not module.cleanup():
-raise Exception("Don't know how to do cleanup")
+module.cleanup()
 
 # Subclass might have specific cleanup function defined.
 if getattr(cls, "classCleanup", None):
@@ -1385,6 +1384,7 @@ class Base(unittest2.TestCase):
 # initially.  If the test errored/failed, the session info
 # (self.session) is then dumped into a session specific file for
 # diagnosis.
+self.__cleanup_errored__ = False
 self.__errored__= False
 self.__failed__ = False
 self.__expected__   = False
@@ -1616,9 +1616,6 @@ class Base(unittest2.TestCase):
 
 self.disableLogChannelsForCurrentTest()
 
-# Decide whether to dump the session info.
-self.dumpSessionInfo()
-
 # =
 # Various callbacks to allow introspection of test progress
 # =
@@ -1631,6 +1628,14 @@ class Base(unittest2.TestCase):
 # Once by the Python unittest framework, and a second time by us.
 print >> sbuf, "ERROR"
 
+def markCleanupError(self):
+"""Callback invoked when an error occurs while a test is cleaning 
up."""
+self.__cleanup_errored__ = True
+with recording(self, False) as sbuf:
+# False because there's no need to write "CLEANUP_ERROR" to the 
stderr twice.
+# Once by the Python unittest framework, and a second time by us.
+print >> sbuf, "CLEANUP_ERROR"
+
 def markFailure(self):
 """Callback invoked when a failure (test assertion failure) 
occurred."""
 self.__failed__ = True
@@ -1729,6 +1734,9 @@ class Base(unittest2.TestCase):
 if self.__errored__:
 pairs = lldb.test_result.errors
 prefix = 'Error'
+if self.__cleanup_errored__:
+pairs = lldb.test_result.cleanup_errors
+prefix = 'CleanupError'
 elif self.__failed__:
 pairs = lldb.test_result.failures
 prefix = 'Failure'

Modified: lldb/trunk/test/unittest2/case.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/unittest2/case.py?rev=246063&r1=246062&r2=246063&view=diff
==
--- lldb/trunk/test/unittest2/case.py (original)
+++ lldb/trunk/test/unittest2/case.py Wed Aug 26 14:44:56 2015
@@ -383,9 +383,11 @@ class TestCase(unittest.TestCase):
 try:
 self.tearDown()
 except Exception:
-result.addError(self, sys.exc_info())
+result.addCleanupError(self, sys.exc_info())
 success = False
 
+self.dumpS

[Lldb-commits] [lldb] r246060 - Disable Objective C test on non-Darwin platforms.

2015-08-26 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 26 14:44:28 2015
New Revision: 246060

URL: http://llvm.org/viewvc/llvm-project?rev=246060&view=rev
Log:
Disable Objective C test on non-Darwin platforms.

Modified:
lldb/trunk/test/lang/objc/modules/TestObjCModules.py

Modified: lldb/trunk/test/lang/objc/modules/TestObjCModules.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/modules/TestObjCModules.py?rev=246060&r1=246059&r2=246060&view=diff
==
--- lldb/trunk/test/lang/objc/modules/TestObjCModules.py (original)
+++ lldb/trunk/test/lang/objc/modules/TestObjCModules.py Wed Aug 26 14:44:28 
2015
@@ -22,8 +22,7 @@ class ObjCModulesTestCase(TestBase):
 self.expr()
 
 @dwarf_test
-@skipIfFreeBSD
-@skipIfLinux
+@skipUnlessDarwin
 @unittest2.expectedFailure("rdar://20416388")
 def test_expr_with_dwarf(self):
 self.buildDwarf()


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


[Lldb-commits] [PATCH] D12380: Comment out DWARFCompileUnit printf spam

2015-08-26 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added a reviewer: sivachandra.
tfiala added a subscriber: lldb-commits.

Comment out a line of diagnostic information that is printed many times during 
test runs when using DWARFCompileUnit.cpp to build the address range table.

http://reviews.llvm.org/D12380

Files:
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp

Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -442,7 +442,7 @@
 {
 const LineTable::FileAddressRanges::Entry &range = 
file_ranges.GetEntryRef(idx);
 debug_aranges->AppendRange(cu_offset, 
range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
+// printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }
 }
 }


Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -442,7 +442,7 @@
 {
 const LineTable::FileAddressRanges::Entry &range = file_ranges.GetEntryRef(idx);
 debug_aranges->AppendRange(cu_offset, range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
+// printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }
 }
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246084 - Fix missing override warnings

2015-08-26 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 26 16:39:52 2015
New Revision: 246084

URL: http://llvm.org/viewvc/llvm-project?rev=246084&view=rev
Log:
Fix missing override warnings

Modified:

lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h?rev=246084&r1=246083&r2=246084&view=diff
==
--- 
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h 
(original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h 
Wed Aug 26 16:39:52 2015
@@ -47,29 +47,29 @@ public:
 //--
 
 virtual void
-DidAttach();
+DidAttach() override;
 
 virtual void
-DidLaunch();
+DidLaunch() override;
 
 virtual lldb::ThreadPlanSP
 GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
- bool stop_others);
+ bool stop_others) override;
 
 virtual lldb_private::Error
-CanLoadImage();
+CanLoadImage() override;
 
 virtual lldb::addr_t
-GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP 
thread);
+GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP 
thread) override;
 
 //--
 // PluginInterface protocol
 //--
 virtual lldb_private::ConstString
-GetPluginName();
+GetPluginName() override;
 
 virtual uint32_t
-GetPluginVersion();
+GetPluginVersion() override;
 
 virtual void
 GetPluginCommandHelp(const char *command, lldb_private::Stream *strm);
@@ -131,7 +131,7 @@ protected:
 ///
 /// @param module The module to traverse.
 void
-UnloadSections(const lldb::ModuleSP module);
+UnloadSections(const lldb::ModuleSP module) override;
 
 /// Locates or creates a module given by @p file and updates/loads the
 /// resulting module at the virtual base address @p base_addr.

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h?rev=246084&r1=246083&r2=246084&view=diff
==
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
(original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
Wed Aug 26 16:39:52 2015
@@ -49,29 +49,29 @@ public:
 //--
 
 virtual void
-DidAttach();
+DidAttach() override;
 
 virtual void
-DidLaunch();
+DidLaunch() override;
 
 virtual lldb::ThreadPlanSP
 GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
- bool stop_others);
+ bool stop_others) override;
 
 virtual lldb_private::Error
-CanLoadImage();
+CanLoadImage() override;
 
 virtual lldb::addr_t
-GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP 
thread);
+GetThreadLocalData (const lldb::ModuleSP module, const lldb::ThreadSP 
thread) override;
 
 //--
 // PluginInterface protocol
 //--
 virtual lldb_private::ConstString
-GetPluginName();
+GetPluginName() override;
 
 virtual uint32_t
-GetPluginVersion();
+GetPluginVersion() override;
 
 virtual void
 GetPluginCommandHelp(const char *command, lldb_private::Stream *strm);


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


Re: [Lldb-commits] [PATCH] D12380: Comment out DWARFCompileUnit printf spam

2015-08-26 Thread Siva Chandra via lldb-commits
sivachandra accepted this revision.
This revision is now accepted and ready to land.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:445
@@ -444,3 +444,3 @@
 debug_aranges->AppendRange(cu_offset, 
range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
+// printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }

I do not know the policy around such debug print statements; I would just 
remove it.


http://reviews.llvm.org/D12380



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


Re: [Lldb-commits] [PATCH] D12380: Comment out DWARFCompileUnit printf spam

2015-08-26 Thread Stephane Sezer via lldb-commits
sas added a subscriber: sas.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:445
@@ -444,3 +444,3 @@
 debug_aranges->AppendRange(cu_offset, 
range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
+// printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }

sivachandra wrote:
> I do not know the policy around such debug print statements; I would just 
> remove it.
Yeah removing (or redirecting to an actual log channel maybe?) might be a 
better fix than commenting out.


http://reviews.llvm.org/D12380



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


Re: [Lldb-commits] [PATCH] D12380: Comment out DWARFCompileUnit printf spam

2015-08-26 Thread Todd Fiala via lldb-commits
tfiala added inline comments.


Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:445
@@ -444,3 +444,3 @@
 debug_aranges->AppendRange(cu_offset, 
range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
+// printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }

sas wrote:
> sivachandra wrote:
> > I do not know the policy around such debug print statements; I would just 
> > remove it.
> Yeah removing (or redirecting to an actual log channel maybe?) might be a 
> better fix than commenting out.
I'll just go ahead and remove it.  It would be easy enough to add back in if 
somebody wants it, and they would be in a better position to determine what 
they'd want to enshrine in a log message.  This one is very spammy.

Thanks, all!


http://reviews.llvm.org/D12380



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


Re: [Lldb-commits] [PATCH] D12158: Fix typo in lldb --help

2015-08-26 Thread Yacine Belkadi via lldb-commits
ybelkadi added a comment.

Sorry if this wasn't the expected way to submit trivial patches. (I don't have 
commit access)


http://reviews.llvm.org/D12158



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


[Lldb-commits] [lldb] r246091 - http://reviews.llvm.org/D12380: remove DWARFCompileUnit printf spam.

2015-08-26 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Aug 26 17:08:26 2015
New Revision: 246091

URL: http://llvm.org/viewvc/llvm-project?rev=246091&view=rev
Log:
http://reviews.llvm.org/D12380: remove DWARFCompileUnit printf spam.

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

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=246091&r1=246090&r2=246091&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Wed Aug 26 
17:08:26 2015
@@ -442,7 +442,6 @@ DWARFCompileUnit::BuildAddressRangeTable
 {
 const LineTable::FileAddressRanges::Entry &range = 
file_ranges.GetEntryRef(idx);
 debug_aranges->AppendRange(cu_offset, 
range.GetRangeBase(), range.GetRangeEnd());
-printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" 
PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd());
 }
 }
 }


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


Re: [Lldb-commits] [PATCH] D12380: Comment out DWARFCompileUnit printf spam

2015-08-26 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Committed:

Sendingsource/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Transmitting file data .
Committed revision 246091.


http://reviews.llvm.org/D12380



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


Re: [Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

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

I got my DWARFDIE stuff in with:

  % svn commit
  Sendinginclude/lldb/Core/dwarf.h
  Sendinginclude/lldb/Symbol/ClangASTContext.h
  Sendinginclude/lldb/Symbol/TypeSystem.h
  Sendinglldb.xcodeproj/project.pbxproj
  Sending
source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h
  Sending
source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
  Sendingsource/Plugins/SymbolFile/DWARF/CMakeLists.txt
  Adding source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFAttribute.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
  Adding source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
  Adding source/Plugins/SymbolFile/DWARF/DWARFDIE.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDIECollection.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/DWARFFormValue.h
  Sendingsource/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  Sendingsource/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  Sendingsource/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp
  Sendingsource/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h
  Sendingsource/Symbol/ClangASTContext.cpp
  Sendingsource/Symbol/TypeSystem.cpp
  Sendingsource/Target/Target.cpp
  Transmitting file data ..
  Committed revision 246100.


http://reviews.llvm.org/D12291



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


[Lldb-commits] [PATCH] D12388: Silence some MSVC warnings.

2015-08-26 Thread Stephane Sezer via lldb-commits
sas created this revision.
sas added a reviewer: zturner.
sas added a subscriber: lldb-commits.

Just `assert("string" && false)` instead of `assert("string" == NULL)`.

This avoid errors like

[...]\Core\SourceManager.cpp(647): warning C4130: '==' : logical operation 
on address of string constant

http://reviews.llvm.org/D12388

Files:
  source/Core/SourceManager.cpp

Index: source/Core/SourceManager.cpp
===
--- source/Core/SourceManager.cpp
+++ source/Core/SourceManager.cpp
@@ -644,14 +644,14 @@
 else
 {
 // Some lines have been populated, start where we last left off
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 
 }
 else
 {
 // Calculate all line offsets up to "line"
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 return false;
 }


Index: source/Core/SourceManager.cpp
===
--- source/Core/SourceManager.cpp
+++ source/Core/SourceManager.cpp
@@ -644,14 +644,14 @@
 else
 {
 // Some lines have been populated, start where we last left off
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 
 }
 else
 {
 // Calculate all line offsets up to "line"
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 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] D12388: Silence some MSVC warnings.

2015-08-26 Thread Zachary Turner via lldb-commits
Thanks for fixing these.  Feel free to commit trivial warning fixes without
review.

On Wed, Aug 26, 2015 at 4:43 PM Stephane Sezer  wrote:

> sas created this revision.
> sas added a reviewer: zturner.
> sas added a subscriber: lldb-commits.
>
> Just `assert("string" && false)` instead of `assert("string" == NULL)`.
>
> This avoid errors like
>
> [...]\Core\SourceManager.cpp(647): warning C4130: '==' : logical
> operation on address of string constant
>
> http://reviews.llvm.org/D12388
>
> Files:
>   source/Core/SourceManager.cpp
>
> Index: source/Core/SourceManager.cpp
> ===
> --- source/Core/SourceManager.cpp
> +++ source/Core/SourceManager.cpp
> @@ -644,14 +644,14 @@
>  else
>  {
>  // Some lines have been populated, start where we last left
> off
> -assert("Not implemented yet" == NULL);
> +assert("Not implemented yet" && false);
>  }
>
>  }
>  else
>  {
>  // Calculate all line offsets up to "line"
> -assert("Not implemented yet" == NULL);
> +assert("Not implemented yet" && false);
>  }
>  return false;
>  }
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246123 - Silence some MSVC warnings.

2015-08-26 Thread Stephane Sezer via lldb-commits
Author: sas
Date: Wed Aug 26 18:55:14 2015
New Revision: 246123

URL: http://llvm.org/viewvc/llvm-project?rev=246123&view=rev
Log:
Silence some MSVC warnings.

Summary:
Just `assert("string" && false)` instead of `assert("string" == NULL)`.

This avoid errors like

[...]\Core\SourceManager.cpp(647): warning C4130: '==' : logical operation 
on address of string constant

Reviewers: zturner

Subscribers: lldb-commits

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

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

Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=246123&r1=246122&r2=246123&view=diff
==
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Wed Aug 26 18:55:14 2015
@@ -644,14 +644,14 @@ SourceManager::File::CalculateLineOffset
 else
 {
 // Some lines have been populated, start where we last left off
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 
 }
 else
 {
 // Calculate all line offsets up to "line"
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 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] D12388: Silence some MSVC warnings.

2015-08-26 Thread Stephane Sezer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246123: Silence some MSVC warnings. (authored by sas).

Changed prior to commit:
  http://reviews.llvm.org/D12388?vs=33275&id=33276#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12388

Files:
  lldb/trunk/source/Core/SourceManager.cpp

Index: lldb/trunk/source/Core/SourceManager.cpp
===
--- lldb/trunk/source/Core/SourceManager.cpp
+++ lldb/trunk/source/Core/SourceManager.cpp
@@ -644,14 +644,14 @@
 else
 {
 // Some lines have been populated, start where we last left off
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 
 }
 else
 {
 // Calculate all line offsets up to "line"
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 return false;
 }


Index: lldb/trunk/source/Core/SourceManager.cpp
===
--- lldb/trunk/source/Core/SourceManager.cpp
+++ lldb/trunk/source/Core/SourceManager.cpp
@@ -644,14 +644,14 @@
 else
 {
 // Some lines have been populated, start where we last left off
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 
 }
 else
 {
 // Calculate all line offsets up to "line"
-assert("Not implemented yet" == NULL);
+assert("Not implemented yet" && false);
 }
 return false;
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246130 - Switch data formatters over to using std::function for their callbacks instead of raw function pointers. NFC

2015-08-26 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 26 19:45:33 2015
New Revision: 246130

URL: http://llvm.org/viewvc/llvm-project?rev=246130&view=rev
Log:
Switch data formatters over to using std::function for their callbacks instead 
of raw function pointers. NFC

Modified:
lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
lldb/trunk/include/lldb/DataFormatters/TypeValidator.h
lldb/trunk/source/API/SBTypeSummary.cpp
lldb/trunk/source/DataFormatters/TypeSummary.cpp
lldb/trunk/source/DataFormatters/TypeSynthetic.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h?rev=246130&r1=246129&r2=246130&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Wed Aug 26 
19:45:33 2015
@@ -12,6 +12,7 @@
 
 // C Includes
 // C++ Includes
+#include 
 
 // Other libraries and framework includes
 #include "clang/AST/DeclCXX.h"
@@ -92,7 +93,7 @@ public:
 typedef typename ValueType::SharedPointer ValueSP;
 typedef std::map MapType;
 typedef typename MapType::iterator MapIterator;
-typedef bool(*CallbackType)(void*, KeyType, const ValueSP&);
+typedef std::function CallbackType;
 
 FormatMap(IFormatChangeListener* lst) :
 m_map(),

Modified: lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeFormat.h?rev=246130&r1=246129&r2=246130&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeFormat.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeFormat.h Wed Aug 26 19:45:33 2015
@@ -13,6 +13,7 @@
 // C Includes
 
 // C++ Includes
+#include 
 #include 
 #include 
 
@@ -150,7 +151,7 @@ namespace lldb_private {
 TypeFormatImpl (const Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef bool(*ValueCallback)(void*, ConstString, const 
lldb::TypeFormatImplSP&);
+typedef std::function ValueCallback;
 
 virtual ~TypeFormatImpl ();
 
@@ -258,7 +259,7 @@ namespace lldb_private {
const TypeFormatImpl::Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef bool(*ValueCallback)(void*, ConstString, const 
TypeFormatImpl_Format::SharedPointer&);
+typedef std::function ValueCallback;
 
 ~TypeFormatImpl_Format() override;
 
@@ -301,7 +302,7 @@ namespace lldb_private {
  const TypeFormatImpl::Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef bool(*ValueCallback)(void*, ConstString, const 
TypeFormatImpl_EnumType::SharedPointer&);
+typedef std::function ValueCallback;
 
 ~TypeFormatImpl_EnumType() override;
 

Modified: lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSummary.h?rev=246130&r1=246129&r2=246130&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeSummary.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSummary.h Wed Aug 26 19:45:33 
2015
@@ -14,6 +14,7 @@
 #include 
 
 // C++ Includes
+#include 
 #include 
 #include 
 
@@ -409,8 +410,8 @@ namespace lldb_private {
 }
 
 typedef std::shared_ptr SharedPointer;
-typedef bool(*SummaryCallback)(void*, ConstString, const 
lldb::TypeSummaryImplSP&);
-typedef bool(*RegexSummaryCallback)(void*, lldb::RegularExpressionSP, 
const lldb::TypeSummaryImplSP&);
+typedef std::function SummaryCallback;
+typedef std::function RegexSummaryCallback;
 
 protected:
 uint32_t m_my_revision;
@@ -472,9 +473,9 @@ namespace lldb_private {
 {
 // we should convert these to SBValue and SBStream if we ever cross
 // the boundary towards the external world
-typedef bool (*Callback)(ValueObject&,
- Stream&,
- const TypeSummaryOptions&);
+typedef std::function Callback;
 
 Callback m_impl;
 std::string m_description;

Modified: lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h?rev=246130&r1=246129&r2=246130&view=diff
==

[Lldb-commits] [lldb] r246131 - Add functionality to the platforms to figure out the proper name for a dynamic library on the system given a basename

2015-08-26 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 26 19:53:57 2015
New Revision: 246131

URL: http://llvm.org/viewvc/llvm-project?rev=246131&view=rev
Log:
Add functionality to the platforms to figure out the proper name for a dynamic 
library on the system given a basename
This will do things like,
given mylibrary,
return

libmylibrary.dylib on OSX
mylibrary.dll on Windows

and so on for other platforms
It is currently implemented for Windows, Darwin, and Linux. Other platforms 
should fill in accordingly


Modified:
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
lldb/trunk/source/Target/Platform.cpp

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=246131&r1=246130&r2=246131&view=diff
==
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Wed Aug 26 19:53:57 2015
@@ -268,6 +268,9 @@ class ModuleCache;
 
 virtual const char *
 GetHostname ();
+
+virtual ConstString
+GetFullNameForDylib (ConstString basename);
 
 virtual const char *
 GetDescription () = 0;

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=246131&r1=246130&r2=246131&view=diff
==
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Wed Aug 26 
19:53:57 2015
@@ -854,3 +854,14 @@ PlatformLinux::ConvertMmapFlagsToPlatfor
 flags_platform |= map_anon;
 return flags_platform;
 }
+
+ConstString
+PlatformLinux::GetFullNameForDylib (ConstString basename)
+{
+if (basename.IsEmpty())
+return basename;
+
+StreamString stream;
+stream.Printf("lib%s.so", basename.GetCString());
+return ConstString(stream.GetData());
+}

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h?rev=246131&r1=246130&r2=246131&view=diff
==
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h Wed Aug 26 
19:53:57 2015
@@ -111,6 +111,9 @@ namespace platform_linux {
 uint64_t
 ConvertMmapFlagsToPlatform(const ArchSpec &arch, unsigned flags) 
override;
 
+ConstString
+GetFullNameForDylib (ConstString basename) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN (PlatformLinux);
 };

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=246131&r1=246130&r2=246131&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Wed Aug 26 
19:53:57 2015
@@ -1531,3 +1531,15 @@ PlatformDarwin::AddClangModuleCompilatio
 options.push_back(sysroot_spec.GetPath());
 }
 }
+
+ConstString
+PlatformDarwin::GetFullNameForDylib (ConstString basename)
+{
+if (basename.IsEmpty())
+return basename;
+
+StreamString stream;
+stream.Printf("lib%s.dylib", basename.GetCString());
+return ConstString(stream.GetData());
+}
+

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=246131&r1=246130&r2=246131&view=diff
==
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Wed Aug 26 
19:53:57 2015
@@ -84,6 +84,9 @@ public:
 
 bool
 SupportsModules () override { return true; }
+
+lldb_private::ConstString
+GetFullNameForDylib (lldb_private::ConstString basename) override;
 
 protected:
 

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=246131&r1=246130&r2=246131&view=diff
=

[Lldb-commits] [PATCH] D12396: Fix lldb build on older OSX versions after svn commit r244716

2015-08-26 Thread Dawn Perchik via lldb-commits
dawn created this revision.
dawn added a reviewer: jasonmolenda.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.

Older OSX versions don't define NSOperatingSystemVersion, so building lldb gets:
../tools/lldb/tools/debugserver/source/MacOSX/MachProcess.mm:2032:5: error: 
unknown type name 'NSOperatingSystemVersion'
NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] 
operatingSystemVersion];
^
This patch fixes the build by having GetOSVersionNumbers return false if 
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000, causing lldb to behave 
the same as it did before this patch.

Repository:
  rL LLVM

http://reviews.llvm.org/D12396

Files:
  tools/debugserver/source/MacOSX/MachProcess.mm

Index: tools/debugserver/source/MacOSX/MachProcess.mm
===
--- tools/debugserver/source/MacOSX/MachProcess.mm
+++ tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
 {
 bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] 
operatingSystemVersion];
@@ -2040,6 +2041,7 @@
 success = true;
 
 [pool drain];
+#endif
 
 return success;
 }


Index: tools/debugserver/source/MacOSX/MachProcess.mm
===
--- tools/debugserver/source/MacOSX/MachProcess.mm
+++ tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
 {
 bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] operatingSystemVersion];
@@ -2040,6 +2041,7 @@
 success = true;
 
 [pool drain];
+#endif
 
 return success;
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12396: Fix lldb build on older OSX versions after svn commit r244716

2015-08-26 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, thanks, I wasn't sure about whether this API would be available on 
older releases.


Repository:
  rL LLVM

http://reviews.llvm.org/D12396



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


[Lldb-commits] [lldb] r246138 - Fix lldb build on older OSX versions after svn commit r244716

2015-08-26 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Wed Aug 26 22:42:56 2015
New Revision: 246138

URL: http://llvm.org/viewvc/llvm-project?rev=246138&view=rev
Log:
Fix lldb build on older OSX versions after svn commit r244716

Older OSX versions don't define NSOperatingSystemVersion, so building
lldb gets: error: unknown type name 'NSOperatingSystemVersion'
This patch fixes the build by having GetOSVersionNumbers return false if
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000, causing lldb to
behave the same as it did before the commit.

Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12396

Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=246138&r1=246137&r2=246138&view=diff
==
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Wed Aug 26 
22:42:56 2015
@@ -2027,6 +2027,7 @@ MachProcess::GetOSVersionNumbers (uint64
 {
 bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] 
operatingSystemVersion];
@@ -2040,6 +2041,7 @@ MachProcess::GetOSVersionNumbers (uint64
 success = true;
 
 [pool drain];
+#endif
 
 return success;
 }


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


Re: [Lldb-commits] [PATCH] D12396: Fix lldb build on older OSX versions after svn commit r244716

2015-08-26 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246138: Fix lldb build on older OSX versions after svn 
commit r244716 (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D12396?vs=33294&id=33297#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12396

Files:
  lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm

Index: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
 {
 bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] 
operatingSystemVersion];
@@ -2040,6 +2041,7 @@
 success = true;
 
 [pool drain];
+#endif
 
 return success;
 }


Index: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
===
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2027,6 +2027,7 @@
 {
 bool success = false;
 
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
 NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] operatingSystemVersion];
@@ -2040,6 +2041,7 @@
 success = true;
 
 [pool drain];
+#endif
 
 return success;
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL245090: Move all clang type system DWARF type parsing into ClangASTContext.cpp.

2015-08-26 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: lldb-commits.

http://reviews.llvm.org/rL245090



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


Re: [Lldb-commits] [Diffusion] rL245090: Move all clang type system DWARF type parsing into ClangASTContext.cpp.

2015-08-26 Thread Dawn Perchik via lldb-commits
dawn added a subscriber: dawn.
dawn added a comment.

Hi Greg,

While I really appreciate that you're making lldb less Clang specific (e.g. 
renaming ClangASTType to CompilerType), I'm concerned about this commit because 
it moves DWARF knowledge from the SymbolFileDWARF plugin into 
ClangASTContext.cpp, making it impossible to support other debug formats as 
plugins.

I realize some DWARF had leaked outside of the DWARF plugin before this commit 
(like the enums for language and calling convention), but those could easily be 
converted to/from other debug formats.  This new code really requires that the 
debug info be DWARF.

Am I missing something?
Thanks in advance, -Dawn


http://reviews.llvm.org/rL245090



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


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

2015-08-26 Thread Jaydeep Patil via lldb-commits
jaydeep updated this revision to Diff 33301.
jaydeep added a comment.

Addressed review comments.
Address conversions are handled in Address class. This is a reduced version of 
the original patch where address conversions are handled for breakpoints only.


Repository:
  rL LLVM

http://reviews.llvm.org/D12079

Files:
  include/lldb/Core/Address.h
  include/lldb/Symbol/Function.h
  source/Breakpoint/BreakpointResolver.cpp
  source/Breakpoint/BreakpointResolverName.cpp
  source/Core/Address.cpp
  source/Core/AddressResolverName.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Symbol/Function.cpp
  source/Symbol/SymbolContext.cpp
  source/Target/RegisterContext.cpp
  source/Target/Target.cpp
  source/Target/ThreadPlanStepInRange.cpp

Index: source/Target/ThreadPlanStepInRange.cpp
===
--- source/Target/ThreadPlanStepInRange.cpp
+++ source/Target/ThreadPlanStepInRange.cpp
@@ -283,7 +283,7 @@
 {
 func_start_address = sc.function->GetAddressRange().GetBaseAddress();
 if (curr_addr == func_start_address.GetLoadAddress(m_thread.CalculateTarget().get()))
-bytes_to_skip = sc.function->GetPrologueByteSize();
+bytes_to_skip = sc.function->GetPrologueByteSize(m_thread.CalculateTarget().get());
 }
 else if (sc.symbol)
 {
Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -2065,6 +2065,31 @@
 addr_t code_addr = load_addr;
 switch (m_arch.GetMachine())
 {
+case llvm::Triple::mips:
+case llvm::Triple::mipsel:
+case llvm::Triple::mips64:
+case llvm::Triple::mips64el:
+switch (addr_class)
+{
+case eAddressClassData:
+case eAddressClassDebug:
+return LLDB_INVALID_ADDRESS;
+
+case eAddressClassUnknown:
+case eAddressClassInvalid:
+case eAddressClassCode:
+case eAddressClassRuntime:
+case eAddressClassCodeAlternateISA:
+{
+uint32_t arch_flags = m_arch.GetFlags ();
+if ((arch_flags & ArchSpec::eMIPSAse_micromips) ||
+(arch_flags & ArchSpec::eMIPSAse_mips16))
+code_addr |= 1ull;
+break;
+}
+}
+break;
+
 case llvm::Triple::arm:
 case llvm::Triple::thumb:
 switch (addr_class)
@@ -2110,6 +2135,10 @@
 addr_t opcode_addr = load_addr;
 switch (m_arch.GetMachine())
 {
+case llvm::Triple::mips:
+case llvm::Triple::mipsel:
+case llvm::Triple::mips64:
+case llvm::Triple::mips64el:
 case llvm::Triple::arm:
 case llvm::Triple::thumb:
 switch (addr_class)
Index: source/Target/RegisterContext.cpp
===
--- source/Target/RegisterContext.cpp
+++ source/Target/RegisterContext.cpp
@@ -103,7 +103,17 @@
 RegisterContext::GetPC(uint64_t fail_value)
 {
 uint32_t reg = ConvertRegisterKindToRegisterNumber (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-return ReadRegisterAsUnsigned (reg, fail_value);
+uint64_t pc = ReadRegisterAsUnsigned (reg, fail_value);
+
+if (pc != fail_value)
+{
+TargetSP target_sp = m_thread.CalculateTarget();
+Target *target = target_sp.get();
+Address addr (pc);
+pc = addr.GetOpcodeLoadAddress (target);
+}
+
+return pc;
 }
 
 bool
Index: source/Symbol/SymbolContext.cpp
===
--- source/Symbol/SymbolContext.cpp
+++ source/Symbol/SymbolContext.cpp
@@ -23,6 +23,7 @@
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Variable.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Target/ExecutionContext.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -173,7 +174,14 @@
 
 if (addr.IsValid())
 {
-const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetOffset();
+Target *target = nullptr;
+if (exe_scope)
+{
+ExecutionContext exe_ctx;
+exe_scope->CalculateExecutionContext (exe_ctx);
+target = Target::GetTargetFromContexts (&exe_ctx, this);
+}
+const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetCallableFileAddress(target).GetOffset();
 if (show_function_name == false)
 {
 // Print +offset even if offset is 0
Index: source/Symbol/Function.cpp
===
--- source/Symbol/Function.cpp
+++ source/Symbol/Function.cpp
@@ -555,7 +555,7 @@
 }
 
 uint32_t
-Function::GetPrologueByteSize ()
+