Re: [Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings
ki.stfu updated this revision to Diff 70653. ki.stfu added a comment. Remove obvious comment https://reviews.llvm.org/D24331 Files: source/Core/Log.cpp source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp source/Plugins/Process/elf-core/ProcessElfCore.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp source/Plugins/Process/minidump/MinidumpParser.cpp source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp source/Target/StackFrame.cpp Index: source/Target/StackFrame.cpp === --- source/Target/StackFrame.cpp +++ source/Target/StackFrame.cpp @@ -1279,6 +1279,8 @@ return std::make_pair(nullptr, 0); } } + default: +return std::make_pair(nullptr, 0); } } @@ -1292,7 +1294,7 @@ } return std::make_pair(nullptr, 0); } -}; +} lldb::ValueObjectSP StackFrame::GuessValueForAddress(lldb::addr_t addr) { TargetSP target_sp = CalculateTarget(); @@ -1421,7 +1423,7 @@ Error error; ValueObjectSP pointee = base->Dereference(error); - if (offset >= pointee->GetByteSize()) { + if (offset > 0 && uint64_t(offset) >= pointee->GetByteSize()) { int64_t index = offset / pointee->GetByteSize(); offset = offset % pointee->GetByteSize(); const bool can_create = true; @@ -1602,6 +1604,9 @@ continue; } +// Ignore an unused-variable warning for a register operand. +(void)register_operand; + // We have an origin operand. Can we track its value down? switch (origin_operand->m_type) { default: Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp === --- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -518,7 +518,7 @@ // 0x. If we use the unsigned long long // it will work as expected. const uint64_t uval = PyLong_AsUnsignedLongLong(m_py_obj); - result = *((int64_t *)&uval); + result = *((const int64_t *)&uval); } return result; } Index: source/Plugins/Process/minidump/MinidumpParser.cpp === --- source/Plugins/Process/minidump/MinidumpParser.cpp +++ source/Plugins/Process/minidump/MinidumpParser.cpp @@ -138,6 +138,8 @@ case MinidumpCPUArchitecture::ARM64: arch_spec.GetTriple().setArch(llvm::Triple::ArchType::aarch64); break; + default: +break; } return arch_spec; Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3567,7 +3567,7 @@ error.SetErrorStringWithFormat("configuring StructuredData feature %s " "failed when sending packet: " "PacketResult=%d", - type_name.AsCString(), result); + type_name.AsCString(), (int)result); } return error; } Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp === --- source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -139,9 +139,9 @@ // Keep a separate map of permissions that that isn't coalesced so all ranges // are maintained. const uint32_t permissions = - ((header->p_flags & llvm::ELF::PF_R) ? lldb::ePermissionsReadable : 0) | - ((header->p_flags & llvm::ELF::PF_W) ? lldb::ePermissionsWritable : 0) | - ((header->p_flags & llvm::ELF::PF_X) ? lldb::ePermissionsExecutable : 0); + ((header->p_flags & llvm::ELF::PF_R) ? lldb::ePermissionsReadable : 0u) | + ((header->p_flags & llvm::ELF::PF_W) ? lldb::ePermissionsWritable : 0u) | + ((header->p_flags & llvm::ELF::PF_X) ? lldb::ePermissionsExecutable : 0u); m_core_range_infos.Append( VMRangeToPermissions::Entry(addr, header->p_memsz, permissions)); Index: source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp === --- source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1460,11 +1460,11 @@ if (m_data.GetU32(&offset, &load_cmd.maxprot, 4)) { const uint32_t segment_permissions = ((load_cmd.initprot & VM_PROT_READ) ? ePermissionsReadable -: 0) | +: 0u) | ((load_cmd.initprot & VM_PROT_WRITE) ? ePermissionsWritable - : 0) |
Re: [Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings
ki.stfu updated this revision to Diff 70654. ki.stfu added a comment. Apply clang-format https://reviews.llvm.org/D24331 Files: source/Core/Log.cpp source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp source/Plugins/Process/elf-core/ProcessElfCore.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp source/Plugins/Process/minidump/MinidumpParser.cpp source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp source/Target/StackFrame.cpp Index: source/Target/StackFrame.cpp === --- source/Target/StackFrame.cpp +++ source/Target/StackFrame.cpp @@ -853,10 +853,9 @@ } else { ValueObjectSP synthetic = valobj_sp->GetSyntheticValue(); if (no_synth_child /* synthetic is forbidden */ || - !synthetic /* no synthetic */ - || - synthetic == valobj_sp) /* synthetic is the same as the - original object */ + !synthetic /* no synthetic */ + || synthetic == valobj_sp) /* synthetic is the same as the +original object */ { valobj_sp->GetExpressionPath(var_expr_path_strm, false); error.SetErrorStringWithFormat( @@ -1279,6 +1278,8 @@ return std::make_pair(nullptr, 0); } } + default: +return std::make_pair(nullptr, 0); } } @@ -1292,7 +1293,7 @@ } return std::make_pair(nullptr, 0); } -}; +} lldb::ValueObjectSP StackFrame::GuessValueForAddress(lldb::addr_t addr) { TargetSP target_sp = CalculateTarget(); @@ -1421,7 +1422,7 @@ Error error; ValueObjectSP pointee = base->Dereference(error); - if (offset >= pointee->GetByteSize()) { + if (offset > 0 && uint64_t(offset) >= pointee->GetByteSize()) { int64_t index = offset / pointee->GetByteSize(); offset = offset % pointee->GetByteSize(); const bool can_create = true; @@ -1602,6 +1603,9 @@ continue; } +// Ignore an unused-variable warning for a register operand. +(void)register_operand; + // We have an origin operand. Can we track its value down? switch (origin_operand->m_type) { default: Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp === --- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -518,7 +518,7 @@ // 0x. If we use the unsigned long long // it will work as expected. const uint64_t uval = PyLong_AsUnsignedLongLong(m_py_obj); - result = *((int64_t *)&uval); + result = *((const int64_t *)&uval); } return result; } Index: source/Plugins/Process/minidump/MinidumpParser.cpp === --- source/Plugins/Process/minidump/MinidumpParser.cpp +++ source/Plugins/Process/minidump/MinidumpParser.cpp @@ -138,6 +138,8 @@ case MinidumpCPUArchitecture::ARM64: arch_spec.GetTriple().setArch(llvm::Triple::ArchType::aarch64); break; + default: +break; } return arch_spec; Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3567,7 +3567,7 @@ error.SetErrorStringWithFormat("configuring StructuredData feature %s " "failed when sending packet: " "PacketResult=%d", - type_name.AsCString(), result); + type_name.AsCString(), (int)result); } return error; } Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp === --- source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -139,9 +139,9 @@ // Keep a separate map of permissions that that isn't coalesced so all ranges // are maintained. const uint32_t permissions = - ((header->p_flags & llvm::ELF::PF_R) ? lldb::ePermissionsReadable : 0) | - ((header->p_flags & llvm::ELF::PF_W) ? lldb::ePermissionsWritable : 0) | - ((header->p_flags & llvm::ELF::PF_X) ? lldb::ePermissionsExecutable : 0); + ((header->p_flags & llvm::ELF::PF_R) ? lldb::ePermissionsReadable : 0u) | + ((header->p_flags & llvm::ELF::PF_W) ? lldb::ePermissionsWritable : 0u) | + ((header->p_flags & llvm::ELF::PF_X) ? lldb::ePermissionsExecutable : 0u); m_core_range_infos.Ap
Re: [Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings
zturner added inline comments. Comment at: source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:1462-1467 @@ -1461,8 +1461,8 @@ const uint32_t segment_permissions = ((load_cmd.initprot & VM_PROT_READ) ? ePermissionsReadable -: 0) | +: 0u) | ((load_cmd.initprot & VM_PROT_WRITE) ? ePermissionsWritable - : 0) | + : 0u) | ((load_cmd.initprot & VM_PROT_EXECUTE) ? ePermissionsExecutable - : 0); + : 0u); I find this code pretty ugly because of how the line breaks. Can you change this to: ``` uint32_t segment_permissions = 0; if (load_cmd.initprot & VM_PROT_READ) segment_permissions |= ePermissionsReadable; if (load_cmd.initprot & VM_PROT_WRITE) segment_permissions |= ePermissionsWritable; if (load_cmd.initprot & VM_PROT_EXECUTE) segment_permissions |= ePermissionsExecutable; ``` or, alternatively: ``` // global scope static uint32_t translateSegmentPermissions(uint32_t initprot) { return ((initprot & VM_PROT_READ) ? ePermissionsReadable : 0u) | (initprot & VM_PROT_WRITE) ? ePermissionsWritable : 0u) | (initprot & VM_PROT_EXECUTE) ? ePermissionsExecutable : 0u); } // at this location const uint32_t segment_permissions = translateSegmentPermissions(load_cmd.initprot); ``` Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:521 @@ -520,3 +520,3 @@ const uint64_t uval = PyLong_AsUnsignedLongLong(m_py_obj); - result = *((int64_t *)&uval); + result = *((const int64_t *)&uval); } Am I missing something? Why isn't this just `result = static_cast(uval);` Comment at: source/Target/StackFrame.cpp:1427 @@ -1423,3 +1426,3 @@ - if (offset >= pointee->GetByteSize()) { + if (offset > 0 && uint64_t(offset) >= pointee->GetByteSize()) { int64_t index = offset / pointee->GetByteSize(); Probably only of theoretical interest since I don't think `pointee->GetByteSize()` can ever return 0, but maybe this should be `offset >= 0` Comment at: source/Target/StackFrame.cpp:1593 @@ -1589,3 +1592,3 @@ Instruction::Operand *register_operand = nullptr; Instruction::Operand *origin_operand = nullptr; How about just delete this variable instead? https://reviews.llvm.org/D24331 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings
ki.stfu updated this revision to Diff 70656. ki.stfu marked 3 inline comments as done. ki.stfu added a comment. Fixes per Zachary's comments https://reviews.llvm.org/D24331 Files: source/Core/Log.cpp source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp source/Plugins/Process/elf-core/ProcessElfCore.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp source/Plugins/Process/minidump/MinidumpParser.cpp source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp source/Target/StackFrame.cpp Index: source/Target/StackFrame.cpp === --- source/Target/StackFrame.cpp +++ source/Target/StackFrame.cpp @@ -853,10 +853,9 @@ } else { ValueObjectSP synthetic = valobj_sp->GetSyntheticValue(); if (no_synth_child /* synthetic is forbidden */ || - !synthetic /* no synthetic */ - || - synthetic == valobj_sp) /* synthetic is the same as the - original object */ + !synthetic /* no synthetic */ + || synthetic == valobj_sp) /* synthetic is the same as the +original object */ { valobj_sp->GetExpressionPath(var_expr_path_strm, false); error.SetErrorStringWithFormat( @@ -1279,6 +1278,8 @@ return std::make_pair(nullptr, 0); } } + default: +return std::make_pair(nullptr, 0); } } @@ -1292,7 +1293,7 @@ } return std::make_pair(nullptr, 0); } -}; +} lldb::ValueObjectSP StackFrame::GuessValueForAddress(lldb::addr_t addr) { TargetSP target_sp = CalculateTarget(); @@ -1421,7 +1422,7 @@ Error error; ValueObjectSP pointee = base->Dereference(error); - if (offset >= pointee->GetByteSize()) { + if (offset >= 0 && uint64_t(offset) >= pointee->GetByteSize()) { int64_t index = offset / pointee->GetByteSize(); offset = offset % pointee->GetByteSize(); const bool can_create = true; @@ -1587,17 +1588,16 @@ continue; } -Instruction::Operand *register_operand = nullptr; Instruction::Operand *origin_operand = nullptr; if (operands[0].m_type == Instruction::Operand::Type::Register && operands[0].m_clobbered == true && operands[0].m_register == reg) { - register_operand = &operands[0]; + // operands[0] is a register operand origin_operand = &operands[1]; } else if (operands[1].m_type == Instruction::Operand::Type::Register && operands[1].m_clobbered == true && operands[1].m_register == reg) { - register_operand = &operands[1]; origin_operand = &operands[0]; + // operands[1] is a register operand } else { continue; } Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp === --- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -518,7 +518,7 @@ // 0x. If we use the unsigned long long // it will work as expected. const uint64_t uval = PyLong_AsUnsignedLongLong(m_py_obj); - result = *((int64_t *)&uval); + result = static_cast(uval); } return result; } Index: source/Plugins/Process/minidump/MinidumpParser.cpp === --- source/Plugins/Process/minidump/MinidumpParser.cpp +++ source/Plugins/Process/minidump/MinidumpParser.cpp @@ -138,6 +138,8 @@ case MinidumpCPUArchitecture::ARM64: arch_spec.GetTriple().setArch(llvm::Triple::ArchType::aarch64); break; + default: +break; } return arch_spec; Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3567,7 +3567,7 @@ error.SetErrorStringWithFormat("configuring StructuredData feature %s " "failed when sending packet: " "PacketResult=%d", - type_name.AsCString(), result); + type_name.AsCString(), (int)result); } return error; } Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp === --- source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -139,9 +139,9 @@ // Keep a separate map of permissions that that isn't coalesced so all ranges // are maintai
Re: [Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings
ki.stfu marked an inline comment as done. Comment at: source/Target/StackFrame.cpp:1425 @@ -1423,3 +1424,3 @@ - if (offset >= pointee->GetByteSize()) { + if (offset > 0 && uint64_t(offset) >= pointee->GetByteSize()) { int64_t index = offset / pointee->GetByteSize(); Good point. Thanks! https://reviews.llvm.org/D24331 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280919 - gdb-remote: Add jModulesInfo packet
Author: labath Date: Thu Sep 8 05:07:04 2016 New Revision: 280919 URL: http://llvm.org/viewvc/llvm-project?rev=280919&view=rev Log: gdb-remote: Add jModulesInfo packet Summary: This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to query multiple modules at once. This makes a significant speed improvement in case the application has many (over a hundred) modules, and the communication link has a non-negligible latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after it reads the list of modules from the inferior memory, but other uses are possible. This decreases the attach time to an android application by about 40%. Reviewers: clayborg Subscribers: tberghammer, lldb-commits, danalbert Differential Revision: https://reviews.llvm.org/D24236 Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py Modified: lldb/trunk/docs/lldb-gdb-remote.txt lldb/trunk/include/lldb/Target/Process.h lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp lldb/trunk/source/Utility/StringExtractorGDBRemote.h lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Modified: lldb/trunk/docs/lldb-gdb-remote.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt?rev=280919&r1=280918&r2=280919&view=diff == --- lldb/trunk/docs/lldb-gdb-remote.txt (original) +++ lldb/trunk/docs/lldb-gdb-remote.txt Thu Sep 8 05:07:04 2016 @@ -1054,6 +1054,28 @@ for this region. //-- //-- +// jModulesInfo:[{"file":"...",triple:"..."}, ...] +// +// BRIEF +// Get information for a list of modules by given module path and +// architecture. +// +// RESPONSE +// A JSON array of dictionaries containing the following keys: uuid, +// triple, file_path, file_offset, file_size. The meaning of the fields +// is the same as in the qModuleInfo packet. The server signals the +// failure to retrieve the module info for a file by ommiting the +// corresponding array entry from the response. The server may also +// include entries the client did not ask for, if it has reason to +// the modules will be interesting to the client. +// +// PRIORITY TO IMPLEMENT +// Optional. If not implemented, qModuleInfo packet will be used, which +// may be slower if the target contains a large number of modules and +// the communication link has a non-negligible latency. +//-- + +//-- // Stop reply packet extensions // // BRIEF Modified: lldb/trunk/include/lldb/Target/Process.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=280919&r1=280918&r2=280919&view=diff == --- lldb/trunk/include/lldb/Target/Process.h (original) +++ lldb/trunk/include/lldb/Target/Process.h Thu Sep 8 05:07:04 2016 @@ -50,6 +50,8 @@ #include "lldb/Target/ThreadList.h" #include "lldb/lldb-private.h" +#include "llvm/ADT/ArrayRef.h" + namespace lldb_private { template struct Range; @@ -2646,6 +2648,9 @@ public: virtual bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec); + virtual void PrefetchModuleSpecs(llvm::ArrayRef module_file_specs, + const llvm::Triple &triple) {} + //-- /// Try to find the load address of a file. /// The load address is defined as the address of the first memory Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py?rev=280919&view=auto == --
Re: [Lldb-commits] [PATCH] D24236: gdb-remote: Add jModulesInfo packet
This revision was automatically updated to reflect the committed changes. Closed by commit rL280919: gdb-remote: Add jModulesInfo packet (authored by labath). Changed prior to commit: https://reviews.llvm.org/D24236?vs=70409&id=70671#toc Repository: rL LLVM https://reviews.llvm.org/D24236 Files: lldb/trunk/docs/lldb-gdb-remote.txt lldb/trunk/include/lldb/Target/Process.h lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp lldb/trunk/source/Utility/StringExtractorGDBRemote.h lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Index: lldb/trunk/include/lldb/Target/Process.h === --- lldb/trunk/include/lldb/Target/Process.h +++ lldb/trunk/include/lldb/Target/Process.h @@ -50,6 +50,8 @@ #include "lldb/Target/ThreadList.h" #include "lldb/lldb-private.h" +#include "llvm/ADT/ArrayRef.h" + namespace lldb_private { template struct Range; @@ -2646,6 +2648,9 @@ virtual bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec); + virtual void PrefetchModuleSpecs(llvm::ArrayRef module_file_specs, + const llvm::Triple &triple) {} + //-- /// Try to find the load address of a file. /// The load address is defined as the address of the first memory Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py === --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py @@ -0,0 +1,39 @@ +from __future__ import print_function + + +import gdbremote_testcase +import lldbgdbserverutils +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase): + +mydir = TestBase.compute_mydir(__file__) + +def module_info(self): +procs = self.prep_debug_monitor_and_inferior() +self.test_sequence.add_log_lines([ +'read packet: $jModulesInfo:[{"file":"%s","triple":"%s"}]]#00' % ( +lldbutil.append_to_process_working_directory("a.out"), +self.dbg.GetSelectedPlatform().GetTriple()), +{"direction": "send", + "regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}', + "capture": {1: "spec"}}, +], True) + +context = self.expect_gdbremote_sequence() +spec = context.get("spec") +self.assertRegexpMatches(spec, '"file_path":".*"') +self.assertRegexpMatches(spec, '"file_offset":\d+') +self.assertRegexpMatches(spec, '"file_size":\d+') +self.assertRegexpMatches(spec, '"triple":"\w*-\w*-.*"') +self.assertRegexpMatches(spec, '"uuid":"[A-Fa-f0-9]+"') + +@llgs_test +def test_module_info(self): +self.init_llgs_test() +self.build() +self.set_inferior_startup_launch() +self.module_info() Index: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp === --- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp +++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp @@ -19,6 +19,7 @@ #include "Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h" #include "lldb/Core/DataBuffer.h" +#include "lldb/Core/ModuleSpec.h" #include "llvm/ADT/ArrayRef.h" @@ -185,3 +186,76 @@ HandlePacket(server, "QSyncThreadState:0047;", "OK"); ASSERT_TRUE(async_result.get()); } + +TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo) { + TestClient client; + MockServer server; + Connect(client, server); + if (HasFailure()) +return; + + llvm::Triple triple("i386-pc-linux"); + + FileSpec file_specs[] = {FileSpec("/foo/bar.so", false), + FileSpec("/foo/baz.so", false)}; + std::future>> async_result = + std::async(std::launch::async, + [&] { return client.GetModulesInfo(file_specs, triple); }); + HandlePacket( + server
[Lldb-commits] [lldb] r280922 - Fix test breakage in r280919
Author: labath Date: Thu Sep 8 06:09:14 2016 New Revision: 280922 URL: http://llvm.org/viewvc/llvm-project?rev=280922&view=rev Log: Fix test breakage in r280919 It turns out that self.dbg.GetSelectedPlatform().GetTriple() is not a good way to get the triple of the process, as it returns the incorrect triple in case of a 32-bit process running on a 64-bit platform. Instead, go the long way round and ask the stub for the process triple. This fixes the test for i386. Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py?rev=280922&r1=280921&r2=280922&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py Thu Sep 8 06:09:14 2016 @@ -14,10 +14,14 @@ class TestGdbRemoteModuleInfo(gdbremote_ def module_info(self): procs = self.prep_debug_monitor_and_inferior() +self.add_process_info_collection_packets() +context = self.expect_gdbremote_sequence() +info = self.parse_process_info_response(context) + self.test_sequence.add_log_lines([ 'read packet: $jModulesInfo:[{"file":"%s","triple":"%s"}]]#00' % ( lldbutil.append_to_process_working_directory("a.out"), -self.dbg.GetSelectedPlatform().GetTriple()), +info["triple"].decode('hex')), {"direction": "send", "regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}', "capture": {1: "spec"}}, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24013: Removed the `GetStringRef()` functions of `StringExtractor`
labath added a comment. The reformat is complete, and our main buildbot is (as I think you've already found out) in the non-experimental mode. As far as I am concerned, we can proceed with this. If you can't test on linux before hand, just look out for the emails and be ready to respond. If there's anything I can do to make this process easier (figure out why the linux test suite is not working on your side?), let me know. https://reviews.llvm.org/D24013 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24251: LLDB: API for Permission of object file's sections
abhishek.aggarwal updated this revision to Diff 70677. abhishek.aggarwal added a comment. Removed get() for shared_ptr https://reviews.llvm.org/D24251 Files: include/lldb/API/SBSection.h scripts/interface/SBSection.i source/API/SBSection.cpp Index: source/API/SBSection.cpp === --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -251,6 +251,15 @@ } uint32_t +SBSection::GetPermissions() const +{ +SectionSP section_sp(GetSP()); +if (section_sp) +return section_sp->GetPermissions(); +return 0; +} + +uint32_t SBSection::GetTargetByteSize () { SectionSP section_sp (GetSP()); Index: scripts/interface/SBSection.i === --- scripts/interface/SBSection.i +++ scripts/interface/SBSection.i @@ -90,6 +90,9 @@ SectionType GetSectionType (); +uint32_t +GetPermissions() const; + %feature("docstring", " //-- /// Return the size of a target's byte represented by this section Index: include/lldb/API/SBSection.h === --- include/lldb/API/SBSection.h +++ include/lldb/API/SBSection.h @@ -72,6 +72,21 @@ GetSectionType (); //-- +/// Gets the permissions (RWX) of the section of the object file +/// +/// Returns a mask of bits of enum lldb::Permissions for this section. +/// Sections for which permissions are not defined, 0 is returned for +/// them. The binary representation of this value corresponds to [XRW] +/// i.e. for a section having read and execute permissions, the value +/// returned is 6 +/// +/// @return +/// Returns an unsigned value for Permissions for the section. +//-- +uint32_t +GetPermissions() const; + +//-- /// Return the size of a target's byte represented by this section /// in numbers of host bytes. Note that certain architectures have /// varying minimum addressable unit (i.e. byte) size for their Index: source/API/SBSection.cpp === --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -251,6 +251,15 @@ } uint32_t +SBSection::GetPermissions() const +{ +SectionSP section_sp(GetSP()); +if (section_sp) +return section_sp->GetPermissions(); +return 0; +} + +uint32_t SBSection::GetTargetByteSize () { SectionSP section_sp (GetSP()); Index: scripts/interface/SBSection.i === --- scripts/interface/SBSection.i +++ scripts/interface/SBSection.i @@ -90,6 +90,9 @@ SectionType GetSectionType (); +uint32_t +GetPermissions() const; + %feature("docstring", " //-- /// Return the size of a target's byte represented by this section Index: include/lldb/API/SBSection.h === --- include/lldb/API/SBSection.h +++ include/lldb/API/SBSection.h @@ -72,6 +72,21 @@ GetSectionType (); //-- +/// Gets the permissions (RWX) of the section of the object file +/// +/// Returns a mask of bits of enum lldb::Permissions for this section. +/// Sections for which permissions are not defined, 0 is returned for +/// them. The binary representation of this value corresponds to [XRW] +/// i.e. for a section having read and execute permissions, the value +/// returned is 6 +/// +/// @return +/// Returns an unsigned value for Permissions for the section. +//-- +uint32_t +GetPermissions() const; + +//-- /// Return the size of a target's byte represented by this section /// in numbers of host bytes. Note that certain architectures have /// varying minimum addressable unit (i.e. byte) size for their ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280924 - LLDB: API for iPermission of object file's sections
Author: abhishek Date: Thu Sep 8 07:22:56 2016 New Revision: 280924 URL: http://llvm.org/viewvc/llvm-project?rev=280924&view=rev Log: LLDB: API for iPermission of object file's sections Summary: - Added an API to public interface that provides permissions (RWX) of individual sections of an object file - Earlier, there was no way to find out this information through SB APIs - A possible use case of this API is: when a user wants to know the sections that have executable machine instructions and want to write a tool on top of LLDB based on this information - Differential Revision: https://reviews.llvm.org/D24251 Modified: lldb/trunk/include/lldb/API/SBSection.h lldb/trunk/scripts/interface/SBSection.i lldb/trunk/source/API/SBSection.cpp Modified: lldb/trunk/include/lldb/API/SBSection.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSection.h?rev=280924&r1=280923&r2=280924&view=diff == --- lldb/trunk/include/lldb/API/SBSection.h (original) +++ lldb/trunk/include/lldb/API/SBSection.h Thu Sep 8 07:22:56 2016 @@ -54,6 +54,21 @@ public: SectionType GetSectionType(); //-- + /// Gets the permissions (RWX) of the section of the object file + /// + /// Returns a mask of bits of enum lldb::Permissions for this section. + /// Sections for which permissions are not defined, 0 is returned for + /// them. The binary representation of this value corresponds to [XRW] + /// i.e. for a section having read and execute permissions, the value + /// returned is 6 + /// + /// @return + /// Returns an unsigned value for Permissions for the section. + //-- + uint32_t + GetPermissions() const; + + //-- /// Return the size of a target's byte represented by this section /// in numbers of host bytes. Note that certain architectures have /// varying minimum addressable unit (i.e. byte) size for their Modified: lldb/trunk/scripts/interface/SBSection.i URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBSection.i?rev=280924&r1=280923&r2=280924&view=diff == --- lldb/trunk/scripts/interface/SBSection.i (original) +++ lldb/trunk/scripts/interface/SBSection.i Thu Sep 8 07:22:56 2016 @@ -90,6 +90,9 @@ public: SectionType GetSectionType (); +uint32_t +GetPermissions() const; + %feature("docstring", " //-- /// Return the size of a target's byte represented by this section Modified: lldb/trunk/source/API/SBSection.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSection.cpp?rev=280924&r1=280923&r2=280924&view=diff == --- lldb/trunk/source/API/SBSection.cpp (original) +++ lldb/trunk/source/API/SBSection.cpp Thu Sep 8 07:22:56 2016 @@ -188,6 +188,15 @@ SectionType SBSection::GetSectionType() return eSectionTypeInvalid; } +uint32_t +SBSection::GetPermissions() const +{ +SectionSP section_sp(GetSP()); +if (section_sp) +return section_sp->GetPermissions(); +return 0; +} + uint32_t SBSection::GetTargetByteSize() { SectionSP section_sp(GetSP()); if (section_sp.get()) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280931 - Fix unused variable and integer sign warnings from r280906
Author: emaste Date: Thu Sep 8 08:11:31 2016 New Revision: 280931 URL: http://llvm.org/viewvc/llvm-project?rev=280931&view=rev Log: Fix unused variable and integer sign warnings from r280906 Modified: lldb/trunk/source/Core/Disassembler.cpp Modified: lldb/trunk/source/Core/Disassembler.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=280931&r1=280930&r2=280931&view=diff == --- lldb/trunk/source/Core/Disassembler.cpp (original) +++ lldb/trunk/source/Core/Disassembler.cpp Thu Sep 8 08:11:31 2016 @@ -369,7 +369,6 @@ bool Disassembler::PrintInstructions(Dis const uint32_t max_opcode_byte_size = disasm_ptr->GetInstructionList().GetMaxOpcocdeByteSize(); - uint32_t offset = 0; SymbolContext sc; SymbolContext prev_sc; AddressRange current_source_line_range; @@ -549,7 +548,7 @@ bool Disassembler::PrintInstructions(Dis if (this_line != previous_line) { std::vector previous_lines; -for (int i = 0; +for (uint32_t i = 0; i < num_mixed_context_lines && (this_line.line - num_mixed_context_lines) > 0; i++) { @@ -579,7 +578,7 @@ bool Disassembler::PrintInstructions(Dis source_lines_to_display.current_source_line = source_lines_to_display.lines.size() - 1; -for (int i = 0; i < num_mixed_context_lines; i++) { +for (uint32_t i = 0; i < num_mixed_context_lines; i++) { SourceLine next_line; next_line.file = this_line.file; next_line.line = this_line.line + i + 1; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280933 - Fix -Wcovered-switch-default warning in AppleObjCRuntimeV2.cpp
Author: emaste Date: Thu Sep 8 08:17:42 2016 New Revision: 280933 URL: http://llvm.org/viewvc/llvm-project?rev=280933&view=rev Log: Fix -Wcovered-switch-default warning in AppleObjCRuntimeV2.cpp The switch coveres all possible values. If a new one is added in the future the compiler will start warning, providing a notification that the switch needs updating. Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=280933&r1=280932&r2=280933&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Thu Sep 8 08:17:42 2016 @@ -1906,8 +1906,6 @@ void AppleObjCRuntimeV2::WarnIfNoClasses "reduce the quality of type information available.\n"); m_noclasses_warning_emitted = true; break; -default: - break; } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24255: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
valentinagiusti updated this revision to Diff 70695. valentinagiusti added a comment. Improved MPX test Makefile and removed workaround for unnamed register sets, and rebased according to the new coding style. https://reviews.llvm.org/D24255 Files: packages/Python/lldbsuite/test/functionalities/register/Makefile packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py packages/Python/lldbsuite/test/functionalities/register/a.cpp packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp packages/Python/lldbsuite/test/functionalities/register/main.cpp packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py packages/Python/lldbsuite/test/functionalities/register/register_command/a.cpp packages/Python/lldbsuite/test/functionalities/register/register_command/main.cpp source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h source/Plugins/Process/Utility/RegisterContext_x86.h source/Plugins/Process/Utility/RegisterInfos_i386.h source/Plugins/Process/Utility/RegisterInfos_x86_64.h source/Plugins/Process/Utility/lldb-x86-register-enums.h source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -547,6 +547,7 @@ .Case("vector-sint32", eFormatVectorOfSInt32) .Case("vector-uint32", eFormatVectorOfUInt32) .Case("vector-float32", eFormatVectorOfFloat32) + .Case("vector-uint64", eFormatVectorOfUInt64) .Case("vector-uint128", eFormatVectorOfUInt128) .Default(eFormatInvalid); } @@ -4178,6 +4179,8 @@ reg_info.format = eFormatVectorOfUInt32; else if (value == "vector-float32") reg_info.format = eFormatVectorOfFloat32; +else if (value == "vector-uint64") + reg_info.format = eFormatVectorOfUInt64; else if (value == "vector-uint128") reg_info.format = eFormatVectorOfUInt128; } else if (name == "group_id") { Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1592,6 +1592,9 @@ case eFormatVectorOfFloat32: response.PutCString("format:vector-float32;"); break; + case eFormatVectorOfUInt64: +response.PutCString("format:vector-uint64;"); +break; case eFormatVectorOfUInt128: response.PutCString("format:vector-uint128;"); break; Index: source/Plugins/Process/Utility/lldb-x86-register-enums.h === --- source/Plugins/Process/Utility/lldb-x86-register-enums.h +++ source/Plugins/Process/Utility/lldb-x86-register-enums.h @@ -104,6 +104,18 @@ lldb_ymm7_i386, k_last_avx_i386 = lldb_ymm7_i386, + k_first_mpxr_i386, + lldb_bnd0_i386 = k_first_mpxr_i386, + lldb_bnd1_i386, + lldb_bnd2_i386, + lldb_bnd3_i386, + k_last_mpxr = lldb_bnd3_i386, + + k_first_mpxc_i386, + lldb_bndcfgu_i386 = k_first_mpxc_i386, + lldb_bndstatus_i386, + k_last_mpxc_i386 = lldb_bndstatus_i386, + lldb_dr0_i386, lldb_dr1_i386, lldb_dr2_i386, @@ -117,9 +129,11 @@ k_num_gpr_registers_i386 = k_last_gpr_i386 - k_first_gpr_i386 + 1, k_num_fpr_registers_i386 = k_last_fpr_i386 - k_first_fpr_i386 + 1, k_num_avx_registers_i386 = k_last_avx_i386 - k_first_avx_i386 + 1, + k_num_mpx_registers_i386 = k_last_mpxc_i386 - k_first_mpxr_i386 + 1, k_num_user_registers_i386 = k_num_gpr_registers_i386 + k_num_fpr_registers_i386 + - k_num_avx_registers_i386, + k_num_avx_registers_i386 + + k_num_mpx_registers_i386, }; //--- @@ -273,6 +287,18 @@ lldb_ymm15_x86_64, k_last_avx_x86_64 = lldb_ymm15_x86_64, + k_first_mpxr_x86_64, + lldb_bnd0_x86_64 = k_first_mpxr_x86_64, + lldb_bnd1_x86_64, +
Re: [Lldb-commits] [PATCH] D24255: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
valentinagiusti added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile:7 @@ +6,2 @@ + +include $(LEVEL)/Makefile.rules Np, thanks for the review and explanations ;) https://reviews.llvm.org/D24255 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24255: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. LGTM, thanks. https://reviews.llvm.org/D24255 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D5867: Minimal API support for non-8-bit byte targets
emaste added a comment. This change will no longer apply. Is it still desired? If so, can you please rebase the patch. https://reviews.llvm.org/D5867 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280942 - Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
Author: valentinagiusti Date: Thu Sep 8 09:16:45 2016 New Revision: 280942 URL: http://llvm.org/viewvc/llvm-project?rev=280942&view=rev Log: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support. Summary: Signed-off-by: Valentina Giusti Reviewers: dvlahovski, granata.enrico, clayborg, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24255 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile - copied, changed from r280931, lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py - copied, changed from r280931, lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/a.cpp - copied, changed from r280931, lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/a.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/main.cpp - copied, changed from r280931, lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/main.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/a.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/main.cpp Modified: lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile?rev=280941&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile (removed) @@ -1,5 +0,0 @@ -LEVEL = ../../make - -CXX_SOURCES := main.cpp a.cpp - -include $(LEVEL)/Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py?rev=280941&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py (removed) @@ -1,417 +0,0 @@ -""" -Test the 'register' command. -""" - -from __future__ import print_function - - -import os -import sys -import time -import re -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class RegisterCommandsTestCase(TestBase): - -mydir = TestBase.compute_mydir(__file__) - -def setUp(self): -TestBase.setUp(self) -self.has_teardown = False - -def tearDown(self): -self.dbg.GetSelectedTarget().GetProcess().Destroy() -TestBase.tearDown(self) - -@skipIfiOSSimulator -@skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64'])) -def test_register_commands(self): -"""Test commands related to registers, in particular vector registers.""" -self.build() -self.common_setup() - -# verify that logging does not assert -self.log_enable("registers") - -self.expect("register read -a", MISSING_EXPECTED_REGISTERS, -substrs=['registers were unavailable'], matching=False) - -if self.getArchitecture() in ['amd64', 'i386', 'x86_64']: -self.runCmd("register read xmm0") -s
Re: [Lldb-commits] [PATCH] D24255: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
This revision was automatically updated to reflect the committed changes. Closed by commit rL280942: Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support. (authored by valentinagiusti). Changed prior to commit: https://reviews.llvm.org/D24255?vs=70695&id=70698#toc Repository: rL LLVM https://reviews.llvm.org/D24255 Files: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/a.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/main.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/a.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/register_command/main.cpp lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h lldb/trunk/source/Plugins/Process/Utility/lldb-x86-register-enums.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1592,6 +1592,9 @@ case eFormatVectorOfFloat32: response.PutCString("format:vector-float32;"); break; + case eFormatVectorOfUInt64: +response.PutCString("format:vector-uint64;"); +break; case eFormatVectorOfUInt128: response.PutCString("format:vector-uint128;"); break; Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -547,6 +547,7 @@ .Case("vector-sint32", eFormatVectorOfSInt32) .Case("vector-uint32", eFormatVectorOfUInt32) .Case("vector-float32", eFormatVectorOfFloat32) + .Case("vector-uint64", eFormatVectorOfUInt64) .Case("vector-uint128", eFormatVectorOfUInt128) .Default(eFormatInvalid); } @@ -4178,6 +4179,8 @@ reg_info.format = eFormatVectorOfUInt32; else if (value == "vector-float32") reg_info.format = eFormatVectorOfFloat32; +else if (value == "vector-uint64") + reg_info.format = eFormatVectorOfUInt64; else if (value == "vector-uint128") reg_info.format = eFormatVectorOfUInt128; } else if (name == "group_id") { Index: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h === --- lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h @@ -34,6 +34,16 @@ LLVM_EXTENSION offsetof(FXSAVE, xmm[7]) + sizeof(XMMReg) + \ (32 * reg_index)) +#define BNDR_OFFSET(reg_index) \ +(LLVM_EXTENSION offsetof(UserArea, i387) + \ + LLVM_EXTENSION offsetof(FPR, xstate) + \ + LLVM_EXTENSION offsetof(XSAVE, mpxr[reg_index])) + +#define BNDC_OFFSET(reg_index) \ +(LLVM_EXTENSION offsetof(UserArea, i387) + \ + LLVM_EXTENSION offsetof(FPR, xstate) + \ + LLVM_EXTENSION offsetof(XSAVE, mpxc[reg_index])) + // Number of bytes needed to represent a FPR. #if !defined(FPR_SIZE) #define FPR_SIZE(reg) sizeof(((FXSAVE *)NULL)->reg) @@ -48,6 +58,10 @@ // Number of bytes needed to represent a YMM register. #define YMM_SIZE sizeof(YMMReg) +// Number of bytes needed to represent MPX registers. +#define BNDR_SIZE sizeof(MPXReg) +#define BNDC_SIZE sizeof(
Re: [Lldb-commits] [PATCH] D24013: Removed the `GetStringRef()` functions of `StringExtractor`
I will try to pick this up again sometime next week. I will also try to get my test suite working on Linux first so I can find these failures myself. On Thu, Sep 8, 2016 at 4:28 AM Pavel Labath wrote: > labath added a comment. > > The reformat is complete, and our main buildbot is (as I think you've > already found out) in the non-experimental mode. As far as I am concerned, > we can proceed with this. If you can't test on linux before hand, just look > out for the emails and be ready to respond. If there's anything I can do to > make this process easier (figure out why the linux test suite is not > working on your side?), let me know. > > > https://reviews.llvm.org/D24013 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r280965 - Fix MSVC error from r280919
Author: labath Date: Thu Sep 8 11:58:30 2016 New Revision: 280965 URL: http://llvm.org/viewvc/llvm-project?rev=280965&view=rev Log: Fix MSVC error from r280919 MSVC did not understand my brace-initializer syntax. :/ Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=280965&r1=280964&r2=280965&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Sep 8 11:58:30 2016 @@ -4055,11 +4055,11 @@ void ProcessGDBRemote::PrefetchModuleSpe auto module_specs = m_gdb_comm.GetModulesInfo(module_file_specs, triple); if (module_specs) { for (const FileSpec &spec : module_file_specs) - m_cached_module_specs[{spec.GetPath(), triple.getTriple()}] = - ModuleSpec(); + m_cached_module_specs[ModuleCacheKey(spec.GetPath(), + triple.getTriple())] = ModuleSpec(); for (const ModuleSpec &spec : *module_specs) - m_cached_module_specs[{spec.GetFileSpec().GetPath(), - triple.getTriple()}] = spec; + m_cached_module_specs[ModuleCacheKey(spec.GetFileSpec().GetPath(), + triple.getTriple())] = spec; } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23026: [LLDB-MI] removing requirement of a parameter for -break-insert's -f flag
pieandcakes added a comment. Would you be willing to please take another look? I think this should be the fix. Repository: rL LLVM https://reviews.llvm.org/D23026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits