raulcd commented on code in PR #13311:
URL: https://github.com/apache/arrow/pull/13311#discussion_r921954967
##########
python/pyarrow/tests/test_gdb.py:
##########
@@ -154,7 +154,7 @@ def select_frame(self, func_name):
# but it's not available on old GDB versions (such as 8.1.1),
# so instead parse the stack trace for a matching frame number.
out = self.run_command("info stack")
- pat = r"(?mi)^#(\d+)\s+.* in " + re.escape(func_name) + " "
+ pat = r"(?mi)^#(\d+)\s+.* in " + re.escape(func_name)
Review Comment:
tests were failing to select the correct frame because the output from gdb
was slightly different:
```
-> out = self.run_command("info stack")
(Pdb) n
info stack
#0 psnip_trap () at
/home/raulcd/code/arrow/cpp/src/arrow/vendored/portable-snippets/debug-trap.h:36
#1 0x00007ffff3f13096 in arrow::internal::DebugTrap () at
/home/raulcd/code/arrow/cpp/src/arrow/util/debug.cc:28
#2 0x00007ffff24a8a42 in arrow::gdb::TestSession() () from
/home/raulcd/code/arrow/python/pyarrow/libarrow_python.so.900
#3 0x00007ffff680fa1d in
__pyx_pw_7pyarrow_3lib_7_gdb_test_session(_object*, _object*) () from
/home/raulcd/code/arrow/python/pyarrow/lib.cpython-310-x86_64-linux-gnu.so
#4 0x00005555556aca1e in ?? ()
#5 0x0000555555698104 in _PyEval_EvalFrameDefault ()
#6 0x0000555555694956 in ?? ()
#7 0x0000555555788906 in PyEval_EvalCode ()
#8 0x00005555557b5b88 in ?? ()
#9 0x00005555557ae86b in ?? ()
#10 0x00005555557a6531 in PyRun_StringFlags ()
#11 0x00005555557a6471 in PyRun_SimpleStringFlags ()
#12 0x00005555557a56a5 in Py_RunMain ()
#13 0x000055555577b8dd in Py_BytesMain ()
#14 0x00007ffff7c7ad90 in __libc_start_call_main
(main=main@entry=0x55555577b8a0, argc=argc@entry=3,
argv=argv@entry=0x7fffffffec68) at ../sysdeps/nptl/libc_start_call_main.h:58
#15 0x00007ffff7c7ae40 in __libc_start_main_impl (main=0x55555577b8a0,
argc=3, argv=0x7fffffffec68, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffec58) at ../csu/libc-start.c:392
#16 0x000055555577b7d5 in _start ()
(gdb) >
/home/raulcd/code/arrow/python/pyarrow/tests/test_gdb.py(162)select_frame()
```
the regex to select the frame expects something like `#2 0x00007ffff24a8a42
in arrow::gdb::TestSession ()` instead of `#2 0x00007ffff24a8a42 in
arrow::gdb::TestSession() ()` (see the space between the ())
Why the output from gdb was different, I am not entirely sure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]