[Lldb-commits] [PATCH] D88769: [trace] Scaffold "thread trace dump instructions"

2020-10-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: clayborg, labath. Herald added subscribers: lldb-commits, dang, mgorny. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. wallace requested review of this revision. As per the discussion in the RFC, we'll implement both

[Lldb-commits] [PATCH] D88753: Fix raciness in the check for whether a stop hook has run the target

2020-10-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM Comment at: lldb/source/Target/Target.cpp:2648-2651 +if (cur_hook_sp->GetAutoContinue()) + this_should_stop = false; +else +

[Lldb-commits] [lldb] 128e999 - [lldb] Add a "design" section to the documentation.

2020-10-02 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-10-02T13:07:31-07:00 New Revision: 128e999d63c41e54d5d73c8af47e1ce401e6a200 URL: https://github.com/llvm/llvm-project/commit/128e999d63c41e54d5d73c8af47e1ce401e6a200 DIFF:

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG128e999d63c4: [lldb] Add a design section to the documentation. (authored by JDevlieghere). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D88516?vs=295873=295897#toc

[Lldb-commits] [PATCH] D88753: Fix raciness in the check for whether a stop hook has run the target

2020-10-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham created this revision. jingham added reviewers: teemperor, labath. Herald added a reviewer: JDevlieghere. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. jingham requested review of this revision. This was originally done by checking the private state to see if it

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D87868#2309260 , @clayborg wrote: > In D87868#2308515 , @labath wrote: > >> That sounds like a plan. FWIW, here's the implementation I hacked up today: >> >> Status

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-02 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D87868#2308515 , @labath wrote: > That sounds like a plan. FWIW, here's the implementation I hacked up today: > > Status NativeProcessLinux::AllocateMemory(size_t size, uint32_t permissions, >

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295875. mgorny marked 2 inline comments as done. mgorny edited the summary of this revision. mgorny added a comment. Use `llvm_unreachable()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88682/new/ https://reviews.llvm.org/D88682 Files:

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 295873. JDevlieghere added a comment. Move architecture under design and rename the page to overview. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88516/new/ https://reviews.llvm.org/D88516 Files: lldb/docs/.htaccess

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398 assert(false && "Unhandled i386 register."); -return 0; +return -1; } mgorny wrote: >

[Lldb-commits] [PATCH] D88681: [lldb] [Process/NetBSD] Fix reading FIP/FDP registers

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295869. mgorny marked an inline comment as done. mgorny added a comment. Fix mistype. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88681/new/ https://reviews.llvm.org/D88681 Files:

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295867. mgorny added a comment. Fixed wrong constant as pointed out by Kamil. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88682/new/ https://reviews.llvm.org/D88682 Files:

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked 2 inline comments as done. mgorny added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398 assert(false && "Unhandled i386 register."); -return 0; +return -1; } krytarowski

[Lldb-commits] [PATCH] D88681: [lldb] [Process/NetBSD] Fix reading FIP/FDP registers

2020-10-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:954 case lldb_foseg_x86_64: -m_fpr.fxstate.fx_dp.fa_64 = reg_value.GetAsUInt64(); +m_fpr.fxstate.fx_dp.fa_32.fa_seg = reg_value.GetAsUInt64();

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398 assert(false && "Unhandled i386 register."); -return 0; +return -1; } Use `llvm_unreachable` ? Same in other places

[Lldb-commits] [PATCH] D88704: [lldb] Fix bug in fallback logic for finding the resource directory.

2020-10-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG07c112574a32: [lldb] Fix bug in fallback logic for finding the resource directory. (authored by JDevlieghere). Herald added a project: LLDB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[Lldb-commits] [lldb] 07c1125 - [lldb] Fix bug in fallback logic for finding the resource directory.

2020-10-02 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-10-02T09:56:01-07:00 New Revision: 07c112574a324318a02ef29901a0d5aa1fd95144 URL: https://github.com/llvm/llvm-project/commit/07c112574a324318a02ef29901a0d5aa1fd95144 DIFF:

Re: [Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-10-02 Thread Walter via lldb-commits
I totally agree with you, I didn't think about creating custom callbacks =P. I'll refactor the code accordingly. Thanks, man Il giorno ven 2 ott 2020 alle ore 01:51 Pavel Labath ha scritto: > On 01/10/2020 20:57, Walter wrote: > >> - I am surprised that it was not necessary to create a special

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; MaskRay wrote: > labath wrote: > > mgorny wrote: > > > labath wrote: > > > > mgorny

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; labath wrote: > mgorny wrote: > > labath wrote: > > > mgorny wrote: > > > > I would

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; mgorny wrote: > labath wrote: > > mgorny wrote: > > > I would really feel better with

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; labath wrote: > mgorny wrote: > > I would really feel better with a real error

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Herald added a subscriber: pengfei. That sounds like a plan. FWIW, here's the implementation I hacked up today: Status NativeProcessLinux::AllocateMemory(size_t size, uint32_t permissions, lldb::addr_t ) {

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; mgorny wrote: > I would really feel better with a real error handling here. It

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/source/Host/common/PseudoTerminal.cpp:149 + int r = ptsname_r(m_primary_fd, buf, sizeof(buf)); + assert(r == 0); + return buf; I would really feel better with a real error handling here. It shouldn't be hard to

[Lldb-commits] [PATCH] D88728: [lldb] Check for and use ptsname_r if available

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. labath added reviewers: mgorny, MaskRay. Herald added a subscriber: emaste. Herald added a project: LLDB. labath requested review of this revision. Herald added a subscriber: JDevlieghere. ptsname is not thread-safe. ptsname_r is available on most (but not all)

[Lldb-commits] [PATCH] D88704: [lldb] Fix bug in fallback logic for finding the resource directory.

2020-10-02 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 Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88704/new/ https://reviews.llvm.org/D88704 ___

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295758. mgorny marked an inline comment as done. mgorny edited the summary of this revision. mgorny added a comment. Fixed coding style, improved description, and added more assertions for unexpected registers. CHANGES SINCE LAST ACTION

Re: [Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-10-02 Thread Pavel Labath via lldb-commits
On 01/10/2020 20:57, Walter wrote: >> - I am surprised that it was not necessary to create a special process > plugin for this purpose. I have a feeling one will be necessary sooner > or later because of the need to customize the step/continue/etc. flows. > Currently, this will probably produce

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 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, looks good. It might not be unreasonable to add asserts to these functions too, as I don't think we should ever have a register that doesn't belong to any register set.

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295753. mgorny edited the summary of this revision. mgorny added a comment. Herald added a subscriber: pengfei. Ok, replaced with a few more assorted fixes ;-). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88682/new/ https://reviews.llvm.org/D88682

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. In D88682#2307911 , @labath wrote: > It sounds like the assertion could be useful (to detect the missing > translations). Under what circumstances can an unknown register make its way > to this function? How did you run into this

[Lldb-commits] [PATCH] D88681: [lldb] [Process/NetBSD] Fix reading FIP/FDP registers

2020-10-02 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. Yes. We also need to fix our kernel but it's no less broken than it was before. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88681/new/ https://reviews.llvm.org/D88681 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It sounds like the assertion could be useful (to detect the missing translations). Under what circumstances can an unknown register make its way to this function? How did you run into this code in the first place? CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D88681: [lldb] [Process/NetBSD] Fix reading FIP/FDP registers

2020-10-02 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'm assuming this is tested by D88583 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88681/new/ https://reviews.llvm.org/D88681