[all-commits] [llvm/llvm-project] 0a36c7: [libcxx][pretty printers] Check GDB Python scripti...

David Spickett via All-commits all-commits at lists.llvm.org
Fri Sep 24 01:32:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a36c72dee61a0a97805a3cd297572ad0c38d979
      https://github.com/llvm/llvm-project/commit/0a36c72dee61a0a97805a3cd297572ad0c38d979
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
    M libcxx/utils/libcxx/test/features.py

  Log Message:
  -----------
  [libcxx][pretty printers] Check GDB Python scripting support

I found this after upgrading from Ubuntu bionic (gdb 8.1.1) to
Focal (gdb 9.2). (where this test fails, but that's for a
different patch)

9.2 allows you to set breakpoint commands from
Python, which was added in 8.3.
(bintutils a913fffbdee21fdd50e8de0596358be425775678
"Allow breakpoint commands to be set from Python")

The reason this test never failed before was because it did so
silently. "source <python file>" doesn't fail even if that script
raises an Exception.

To fix this extend the gdb lit feature to check that:
* gdb exists
* has Python support
* allows you to set breakpoint commands

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D110334




More information about the All-commits mailing list