docstr: Select the innermost frame with the given function name.
docstr_tok: ["Select","the","innermost","frame","with","the","given","function","name","."]
code: def select_frame(self, func_name):
      """
      Select the innermost frame with the given function name.
      """
      # Ideally, we would use the "frame function" command,
      # 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) + r"\b"
      m = re.search(pat, out)
      if m is None:
          pytest.fail(
              f"Could not select frame for function {func_name}"
          )
  
      frame_num = int(m[1])
      out = self.run_command(f"frame {frame_num}")
      assert f"in {func_name}" in out
  
imports: from functools import lru_cache
  import os
  import re
  import shutil
  import subprocess
  import sys
  import pytest
  import pyarrow
label_desc: Use image node_id 6 for calling the GdbSession obj's underlying member method code with example usage: obj.select_frame(func_name) without return types