[Lldb-commits] [PATCH] D62714: [FormatEntity] Ignore ASCII escape sequences when colors are disabled.

2019-05-31 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62714/new/ https://reviews.llvm.org/D62714 _

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks for the update. The actual code looks mostly good, but I have some comments on the error handling infrastructure. I am sorry that this is taking a bit long, but I am trying to make sure it's not unnecessarily overcomplicated (in the past we've generally not paid m

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:91-94 + DataExtractor auxv_data(m_process ? m_process->GetAuxvData() : DataBufferSP(), + m_process->GetByteOrder(), +

[Lldb-commits] [PATCH] D62715: [NativeProcessLinux] Reuse memory read by process_vm_readv before calling ptrace

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thinking about tests, do you know of any way to create memory which is readable by ptrace, but it is not accessible via process_vm_readv ? I know that latest android phones have memory like that, but I believe this depends on selinux or some other mechanism which cannot

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 4 inline comments as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp:125 + [&](std::unique_ptr e) { +result = SendErrorResponse(std::move(e)); + }); labath wrot

[Lldb-commits] [PATCH] D62732: [WIP][RISCV] Initial port of LLDB for RISC-V

2019-05-31 Thread Simon Cook via Phabricator via lldb-commits
simoncook created this revision. simoncook added reviewers: asb, lewis-revill. Herald added subscribers: benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, johnrusso, rbar, mgorny. Heral

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 3 inline comments as done. aadsm added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:91-94 + DataExtractor auxv_data(m_process ? m_process->GetAuxvData() : DataBufferSP(), + m_process-

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp:125 + [&](std::unique_ptr e) { +result = SendErrorResponse(std::move(e)); + }); aadsm wrote: > labath wrote: > > I'm a bit confuse

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/Utility/AuxVector.cpp:38 -AuxVector::AuxVector(Process *process) : m_process(process) { - DataExtractor data; - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); - - data.SetData(GetAuxvData(

[Lldb-commits] [PATCH] D62715: [NativeProcessLinux] Reuse memory read by process_vm_readv before calling ptrace

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 2 inline comments as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1457 -bytes_read = process_vm_readv(pid, &local_iov, 1, &remote_iov, 1, 0); -const bool success = bytes_read == size; +auto vm_b

[Lldb-commits] [PATCH] D62715: [NativeProcessLinux] Reuse memory read by process_vm_readv before calling ptrace

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. That's a good idea for the tests, will look into that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62715/new/ https://reviews.llvm.org/D62715 ___ lldb-commits mailing list lldb

[Lldb-commits] [PATCH] D62715: [NativeProcessLinux] Reuse memory read by process_vm_readv before calling ptrace

2019-05-31 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D62715#1525085 , @aadsm wrote: > That's a good idea for the tests, will look into that. Actually, it looks like getting `process_vm_readv` to fail is as simple as running `mprotect(..., PROT_NONE)` on the piece of memory. Here

[Lldb-commits] [lldb] r362240 - [FormatEntity] Ignore ASCII escape sequences when colors are disabled.

2019-05-31 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Fri May 31 09:27:44 2019 New Revision: 362240 URL: http://llvm.org/viewvc/llvm-project?rev=362240&view=rev Log: [FormatEntity] Ignore ASCII escape sequences when colors are disabled. This patch makes the FormatEntity honor the debugger's color settings by not inserting

[Lldb-commits] [PATCH] D62714: [FormatEntity] Ignore ASCII escape sequences when colors are disabled.

2019-05-31 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362240: [FormatEntity] Ignore ASCII escape sequences when colors are disabled. (authored by JDevlieghere, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pri

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-31 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:94 + m_process->GetAddressByteSize()); + m_auxv.reset(new AuxVector(auxv_data)); if (log) `llvm::make_unique< Aux

[Lldb-commits] [PATCH] D62743: Add color to the default thread and frame format.

2019-05-31 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: clayborg, aprantl, teemperor, labath. Herald added a project: LLDB. Now that we correctly ignore ASCII escape sequences (r 362240) when colors are disabled, I'd like to change the the default frame and thread format to include col

[Lldb-commits] [PATCH] D62743: Add color to the default thread and frame format.

2019-05-31 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added a comment. +1. I'm (obviously) in favor of this. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62743/new/ https://reviews.llvm.org/D62743 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] r362259 - [Target] Remove ABI's dependence on ExpressionParser

2019-05-31 Thread Alex Langford via lldb-commits
Author: xiaobai Date: Fri May 31 13:17:21 2019 New Revision: 362259 URL: http://llvm.org/viewvc/llvm-project?rev=362259&view=rev Log: [Target] Remove ABI's dependence on ExpressionParser Modified: lldb/trunk/source/Target/ABI.cpp Modified: lldb/trunk/source/Target/ABI.cpp URL: http://llvm.o

[Lldb-commits] [PATCH] D62702: [ABI] Fix SystemV ABI to handle nested aggregate type returned in register

2019-05-31 Thread Saleem Abdulrasool via Phabricator via lldb-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Actually, I think that we should extend `CompilerType` and `TypeSystem` to expose Clang's knowledge of whether a type is passed in a register by means of using `clang::RecordDecl

Re: [Lldb-commits] [PATCH] D62702: [ABI] Fix SystemV ABI to handle nested aggregate type returned in register

2019-05-31 Thread Jim Ingham via lldb-commits
There was a plan - which Adrian may remember more about - to have some API from clang where you could pass in a function signature and have it return dwarf expressions for the locations of all the input parameters, and of the return value directly on exit. That would be the handiest form, dwarf

[Lldb-commits] [PATCH] D62702: [ABI] Fix SystemV ABI to handle nested aggregate type returned in register

2019-05-31 Thread Wanyi Ye via Phabricator via lldb-commits
kusmour added a comment. In D62702#1525655 , @compnerd wrote: > Actually, I think that we should extend `CompilerType` and `TypeSystem` to > expose Clang's knowledge of whether a type is passed in a register by means > of using `clang::RecordDecl::isPass

[Lldb-commits] [lldb] r362268 - [Commands] Stop hardcoding languages in CommandObjectType

2019-05-31 Thread Alex Langford via lldb-commits
Author: xiaobai Date: Fri May 31 15:15:29 2019 New Revision: 362268 URL: http://llvm.org/viewvc/llvm-project?rev=362268&view=rev Log: [Commands] Stop hardcoding languages in CommandObjectType Modified: lldb/trunk/source/Commands/CommandObjectType.cpp Modified: lldb/trunk/source/Commands/Comm

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: compnerd, davide, JDevlieghere, jingham, clayborg, labath, aprantl. I want to remove this method because I think that Process should be language agnostic, or at least, not have knowledge about specific language runtimes. There is "GetLanguag

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2770 LLDB_LOG(log, "no auxv data retrieved: {0}", ec.message()); - return SendErrorResponse(ec.value()); +

[Lldb-commits] [PATCH] D62756: Be consistent when adding names and mangled names to the index

2019-05-31 Thread Greg Clayton via Phabricator via lldb-commits
clayborg created this revision. clayborg added reviewers: labath, aprantl, JDevlieghere, jingham, jasonmolenda. Herald added a subscriber: arphaman. We were being very inconsistent with the way we were adding names to the indexes. For DW_TAG_subprogram and DW_TAG_inlined_subroutine we would not

[Lldb-commits] [PATCH] D62743: Add color to the default thread and frame format.

2019-05-31 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. Let the bike-shedding begin! Feel free to ignore this, but personally, I'd only highlight the filename (or highlight the the line number in a different color). Feel free to ignore this even more, but we should probably have symbolic color names instead of hardcoding red

[Lldb-commits] [PATCH] D62756: Be consistent when adding names and mangled names to the index

2019-05-31 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:114 +static inline bool AddMangled(const char *name, const char *mangled) { + if (mangled == nullptr || name == mangled) +return false; Even in a static function

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments. Comment at: source/Target/Process.cpp:1601 -CPPLanguageRuntime *Process::GetCPPLanguageRuntime(bool retry_if_null) { - std::lock_guard guard(m_language_runtimes_mutex); so what about this mutex at the new call sites? CHANGES SI

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Jim Ingham via Phabricator via lldb-commits
jingham requested changes to this revision. jingham added a comment. This revision now requires changes to proceed. This seems like carrying purity a little too far. You haven't removed the fact that the using code is explicitly dialing up the C++ language runtime, you've just made the call-sit

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. I tend to agree with Jim's comment. > There is "GetLanguageRuntime()" which should be used instead. Can you explain why that is? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62755/new/ https://reviews.llvm.org/D62755 ___

[Lldb-commits] [PATCH] D62759: Fix lit tests on Windows related to CR

2019-05-31 Thread Adrian McCarthy via Phabricator via lldb-commits
amccarth created this revision. amccarth added a reviewer: jasonmolenda. Problem discovered in the breakpoint lit test, but probably exists in others. lldb-test splits lines on LF. Input files that are CR+LF separated (as is common on Windows) then resulted in commands being sent to LLDB that e

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added a comment. In D62755#1525790 , @jingham wrote: > This seems like carrying purity a little too far. I disagree that it is "carrying purity a little too far". My goal is to see LLDB's non-plugin libr

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. > I disagree that it is "carrying purity a little too far". My goal is to see > LLDB's non-plugin libraries be more language agnostic. I have two motivations for this: > Better language support in LLDB, making it easier to add support for new > languages in a clean fas

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2770 LLDB_LOG(log, "no auxv data retrieved: {0}", ec.message()); - return SendErrorResponse(ec.value()); +

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D62755#1525890 , @aprantl wrote: > Those are good goals. Thank you for working on this! Thank you for taking the time to review this and discuss this with me! :) > I don't yet see the connection between those goals and this p

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D62755#1525890 , @aprantl wrote: > I don't yet see the connection between those goals and this patch, but I > might be missing something. Would CPPLanguageRuntime need to be anything but > a forward declaration in Process.h?

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D62755#1525919 , @xiaobai wrote: > In D62755#1525890 , @aprantl wrote: > > > I don't yet see the connection between those goals and this patch, but I > > might be missing something. Woul

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2766 // Grab the auxv data. auto buffer_or_error = m_debugged_process_up->GetAuxvData(); if (!buffer_or_err

[Lldb-commits] [PATCH] D62702: [ABI] Fix SystemV ABI to handle nested aggregate type returned in register

2019-05-31 Thread Wanyi Ye via Phabricator via lldb-commits
kusmour updated this revision to Diff 202517. kusmour added a comment. Herald added a subscriber: teemperor. added a virtual function `CanPassInRegister` in TypeSystem class to provide info about type can be passed in register or not `ClangASTContext` will refer to `clang::RecordDecl::canPassInReg

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D62755#1525937 , @jingham wrote: > Yeah, getting CPPLanguageRuntime out of the general forward declarations does > seem a worthy goal. But it would be great to do it in a way that doesn't add > so much line noise. I added th

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-05-31 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:549-550 - if (ModuleSP module_sp = target.GetOrCreateModule(module_spec, -

[Lldb-commits] [PATCH] D62764: Detect x86 mid-function epilogues that end in a jump

2019-05-31 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda created this revision. jasonmolenda added a project: LLDB. Herald added a subscriber: abidh. This patch adds a few new instruction recognizers to the x86 assembly inspection engine to recognize relative branches & jumps, adds support for recognizing a mid-function epilogue that ends

[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime

2019-05-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 202523. xiaobai added a comment. Jim's suggestion CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62755/new/ https://reviews.llvm.org/D62755 Files: include/lldb/Target/CPPLanguageRuntime.h include/lldb/Target/Process.h include/lldb/lldb-forward