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

Method select_frame

python/pyarrow/tests/test_gdb.py:149–164  ·  view source on GitHub ↗

Select the innermost frame with the given function name.

(self, func_name)

Source from the content-addressed store, hash-verified

147 return out.strip()
148
149 def select_frame(self, func_name):
150 """
151 Select the innermost frame with the given function name.
152 """
153 # Ideally, we would use the "frame function" command,
154 # but it's not available on old GDB versions (such as 8.1.1),
155 # so instead parse the stack trace for a matching frame number.
156 out = self.run_command("info stack")
157 pat = r"(?mi)^#(\d+)\s+.* in " + re.escape(func_name) + r"\b"
158 m = re.search(pat, out)
159 if m is None:
160 pytest.fail(f"Could not select frame for function {func_name}")
161
162 frame_num = int(m[1])
163 out = self.run_command(f"frame {frame_num}")
164 assert f"in {func_name}" in out
165
166 def join(self):
167 if self.proc is not None:

Callers 1

gdb_arrowFunction · 0.80

Calls 2

run_commandMethod · 0.95
failMethod · 0.45

Tested by

no test coverage detected