What is the recommended framework to debug XGboost’s C API functions?
For context, I’m trying to include custom node-splitting logic, but first I need to trace through the logic of XGBoosterUpdateOneIter defined in [src/c_api.cc]. To do so, I created a dummy.cc file that calls the function appropriately (following https://xgboost.readthedocs.io/en/stable/tutorials/c_api_tutorial.html) with the correct CMake debugging symbols.
From here, my first approach was to step in with lldb (I’m using M1 mac) but this outputs assembly code since XGBoosterUpdateOneIter is type XGB_DLL.
My second approach was to instead cast as follows in dummy.cc
auto* bst = static_cast<xgboost::Learner*>(booster); auto *dtr = static_cast<std::shared_ptr<xgboost::DMatrix> *>(dmatrix); bst -> UpdateOneIter(i, *dtr);
and just step into UpdateOneIter defined in [src/learner.cc]. Unfortunately, this also outputs assembly code:
frame #0: 0x000000010066386c libxgboost.dylib`xgboost::LearnerImpl::UpdateOneIter(int,
Is there any method to trace line-by-line through XGBoost’s C API? I’m assuming that there must be a developer setup that allows this but I’m having trouble finding anything of the sort as of now.