[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-18 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 306091. DavidSpickett added a comment. Updated the way the test works. - If you build without MTE in the toolchain the binary just returns the magic failure number. - If you do have an MTE toolchain but your target doesn't have MTE then it will also

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-12 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/test/API/linux/aarch64/mte_memory_region/main.c:9-14 + if (!(getauxval(AT_HWCAP2) & HWCAP2_MTE)) +return 1; + + int got = prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0); + if (got) +return 1;

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-12 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/API/linux/aarch64/mte_memory_region/main.c:9-14 + if (!(getauxval(AT_HWCAP2) & HWCAP2_MTE)) +return 1; + + int got = prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0); + if (got) +return 1;

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-11 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 304441. DavidSpickett added a comment. - Remove unused assert header - Simplify error handling in LinuxProcMapsTest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87442/new/

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-11 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added inline comments. Comment at: lldb/test/API/linux/aarch64/mte_memory_region/main.c:9-14 + if (!(getauxval(AT_HWCAP2) & HWCAP2_MTE)) +return 1; + + int got = prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0); + if (got) +return 1;

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I think this looks pretty good now. Some questions inline... Comment at: lldb/source/Target/MemoryRegionInfo.cpp:10 #include "lldb/Target/MemoryRegionInfo.h" +#include "lldb/Utility/LLDBAssert.h" unused? Comment

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-04 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 302845. DavidSpickett added a comment. - Revert stray change of run-qemu.sh file mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87442/new/ https://reviews.llvm.org/D87442 Files:

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-11-04 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 302843. DavidSpickett added a comment. - Only "mt" flag supported - Don't typedef expected MemoryRegionInfo - Link lldbPluginProcessUtility (not lldbPluginProcessLinux) in proc map tests - "mt" is now the only supported flag - "memory tagging: enabled"

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-19 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D87442#2334786 , @DavidSpickett wrote: >> Woa, back up. I though you were just going to add the one flag you need >> right now... :( > > I was going for the showing flags as a feature of the "memory region" command > then

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-16 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D87442#2332244 , @DavidSpickett wrote: > If you are wondering, the average number of flags for a Linux hello world's > memory regions is 8 so 8 lines of output. Here's an example I had that does > madvise. > > (lldb) memory

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. If you wondering, the average number of flags for a hello world's memory regions is 8 so 8 lines of output. Here's an example I had that does madvise. (lldb) memory region addr [0x77ed5000-0x77fd5000) rw- /dev/zero (deleted) flags: readable

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 298371. DavidSpickett added a comment. - Move to llvm::Expected for callbacks - Use flag names based on Linux names but for all platforms - Show generic names/descriptions in memory region output - Add minidump cases for error handling Repository:

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-07 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett planned changes to this revision. DavidSpickett added a comment. > Yes, that's pretty much it. Great, I will rework this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87442/new/ https://reviews.llvm.org/D87442

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-06 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 296517. DavidSpickett marked 2 inline comments as done. DavidSpickett added a comment. Fix unit test failures due to dereferncing an empty optional when smaps parsing failed. To prevent this happening again pass an Optional to the callback and let it

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-06 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked 11 inline comments as done. DavidSpickett added inline comments. Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1319 + // Linux kernel since 2.6.14 has /proc/{pid}/smaps + // if CONFIG_PROC_PAGE_MONITOR is enabled + auto

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-06 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 296495. DavidSpickett added a comment. - reset flags in MemoryRegionInfo Clear() - add Linux specific memory region flags test - address comments from labath (doing this before any change of approach, to prevent any confusion) Repository: rG LLVM

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-10-05 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. > The thing I'm not so sure about is the verbatim passing of the os-specific > flags. That's nice for the purpose of displaying them to the user, but it can > make things messy for programatic use, particularly if multiple platforms > start using these. What's do

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-29 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I think this patch for its test coverage. The thing I'm not so sure about is the verbatim passing of the os-specific flags. That's nice for the purpose of displaying them to the user, but it can make things messy for programatic use, particularly if multiple platforms

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett marked 3 inline comments as done. DavidSpickett added a comment. In D87442#2273064 , @omjavaid wrote: > This seems fine to me with some minor nits. Also do you plan on writing a > Linux API test for this which test memory regions on Linux?

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-15 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 291835. DavidSpickett added a comment. - clang-format Minidump file - Remove HasFlags from API, return True/False from GetFlags instead - Rename MapKind to MapsKind and make it an enum class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-14 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment. Herald added a reviewer: JDevlieghere. This seems fine to me with some minor nits. Also do you plan on writing a Linux API test for this which test memory regions on Linux? I couldnt locate one already written. Comment at:

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-10 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a reviewer: omjavaid. DavidSpickett added a comment. What isn't covered in testing is checking that "memory region" will not print "flags:" if there aren't any. This would need a way to make a fake lldbserver that didn't reply with the flags field, I could write tests that

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-10 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment. This is in support of AArch64 memory tagging support as described here: http://lists.llvm.org/pipermail/lldb-dev/2020-August/016402.html See "### Extending qMemoryRegion" smaps format described here: https://man7.org/linux/man-pages/man5/proc.5.html Support not

[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions

2020-09-10 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. DavidSpickett requested review of this revision. Herald added a subscriber: JDevlieghere. This extends the "memory region" command to show flags such as those found in /proc/smaps on