This is an automated email from the ASF dual-hosted git repository.
uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new c938464 ARROW-5565: [Python][Docs] Add instructions how to use gdb to
debug C++ libraries when running Python unit tests
c938464 is described below
commit c9384641e44707c41f78703a8be738e77a072896
Author: Wes McKinney <[email protected]>
AuthorDate: Fri Jun 14 13:43:11 2019 +0200
ARROW-5565: [Python][Docs] Add instructions how to use gdb to debug C++
libraries when running Python unit tests
Author: Wes McKinney <[email protected]>
Closes #4560 from wesm/ARROW-5565 and squashes the following commits:
325b3670 <Wes McKinney> Add docs section about how to use gdb to debug from
Python
---
docs/source/developers/python.rst | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/docs/source/developers/python.rst
b/docs/source/developers/python.rst
index 69bd59d..0242714 100644
--- a/docs/source/developers/python.rst
+++ b/docs/source/developers/python.rst
@@ -341,6 +341,32 @@ environment variable when building pyarrow:
export PYARROW_WITH_CUDA=1
+Debugging
+---------
+
+Since pyarrow depends on the Arrow C++ libraries, debugging can
+frequently involve crossing between Python and C++ shared libraries.
+
+Using gdb on Linux
+~~~~~~~~~~~~~~~~~~
+
+To debug the C++ libraries with gdb while running the Python unit
+ test, first start pytest with gdb:
+
+.. code-block:: shell
+
+ gdb --args python -m pytest pyarrow/tests/test_to_run.py -k $TEST_TO_MATCH
+
+To set a breakpoint, use the same gdb syntax that you would when
+debugging a C++ unitttest, for example:
+
+.. code-block:: shell
+
+ (gdb) b src/arrow/python/arrow_to_pandas.cc:1874
+ No source file named src/arrow/python/arrow_to_pandas.cc.
+ Make breakpoint pending on future shared library load? (y or [n]) y
+ Breakpoint 1 (src/arrow/python/arrow_to_pandas.cc:1874) pending.
+
Building on Windows
===================