[Lldb-commits] [lldb] r363910 - DWARF: Provide accessors to DIERef fields

2019-06-20 Thread Pavel Labath via lldb-commits
Author: labath Date: Thu Jun 20 01:24:46 2019 New Revision: 363910 URL: http://llvm.org/viewvc/llvm-project?rev=363910&view=rev Log: DWARF: Provide accessors to DIERef fields Summary: Instead of accessing the fields directly, use accessor functions to provide access to the DIERef components. This

[Lldb-commits] [PATCH] D63400: DWARF: Provide accessors to DIERef fields

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363910: DWARF: Provide accessors to DIERef fields (authored by labath, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTI

[Lldb-commits] [PATCH] D63110: Fix a crash in option parsing.

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. The added test broke NetBSD buildbot: http://lab.llvm.org:8011/builders/netbsd-amd64/builds/109/steps/run%20unit%20tests/logs/FAIL%3A%20LLDB%3A%3ATestProcessAttach.test Apparently this doesn't work as expected here: $ /home/mgorny/llvm-project/build-rel-master/bin/lldb

[Lldb-commits] [PATCH] D63428: DWARF: Add "dwo_num" field to the DIERef class

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 8 inline comments as done. labath added inline comments. Comment at: source/Plugins/SymbolFile/DWARF/DIERef.h:30 - DIERef(Section s, llvm::Optional u, dw_offset_t d) - : m_section(s), m_unit_offset(u.getValueOr(DW_INVALID_OFFSET)), -m_die_offset(d) {

[Lldb-commits] [PATCH] D63428: DWARF: Add "dwo_num" field to the DIERef class

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 205760. labath marked an inline comment as done. labath added a comment. - use uint32_t for bitfields - pass DIERefs by value - implement GetUID so that it is structurally similar to the decoding code in DecodeUID CHANGES SINCE LAST ACTION https://reviews.

[Lldb-commits] [PATCH] D63110: Fix a crash in option parsing.

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. @stella.stamenova could you try running the lldb invocation manually like I did? I'm wondering if you're getting the same issue. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63110/new/ https://reviews.llvm.org/D63110 __

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 205763. mgorny added a comment. Rebased for changes in `NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum()`, and removed the conditions there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63545/new/ https://reviews.llvm.org/D63545 Files:

[Lldb-commits] [lldb] r363915 - Fix -Wmismatched-tags introduced in r363910

2019-06-20 Thread Pavel Labath via lldb-commits
Author: labath Date: Thu Jun 20 02:46:37 2019 New Revision: 363915 URL: http://llvm.org/viewvc/llvm-project?rev=363915&view=rev Log: Fix -Wmismatched-tags introduced in r363910 That commit changed DIERef from a struct to a class, but did not update the forward-declarations. This fixes one forward

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. labath added reviewers: dblaikie, JDevlieghere, probinson. Herald added a project: LLVM. While examining this class for possible use in lldb, I noticed two things: - it spits out parsing errors directly to stderr - the loclists parser can incorrectly return valid loc

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. We have the same XSTATE<->YMM conversion functions in NativeProcessLinux. It would be nice to extract them to some common place (Plugins/Process/Utility, I guess :P). The rest seems pretty straight-forward, though you're repeating the patterns that I find really reduntan

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked an inline comment as done. mgorny added a comment. In D63545#1551627 , @labath wrote: > We have the same XSTATE<->YMM conversion functions in NativeProcessLinux. It > would be nice to extract them to some common place (Plugins/Process/Utilit

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D63545#1551675 , @mgorny wrote: > In D63545#1551627 , @labath wrote: > > > We have the same XSTATE<->YMM conversion functions in NativeProcessLinux. > > It would be nice to extract them t

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, krytarowski. Firstly, make Get*Buffer() method abstract, rather than defining them to return NULL. They are going to be redefined in majority (if not all) arches and if we ever need to skip them somewhere, it's better to define it as l

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. How about we go even a bit further? The non-`Do` functions are now so trivial that the `Do` functions could be inlined into them, producing something like `return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(), GetFPRBuffer(),m_thread.GetID());`. If you

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. BTW, is ReadGPR even called from some other place than `NativeRegisterContextNetBSD_x86_64::ReadRegisterSet` ? If not, then we could remove all of these functions (except the `ReadRegisterSet` I suggest above), and inline everything into `NativeRegisterContextNetBSD_x86

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. In D63545#1551681 , @labath wrote: > In D63545#1551675 , @mgorny wrote: > > > In D63545#1551627 , @labath wrote: > > > > > We have the same XSTATE<->Y

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. In D63594#1551702 , @labath wrote: > BTW, is ReadGPR even called from some other place than > `NativeRegisterContextNetBSD_x86_64::ReadRegisterSet` ? If not, then we could > remove all of these functions (except the `ReadRegisterS

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D63545#1551703 , @mgorny wrote: > In D63545#1551681 , @labath wrote: > > > Maybe have GetYMM(unsigned num, YMM& reg)/SetYMM(unsigned num, const YMM > > ®) methods on the XSAVE struct ? >

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D63594#1551715 , @mgorny wrote: > In D63594#1551702 , @labath wrote: > > > BTW, is ReadGPR even called from some other place than > > `NativeRegisterContextNetBSD_x86_64::ReadRegisterSet`

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Simplify register buffer usage

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. I'll try to simplify it in a few steps and see how that goes. All I'm saying is that ultimately having some `DoRegisterSet()` wrapper that calls `ptrace()` and avoids repeating getting PID/TID may help. Though admittely it saves very little actual code. CHANGES SINCE L

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 205784. mgorny retitled this revision from "[lldb] [Process/NetBSD] Simplify register buffer usage" to "[lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction". mgorny edited the summary of this revision. mgorny added a comment. How about this

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction

2019-06-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. Yes, that's exactly what I had in mind. Let's ship it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63594/new/ https://reviews.llvm.org/D63594

[Lldb-commits] [lldb] r363923 - [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction

2019-06-20 Thread Michal Gorny via lldb-commits
Author: mgorny Date: Thu Jun 20 05:44:37 2019 New Revision: 363923 URL: http://llvm.org/viewvc/llvm-project?rev=363923&view=rev Log: [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction Remove most of the abstraction over ptrace() register operations, as it has little value and

[Lldb-commits] [PATCH] D63594: [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363923: [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction (authored by mgorny, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Paul Robinson via Phabricator via lldb-commits
probinson added a comment. Looks pretty good, and thanks especially for the error-case tests! I'll give other folks a chance to chime in if they want to. Comment at: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:101 +if (!Data.isValidOffsetForDataOfSize(*Offset, 2 * Data.getAddress

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:115 -if (!Data.isValidOffsetForDataOfSize(*Offset, 2)) { - WithColor::error() << "location list overflows the debug_loc section.\n"; - return None; -} +if (!Data.isValidOffsetF

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 205792. labath marked 3 inline comments as done. labath added a comment. - add createOverflowError helper - use unique file names in tests Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63591/new/ https://reviews.llvm.org/D63591

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Paul Robinson via Phabricator via lldb-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM but give the West Coast folks a chance to look at it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63591/new/ https://reviews.llvm.org/D63591 ___

[Lldb-commits] [PATCH] D63544: Use object library if cmake supports it

2019-06-20 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha updated this revision to Diff 205800. tatyana-krasnukha added a comment. Finally updated versions - `target_sources` supports using `$` since CMake 3.5.0. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63544/new/ https://reviews.llvm.org/D6354

[Lldb-commits] [PATCH] D63428: DWARF: Add "dwo_num" field to the DIERef class

2019-06-20 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added inline comments. This revision is now accepted and ready to land. Comment at: source/Plugins/SymbolFile/DWARF/DIERef.h:35 +assert(this->dwo_num() == dwo_num && "Dwo number out of range?"); + } Sounds good C

[Lldb-commits] [PATCH] D63544: Use object library if cmake supports it

2019-06-20 Thread Don Hinton via Phabricator via lldb-commits
hintonda accepted this revision. hintonda added a comment. In D63544#1551939 , @tatyana-krasnukha wrote: > Finally updated versions - `target_sources` supports using > `$` since CMake 3.5.0. Great, thanks for narrowing that down, Still LGTM! Reposit

[Lldb-commits] [lldb] r363933 - [unittests] Use object library if cmake supports it

2019-06-20 Thread Tatyana Krasnukha via lldb-commits
Author: tkrasnukha Date: Thu Jun 20 08:06:31 2019 New Revision: 363933 URL: http://llvm.org/viewvc/llvm-project?rev=363933&view=rev Log: [unittests] Use object library if cmake supports it Differential Revision: https://reviews.llvm.org/D63544 Modified: lldb/trunk/unittests/tools/lldb-mi/uti

[Lldb-commits] [PATCH] D63544: Use object library if cmake supports it

2019-06-20 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363933: [unittests] Use object library if cmake supports it (authored by tkrasnukha, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:239 + + if (byte_order == lldb::eByteOrderBig) { +::memcpy(m_xstate_x86_64.xs_fxsave.fx_xmm[reg_index].xmm_bytes, labath wrote: > mgorny

[Lldb-commits] [PATCH] D63610: [lldb] [Process] Introduce common helpers to split/recombine YMM data

2019-06-20 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, zturner, krytarowski. Herald added a subscriber: emaste. Introduce two common helpers to take care of splitting and recombining YMM registers to/from XSAVE-like data. Since FreeBSD, Linux and NetBSD all use XSAVE-like data structures b

[Lldb-commits] [PATCH] D63544: Use object library if cmake supports it

2019-06-20 Thread Chris Bieneman via Phabricator via lldb-commits
beanz added a comment. I really don't think this is the right solution. `$` can be passed in as source files in the unit test target, which should work just fine on CMake 3.4.x. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63544/new/ https://reviews.llvm.org/D6

[Lldb-commits] [PATCH] D63110: Fix a crash in option parsing.

2019-06-20 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment. In D63110#1551572 , @mgorny wrote: > @stella.stamenova could you try running the lldb invocation manually like I > did? I'm wondering if you're getting the same issue. It is the same. The interesting thing is that it pa

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread David Blaikie via Phabricator via lldb-commits
dblaikie added inline comments. Comment at: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:27 +template +static llvm::Error createError(const char *Fmt, Ts &&... Vals) { + return createStringError(inconvertibleErrorCode(), Fmt, Vals...); I guess "Ts &&... Vals" should b

[Lldb-commits] [PATCH] D63591: DWARFDebugLoc: Make parsing and error reporting more robust

2019-06-20 Thread Paul Robinson via Phabricator via lldb-commits
probinson added inline comments. Comment at: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:220 } - return LL; + llvm_unreachable("Exit from function inside while loop!"); } dblaikie wrote: > Given the loop condition is "while (true)" this unreachable seems a bit >

[Lldb-commits] [PATCH] D63622: [Target] Hoist LanguageRuntime::GetDeclVendor

2019-06-20 Thread Alex Langford via Phabricator via lldb-commits
xiaobai created this revision. xiaobai added reviewers: JDevlieghere, labath, compnerd, davide. It's possible that each LanguageRuntime could have its own DeclVendor, so let's hoist that out of ObjCLanguageRuntime into LanguageRuntime. Additionally, this gives the opportunity to remove SBTarget's

[Lldb-commits] [PATCH] D63240: [Core] Generalize ValueObject::IsRuntimeSupportValue

2019-06-20 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63240/new/ https://reviews.llvm.org/D63240 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D63622: [Target] Hoist LanguageRuntime::GetDeclVendor

2019-06-20 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. This change makes it clear that SBTarget::FindFirstType should take a language, but that is orthogonal to this change. Comment at: source/API/SBTarget.cpp:1854-1859 + if (vendor->FindDecls(const_typename, /*append*/ true, +

[Lldb-commits] [PATCH] D63622: [Target] Hoist LanguageRuntime::GetDeclVendor

2019-06-20 Thread Alex Langford via Phabricator via lldb-commits
xiaobai marked an inline comment as done. xiaobai added a comment. In D63622#1552717 , @jingham wrote: > This change makes it clear that SBTarget::FindFirstType should take a > language, but that is orthogonal to this change. Yep, it definitely should.

Re: [Lldb-commits] [PATCH] D63110: Fix a crash in option parsing.

2019-06-20 Thread Davide Italiano via lldb-commits
Adrian is OOO. I am looking at this and I'll revert if I can't understand what's going on. On Thu, Jun 20, 2019 at 11:27 AM Stella Stamenova via Phabricator via lldb-commits wrote: > > stella.stamenova added a comment. > > In D63110#1551572 , @mgorny wrote

[Lldb-commits] [PATCH] D62504: Avoid calling LoadModules twice when modules change

2019-06-20 Thread Alex Langford via Phabricator via lldb-commits
xiaobai added a comment. ping @labath @clayborg any issues with this one? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62504/new/ https://reviews.llvm.org/D62504 ___ lldb-commits mailing list lldb-com

[Lldb-commits] [lldb] r363999 - Revert "Fix a crash in option parsing."

2019-06-20 Thread Davide Italiano via lldb-commits
Author: davide Date: Thu Jun 20 16:44:37 2019 New Revision: 363999 URL: http://llvm.org/viewvc/llvm-project?rev=363999&view=rev Log: Revert "Fix a crash in option parsing." This fails on the bots around 1/10 of the time. Removed: lldb/trunk/lit/Driver/Inputs/process_attach_pid.in lldb/tr

Re: [Lldb-commits] [PATCH] D63110: Fix a crash in option parsing.

2019-06-20 Thread Davide Italiano via lldb-commits
I reverted this in r363999 On Thu, Jun 20, 2019 at 2:26 PM Davide Italiano wrote: > > Adrian is OOO. I am looking at this and I'll revert if I can't > understand what's going on. > > On Thu, Jun 20, 2019 at 11:27 AM Stella Stamenova via Phabricator via > lldb-commits wrote: > > > > stella.stamen

[Lldb-commits] [PATCH] D63240: [Core] Generalize ValueObject::IsRuntimeSupportValue

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath resigned from this revision. labath added a comment. I'm not familiar with the code enough to make the calls here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63240/new/ https://reviews.llvm.org/D63240 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D63622: [Target] Hoist LanguageRuntime::GetDeclVendor

2019-06-20 Thread Pavel Labath via Phabricator via lldb-commits
labath edited reviewers, added: jingham; removed: labath. labath added a comment. Seems like a reasonable thing to do, but I don't really know what this code does... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63622/new/ https://reviews.llvm.org/D63622