[Lldb-commits] [PATCH] D43857: Speed up TestWatchpointMultipleThreads

2018-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. Thanks for taking the time to do this! Can you please double check some of the formatting in the python code? It looks like it's not indented properly. https://reviews.llvm.org/D43857 ___ lldb-commits mailing list lldb-com

[Lldb-commits] [PATCH] D44056: [lldb] Fix "code unreachable" warning in HostThreadPosix::Cancel

2018-03-02 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added inline comments. Comment at: source/Host/posix/HostThreadPosix.cpp:44 if (IsJoinable()) { #ifndef __ANDROID__ #ifndef __FreeBSD__ aprantl wrote: > What about: > ``` > #ifdef __ANDROID__ > error.SetErrorString("HostThreadPosix::Cancel() not

[Lldb-commits] [PATCH] D44056: [lldb] Fix "code unreachable" warning in HostThreadPosix::Cancel

2018-03-02 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added inline comments. Comment at: source/Host/posix/HostThreadPosix.cpp:44 if (IsJoinable()) { #ifndef __ANDROID__ #ifndef __FreeBSD__ labath wrote: > xiaobai wrote: > > aprantl wrote: > > > What about: > > > ``` > > > #ifdef __ANDROID__ > > > e

[Lldb-commits] [PATCH] D44056: [lldb] Fix "code unreachable" warning in HostThreadPosix::Cancel

2018-03-04 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added inline comments. Comment at: source/Host/posix/HostThreadPosix.cpp:44 if (IsJoinable()) { #ifndef __ANDROID__ #ifndef __FreeBSD__ labath wrote: > xiaobai wrote: > > labath wrote: > > > xiaobai wrote: > > > > aprantl wrote: > > > > > What about:

[Lldb-commits] [PATCH] D44507: [cmake] Copy system debugserver from the right place when only CommandLineTools are installed

2018-03-14 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: vsk, beanz. Herald added a subscriber: mgorny. Instead of building debugserver when building lldb, I'd rather pass LLDB_CODESIGN_IDENTITY="" to cmake and use the one already on my system. However, on one of my machines I only have the Command

[Lldb-commits] [PATCH] D44507: [cmake] Copy system debugserver from the right place when only CommandLineTools are installed

2018-03-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @vsk Would you mind committing this for me when you get the chance? I don't have commit access. :) https://reviews.llvm.org/D44507 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[Lldb-commits] [PATCH] D45547: [Command] Implement `stats`

2018-04-12 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added subscribers: sas, xiaobai. xiaobai added a comment. I really like this idea! It will be very helpful for @sas and I. I'd like to +1 creating a separate `stats dump` subcommand instead of dumping stats on `stats disable`. Comment at: lldb/source/Commands/CommandO

[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

2017-03-29 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. This aims to verify the validity of the response from the debugging server in GDBRemoteCommunicationClient::GetMemoryRegionInfo. I was working with ds2 (https://github.com/facebook/ds2) and encountered a bug that caused the server's response to have a 'size' value of

[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

2017-03-30 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 93566. xiaobai added a comment. Added unit tests for the method and changed the logic according to clayborg's suggestion. https://reviews.llvm.org/D31485 Files: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp unittests/Process/gdb-re

[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

2017-03-30 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1506-1510 + // We got an invalid address range back + if (!region_info.GetRange().IsValid()) { +error.SetErro

[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

2017-03-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added a comment. I'll resubmit after removing the extra code in the test and get somebody to commit for me. Comment at: unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp:373 + + result = std::async(std::launch

[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

2017-03-31 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 93674. xiaobai added a comment. Removed extra code in unit test https://reviews.llvm.org/D31485 Files: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Index: unittest

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-24 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. I have found a way to segfault lldb in 7 keystrokes! Steps to reproduce: 1. Launch lldb 2. Type `print` and hit enter. lldb will now prompt you to type a list of expressions, followed by an empty line. 3. Hit enter, indicating the end of your input. 4. Segfault! A

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @krytarowski: Thanks for checking! I can set up a NetBSD environment sometime in the next few days to see what's going on. While it might not be an issue on this platform, I think it's an issue that MoveCursor() accesses `m_input_lines[m_input_lines.size() - 1]` without

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-02 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 97553. xiaobai added a comment. Updating per @labath's suggestions https://reviews.llvm.org/D32421 Files: packages/Python/lldbsuite/test/functionalities/print/TestPrintEmptyExpressionList.py source/Host/common/Editline.cpp Index: source/Host/common/E

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-03 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. Over the weekend I dug into this further. It looks like the environment I found this bug in didn't have C++11 support and was using `std::string::length()`, which tries to perform a memory read where it's not supposed to, resulting in a segfault. On my friend's Ubuntu s

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-03 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 97717. xiaobai added a comment. Moving test per @labath's suggestion https://reviews.llvm.org/D32421 Files: packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py source/Host/common/Editline.cpp Index: source/Host/com

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-05-04 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. I do not have commit access. I would appreciate it if you could commit it for me. https://reviews.llvm.org/D32421 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. With this patch I want to do the following: When searching for global data symbols, only consider non-externally visible symbols if we are in the module where they are visible. I was investigating bug 35043 (https://bugs.llvm.org/show_bug.cgi?id=35043) and found out

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In https://reviews.llvm.org/D39307#907220, @clayborg wrote: > It is a nice idea. I would still rather fix this in clang so it doesn't ask > us about a variable it already knows about. Though this might be a good > solution until we can fix it for real though. Sean or Ji

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In https://reviews.llvm.org/D39307#907253, @jingham wrote: > If I have a library that uses some singleton class that's not exported, and > I'm debugging code in a client of my library, and the state of my library is > looking odd based on what it is returning to the cli

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In https://reviews.llvm.org/D39307#907248, @davide wrote: > Thanks, I'll try this patch tomorrow. > I know this may be a little off, but how hard is to write a test for this so > that it doesn't regress? I don't think this would be terribly difficult, and I absolutely

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. $ nm /lib64/libm.so.6 | grep " a$" 00093bb0 r a 000c6a80 r a 00093bb0 r a This is what I get, which seems to match what you said. These are definitely internal to libm. It's a similar story for the symbol `b`. https://reviews.llvm.org/D3

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In https://reviews.llvm.org/D39307#907302, @jingham wrote: > Note, BTW, we absolutely need some way to say "this symbol from this > library". But first of all, if we're going to do this you need to be able to > mix & match within an expression which you can't do with a

[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In https://reviews.llvm.org/D39307#907301, @jingham wrote: > So one of the expectations of people using the debugger is that their whole > program is available to them wherever they happen to be stopped. People get > really upset when we break that fiction. I've exper

[Lldb-commits] [PATCH] D56440: [CMake] Phase out LLDB_TEST_C/CXX_COMPILER in favor of single LLDB_TEST_COMPILER

2019-01-09 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added inline comments. Comment at: CMakeLists.txt:72 endif() + if (compiler_used) +set(LLDB_TEST_COMPILER_USED ${compiler_used}) Is this check needed? `compiler_used` should be set always here because of the way the above block is written. CHAN

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-09 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: sgraenitz, labath, zturner, JDevlieghere, davide, aprantl, stella.stamenova. Herald added a subscriber: mgorny. I did this for two reasons: - Using the CMake packages simplifies building LLDB Standalone. This is for two reasons: 1) We were

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-10 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked 2 inline comments as done. xiaobai added inline comments. Comment at: cmake/modules/LLDBStandalone.cmake:7 option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) + find_package(LLVM REQUIRED CONFIG co

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-10 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 181135. xiaobai added a comment. compnerd's comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56531/new/ https://reviews.llvm.org/D56531 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-11 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: cmake/modules/LLDBStandalone.cmake:9 + find_package(LLVM REQUIRED CONFIG +HINTS "${LLDB_PATH_TO_LLVM_BUILD}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_package(Clang REQUIRED CONFIG --

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-11 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 181352. xiaobai added a comment. Removed use of `NO_DEFAULT_PATH` Made LLDB_PATH_TO_{LLVM,CLANG}_BUILD cache variables CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56531/new/ https://reviews.llvm.org/D56531 Files: cmake/modules/LLDBStandalone.cm

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-11 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: cmake/modules/LLDBStandalone.cmake:9 + find_package(LLVM REQUIRED CONFIG +HINTS "${LLDB_PATH_TO_LLVM_BUILD}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + find_package(Clang REQUIRED CONFIG --

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-14 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. Thanks all for the feedback and discussion! I won't commit this until after the branch cut. I'm thinking it should be fine to do early next week, but I'll wait if needed. Does anyone have any objects to this patch in its current form? I will rebase it later this week to

[Lldb-commits] [PATCH] D56741: [CMake] Explicitly list User32 as dependency of lldb-mi

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: zturner, compnerd, sgraenitz. Herald added subscribers: mgorny, ki.stfu. When building LLDB standalone on windows, lldb-mi fails to build because it doesn't link against User32. This patch adds an explicit dependency of lldb-mi on User32. h

[Lldb-commits] [PATCH] D56741: [CMake] Explicitly list User32 as dependency of lldb-mi

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @zturner: `undefined symbol: __imp_MessageBoxA`. Looks like MessageBoxA is used in the file `tools/lldb-mi/MIUtilDebug.cpp`, specifically in the function `CMIUtilDebug::ShowDlgWaitForDbgAttach`. In D56741#1358733 , @compnerd wrot

[Lldb-commits] [PATCH] D56741: [CMake] Explicitly list User32 as dependency of lldb-mi

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D56741#1358804 , @zturner wrote: > It seems like a pretty bad idea to have lldb-mi show a dialog box :-/ > > I don't actually work on or have anything to do with lldb-mi though, but I > don't know how well-maintained or support

[Lldb-commits] [PATCH] D56741: [CMake] Explicitly list User32 as dependency of lldb-mi

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D56741#1358882 , @jingham wrote: > As far as I can tell, this dialog is only used when you build the lldb-mi > with MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG, which you would only do if you > wanted to debug lldb-mi. The point is to

[Lldb-commits] [PATCH] D56741: [CMake] Explicitly list User32 as dependency of lldb-mi

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai abandoned this revision. xiaobai added a comment. Abandoned in favor of D56755 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56741/new/ https://reviews.llvm.org/D56741 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D56763: [CMake] Prevent lldbDebugserverCommon from building if you disable debugserver builds

2019-01-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: sgraenitz, davide, JDevlieghere, beanz, vsk, aprantl, labath. Herald added subscribers: jfb, mgorny. The flags `LLDB_USE_SYSTEM_DEBUGSERVER` and `LLDB_NO_DEBUGSERVER` were introduced to the debugserver build. If one of these two flags are se

[Lldb-commits] [PATCH] D56763: [CMake] Prevent lldbDebugserverCommon from building if you disable debugserver builds

2019-01-16 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 182131. xiaobai added a comment. Modified unittests/CMakeLists.txt to reflect this change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56763/new/ https://reviews.llvm.org/D56763 Files: tools/debugserver/source/CMakeLists.txt unittests/CMakeLi

[Lldb-commits] [PATCH] D56763: [CMake] Prevent lldbDebugserverCommon from building if you disable debugserver builds

2019-01-17 Thread Alex Langford via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB351496: [CMake] Prevent lldbDebugserverCommon from building if you disable debugserver… (authored by xiaobai, committed

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-22 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351863: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages (authored by xiaobai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTIO

[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-22 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @sgraenitz: I don't mind at all, I view those changes as improvements. Thanks for that! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56531/new/ https://reviews.llvm.org/D56531 ___ lldb-commi

[Lldb-commits] [PATCH] D57194: [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

2019-01-24 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: compnerd, sgraenitz. Herald added a subscriber: mgorny. When cross-compiling LLDB, we want to use llvm-tblgen built for the host, not the target. https://reviews.llvm.org/D57194 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/mo

[Lldb-commits] [PATCH] D57194: [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

2019-01-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 183585. xiaobai added a comment. Added a comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57194/new/ https://reviews.llvm.org/D57194 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake ==

[Lldb-commits] [PATCH] D57194: [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

2019-01-25 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352235: [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling (authored by xiaobai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D57402: build: remove custom variables

2019-01-29 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. I don't mind you doing this. This just means that we must set LLVM_DIR and Clang_DIR instead of LLDB_PATH_TO_LLVM_BUILD and LLDB_PATH_TO_CLANG_BUILD. Maybe @sgraenitz might have something to say about this? Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://

[Lldb-commits] [PATCH] D57402: build: remove custom variables

2019-02-05 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D57402#1385422 , @sgraenitz wrote: > Pro Saleem's proposal: > > - It's good to have fewer ways to do things. The docs describe how to use > `LLVM_DIR` to build against LLVM. If that's sufficient LLDB should do the > same. http

[Lldb-commits] [PATCH] D57995: [lldb] [cmake] Use install directories for LLVM_* variables

2019-02-12 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. I just caught up to this thread and wow, yeah things are far more broken than I realized. Apologies for opening this can of worms. That being said, thanks for taking the time to look at it and clean it up. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57995/new

[Lldb-commits] [PATCH] D57995: [lldb] [cmake] Use install directories for LLVM_* variables

2019-02-12 Thread Alex Langford via Phabricator via lldb-commits
xiaobai accepted this revision. xiaobai added a comment. This revision is now accepted and ready to land. After looking at the dependent patch, this looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57995/new/ https://reviews.llvm.org/D57995

[Lldb-commits] [PATCH] D58193: Do not explicitly depend on llvm tools during standalone build

2019-02-13 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a reviewer: sgraenitz. xiaobai added a comment. I think you might need to rebase this patch because D57233 seems to accomplish part of what this patch does, but I don't see those changes here. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D58193: Do not explicitly depend on llvm tools during standalone build

2019-02-14 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @sgraenitz: I don't think `find_package` alone will help you here. LLVMConfig doesn't necessarily tell you what's actually been built and/or installed, but it can tell you what's exported. Here's what I would do: 1. List the tools you need for `LLDB_TEST_DEPS` from LLVM

[Lldb-commits] [PATCH] D58193: Do not explicitly depend on llvm tools during standalone build

2019-02-14 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58193#1398376 , @labath wrote: > BTW, what's the reason for having super-high-fidelity list of dependencies in > a standalone build? I know that they're important for in-tree builds, as that > makes sure everything is built w

[Lldb-commits] [PATCH] D58279: Set cmake policy CMP0075 to NEW

2019-02-15 Thread Alex Langford via Phabricator via lldb-commits
xiaobai accepted this revision. xiaobai added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58279/new/ https://reviews.llvm.org/D58279 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [PATCH] D58405: Make educated guess when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: clayborg, zturner, JDevlieghere, compnerd, aprantl, labath. Herald added a subscriber: jdoerfert. While debugging an android process remotely from a windows machine, I noticed that the modules constructed from an object file in memory only h

[Lldb-commits] [PATCH] D58405: Make educated guess when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58405#1402908 , @aprantl wrote: > > a good guess is the triple that the target executable was compiled for. > > What does this do when the executable has multiple slices, such as a Mach-O > universal binary? Hmm, I hadn't

[Lldb-commits] [PATCH] D58405: Make educated guess when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: source/Target/Process.cpp:2638-2639 } - ModuleSP module_sp(new Module(file_spec, ArchSpec())); + ModuleSP module_sp(new Module( + file_spec, GetTarget().GetExecutableModule()->GetArchit

[Lldb-commits] [PATCH] D58405: Make educated guess when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: source/Target/Process.cpp:2639 + ModuleSP module_sp(new Module( + file_spec, GetTarget().GetExecutableModule()->GetArchitecture())); if (module_sp) { clayborg wrote: > S

[Lldb-commits] [PATCH] D58405: Merge target triple into module triple when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 187458. xiaobai added a comment. Updating based on feedback from clayborg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58405/new/ https://reviews.llvm.org/D58405 Files: source/Core/Module.cpp Index: source/Core/Module.cpp =

[Lldb-commits] [PATCH] D58405: Merge target triple into module triple when constructing module from memory

2019-02-19 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 187460. xiaobai added a comment. Minor change CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58405/new/ https://reviews.llvm.org/D58405 Files: source/Core/Module.cpp Index: source/Core/Module.cpp =

[Lldb-commits] [PATCH] D58405: Merge target triple into module triple when constructing module from memory

2019-02-20 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354526: Merge target triple into module triple when constructing module from memory (authored by xiaobai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository:

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: aprantl, labath, JDevlieghere. Herald added subscribers: jdoerfert, srhines. I saw that `llvm::Triple::normalize` will set vendor, os, and environment to "unknown" if they aren't set. Because we use that function when creating a triple with a

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188309. xiaobai added a comment. Remove redundant checks for triple components CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58653/new/ https://reviews.llvm.org/D58653 Files: include/lldb/Utility/ArchSpec.h source/Utility/ArchSpec.cpp unittes

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58653#1409978 , @JDevlieghere wrote: > Do we actually need to check the string values in addition to the enum > values? It looks like the llvm class tries pretty hard to make that the > canonical way to query it. I know trip

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: aprantl, labath, JDevlieghere, clayborg. Herald added subscribers: jdoerfert, srhines. This behavior was originally added in rL252264 (git commit 76a7f365da) in order to be extra careful with handling plat

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188312. xiaobai set the repository for this revision to rLLDB LLDB. xiaobai added a comment. Herald added a subscriber: abidh. Herald added a project: LLDB. Accidentally added a commit to this diff that I didn't intend to add. Repository: rLLDB LLDB CHANG

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58653#1410593 , @clayborg wrote: > A "specified unknown" is when the user actually typed "unknown" in their > triple. IIRC there is no "none" to specify that there is no OS, so we use > "specified unknowns" for this case. In

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58664#1410750 , @aprantl wrote: > Could you please add more context to the diff? Something like `git diff > -U HEAD~1` works fine. Will do. It looks like the dependent diff might change significantly so I'm going to reb

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188417. xiaobai added a comment. More context + rebase on top of master CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58664/new/ https://reviews.llvm.org/D58664 Files: source/Utility/ArchSpec.cpp unittests/Utility/ArchSpecTest.cpp Index: unit

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D58653#1410964 , @clayborg wrote: > I agree testing is good. The main things I would like to stay consistent are: > > - if any part of a triple isn't specified, we need to be able to tell so that > MergeFrom can merge in any un

[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188454. xiaobai added a comment. Herald added subscribers: arichardson, emaste. Herald added a reviewer: espindola. Add more tests and rethink approach CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58653/new/ https://reviews.llvm.org/D58653 Files:

[Lldb-commits] [PATCH] D58653: [Utility] Remove Triple{Environment, OS, Vendor}IsUnspecifiedUnknown from ArchSpec

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188457. xiaobai added a comment. Fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58653/new/ https://reviews.llvm.org/D58653 Files: include/lldb/Utility/ArchSpec.h source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Utility/ArchSpec.

[Lldb-commits] [PATCH] D58653: [Utility] Remove Triple{Environment, OS, Vendor}IsUnspecifiedUnknown from ArchSpec

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB354933: [Utility] Remove Triple{Environment,OS,Vendor}IsUnspecifiedUnknown from ArchSpec (authored by xiaobai, committed by ). Herald added a project: LLDB. Changed prior to commit: https://reviews.

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188474. xiaobai added a comment. Rebase on master CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58664/new/ https://reviews.llvm.org/D58664 Files: source/Utility/ArchSpec.cpp unittests/Utility/ArchSpecTest.cpp Index: unittests/Utility/ArchSpec

[Lldb-commits] [PATCH] D58664: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-26 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB354938: [Utility] Fix ArchSpec.MergeFrom to correctly merge environments (authored by xiaobai, committed by ). Changed prior to commit: https://reviews.llvm.org/D58664?vs=188474&id=188479#toc Reposi

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-27 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: zturner, clayborg. Herald added subscribers: jdoerfert, kadircet, ioeric, ilya-biryukov. Herald added a reviewer: serge-sans-paille. I'm doing this because I plan on implementing `ComputeClangDirectory` on windows so that `GetClangResourceDir

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py:20 +# GetClangResourceDir doesn't work on windows yet +@expectedFailureAll(oslist=["windows"]) @no_debug_info_test teemperor wrote: > Doesn't

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py:20 +# GetClangResourceDir doesn't work on windows yet +@expectedFailureAll(oslist=["windows"]) @no_debug_info_test -

[Lldb-commits] [PATCH] D58793: [CMake] Make liblldb depend on clang-headers

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: labath, zturner, sgraenitz. Herald added a subscriber: mgorny. The clang headers are useful when dealing with clang modules. There is also a way to get to the clang headers from the SB API so it would be nice if they were also available when

[Lldb-commits] [PATCH] D58793: [CMake] Make liblldb depend on clang-headers

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355149: [CMake] Make liblldb depend on clang-headers (authored by xiaobai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188816. xiaobai added a comment. Address suggestions and add unit test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://reviews.llvm.org/D58748 Files: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py source/Plug

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188817. xiaobai added a comment. Reword comment to be clearer CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://reviews.llvm.org/D58748 Files: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py source/Plugins/Expre

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-02-28 Thread Alex Langford via Phabricator via lldb-commits
xiaobai planned changes to this revision. xiaobai added a comment. Looks like the test I wrote doesn't pass on MacOS, I need to investigate. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://reviews.llvm.org/D58748 ___ lldb-c

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-03-01 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 188952. xiaobai added a comment. Minor changes to make MacOS work CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://reviews.llvm.org/D58748 Files: packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py source/Plugins/E

[Lldb-commits] [PATCH] D58860: [build.py] Allow clang-cl to build files starting with '/U'

2019-03-01 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: zturner, labath. Herald added a reviewer: serge-sans-paille. clang-cl tries to match cl's interface, and treats /U as "Removes a predefined macro" as cl does. When you feed clang-cl a file that begins with '/U' (e.g. /Users/xiaobai/foo.c), cl

[Lldb-commits] [PATCH] D58860: [build.py] Allow clang-cl to build files starting with '/U'

2019-03-04 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB355341: [build.py] Allow clang-cl to build files starting with '/U' (authored by xiaobai, committed by ). Herald added subscribers: teemperor, abidh. Herald added a project: LLDB. Changed prior to comm

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-03-05 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. @aprantl: Do you mind taking a look at this when you get a moment? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://reviews.llvm.org/D58748 ___ lldb-commits mailing list lldb-commits@lists.llvm.org h

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-03-05 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 189392. xiaobai added a comment. {Default,}ComputeClangDirectory -> {Default,}ComputeClangResourceDir Added a comment explaining exactly how DefaultComputeClangResourceDir works CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58748/new/ https://review

[Lldb-commits] [PATCH] D58748: [ExpressionParser] Test GetClangResourceDir

2019-03-05 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB355463: [ExpressionParser] Test GetClangResourceDir (authored by xiaobai, committed by ). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D58748?vs=189392&id=189427#to

[Lldb-commits] [PATCH] D59056: Repair the build when LLDB_DISABLE_PYTHON is set

2019-03-06 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: JDevlieghere, labath. If LLDB_DISABLE_PYTHON is set, some functions are unavailable but SBReproducer assumes they are. Let's conditionally register those functions since they are conditionally declared. https://reviews.llvm.org/D59056 File

[Lldb-commits] [PATCH] D59056: Repair the build when LLDB_DISABLE_PYTHON is set

2019-03-06 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 189603. xiaobai added a comment. Group function registrations to cut down on ifdefs CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59056/new/ https://reviews.llvm.org/D59056 Files: source/API/SBReproducer.cpp Index: source/API/SBReproducer.cpp ==

[Lldb-commits] [PATCH] D59056: Repair the build when LLDB_DISABLE_PYTHON is set

2019-03-06 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB355575: Repair the build when LLDB_DISABLE_PYTHON is set (authored by xiaobai, committed by ). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D59056?vs=189603&id=1896

[Lldb-commits] [PATCH] D59072: [ExpressionParser] Implement ComputeClangResourceDir for Windows

2019-03-06 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: aprantl, labath. Herald added subscribers: jdoerfert, teemperor. Herald added a project: LLDB. This function is useful for expression evaluation, especially when doing swift debugging on windows. Repository: rLLDB LLDB https://reviews.l

[Lldb-commits] [PATCH] D59072: [ExpressionParser] Implement ComputeClangResourceDir for Windows

2019-03-07 Thread Alex Langford via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355631: [ExpressionParser] Implement ComputeClangResourceDir for Windows (authored by xiaobai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commi

[Lldb-commits] [PATCH] D59072: [ExpressionParser] Implement ComputeClangResourceDir for Windows

2019-03-07 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D59072#1422059 , @stella.stamenova wrote: > This broke the Windows bot because now one of the TestPaths tests passes on > Windows: > > http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/2394 > > There's also this

[Lldb-commits] [PATCH] D59708: [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-22 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: aprantl, davide, compnerd, JDevlieghere, jingham. I'm adding this to reduce the difference between swift-lldb and llvm.org's lldb. https://reviews.llvm.org/D59708 Files: source/Plugins/ExpressionParser/Clang/ClangHost.cpp Index: source

[Lldb-commits] [PATCH] D59708: [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. In D59708#1439872 , @jingham wrote: > The behavior when verify is false seems a little weird to me. In that case > you will just always get the $install_dir/lib/clang/$clang_version path. > That's fairly different from the veri

[Lldb-commits] [PATCH] D59708: [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 192185. xiaobai added a comment. Herald added a subscriber: jdoerfert. - Respect LIBDIR for swift-lldb case - Loop over a list of known directory suffixes - Change default behavior to not set file_spec and return false upon failure. CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D59708: [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. I changed the default behavior here setting file_spec to some known default unverified value to not setting it at all. It previously relied on there being a relative path to the clang resource dir, of which there are now two to pick from. Additionally, we pass in the di

[Lldb-commits] [PATCH] D59708: [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-25 Thread Alex Langford via Phabricator via lldb-commits
xiaobai updated this revision to Diff 192204. xiaobai added a comment. Added comment about verify CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59708/new/ https://reviews.llvm.org/D59708 Files: source/Plugins/ExpressionParser/Clang/ClangHost.cpp unittests/Expression/ClangParserTest

<    1   2   3   4   5   6   7   8   9   10   >