docstr: Ask gdb to print the value of an expression and return the result.
docstr_tok: ["Ask","gdb","to","print","the","value","of","an","expression","and","return","the","result","."]
code: def print_value(self, expr):
      """
      Ask gdb to print the value of an expression and return the result.
      """
      out = self.run_command(f"p {expr}")
      out, n = re.subn(r"^\$\d+ = ", "", out)
      assert n == 1, out
      # gdb may add whitespace depending on result width, remove it
      return out.strip()
  
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 5 for calling the GdbSession obj's underlying member method code with example usage: obj.print_value(expr) and returns: out