[Lldb-commits] [PATCH] D40587: [lldb] Minor fixes for in TaskPool

2017-11-28 Thread Alexander Shaposhnikov via Phabricator via lldb-commits
alexshap updated this revision to Diff 124661. alexshap added a comment. fix the tests Repository: rL LLVM https://reviews.llvm.org/D40587 Files: include/lldb/Host/TaskPool.h source/Host/common/TaskPool.cpp unittests/Host/TaskPoolTest.cpp Index: unittests/Host/TaskPoolTest.cpp ==

[Lldb-commits] [PATCH] D40587: [lldb] Minor fixes for in TaskPool

2017-11-28 Thread Alexander Shaposhnikov via Phabricator via lldb-commits
alexshap created this revision. 1. Move everything into the namespace lldb_private 2. Add missing std::move in TaskPoolImpl::Worker 3. std::thread::hardware_concurrency may return 0, handle this case correctly Repository: rL LLVM https://reviews.llvm.org/D40587 Files: include/lldb/Host/Tas

[Lldb-commits] [lldb] r319226 - Add elf-core/RegisterUtilities.{cpp, h} to the project file.

2017-11-28 Thread Jim Ingham via lldb-commits
Author: jingham Date: Tue Nov 28 13:11:15 2017 New Revision: 319226 URL: http://llvm.org/viewvc/llvm-project?rev=319226&view=rev Log: Add elf-core/RegisterUtilities.{cpp,h} to the project file. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pb

[Lldb-commits] [lldb] r319213 - Update remote debugging page with many more details.

2017-11-28 Thread Greg Clayton via lldb-commits
Author: gclayton Date: Tue Nov 28 12:04:43 2017 New Revision: 319213 URL: http://llvm.org/viewvc/llvm-project?rev=319213&view=rev Log: Update remote debugging page with many more details. Modified: lldb/trunk/www/remote.html Modified: lldb/trunk/www/remote.html URL: http://llvm.org/viewvc/

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
For that you still need something like what we have, but it would be nice if the internal code that knew more about the contents could use that extra information for better clarity and safety. I’d honestly probably make the interfaces deal in ArrayRef and assert in the API boundaries that that the

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Jim Ingham via lldb-commits
How would the ObjectFile API's that take or return UUID's work in this case? Jim > On Nov 28, 2017, at 11:44 AM, Zachary Turner via lldb-commits > wrote: > > Also worth pointing out that when you write things this way, this UUID > class can be part of a larger structure that matches the reco

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
Also worth pointing out that when you write things this way, this UUID class can be part of a larger structure that matches the record layout of a header or section in a binary file, and then you can just memcpy over the class and your'e good to go. For example you could have ``` struct MachOHead

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
Eh, that actually just makes me think the compiler *can* check it. For example, right now you can have mach-o files with 20 byte UUIDs. But just in the code, not in practice. You could have a bug in your code that accidentally wrote the wrong number of bytes from a dynamic buffer. You could enf

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Greg Clayton via lldb-commits
> On Nov 28, 2017, at 10:24 AM, Zachary Turner wrote: > > > > On Tue, Nov 28, 2017 at 10:18 AM Greg Clayton > wrote: >> On Nov 27, 2017, at 10:11 PM, Zachary Turner > > wrote: >> >> As an aside, I don't really like this class. For exampl

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. ok, this is fine then. Just need to test somehow. https://reviews.llvm.org/D40539 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
On Tue, Nov 28, 2017 at 10:18 AM Stephane Sezer via Phabricator < revi...@reviews.llvm.org> wrote: > > > The other alternative seems a bit less explicit to me but I don't mind it > too much. What's the issue with using `std::any_of` exactly? > > In the sense of correctness, nothing is wrong with u

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
On Tue, Nov 28, 2017 at 10:24 AM Zachary Turner wrote: > On Tue, Nov 28, 2017 at 10:18 AM Greg Clayton wrote: > >> On Nov 27, 2017, at 10:11 PM, Zachary Turner wrote: >> >> As an aside, I don't really like this class. For example, You can >> currently assign a UUID[16] to a UUID[20]. That doe

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
sas added a comment. In https://reviews.llvm.org/D40539#937900, @clayborg wrote: > In https://reviews.llvm.org/D40539#937854, @sas wrote: > > > Basically, if you have a `.debug` directory in the same directory where the > > original object file is, you can have debug symbols there. For instance,

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via lldb-commits
On Tue, Nov 28, 2017 at 10:18 AM Greg Clayton wrote: > On Nov 27, 2017, at 10:11 PM, Zachary Turner wrote: > > As an aside, I don't really like this class. For example, You can > currently assign a UUID[16] to a UUID[20]. That doesn't make a lot of > sense to me. > > > What about an invalid UU

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. No one is relying on the 16 bytes of zeroes that I know of. UUID::IsValid() is the test that everyone uses to tell if the UUID is valid or not. I still prefer to just set the length to zero as this does allow us to have a UUID of all zeroes if needed. https://reviews

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In https://reviews.llvm.org/D40539#937854, @sas wrote: > Basically, if you have a `.debug` directory in the same directory where the > original object file is, you can have debug symbols there. For instance, you > can have: > > /my/project/myElf.exe > /my/project/.

Re: [Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Greg Clayton via lldb-commits
> On Nov 27, 2017, at 10:11 PM, Zachary Turner wrote: > > As an aside, I don't really like this class. For example, You can currently > assign a UUID[16] to a UUID[20]. That doesn't make a lot of sense to me. What about an invalid UUID[0] being assigned with a valid UUID[16] or UUID[20]? Wh

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
sas added a comment. In https://reviews.llvm.org/D40537#937880, @zturner wrote: > In https://reviews.llvm.org/D40537#937866, @sas wrote: > > > In https://reviews.llvm.org/D40537#937196, @zturner wrote: > > > > > You could use llvm's range adapters to make this slightly better. > > > > > > auto

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D40537#937866, @sas wrote: > In https://reviews.llvm.org/D40537#937196, @zturner wrote: > > > You could use llvm's range adapters to make this slightly better. > > > > auto Bytes = makeArrayRef(m_uuid, m_num_uuid_bytes); > > return llvm::fi

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
sas added a comment. In https://reviews.llvm.org/D40537#937862, @clayborg wrote: > A better solution would be to initialize UUID::m_num_uuid_bytes with zero and > only set it to a valid value if we set bytes into it. Then UUID::IsValid() > becomes easy: > > bool UUID::IsValid() const { return

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
sas added a comment. In https://reviews.llvm.org/D40537#937196, @zturner wrote: > You could use llvm's range adapters to make this slightly better. > > auto Bytes = makeArrayRef(m_uuid, m_num_uuid_bytes); > return llvm::find(Bytes, 0) != Bytes.end(); > > > Another option would just be `ret

[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

2017-11-28 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. A better solution would be to initialize UUID::m_num_uuid_bytes with zero and only set it to a valid value if we set bytes into it. Then UUID::IsValid() becomes easy: bool UUI

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
sas added a comment. Basically, if you have a `.debug` directory in the same directory where the original object file is, you can have debug symbols there. For instance, you can have: /my/project/myElf.exe /my/project/.debug/myElf.exe with the first file being a standard stripped elf file, and

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. I am not sure I follow this patch. We are adding a FileSpec whose path is just the basename of the current ELF file? What do we do with that? Do we look in certain directories to try and find this file? How this this basename added to the list end up getting found in t

[Lldb-commits] [PATCH] D40536: Simplify UUID constructors

2017-11-28 Thread Stephane Sezer via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319191: Simplify UUID constructors (authored by sas). Repository: rL LLVM https://reviews.llvm.org/D40536 Files: lldb/trunk/source/Utility/UUID.cpp Index: lldb/trunk/source/Utility/UUID.cpp ===

[Lldb-commits] [lldb] r319191 - Simplify UUID constructors

2017-11-28 Thread Stephane Sezer via lldb-commits
Author: sas Date: Tue Nov 28 09:50:31 2017 New Revision: 319191 URL: http://llvm.org/viewvc/llvm-project?rev=319191&view=rev Log: Simplify UUID constructors Summary: This remove a small amount of duplicated code. Reviewers: clayborg, zturner, davide Subscribers: lldb-commits Differential Revis

Re: [Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Zachary Turner via lldb-commits
On Tue, Nov 28, 2017 at 2:48 AM Pavel Labath via Phabricator via lldb-commits wrote: > labath added a comment. > > On 28 November 2017 at 06:12, Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > > yaml2core would be an excellent idea for a tool. > > An (elf) core file is

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. yaml2obj sounds generally like a good solution. I should note that right now yaml2obj is only used/tested for the (narrow) use-case of testing the linker. For creating debug-info-related testcases, I found it both to high and too low an abstraction. Too low, because it

[Lldb-commits] [PATCH] D40557: Variable: Fix usage of uninitialised value

2017-11-28 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added a subscriber: mehdi_amini. Variable::GetValuesForVariableExpressionPath was passing an uninitialised value for the final_task_on_target argument. On my compiler/optimization level combo, the final_task_on_target happened to contain "dereference" in some c

[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps

2017-11-28 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319162: elf-core: Convert remaining register context to use register set maps (authored by labath). Repository: rL LLVM https://reviews.llvm.org/D40133 Files: lldb/trunk/source/Plugins/Process/elf-c

[Lldb-commits] [lldb] r319162 - elf-core: Convert remaining register context to use register set maps

2017-11-28 Thread Pavel Labath via lldb-commits
Author: labath Date: Tue Nov 28 03:10:23 2017 New Revision: 319162 URL: http://llvm.org/viewvc/llvm-project?rev=319162&view=rev Log: elf-core: Convert remaining register context to use register set maps In https://reviews.llvm.org/D39681, we started using a map instead passing a long list of regi

[Lldb-commits] [PATCH] D40434: Fix floating point register write on new x86 linux kernels

2017-11-28 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319161: Fix floating point register write on new x86 linux kernels (authored by labath). Repository: rL LLVM https://reviews.llvm.org/D40434 Files: lldb/trunk/packages/Python/lldbsuite/test/functio

[Lldb-commits] [lldb] r319161 - Fix floating point register write on new x86 linux kernels

2017-11-28 Thread Pavel Labath via lldb-commits
Author: labath Date: Tue Nov 28 02:56:54 2017 New Revision: 319161 URL: http://llvm.org/viewvc/llvm-project?rev=319161&view=rev Log: Fix floating point register write on new x86 linux kernels Summary: New linux kernels (on systems that support the XSAVES instruction) will not update the inferior

[Lldb-commits] [PATCH] D40539: Allow using the object file name for debug symbol resolution

2017-11-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. On 28 November 2017 at 06:12, Zachary Turner via lldb-commits wrote: > yaml2core would be an excellent idea for a tool. An (elf) core file is an elf file, with metadata in the elf program headers, so I think this would naturally fit into yaml2obj. Unfortunately, yaml2o