MCPcopy Create free account
hub / github.com/apache/arrow / gdb_arrow

Function gdb_arrow

python/pyarrow/tests/test_gdb.py:195–216  ·  view source on GitHub ↗
(gdb)

Source from the content-addressed store, hash-verified

193
194@pytest.fixture(scope='session')
195def gdb_arrow(gdb):
196 if 'deb' not in pa.build_info.cpp_build_info.build_type:
197 pytest.skip("Arrow C++ debug symbols not available")
198 if pa.build_info.build_type != 'debug':
199 pytest.skip("PyArrow C++ not built in debug mode")
200
201 skip_if_gdb_script_unavailable()
202 gdb.run_command(f"source {gdb_script}")
203
204 lib_path_var = 'PATH' if sys.platform == 'win32' else 'LD_LIBRARY_PATH'
205 lib_path = os.environ.get(lib_path_var)
206 if lib_path:
207 # GDB starts the inferior process in a pristine shell, need
208 # to propagate the library search path to find the Arrow DLL
209 gdb.run_command(f"set env {lib_path_var} {lib_path}")
210
211 code = "from pyarrow.lib import _gdb_test_session; _gdb_test_session()"
212 out = gdb.run_command(f"run -c '{code}'")
213 assert ("Trace/breakpoint trap" in out or
214 "received signal" in out), out
215 gdb.select_frame("arrow::gdb::TestSession")
216 return gdb
217
218
219def test_gdb_session(gdb):

Callers

nothing calls this directly

Calls 4

run_commandMethod · 0.80
select_frameMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected