(self, val)
| 502 | """ |
| 503 | |
| 504 | def __init__(self, val): |
| 505 | self.val = val |
| 506 | try: |
| 507 | # libstdc++ internals |
| 508 | impl = self.val['_M_impl'] |
| 509 | self._data = impl['_M_start'] |
| 510 | self._size = int(impl['_M_finish'] - self._data) |
| 511 | except gdb.error: |
| 512 | # fallback for other C++ standard libraries |
| 513 | self._data = int(gdb.parse_and_eval( |
| 514 | f"{for_evaluation(self.val)}.data()")) |
| 515 | self._size = int(gdb.parse_and_eval( |
| 516 | f"{for_evaluation(self.val)}.size()")) |
| 517 | |
| 518 | def _check_index(self, index): |
| 519 | if index < 0 or index >= self._size: |
nothing calls this directly
no test coverage detected