[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
lemo added inline comments. Comment at: include/lldb/API/SBThread.h:96 + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); apolyakov wrote: > aprantl wrote: > > Where is the SBAPI documentation that is displayed on http://lldb.llvm.org > > ? Apparently no in this file, but it must exist *somewhere*, can you update > > it too, please? > Due to http://lldb.llvm.org/: `This documentation is generated directly from > the source code with doxygen.`. So I think that we don't need to change > anything except source files. While not perfectly consistent across SB API, most methods having an out SBError parameter place it last. Comment at: include/lldb/API/SBThread.h:96 + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); lemo wrote: > apolyakov wrote: > > aprantl wrote: > > > Where is the SBAPI documentation that is displayed on > > > http://lldb.llvm.org ? Apparently no in this file, but it must exist > > > *somewhere*, can you update it too, please? > > Due to http://lldb.llvm.org/: `This documentation is generated directly > > from the source code with doxygen.`. So I think that we don't need to > > change anything except source files. > While not perfectly consistent across SB API, most methods having an out > SBError parameter place it last. I believe you need to update SBThread.i as well. It is required for Python binding through SWIG and it also defines the Python API documentation. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
jingham requested changes to this revision. jingham added a comment. This revision now requires changes to proceed. Sorry for coming in late (WWDC...) It does seem asymmetric to only have one stepping API take an error. If one is going to they all should. You need to add the new API to the SBThread.i file as well or it won't get exported to Python. Beyond that, the SBError parameter is the last parameter in pretty much all the other SB API's. We do inputs first and outputs second as a general rule. So if you are going to add one here it would be better to make it the last parameters. BTW, the web docs are auto-generated but not live. I don't remember when somebody last refreshed them (and actually I didn't follow in detail how this was done.) But we should kick that as an additional step. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
aprantl added a comment. No, but I found this: http://www.swig.org/Doc1.3/Python.html#Python_nn67 https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
apolyakov added a comment. In https://reviews.llvm.org/D47991#1128477, @labath wrote: > In https://reviews.llvm.org/D47991#1128433, @aprantl wrote: > > > Hmm.. it looks like most C++ API calls don't have any documentation. > > > > http://lldb.llvm.org/cpp_reference/html/classlldb_1_1SBThread.html#a42755a170e127881a5dd65162217f68b > > > > It does look like the python API has more documentation.. where does that > > come from? > > > scripts/interface/SBThread.i Do you know what is the difference between `autodoc` and `docstring` there? https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
labath added a comment. In https://reviews.llvm.org/D47991#1128433, @aprantl wrote: > Hmm.. it looks like most C++ API calls don't have any documentation. > > http://lldb.llvm.org/cpp_reference/html/classlldb_1_1SBThread.html#a42755a170e127881a5dd65162217f68b > > It does look like the python API has more documentation.. where does that > come from? scripts/interface/SBThread.i https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
aprantl added a comment. It would be good to add documentation for the new API call there, then. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
apolyakov added a comment. I found it out. Info about each method is located in header file. For example, you may look at `include/lldb/API/SBThread.h` and find text from docs. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
aprantl added a comment. Hmm.. it looks like most C++ API calls don't have any documentation. http://lldb.llvm.org/cpp_reference/html/classlldb_1_1SBThread.html#a42755a170e127881a5dd65162217f68b It does look like the python API has more documentation.. where does that come from? http://lldb.llvm.org/python_reference/index.html http://lldb.llvm.org/python_reference/lldb.SBThread-class.html#StepInto https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
apolyakov added inline comments. Comment at: include/lldb/API/SBThread.h:96 + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); aprantl wrote: > Where is the SBAPI documentation that is displayed on http://lldb.llvm.org ? > Apparently no in this file, but it must exist *somewhere*, can you update it > too, please? Due to http://lldb.llvm.org/: `This documentation is generated directly from the source code with doxygen.`. So I think that we don't need to change anything except source files. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
clayborg added a comment. It is unfortunate that we can't overload with the return value and return an SBError... https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. This is fine. Make sure all other steps have error overloads. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
aprantl added a comment. This looks reasonable to me, but I'd like to also hear from Greg and Jim since SBAPI changes are kind of final. Comment at: include/lldb/API/SBThread.h:96 + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); Where is the SBAPI documentation that is displayed on http://lldb.llvm.org ? Apparently no in this file, but it must exist *somewhere*, can you update it too, please? https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
apolyakov added a comment. Also, I suggest to make similar things in other SBThread methods like StepOut etc. https://reviews.llvm.org/D47991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D47991: Add method SBThread::StepOver with SBError parameter.
apolyakov created this revision. apolyakov added reviewers: aprantl, clayborg, labath. The new method will allow to get error messages from StepOver function. https://reviews.llvm.org/D47991 Files: include/lldb/API/SBThread.h source/API/SBThread.cpp Index: source/API/SBThread.cpp === --- source/API/SBThread.cpp +++ source/API/SBThread.cpp @@ -633,6 +633,11 @@ } void SBThread::StepOver(lldb::RunMode stop_other_threads) { + SBError error; + StepOver(error, stop_other_threads); +} + +void SBThread::StepOver(SBError &error, lldb::RunMode stop_other_threads) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -662,9 +667,8 @@ } } -// This returns an error, we should use it! -ResumeNewPlan(exe_ctx, new_plan_sp.get()); - } +error = ResumeNewPlan(exe_ctx, new_plan_sp.get()); + } else error.SetErrorString("this SBThread object is invalid"); } void SBThread::StepInto(lldb::RunMode stop_other_threads) { Index: include/lldb/API/SBThread.h === --- include/lldb/API/SBThread.h +++ include/lldb/API/SBThread.h @@ -93,6 +93,9 @@ void StepOver(lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + void StepInto(lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); void StepInto(const char *target_name, Index: source/API/SBThread.cpp === --- source/API/SBThread.cpp +++ source/API/SBThread.cpp @@ -633,6 +633,11 @@ } void SBThread::StepOver(lldb::RunMode stop_other_threads) { + SBError error; + StepOver(error, stop_other_threads); +} + +void SBThread::StepOver(SBError &error, lldb::RunMode stop_other_threads) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); std::unique_lock lock; @@ -662,9 +667,8 @@ } } -// This returns an error, we should use it! -ResumeNewPlan(exe_ctx, new_plan_sp.get()); - } +error = ResumeNewPlan(exe_ctx, new_plan_sp.get()); + } else error.SetErrorString("this SBThread object is invalid"); } void SBThread::StepInto(lldb::RunMode stop_other_threads) { Index: include/lldb/API/SBThread.h === --- include/lldb/API/SBThread.h +++ include/lldb/API/SBThread.h @@ -93,6 +93,9 @@ void StepOver(lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + void StepOver(SBError &error, +lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + void StepInto(lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); void StepInto(const char *target_name, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits