[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-09-06 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added a comment. Hi, @DavidSpickett, @teemperor, @rupprecht After our previous discussions, I have modified the patch. Now :- 1. OS is detected in Target::Attach(), and reason for failure is analyzed accordingly. 2. ptrace_scope related error message is only emitted after checkin

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-09-06 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added a comment. Hi, @DavidSpickett, @teemperor, @rupprecht After our previous discussions, I have modified the patch. Now :- 1. OS is detected in Target::Attach(), and reason for failure is analyzed accordingly. 2. ptrace_scope related error message is only emitted after checkin

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-09-06 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 370960. apoos-maximus added a comment. Changed the error message to be more informative, and added things, based on the previous review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106226/new/ https://r

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-09-06 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 370935. apoos-maximus added a comment. added logic to report ptrace related error only if ptrace policy was the actual reason for failure. i.e. by reading the value of /proc/sys/kernel/yama/ptrace_scope file if it exists, and setting the ptrace error on

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-09-04 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 370769. apoos-maximus added a comment. moved the error message building logic to Target::Attach() where the ptrace policy related mesasge gets appended only if the debugee process is running on LinuxOS Repository: rG LLVM Github Monorepo CHANGES SIN

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-21 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added a comment. In D106226#2891107 , @teemperor wrote: > Also I wonder how we could make sure we emit this diagnostic in cases where > the ptrace_scope is actually the reason for the failed attach. The proper way > to check this seems to

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-21 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added a comment. In D106226#2891107 , @teemperor wrote: > Congrats on getting started on your first patch! I improving this error > message really seems like a good idea. Thanks : ) ! > From what I can see the error message here is ident

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-21 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added a comment. In D106226#2886627 , @DavidSpickett wrote: > It changes whether the output goes to stdout or stderr and whether we set the > return status to failed. So I would merge it into one call to > `AppendErrorWithFormat`. Thanks

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-17 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 359586. apoos-maximus added a comment. reformatted code to comply with pre-merge checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106226/new/ https://reviews.llvm.org/D106226 Files: lldb/source/Com

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-17 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 359585. apoos-maximus added a comment. realigned patch against main branch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106226/new/ https://reviews.llvm.org/D106226 Files: lldb/source/Commands/Command

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-17 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus updated this revision to Diff 359584. apoos-maximus added a comment. changed the code-styling to comply with pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106226/new/ https://reviews.llvm.org/D106226 Files: lldb/s

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-17 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus added reviewers: jingham, rupprecht, davide. apoos-maximus added a comment. This patch is supposed to fix this Bug : 39166 I compiled the code and used the binary with local/remote debugging scenarios. On attach failure this is the out

[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

2021-07-17 Thread APOORV SACHAN via Phabricator via lldb-commits
apoos-maximus created this revision. apoos-maximus requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. lldb attach operation fails when the ptrace() call fails on a traced process. The error reporting in this scenario could be improved by inclu