[Lldb-commits] [PATCH] D59579: Use list comprehension instead of map/filter to prepare Python2/3 compat

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59579 Files: lldb/packages/Python/lldbsuite/test/dotest.py lldb/sc

[Lldb-commits] [PATCH] D59581: Python 2/3 compat: urllib

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: llvm-commits, lldb-commits, jdoerfert. Herald added projects: LLDB, LLVM. Repository: rLLDB LLDB https://reviews.llvm.org/D59581 Files: lld/utils/benchmark.py Index: lld/

[Lldb-commits] [PATCH] D59583: python2/3 compat: exceptions

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59583 Files: lldb/examples/python/crashlog.py Index: lldb/examples

[Lldb-commits] [PATCH] D59584: python 2/3 compat: commands vs subprocess

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59584 Files: lldb/examples/python/delta.py lldb/examples/python/gd

[Lldb-commits] [PATCH] D59582: Python 2/3 compat: StringIO

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59582 Files: lldb/examples/customization/bin-utils/binutils.py lld

[Lldb-commits] [PATCH] D59585: python 2/3 compat: int vs long

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59585 Files: lldb/examples/python/jump.py Index: lldb/examples/pyt

[Lldb-commits] [PATCH] D59587: Use explicit loop instead of map for Python 2/3 compat

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. The output of map is not used, so using a list comprehension or an explicit call to list looks awkward. Repository: rL

[Lldb-commits] [PATCH] D59586: Python 2/3 compat: tkinter

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59586 Files: lldb/examples/python/lldbtk.py Index: lldb/examples/p

[Lldb-commits] [PATCH] D59588: Python 2/3 compat: iteritems vs items

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59588 Files: lldb/examples/python/pytracer.py Index: lldb/examples

[Lldb-commits] [PATCH] D59590: Python 2/3 compat: queue vs Queue

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59590 Files: lldb/utils/lui/lui.py lldb/utils/lui/sandbox.py Ind

[Lldb-commits] [PATCH] D59591: Python 2/3 compat: unichr vs chr

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59591 Files: lldb/examples/summaries/cocoa/CFString.py Index: lldb

[Lldb-commits] [PATCH] D59589: Python 2/3 compat: str vs basestring

2019-03-20 Thread serge via Phabricator via lldb-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added subscribers: lldb-commits, jdoerfert, arphaman. Herald added a project: LLDB. Repository: rLLDB LLDB https://reviews.llvm.org/D59589 Files: lldb/examples/summaries/cocoa/CFArray.py ll

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Paul Robinson via Phabricator via lldb-commits
probinson added a comment. I remember LLVM's DWARFContext being irritating to deal with when I was doing the DWARF 5 stuff. The exact details have been swapped out of my memory, but I suspect it had something to do with needing to know whether I was in DWO mode or normal mode in order to snag

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread James Henderson via Phabricator via lldb-commits
jhenderson accepted this revision. jhenderson added a comment. This revision is now accepted and ready to land. LGTM. I don't really know much about the minidump stuff, but the general structure looks fine to me. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59482

[Lldb-commits] [PATCH] D59579: Use list comprehension instead of map/filter to prepare Python2/3 compat

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. I think this should be fine, modulo the typo. TBH, I was not even aware some of these files existed. The ones that are already used by people on a daily basis should by already python3-ready.

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h:28 + + void SetDwarfData(const DWARFDataExtractor &dwarf); + Don't want to block progress here over this, but I just wanted to say that my impression was that this Dwa

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added reviewers: markmentovai, amccarth. labath added a comment. Thanks for the review. I've added some extra people who should be familiar with the minidump format (in addition to @clayborg, and @zturner, who should also have some knowledge of it), just in case they have any thoughts/su

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:27 +struct Stream { + enum class StreamKind { +Hex, Maybe "Encoding" might be a better name? Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:28 + enum c

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added inline comments. This revision now requires changes to proceed. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:17 +static const DWARFDataExtractor *LoadOrGetSection( +Module &module, const llvm::Op

[Lldb-commits] [PATCH] D59580: Use compatible print statements for Python2/3

2019-03-20 Thread Davide Italiano via Phabricator via lldb-commits
davide added a comment. Thanks for your interest in the subject of Python! I converted everything I was able to find looking at our test suite, it seems that we lack coverage for these scripts. Did you end up testing them with both py 2 and py 3 or just applied a tool on them? Repository: r

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h:28 + + void SetDwarfData(const DWARFDataExtractor &dwarf); + clayborg wrote: > labath wrote: > > Don't want to block progress here over this, but I just wanted to say t

[Lldb-commits] [PATCH] D59433: Fix UUID decoding from minidump files.

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg marked an inline comment as done. clayborg added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py:533 +self.assertEqual(2, len(modules)) +self.verify_module(modules[0], "/tmp/a", None)

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
zturner marked 5 inline comments as done. zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:17 +static const DWARFDataExtractor *LoadOrGetSection( +Module &module, const llvm::Optional &mapped_dwarf_data, +SectionType sectio

[Lldb-commits] [PATCH] D59433: Fix UUID decoding from minidump files.

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py:533 +self.assertEqual(2, len(modules)) +self.verify_module(modules[0], "/tmp/a", None) +self.verify_module(modules[1], "/tm

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. We can get rid of the m_dwarf_data all together. As Pavel suggested, we used to not mmap the entire file, and now we do most of the time. The Section::GetSectionData() will ref count the mmap data in the data extractor and use the mmap already, so we should only suppor

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:17 +static const DWARFDataExtractor *LoadOrGetSection( +Module &module, const llvm::Optional &mapped_dwarf_data, +SectionType section_type, llvm::Optional &extractor) {

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 8 inline comments as done. labath added inline comments. Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:27 +struct Stream { + enum class StreamKind { +Hex, clayborg wrote: > Maybe "Encoding" might be a better name? On it's own I agree Encod

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 191508. labath marked 2 inline comments as done. labath added a comment. - rename Text/Hex streams - fix Hex stream size handling and add some tests for it Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59482/new/ https://review

[Lldb-commits] [PATCH] D59482: [ObjectYAML] Add basic minidump generation support

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. LGTM Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59482/new/ https://reviews.llvm.org/D59482 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
zturner updated this revision to Diff 191510. zturner marked an inline comment as done. zturner added a comment. Updated based on suggestions, including removal of the `m_dwarf_data` member variable which holds the contents of the `__DWARF` segment on MachO. CHANGES SINCE LAST ACTION https://

[Lldb-commits] [lldb] r356573 - Fix UUID decoding from minidump files

2019-03-20 Thread Greg Clayton via lldb-commits
Author: gclayton Date: Wed Mar 20 09:50:17 2019 New Revision: 356573 URL: http://llvm.org/viewvc/llvm-project?rev=356573&view=rev Log: Fix UUID decoding from minidump files This patch fixes: UUIDs now don't include the age field from a PDB70 when the age is zero. Prior to this they would incorr

[Lldb-commits] [PATCH] D59433: Fix UUID decoding from minidump files.

2019-03-20 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356573: Fix UUID decoding from minidump files (authored by gclayton, committed by ). Herald added subscribers: llvm-commits, jdoerfert. Herald added a project: LLVM. Changed prior to commit: https://rev

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, JDevlieghere, zturner. Herald added subscribers: ki.stfu, emaste. Herald added a project: LLDB. This is WIP on adding EINTR handling all over the place, via `llvm::sys::RetryAfterSignal()`. If you don't like this approach, please lemme

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The "problem" I have with this is that (IIRC) retrying close(2) on EINTR is the *wrong* thing to do on linux (because the fd will be closed anyway, and so we may end up closing someone else's file the second time around). I'll try to dig up more info about that tomorrow.

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. In D59606#1436796 , @labath wrote: > The "problem" I have with this is that (IIRC) retrying close(2) on EINTR is > the *wrong* thing to do on linux (because the fd will be closed anyway, and > so we may end up closing someone else

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. Hmm, I also see that LLVM has signal-safe `Process::SafelyCloseFileDescriptor()`. Should I use that, or just ignore potential issues with `close()`? Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59606/new/ https://reviews.llvm.org/D596

[Lldb-commits] [lldb] r356592 - Remove the unused return value in ASTImporter::Imported [NFC]

2019-03-20 Thread Raphael Isemann via lldb-commits
Author: teemperor Date: Wed Mar 20 12:00:25 2019 New Revision: 356592 URL: http://llvm.org/viewvc/llvm-project?rev=356592&view=rev Log: Remove the unused return value in ASTImporter::Imported [NFC] Summary: `ASTImporter::Imported` currently returns a Decl, but that return value is not used by th

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 191553. mgorny added a comment. Got rid of `close()` and `fclose()` wrapping, for now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59606/new/ https://reviews.llvm.org/D59606 Files: lldb/source/Host/common/Socket.cpp lldb/source/Host/common/TCP

[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. LGTM as long as the test suite is happy CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59606/new/ https://reviews.llvm.org/D59606 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:24 + // forward. + extractor.emplace(); + Don't we want to put an empty DWARFDataExtractor in here? Maybe this code should be: ``` const SectionList *section_lis

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:24 + // forward. + extractor.emplace(); + clayborg wrote: > Don't we want to put an empty DWARFDataExtractor in here? Maybe this code > should be: > > ``` > cons

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
zturner marked 2 inline comments as done. zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:50 + +const DWARFDataExtractor *DWARFContext::getOrLoadArangesData() { + return LoadOrGetSection(m_module, m_dwarf_data, eSectionTypeDWARFD

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:552 + data.Clear(); + m_obj_file->ReadSectionData(section_sp.get(), data); } clayborg wrote: > ``` > if (m_obj_file->ReadSectionData(section_sp.get(), data) ==

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
zturner marked an inline comment as done. zturner added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:552 + data.Clear(); + m_obj_file->ReadSectionData(section_sp.get(), data); } clayborg wrote: > clayborg wrote: > > ```

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. The suggestion just avoids the Clear() call at the expense of a branch. No big deal. Fine either way. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59562/new/ https://reviews.llv

[Lldb-commits] [lldb] r356612 - Introduce DWARFContext.

2019-03-20 Thread Zachary Turner via lldb-commits
Author: zturner Date: Wed Mar 20 13:49:25 2019 New Revision: 356612 URL: http://llvm.org/viewvc/llvm-project?rev=356612&view=rev Log: Introduce DWARFContext. LLVM's DWARF parsing library has a class called DWARFContext which holds all of the various DWARF data sections and lots of other informati

[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356612: Introduce DWARFContext. (authored by zturner, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D59562?vs=1

[Lldb-commits] [PATCH] D59611: Move the rest of the section loading over to DWARFContext

2019-03-20 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, JDevlieghere, labath, aprantl. Herald added a subscriber: jdoerfert. This gets all of the remaining sections except those that are DWO-dependent. That will be a bit harder to do since we'll somehow have to get knowledge of DWO-ne

[Lldb-commits] [PATCH] D59611: Move the rest of the section loading over to DWARFContext

2019-03-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Use reference to DWARFContext instead of pointers? Apply to entire patch and good to go CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59611/new/ https://reviews.llvm.or

[Lldb-commits] [lldb] r356625 - Update DWARF files.

2019-03-20 Thread Jason Molenda via lldb-commits
Author: jmolenda Date: Wed Mar 20 15:57:33 2019 New Revision: 356625 URL: http://llvm.org/viewvc/llvm-project?rev=356625&view=rev Log: Update DWARF files. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm

[Lldb-commits] [lldb] r356626 - Change the logging on ptrace(PT_KILL) in MachProcess::Kill to log

2019-03-20 Thread Jason Molenda via lldb-commits
Author: jmolenda Date: Wed Mar 20 15:59:16 2019 New Revision: 356626 URL: http://llvm.org/viewvc/llvm-project?rev=356626&view=rev Log: Change the logging on ptrace(PT_KILL) in MachProcess::Kill to log if LOG_PROCESS is enabled or if there was an error making that call. Modified: lldb/trunk

[Lldb-commits] [lldb] r356638 - [Reproducers] Log inconsistencies during replay (NFC)

2019-03-20 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Wed Mar 20 18:57:33 2019 New Revision: 356638 URL: http://llvm.org/viewvc/llvm-project?rev=356638&view=rev Log: [Reproducers] Log inconsistencies during replay (NFC) Make debugging of the GDB remote packet aspect of reproducers easier by logging both requests and replie

[Lldb-commits] [lldb] r356643 - [Reproducers] Properly handle QEnvironment packets

2019-03-20 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Wed Mar 20 21:08:31 2019 New Revision: 356643 URL: http://llvm.org/viewvc/llvm-project?rev=356643&view=rev Log: [Reproducers] Properly handle QEnvironment packets On Linux, a QEnvironment packet is sent for every environment variable. This breaks replay when the number

[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2019-03-20 Thread Robert O'Callahan via Phabricator via lldb-commits
rocallahan added a comment. Herald added a project: LLVM. Ping? Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 ___ lldb-commits mailing list lldb-commits@lists.llvm.o