[Lldb-commits] [lldb] r273546 - Test commit to verify access, fix typo.
Author: hhellyer Date: Thu Jun 23 03:31:22 2016 New Revision: 273546 URL: http://llvm.org/viewvc/llvm-project?rev=273546&view=rev Log: Test commit to verify access, fix typo. Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h?rev=273546&r1=273545&r2=273546&view=diff == --- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h (original) +++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h Thu Jun 23 03:31:22 2016 @@ -134,7 +134,7 @@ private: /// /// If a core file contains both a kernel binary and a user-process /// dynamic loader, lldb needs to pick one over the other. This could -/// be a kernel corefile that happens to have a coyp of dyld in its +/// be a kernel corefile that happens to have a copy of dyld in its /// memory. Or it could be a user process coredump of lldb while doing /// kernel debugging - so a copy of the kernel is in its heap. This /// should become a setting so it can be over-ridden when necessary. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273547 - Add MemoryRegionInfo to SB API
Author: hhellyer Date: Thu Jun 23 03:35:37 2016 New Revision: 273547 URL: http://llvm.org/viewvc/llvm-project?rev=273547&view=rev Log: Add MemoryRegionInfo to SB API Summary: This adds new SB API calls and classes to allow a user of the SB API to obtain a full list of memory regions accessible within the process. Adding this to the API makes it possible use the API for tasks like scanning memory for blocks allocated with a header and footer to track down memory leaks, otherwise just inspecting every address is impractical especially for 64 bit processes. These changes only add the API itself and a base implementation of GetMemoryRegions() to lldb_private::Process::GetMemoryRegions. I will submit separate patches to fill in lldb_private::Process::GetMemoryRegionInfoList and GetMemoryRegionInfo for individual platforms. The original discussion about this is here: http://lists.llvm.org/pipermail/lldb-dev/2016-May/010203.html Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20565 Added: lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h lldb/trunk/include/lldb/API/SBMemoryRegionInfoList.h lldb/trunk/source/API/SBMemoryRegionInfo.cpp lldb/trunk/source/API/SBMemoryRegionInfoList.cpp Modified: lldb/trunk/include/lldb/API/LLDB.h lldb/trunk/include/lldb/API/SBDefines.h lldb/trunk/include/lldb/API/SBProcess.h lldb/trunk/include/lldb/API/SBStream.h lldb/trunk/include/lldb/Target/MemoryRegionInfo.h lldb/trunk/include/lldb/Target/Process.h lldb/trunk/include/lldb/lldb-forward.h lldb/trunk/source/API/CMakeLists.txt lldb/trunk/source/API/SBProcess.cpp Modified: lldb/trunk/include/lldb/API/LLDB.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=273547&r1=273546&r2=273547&view=diff == --- lldb/trunk/include/lldb/API/LLDB.h (original) +++ lldb/trunk/include/lldb/API/LLDB.h Thu Jun 23 03:35:37 2016 @@ -43,6 +43,8 @@ #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBListener.h" +#include "lldb/API/SBMemoryRegionInfo.h" +#include "lldb/API/SBMemoryRegionInfoList.h" #include "lldb/API/SBModule.h" #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBPlatform.h" Modified: lldb/trunk/include/lldb/API/SBDefines.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=273547&r1=273546&r2=273547&view=diff == --- lldb/trunk/include/lldb/API/SBDefines.h (original) +++ lldb/trunk/include/lldb/API/SBDefines.h Thu Jun 23 03:35:37 2016 @@ -59,6 +59,8 @@ class LLDB_API SBLanguageRuntime; class LLDB_API SBLaunchInfo; class LLDB_API SBLineEntry; class LLDB_API SBListener; +class LLDB_API SBMemoryRegionInfo; +class LLDB_API SBMemoryRegionInfoList; class LLDB_API SBModule; class LLDB_API SBModuleSpec; class LLDB_API SBModuleSpecList; Added: lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h?rev=273547&view=auto == --- lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h (added) +++ lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h Thu Jun 23 03:35:37 2016 @@ -0,0 +1,107 @@ +//===-- SBMemoryRegionInfo.h *- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef LLDB_SBMemoryRegionInfo_h_ +#define LLDB_SBMemoryRegionInfo_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBData.h" + +namespace lldb { + +class LLDB_API SBMemoryRegionInfo +{ +public: + +SBMemoryRegionInfo (); + +SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs); + +~SBMemoryRegionInfo (); + +const lldb::SBMemoryRegionInfo & +operator = (const lldb::SBMemoryRegionInfo &rhs); + +void +Clear(); + +//-- +/// Get the base address of this memory range. +/// +/// @return +/// The base address of this memory range. +//-- +lldb::addr_t +GetRegionBase (); + +//-- +/// Get the end address of this memory range. +/// +/// @return +/// The base address of this memory range. +//-- +lldb::addr_t +GetRegionEnd (); + +//-- +/// Check if this memory address is marked
Re: [Lldb-commits] [PATCH] D20565: Add MemoryRegionInfo to SB API
This revision was automatically updated to reflect the committed changes. Closed by commit rL273547: Add MemoryRegionInfo to SB API (authored by hhellyer). Changed prior to commit: http://reviews.llvm.org/D20565?vs=61253&id=61648#toc Repository: rL LLVM http://reviews.llvm.org/D20565 Files: lldb/trunk/include/lldb/API/LLDB.h lldb/trunk/include/lldb/API/SBDefines.h lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h lldb/trunk/include/lldb/API/SBMemoryRegionInfoList.h lldb/trunk/include/lldb/API/SBProcess.h lldb/trunk/include/lldb/API/SBStream.h lldb/trunk/include/lldb/Target/MemoryRegionInfo.h lldb/trunk/include/lldb/Target/Process.h lldb/trunk/include/lldb/lldb-forward.h lldb/trunk/source/API/CMakeLists.txt lldb/trunk/source/API/SBMemoryRegionInfo.cpp lldb/trunk/source/API/SBMemoryRegionInfoList.cpp lldb/trunk/source/API/SBProcess.cpp Index: lldb/trunk/include/lldb/API/LLDB.h === --- lldb/trunk/include/lldb/API/LLDB.h +++ lldb/trunk/include/lldb/API/LLDB.h @@ -43,6 +43,8 @@ #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBListener.h" +#include "lldb/API/SBMemoryRegionInfo.h" +#include "lldb/API/SBMemoryRegionInfoList.h" #include "lldb/API/SBModule.h" #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBPlatform.h" Index: lldb/trunk/include/lldb/API/SBProcess.h === --- lldb/trunk/include/lldb/API/SBProcess.h +++ lldb/trunk/include/lldb/API/SBProcess.h @@ -393,6 +393,34 @@ lldb::SBError SaveCore(const char *file_name); +//-- +/// Query the address load_addr and store the details of the memory +/// region that contains it in the supplied SBMemoryRegionInfo object. +/// To iterate over all memory regions use GetMemoryRegionList. +/// +/// @param[in] load_addr +/// The address to be queried. +/// +/// @param[out] region_info +/// A reference to an SBMemoryRegionInfo object that will contain +/// the details of the memory region containing load_addr. +/// +/// @return +/// An error object describes any errors that occurred while +/// querying load_addr. +//-- +lldb::SBError +GetMemoryRegionInfo (lldb::addr_t load_addr, lldb::SBMemoryRegionInfo ®ion_info); + +//-- +/// Return the list of memory regions within the process. +/// +/// @return +/// A list of all witin the process memory regions. +//-- +lldb::SBMemoryRegionInfoList +GetMemoryRegions(); + protected: friend class SBAddress; friend class SBBreakpoint; Index: lldb/trunk/include/lldb/API/SBDefines.h === --- lldb/trunk/include/lldb/API/SBDefines.h +++ lldb/trunk/include/lldb/API/SBDefines.h @@ -59,6 +59,8 @@ class LLDB_API SBLaunchInfo; class LLDB_API SBLineEntry; class LLDB_API SBListener; +class LLDB_API SBMemoryRegionInfo; +class LLDB_API SBMemoryRegionInfoList; class LLDB_API SBModule; class LLDB_API SBModuleSpec; class LLDB_API SBModuleSpecList; Index: lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h === --- lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h +++ lldb/trunk/include/lldb/API/SBMemoryRegionInfo.h @@ -0,0 +1,107 @@ +//===-- SBMemoryRegionInfo.h *- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef LLDB_SBMemoryRegionInfo_h_ +#define LLDB_SBMemoryRegionInfo_h_ + +#include "lldb/API/SBDefines.h" +#include "lldb/API/SBData.h" + +namespace lldb { + +class LLDB_API SBMemoryRegionInfo +{ +public: + +SBMemoryRegionInfo (); + +SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs); + +~SBMemoryRegionInfo (); + +const lldb::SBMemoryRegionInfo & +operator = (const lldb::SBMemoryRegionInfo &rhs); + +void +Clear(); + +//-- +/// Get the base address of this memory range. +/// +/// @return +/// The base address of this memory range. +//-- +lldb::addr_t +GetRegionBase (); + +//-- +/// Get the end address of this memory range. +/// +/// @return +/// The base address of th
Re: [Lldb-commits] [PATCH] D21064: [LLDB][MIPS] Fix Emulation of Compact branch and ADDIU instructions
sdardis added a comment. You also need to emulate dsubu and subu as the MIPS LLVM backend will generate them in certain cases. Repository: rL LLVM http://reviews.llvm.org/D21064 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21064: [LLDB][MIPS] Fix Emulation of Compact branch and ADDIU instructions
nitesh.jain added a comment. In http://reviews.llvm.org/D21064#465410, @sdardis wrote: > You also need to emulate dsubu and subu as the MIPS LLVM backend will > generate them in certain cases. Thanks will emulate them too. Repository: rL LLVM http://reviews.llvm.org/D21064 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21221: Fix for PrintStackTraces
ravitheja updated this revision to Diff 61668. ravitheja added a comment. Adding testcase http://reviews.llvm.org/D21221 Files: packages/Python/lldbsuite/test/functionalities/unwind/nonabi/ packages/Python/lldbsuite/test/functionalities/unwind/nonabi/Makefile packages/Python/lldbsuite/test/functionalities/unwind/nonabi/TestNonABIFuncUnwind.py packages/Python/lldbsuite/test/functionalities/unwind/nonabi/main.c source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h source/Plugins/Process/Utility/RegisterContextLLDB.cpp Index: source/Plugins/Process/Utility/RegisterContextLLDB.cpp === --- source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -210,12 +210,28 @@ m_frame_type = eNormalFrame; } +// We've set m_frame_type and m_sym_ctx before these calls. + +m_fast_unwind_plan_sp = GetFastUnwindPlanForFrame (); +m_full_unwind_plan_sp = GetFullUnwindPlanForFrame (); + // If we were able to find a symbol/function, set addr_range to the bounds of that symbol/function. // else treat the current pc value as the start_pc and record no offset. if (addr_range.GetBaseAddress().IsValid()) { m_start_pc = addr_range.GetBaseAddress(); -if (m_current_pc.GetSection() == m_start_pc.GetSection()) +if (m_sym_ctx.symbol != nullptr && m_sym_ctx.symbol->IsSynthetic()) +{ +// The current offset should be recalculated here. The m_current_offset is +// calculated from the base address of the symbol. The symbol can lie in the PLT +// (Procedure Linkage Table) i.e its a symbol stub for external call. In this case +// the base address for the unwindplan and the base address of the symbol maybe different, hence +// the m_current_offset will be wrong. +AddressRange unwind_address_range = m_full_unwind_plan_sp->GetAddressRange(); +if (unwind_address_range.ContainsFileAddress(m_current_pc)) +m_current_offset = m_current_pc.GetOffset() - unwind_address_range.GetBaseAddress().GetOffset(); +} +else if (m_current_pc.GetSection() == m_start_pc.GetSection()) { m_current_offset = m_current_pc.GetOffset() - m_start_pc.GetOffset(); } @@ -236,11 +252,6 @@ m_current_offset_backed_up_one = -1; } -// We've set m_frame_type and m_sym_ctx before these calls. - -m_fast_unwind_plan_sp = GetFastUnwindPlanForFrame (); -m_full_unwind_plan_sp = GetFullUnwindPlanForFrame (); - UnwindPlan::RowSP active_row; lldb::RegisterKind row_register_kind = eRegisterKindGeneric; if (m_full_unwind_plan_sp && m_full_unwind_plan_sp->PlanValidAtAddress (m_current_pc)) @@ -255,36 +266,14 @@ } } -if (!active_row.get()) -{ -UnwindLogMsg ("could not find an unwindplan row for this frame's pc"); -m_frame_type = eNotAValidFrame; -return; -} - - if (!ReadCFAValueForRow (row_register_kind, active_row, m_cfa)) { // Try the fall back unwind plan since the // full unwind plan failed. -FuncUnwindersSP func_unwinders_sp; -UnwindPlanSP call_site_unwind_plan; bool cfa_status = false; +if (TryFallbackUnwindPlan()) +cfa_status = true; -if (m_sym_ctx_valid) -{ -func_unwinders_sp = pc_module_sp->GetObjectFile()->GetUnwindTable().GetFuncUnwindersContainingAddress (m_current_pc, m_sym_ctx); -} - -if(func_unwinders_sp.get() != nullptr) -call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one); - -if (call_site_unwind_plan.get() != nullptr) -{ -m_fallback_unwind_plan_sp = call_site_unwind_plan; -if(TryFallbackUnwindPlan()) -cfa_status = true; -} if (!cfa_status) { UnwindLogMsg ("could not read CFA value for first frame."); @@ -881,6 +870,8 @@ // call GetUnwindPlanAtCallSite() -- because CallSite may return an unwind plan sourced from // either eh_frame (that's what we intend) or compact unwind (this won't work) unwind_plan_sp = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); +m_fallback_unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtNonCallSite (process->GetTarget(), m_thread, m_current_offset_backed_up_one); + if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress (m_current_pc)) { UnwindLogMsgVerbose ("frame uses %s for full UnwindPlan because the DynamicLoader suggested we prefer it", @@ -1608,8 +1599,8 @@ // If a compiler generated unwind plan failed, tryi
[Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci created this revision. fjricci added reviewers: clayborg, tfiala, zturner. fjricci added subscribers: lldb-commits, sas. When running the test suite in platform mode, this test would use 'platform select host', which would cause the rest of the suite to stop running in platform mode. Instead, use 'platform select' to select the remote platform, if it exists. http://reviews.llvm.org/D21648 Files: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -39,5 +39,9 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +self.runCmd('platform select %s' % lldb.remote_platform.GetName()) +else: +self.runCmd("platform select host") Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -39,5 +39,9 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +self.runCmd('platform select %s' % lldb.remote_platform.GetName()) +else: +self.runCmd("platform select host") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
fjricci created this revision. fjricci added reviewers: clayborg, jingham, vharron. fjricci added subscribers: sas, lldb-commits. When using 'platform select', re-use an existing platform which matches the remote platform specs, rather than creating a new one. Without this patch, repeating the following sequence of commands will generate a large number of platforms which are unused (and inaccessible): platform select remote-linux platform connect platform select host platform select remote-linux http://reviews.llvm.org/D21649 Files: source/Commands/CommandObjectPlatform.cpp Index: source/Commands/CommandObjectPlatform.cpp === --- source/Commands/CommandObjectPlatform.cpp +++ source/Commands/CommandObjectPlatform.cpp @@ -237,20 +237,41 @@ { const bool select = true; m_platform_options.SetPlatformName (platform_name); -Error error; -ArchSpec platform_arch; -PlatformSP platform_sp (m_platform_options.CreatePlatformWithOptions (m_interpreter, ArchSpec(), select, error, platform_arch)); -if (platform_sp) + +bool found = false; +PlatformList &list = m_interpreter.GetDebugger().GetPlatformList(); +for (size_t i = 0; i < list.GetSize(); ++i) { - m_interpreter.GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp); +PlatformSP platform_sp = list.GetAtIndex(i); +if (m_platform_options.PlatformMatches(platform_sp)) +{ +list.SetSelectedPlatform(platform_sp); -platform_sp->GetStatus (result.GetOutputStream()); -result.SetStatus (eReturnStatusSuccessFinishResult); +platform_sp->GetStatus (result.GetOutputStream()); +result.SetStatus (eReturnStatusSuccessFinishResult); + +found = true; +break; +} } -else + +if (!found) { -result.AppendError(error.AsCString()); -result.SetStatus (eReturnStatusFailed); +Error error; +ArchSpec platform_arch; +PlatformSP platform_sp (m_platform_options.CreatePlatformWithOptions (m_interpreter, ArchSpec(), select, error, platform_arch)); +if (platform_sp) +{ +list.SetSelectedPlatform(platform_sp); + +platform_sp->GetStatus (result.GetOutputStream()); +result.SetStatus (eReturnStatusSuccessFinishResult); +} +else +{ +result.AppendError(error.AsCString()); +result.SetStatus (eReturnStatusFailed); +} } } else Index: source/Commands/CommandObjectPlatform.cpp === --- source/Commands/CommandObjectPlatform.cpp +++ source/Commands/CommandObjectPlatform.cpp @@ -237,20 +237,41 @@ { const bool select = true; m_platform_options.SetPlatformName (platform_name); -Error error; -ArchSpec platform_arch; -PlatformSP platform_sp (m_platform_options.CreatePlatformWithOptions (m_interpreter, ArchSpec(), select, error, platform_arch)); -if (platform_sp) + +bool found = false; +PlatformList &list = m_interpreter.GetDebugger().GetPlatformList(); +for (size_t i = 0; i < list.GetSize(); ++i) { -m_interpreter.GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp); +PlatformSP platform_sp = list.GetAtIndex(i); +if (m_platform_options.PlatformMatches(platform_sp)) +{ +list.SetSelectedPlatform(platform_sp); -platform_sp->GetStatus (result.GetOutputStream()); -result.SetStatus (eReturnStatusSuccessFinishResult); +platform_sp->GetStatus (result.GetOutputStream()); +result.SetStatus (eReturnStatusSuccessFinishResult); + +found = true; +break; +} } -else + +if (!found) { -result.AppendError(error.AsCString()); -result.SetStatus (eReturnStatusFailed); +Error error; +ArchSpec platform_arch; +PlatformSP p
[Lldb-commits] [lldb] r273582 - fix Xcode build for r273547
Author: tfiala Date: Thu Jun 23 11:54:39 2016 New Revision: 273582 URL: http://llvm.org/viewvc/llvm-project?rev=273582&view=rev Log: fix Xcode build for r273547 Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=273582&r1=273581&r2=273582&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Jun 23 11:54:39 2016 @@ -84,6 +84,8 @@ 239504E51BDD454B00963CEA /* UriParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9461BDD346100BA9A93 /* UriParserTest.cpp */; }; 23D4007D1C2101F2000C3885 /* DWARFDebugMacro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */; }; 23D4007E1C210201000C3885 /* DebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */; }; + 23DCEA461D1C4D0F00A602B4 /* SBMemoryRegionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */; }; + 23DCEA471D1C4D0F00A602B4 /* SBMemoryRegionInfoList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */; }; 23DDF226196C3EE600BB8417 /* CommandOptionValidators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */; }; 23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */ = {isa = PBXBuildFile; fileRef = 23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23EFE38B193D1AEC00E54E54 /* SBTypeEnumMember.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */; }; @@ -1209,6 +1211,8 @@ 23AB0530199FF639003B8084 /* ProcessFreeBSD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessFreeBSD.h; sourceTree = ""; }; 23AB0531199FF639003B8084 /* ProcessMonitor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMonitor.cpp; sourceTree = ""; }; 23AB0532199FF639003B8084 /* ProcessMonitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessMonitor.h; sourceTree = ""; }; + 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfo.cpp; path = source/API/SBMemoryRegionInfo.cpp; sourceTree = ""; }; + 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfoList.cpp; path = source/API/SBMemoryRegionInfoList.cpp; sourceTree = ""; }; 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandOptionValidators.cpp; path = source/Interpreter/CommandOptionValidators.cpp; sourceTree = ""; }; 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugMacro.cpp; sourceTree = ""; }; 23E77CD71C20F29F007192AD /* DWARFDebugMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugMacro.h; sourceTree = ""; }; @@ -3598,6 +3602,8 @@ 26DE20621161904200A093E2 /* SBLineEntry.cpp */, 9A9831021125FC5800A56CB0 /* SBListener.h */, 9A9831011125FC5800A56CB0 /* SBListener.cpp */, + 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */, + 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */, 26DE204E11618E9800A093E2 /* SBModule.h */, 26DE204C11618E7A00A093E2 /* SBModule.cpp */, 263C4939178B50CF0070F12D /* SBModuleSpec.h */, @@ -6518,6 +6524,7 @@ 2668032D116005E3008E1FE4 /* SBFileSpec.cpp in Sources */, 2668032E116005E5008E1FE4 /* SBEvent.cpp in Sources */, 2668032F116005E6008E1FE4 /* SBError.cpp in Sources */, + 23DCEA461D1C4D0F00A602B4 /* SBMemoryRegionInfo.cpp in Sources */, 26680330116005E7008E1FE4 /* SBDebugger.cpp in Sources */, 26680331116005E9008E1FE4 /* SBCommunication.cpp in S
Re: [Lldb-commits] [PATCH] D20357: [LLDB][MIPS] Fix FPU Size Based on Dynamic FR/FRE bit
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. So this is close. My idea was that the lldb-server would not just set a key/value pair named "dynamic_size" to "1" in the "qRegisterInfo" or "$qXfer:features:read:target.xml:0,1" XML data, it would add a key value pair: whose name is "dynamic_size_dwarf_expr" whose value is the HEX ASCII bytes encded. So qRegisterInfo would have: dynamic_size_dwarf_expr:112233AABB where "112233AABB" are the bytes for the DWARF expression: llvm::dwarf::DW_OP_regx, sr_reg_num, llvm::dwarf::DW_OP_lit1, llvm::dwarf::DW_OP_lit26, llvm::dwarf::DW_OP_shl, llvm::dwarf::DW_OP_and, llvm::dwarf::DW_OP_regx, config5_reg_num, llvm::dwarf::DW_OP_lit1, llvm::dwarf::DW_OP_lit8, llvm::dwarf::DW_OP_shl, llvm::dwarf::DW_OP_and, llvm::dwarf::DW_OP_lit18, llvm::dwarf::DW_OP_shl, llvm::dwarf::DW_OP_xor The result of the expression should be the byte size for the register, not a zero or 1. This way, any target can hook up to LLDB and provide the needed info and LLDB will just work. With the above solution, you must go and modify LLDB source code. See inlined comments for more details. I really want to get this dynamic register size stuff right so the next target that needs it just works with no modifications to existing code. Thanks for making all the changes. Comment at: include/lldb/lldb-private-types.h:57-58 @@ -56,2 +56,4 @@ // ax, ah, and al. +uint8_t dynamic_size; // if this value is 1 then size of this register is decided at run time. + // Default value is 0 }; We shouldn't have to add this as any register size adjustments can be taken care of in: ``` const RegisterInfo * RegisterContext::GetRegisterInfoAtIndex (uint32_t reg_index) const; ``` Another thing we could do is store the DWARF expression bytes right in the RegisterInfo: ``` const uint8_t *dynamic_size_dwarf_expr_bytes; // A DWARF expression that when evaluated gives the byte size of this register size_t dynamic_size_dwarf_len; // The length of the DWARF expression in bytes in the dynamic_size_dwarf_expr_bytes member ``` Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:495 @@ +494,3 @@ + + if (reg_info->dynamic_size) + { Just check if reg_index is in the FPUs. We shouldn't need to add the dynamic_size to RegisterInfo, or we just check the new "dynamic_size_dwarf_expr_bytes" field in RegisterInfo. Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:497-505 @@ +496,11 @@ + { +bool fre; +bool fr1; +IsFR1_FRE (fr1, fre); + +// fr1 fre fpu_reg_size +// 10 64 +// 11 32 +// 00 32 +reg_info->byte_size = (fr1 ^ fre) ? 8 : 4; + } If we don't add anything to RegisterInfo, then this code is fine. Else we will need to check "reg_info->dynamic_size_dwarf_expr_bytes" and evaluate the DWARF expression to get the size. Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:930-963 @@ -903,1 +929,36 @@ +void +NativeRegisterContextLinux_mips64::IsFR1_FRE (bool& fr1, bool& fre) const +{ +GPR_linux_mips regs; +RegisterValue reg_value; +const RegisterInfoInterface& reg_info_interface = GetRegisterInfoInterface (); +const RegisterInfo* reg_info_sr = reg_info_interface.GetRegisterInfo () + gpr_sr_mips64 ; +const RegisterInfo* reg_info_config5 = reg_info_interface.GetRegisterInfo () + gpr_config5_mips; +lldb_private::ArchSpec arch; +::memset (®s, 0, sizeof(GPR_linux_mips)); + +fre = 0; +if (!(m_thread.GetProcess ()->GetArchitecture (arch))) + assert (false && "Failed to get Architecture."); + +errno = 0; + +// Reading SR/Config5 using PTRACE_PEEKUSER is not supported. So read entire register set +Error error = NativeProcessLinux::PtraceWrapper (PTRACE_GETREGS, m_thread.GetID(), NULL, ®s, sizeof regs); +if (!error.Success()) +assert (false && "Unable to Read Register"); + +void* target_address = ((uint8_t*)®s) + reg_info_sr->byte_offset + 4 * (arch.GetMachine () == llvm::Triple::mips); +reg_value.SetBytes (target_address, 4, arch.GetByteOrder()); +fr1 = reg_value.GetAsUInt32() & SR_FR; + +// FRE is valid only when FR bit is set +if (fr1) +{ +target_address = ((uint8_t*)®s) + reg_info_config5->byte_offset + + 4 * (arch.GetMachine () == llvm::Triple::mips); +reg_value.SetBytes(target_address, 4, arch.GetByteOrder ()); +fre = reg_value.GetAsUInt32() & CONFIG5_FRE; +} +} This whole function goes away if we add "dynamic_size_dwarf_expr_bytes" t
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
fjricci planned changes to this revision. fjricci added a comment. This will fail in the case where the remote-platform server dies, as lldb will not cleanup its data structures. I'll investigate how to make sure the platform is alive before connecting to it. http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
clayborg accepted this revision. clayborg added a comment. Make sure you keep a very close eye on all the buildbots with this one. I agree this change is good, but I seem to remember there were problems when this was done. http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
clayborg requested changes to this revision. clayborg added a comment. Sorry missed your comments about when a platform dies. Also be sure to know that you might not have to connect to a platform for it to be useful. We have ios-simulator platforms that don't require connecting. http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
fjricci added a comment. As I'm poking through the APIs, I found that platform_sp->IsConnected() will return true even if the remote server has been killed since connecting (at least on remote-linux with lldb-server in platform mode). Is this the expected behavior of that set of functions? http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
fjricci added a comment. Although, given your comments about the ios platforms, IsConnected() doesn't seem like the right API to use anyway... http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273604 - Added a new python example which installs a command called "shadow".
Author: gclayton Date: Thu Jun 23 14:54:32 2016 New Revision: 273604 URL: http://llvm.org/viewvc/llvm-project?rev=273604&view=rev Log: Added a new python example which installs a command called "shadow". This shows how to grab individual blocks from stack frames and get only the variables from those blocks. It then will iterate over all of the parent blocks and look for shadowed variables. Added: lldb/trunk/examples/python/shadow.py Added: lldb/trunk/examples/python/shadow.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/shadow.py?rev=273604&view=auto == --- lldb/trunk/examples/python/shadow.py (added) +++ lldb/trunk/examples/python/shadow.py Thu Jun 23 14:54:32 2016 @@ -0,0 +1,59 @@ +#!/usr/bin/python + +import lldb +import shlex + +@lldb.command("shadow") +def check_shadow_command(debugger, command, result, dict): +target = debugger.GetSelectedTarget() +if not target: +print >>result, "invalid target" +return +process = target.GetProcess() +if not process: +print >>result, "invalid process" +return +thread = process.GetSelectedThread() +if not thread: +print >>result, "invalid thread" +return +frame = thread.GetSelectedFrame() +if not frame: +print >>result, "invalid frame" +return +# Parse command line args +command_args = shlex.split(command) +# TODO: add support for using arguments that are passed to this command... + +# Make a dictionary of variable name to "SBBlock and SBValue" +var_dict = {} + +# Get the deepest most block from the current frame +block = frame.GetBlock() +# Iterate through the block and all of its parents +while block.IsValid(): +# Get block variables from the current block only +block_vars = block.GetVariables(frame, True, True, True, 0) +# Iterate through all variables in the current block +for block_var in block_vars: +# Get the variable name and see if we already have a variable by this name? +block_var_name = block_var.GetName() +if block_var_name in var_dict: +# We already have seen a variable with this name, so it is shadowed +shadow_block_and_vars = var_dict[block_var_name] +for shadow_block_and_var in shadow_block_and_vars: +print shadow_block_and_var[0], shadow_block_and_var[1] +print 'is shadowed by:' +print block, block_var +# Since we can have multiple shadowed variables, we our variable +# name dictionary to have an array or "block + variable" pairs so +# We can correctly print out all shadowed variables and whow which +# blocks they come from +if block_var_name in var_dict: +var_dict[block_var_name].append([block, block_var]) +else: +var_dict[block_var_name] = [[block, block_var]] +# Get the parent block and continue +block = block.GetParent() + + ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
fjricci abandoned this revision. fjricci added a comment. I don't think that we can assume that the user always wants to re-use an existing platform, even of the same type. Probably the only way to resolve the problem this tries to fix would be to add a command to display all connected platforms, and an option to "platform select" to choose an existing platform to connect to. But that's outside the scope of this patch, and a bit of a design decision. http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci planned changes to this revision. fjricci added a comment. This fix does not work without something along the lines of http://reviews.llvm.org/D21649, I'll re-upload with a better fix. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci updated this revision to Diff 61717. fjricci added a comment. This revision is now accepted and ready to land. Disconnect from existing platform connection to prevent extra hanging connections This is good practice on all debug servers, and required for debug servers which can't handle more than one simultaneous platform mode connection. http://reviews.llvm.org/D21648 Files: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -23,6 +23,10 @@ @no_debug_info_test def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" +# Don't leave residual open platform connections +if lldb.remote_platform: +lldb.remote_platform.DisconnectRemote() + images = { "hello-freebsd-10.0-x86_64-clang-3.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), "hello-freebsd-10.0-x86_64-gcc-4.7.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), @@ -39,5 +43,11 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +platform_connect_options = lldb.SBPlatformConnectOptions(configuration.lldb_platform_url) +err = lldb.remote_platform.ConnectRemote(platform_connect_options) +self.assertTrue(err.Success()) +else: +self.runCmd("platform select host") Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -23,6 +23,10 @@ @no_debug_info_test def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" +# Don't leave residual open platform connections +if lldb.remote_platform: +lldb.remote_platform.DisconnectRemote() + images = { "hello-freebsd-10.0-x86_64-clang-3.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), "hello-freebsd-10.0-x86_64-gcc-4.7.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), @@ -39,5 +43,11 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +platform_connect_options = lldb.SBPlatformConnectOptions(configuration.lldb_platform_url) +err = lldb.remote_platform.ConnectRemote(platform_connect_options) +self.assertTrue(err.Success()) +else: +self.runCmd("platform select host") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
clayborg added a comment. Platforms are funny because the "ios-simulator" platform doesn't need to be connected for anything since it exists and runs things locally. The platform is there to help us launch our processes so they run as simulator binaries, and also to help locate files and other things. Others like "remote-ios" will need to be connected in order to debug things since they might need to send files over and read files from the remote system for local caching. http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
tfiala added a comment. Hi all, If memory serves me correctly, I originally wrote this test. I don't think it buys us anything to run it against remote targets. I think a better approach here is to just exclude it when running against a remote. We could instead use: @decorator.skipIfRemote http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273622 - Don't run the top-level expression test case with -gmodules.
Author: spyffe Date: Thu Jun 23 17:18:08 2016 New Revision: 273622 URL: http://llvm.org/viewvc/llvm-project?rev=273622&view=rev Log: Don't run the top-level expression test case with -gmodules. Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py?rev=273622&r1=273621&r2=273622&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py Thu Jun 23 17:18:08 2016 @@ -52,7 +52,7 @@ class TopLevelExpressionsTestCase(TestBa @add_test_categories(['pyapi']) @expectedFailureAndroid(api_levels=[21, 22], bugnumber="llvm.org/pr27787") @expectedFailureAll(oslist=["linux"], archs=["arm", "aarch64"], bugnumber="llvm.org/pr27787") -@expectedFailureAll(oslist=["macosx"], debug_info="gmodules", bugnumber="llvm.org/pr27864") +@skipIf(debug_info="gmodules") # not relevant @skipIf(oslist=["windows"]) # Error in record layout on Windows def test_top_level_expressions(self): self.build_and_run() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21649: Don't create unnecessary remote platforms
ted added a subscriber: ted. ted added a comment. The Hexagon platform (currently in-house only) acts like the ios simulator platform, in that it doesn't connect - it fixes up the command line, then launches the Hexagon simulator (based on the debugserver launch code in the gdb-remote process plugin). http://reviews.llvm.org/D21649 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci added a comment. I was wondering that as well. I thought there might be some value to testing that the "disconnect->change platform->reconnect" path worked though. I have no problem disabling if that doesn't seem useful though. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273632 - Handle variadic Objective-C methods from DWARF correctly.
Author: spyffe Date: Thu Jun 23 19:24:40 2016 New Revision: 273632 URL: http://llvm.org/viewvc/llvm-project?rev=273632&view=rev Log: Handle variadic Objective-C methods from DWARF correctly. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=273632&r1=273631&r2=273632&view=diff == --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Jun 23 19:24:40 2016 @@ -1038,7 +1038,8 @@ public: const char *name, // the full symbol name as seen in the symbol table (lldb::opaque_compiler_type_t type, "-[NString stringWithCString:]") const CompilerType &method_compiler_type, lldb::AccessType access, - bool is_artificial); + bool is_artificial, + bool is_variadic); static bool SetHasExternalStorage (lldb::opaque_compiler_type_t type, bool has_extern); Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py?rev=273632&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py Thu Jun 23 19:24:40 2016 @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows]) Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m?rev=273632&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m Thu Jun 23 19:24:40 2016 @@ -0,0 +1,31 @@ +//===-- main.m ---*- Objective-C-*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#import + +@interface VarClass : NSObject +- (id) lottaArgs: (id) first, ...; +@end + +@implementation VarClass +- (id) lottaArgs: (id) first, ... +{ + return first; +} +@end + +int +main() +{ + VarClass *my_var = [[VarClass alloc] init]; + id something = [my_var lottaArgs: @"111", @"222", nil]; + NSLog (@"%@ - %@", my_var, something); //% self.expect("expression -O -- [my_var lottaArgs:@\"111\", @\"222\", nil]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["111"]) + return 0; +} + Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=273632&r1=273631&r2=273632&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Thu Jun 23 19:24:40 2016 @@ -1352,7 +1352,8 @@ DWARFASTParserClang::ParseTypeFromDWARF type_name_cstr, clang_type, accessibility, - is_artificial); + is_artificial, +
[Lldb-commits] Fwd: Buildbot numbers for the last week of 6/12/2016 - 6/18/2016
Hello everyone, Below are some buildbot numbers for the last week of 6/12/2016 - 6/18/2016. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time); Thanks Galina The longest time each builder was red during the last week: buildername | was_red ---+--- libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11 | 77:19:45 sanitizer-windows | 64:33:03 clang-ppc64be-linux-multistage| 63:36:04 clang-3stage-ubuntu | 50:33:16 libcxx-libcxxabi-x86_64-linux-debian-noexceptions | 37:13:20 libcxx-libcxxabi-libunwind-x86_64-linux-debian| 37:12:29 libcxx-libcxxabi-x86_64-linux-debian | 35:59:28 perf-x86_64-penryn-O3 | 33:55:39 sanitizer-x86_64-linux-fuzzer | 25:54:53 lldb-windows7-android | 23:28:39 clang-x64-ninja-win7 | 23:20:06 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 21:34:12 sanitizer-ppc64le-linux | 17:50:45 perf-x86_64-penryn-O3-polly | 16:10:25 clang-cmake-mipsel| 14:38:58 sanitizer-x86_64-linux-bootstrap | 13:03:49 perf-x86_64-penryn-O3-polly-unprofitable | 12:41:56 polly-amd64-linux | 12:28:35 clang-ppc64le-linux-multistage| 12:28:10 perf-x86_64-penryn-O3-polly-fast | 12:22:48 perf-x86_64-penryn-O3-polly-parallel-fast | 12:21:54 clang-native-aarch64-full | 10:11:10 clang-cmake-thumbv7-a15-full-sh | 07:00:56 clang-cmake-armv7-a15-selfhost| 06:45:33 lld-x86_64-win7 | 06:43:04 clang-x86-win2008-selfhost| 06:11:55 clang-sphinx-docs | 05:55:06 clang-ppc64le-linux-lnt | 05:16:48 clang-atom-d525-fedora-rel| 04:35:52 sanitizer-x86_64-linux-fast | 04:35:43 clang-cmake-mips | 04:26:54 clang-cmake-armv7-a15-full| 04:17:07 sanitizer-x86_64-linux-autoconf | 04:03:28 libcxx-libcxxabi-singlethreaded-x86_64-linux-debian | 04:01:44 llvm-clang-lld-x86_64-debian-fast | 03:55:00 sanitizer-x86_64-linux| 03:50:31 clang-cmake-armv7-a15-selfhost-neon | 03:44:48 clang-cmake-thumbv7-a15 | 03:43:24 lldb-x86_64-ubuntu-14.04-cmake| 03:42:26 clang-cmake-aarch64-quick | 03:42:07 clang-cmake-armv7-a15 | 03:41:26 clang-cmake-aarch64-42vma | 03:36:25 clang-x86_64-linux-selfhost-modules | 03:28:11 lldb-x86_64-ubuntu-14.04-buildserver | 03:22:24 clang-s390x-linux | 03:16:36 clang-ppc64be-linux-lnt | 03:16:21 clang-ppc64be-linux | 03:15:32 clang-x86_64-debian-fast | 03:06:23 clang-cmake-aarch64-full | 03:03:15 clang-ppc64le-linux | 03:02:44 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 02:57:02 clang-cuda-build | 02:56:20 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx11| 02:54:48 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx14| 02:54:44 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx1z| 02:42:51 clang-native-arm-lnt | 02:38:46 llvm-mips-linux | 02:22:35 lldb-x86_64-darwin-13.4 | 02:04:39 lldb-x86_64-ubuntu-14.04-android | 01:49:47 sanitizer-ppc64be-linux | 01:47:19 libcxx-libcxxa
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
tfiala added a comment. In http://reviews.llvm.org/D21648#466011, @fjricci wrote: > I was wondering that as well. I thought there might be some value to testing > that the "disconnect->change platform->reconnect" path worked though. I have > no problem disabling if that doesn't seem useful though. I think that kind of test sounds good, but I would separate that into a test that is focused on that element rather than conflating it with this one. If you can switch this over to skipping the test on remote systems (should be @decorators.skipIfRemote IIRC), that would be ideal. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci planned changes to this revision. fjricci added a comment. That's reasonable, will do. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273640 - Fix an issue where the @lldb.command marker would not work with the new 5-argument version of the Python command function
Author: enrico Date: Thu Jun 23 21:07:15 2016 New Revision: 273640 URL: http://llvm.org/viewvc/llvm-project?rev=273640&view=rev Log: Fix an issue where the @lldb.command marker would not work with the new 5-argument version of the Python command function This: a) teaches PythonCallable to look inside a callable object b) teaches PythonCallable to discover whether a callable method is bound c) teaches lldb.command to dispatch to either the older 4 argument version or the newer 5 argument version Modified: lldb/trunk/scripts/Python/python-extensions.swig lldb/trunk/scripts/Python/python-wrapper.swig lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h Modified: lldb/trunk/scripts/Python/python-extensions.swig URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-extensions.swig?rev=273640&r1=273639&r2=273640&view=diff == --- lldb/trunk/scripts/Python/python-extensions.swig (original) +++ lldb/trunk/scripts/Python/python-extensions.swig Thu Jun 23 21:07:15 2016 @@ -810,6 +810,7 @@ def command(*args, **kwargs): import lldb +import inspect """A decorator function that registers an LLDB command line command that is bound to the function it is attached to.""" class obj(object): @@ -821,11 +822,15 @@ def command(*args, **kwargs): command = "command script add -f %s.%s %s" % (function.__module__, function.__name__, command_name) lldb.debugger.HandleCommand(command) self.function = function -def __call__(self, *args, **kwargs): -self.function(*args, **kwargs) +def __call__(self, debugger, command, exe_ctx, result, dict): +if len(inspect.getargspec(self.function).args) == 5: +self.function(debugger, command, exe_ctx, result, dict) +else: +self.function(debugger, command, result, dict) def callable(function): """Creates a callable object that gets used.""" -return obj(function, *args, **kwargs) +f = obj(function, *args, **kwargs) +return f.__call__ return callable class declaration(object): @@ -1129,4 +1134,4 @@ def is_numeric_type(basic_type): #if basic_type == eBasicTypeOther: return (False,False) -%} \ No newline at end of file +%} Modified: lldb/trunk/scripts/Python/python-wrapper.swig URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-wrapper.swig?rev=273640&r1=273639&r2=273640&view=diff == --- lldb/trunk/scripts/Python/python-wrapper.swig (original) +++ lldb/trunk/scripts/Python/python-wrapper.swig Thu Jun 23 21:07:15 2016 @@ -610,7 +610,7 @@ LLDBSwigPythonCallCommand PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb)); PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb)); -if (argc.count == 5 || argc.has_varargs) +if (argc.count == 5 || argc.is_bound_method || argc.has_varargs) pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg, dict); else pfunc(debugger_arg, PythonString(args), cmd_retobj_arg, dict); Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp?rev=273640&r1=273639&r2=273640&view=diff == --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp Thu Jun 23 21:07:15 2016 @@ -1109,13 +1109,37 @@ PythonCallable::Reset(PyRefType type, Py PythonCallable::ArgInfo PythonCallable::GetNumArguments() const { -ArgInfo result = { 0, false, false }; +ArgInfo result = { 0, false, false, false }; if (!IsValid()) return result; PyObject *py_func_obj = m_py_obj; if (PyMethod_Check(py_func_obj)) +{ py_func_obj = PyMethod_GET_FUNCTION(py_func_obj); +PythonObject im_self = GetAttributeValue("im_self"); +if (im_self.IsValid() && !im_self.IsNone()) +result.is_bound_method = true; +} +else +{ +// see if this is a callable object with an __call__ method +if (!PyFunction_Check(py_func_obj)) +{ +PythonObject __call__ = GetAttributeValue("__call__"); +if (__call__.IsValid()) +{ +auto __callable__ = __call__.AsType(); +if (__callable__.IsValid()) +{ +py_func_obj = PyMethod_GET_FUNCTION(__callable__.get()); +PythonObject im_self = GetAttribut
[Lldb-commits] [lldb] r273648 - Update LLDB for r273647
Author: majnemer Date: Thu Jun 23 23:39:22 2016 New Revision: 273648 URL: http://llvm.org/viewvc/llvm-project?rev=273648&view=rev Log: Update LLDB for r273647 Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=273648&r1=273647&r2=273648&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Jun 23 23:39:22 2016 @@ -7748,8 +7748,7 @@ ClangASTContext::BuildIndirectFields (co clang::SourceLocation(), nested_field_decl->getIdentifier(), nested_field_decl->getType(), - chain, - 2); + {chain, 2}); indirect_field->setImplicit(); @@ -7779,8 +7778,7 @@ ClangASTContext::BuildIndirectFields (co clang::SourceLocation(), nested_indirect_field_decl->getIdentifier(), nested_indirect_field_decl->getType(), - chain, - nested_chain_size + 1); + {chain, nested_chain_size + 1}); indirect_field->setImplicit(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273649 - Silence a -Wc++11-narrowing warning
Author: majnemer Date: Fri Jun 24 00:31:23 2016 New Revision: 273649 URL: http://llvm.org/viewvc/llvm-project?rev=273649&view=rev Log: Silence a -Wc++11-narrowing warning Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=273649&r1=273648&r2=273649&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jun 24 00:31:23 2016 @@ -7759,7 +7759,7 @@ ClangASTContext::BuildIndirectFields (co } else if (clang::IndirectFieldDecl *nested_indirect_field_decl = llvm::dyn_cast(*di)) { -int nested_chain_size = nested_indirect_field_decl->getChainingSize(); +size_t nested_chain_size = nested_indirect_field_decl->getChainingSize(); clang::NamedDecl **chain = new (*ast->getASTContext()) clang::NamedDecl*[nested_chain_size + 1]; chain[0] = *field_pos; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits