)]}'
{
  "commit": "e17e65798e466913f384e7a568d991124798ecb4",
  "tree": "48ac12f2fc5f71bc07155f2cd3edfc6f8c5e1cf0",
  "parents": [
    "23cdb9da3b64a1b396e6053d0b13f9da9abfb44c"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Tue Aug 26 13:17:51 2025 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Aug 27 11:18:52 2025 +0100"
  },
  "message": "gdb/testsuite: work around empty substring bug in expect\n\nThere is a bug in expect, see:\n\n  https://sourceforge.net/p/expect/patches/26/\n\nwhich causes empty substring matches from a regexp to instead return\nthe complete input buffer.  To reproduce this bug, try this command:\n\n  expect -c \u0027spawn sh -c \"echo -n -e \\\"abc\\\"\"; \\\n            expect -re \"(a?)(a)(bc)\"; \\\n\t    puts \"\\n\"; \\\n\t    for { set i 1 } { $i \u003c 4 } { incr i } { \\\n\t      puts -nonewline \"($i): \\\"\"; \\\n\t      puts -nonewline $expect_out($i,string); \\\n\t      puts \"\\\"\" \\\n\t    }\u0027\n\nFor a working expect the output looks like:\n\n  spawn sh -c echo -n -e \"abc\"\n  abc\n\n  (1): \"\"\n  (2): \"a\"\n  (3): \"bc\"\n\nBut for a broken expect the output looks like:\n\n  spawn sh -c echo -n -e \"abc\"\n  abc\n\n  (1): \"abc\"\n  (2): \"a\"\n  (3): \"bc\"\n\nNotice that (1) is now returning the complete input buffer rather than\nthe empty string, this is wrong.\n\nThis is not the first time this bug has impacted GDB\u0027s testsuite,\nthis commit seems to be working around the same problem:\n\n  commit e579b537353cd91cb8fac1eaeb69901d4936766f\n  Date:   Sat Aug 16 20:32:37 2025 +0200\n\n      [gdb/testsuite] Fix TUI tests on freebsd\n\nI recently pushed this commit:\n\n  commit 3825c972a636852600b47c242826313f4b9963b8\n  Date:   Wed Jun 18 15:02:29 2025 +0100\n\n      gdb: allow gdb.Color to work correctly with pagination\n\nWhich added gdb.python/py-color-pagination.exp.  Bug PR gdb/33321 was\nthen created as the test was failing on some hosts.  Turns out, this\nis same expect bug.\n\nThe fix presented here is the same as for e579b537353cd91cb8, avoid\nusing optional regexp substrings at the start of a regexp, and instead\nuse two separate regexp patterns.  With this change in place, the test\nnow passes on all hosts.\n\nThere\u0027s no change in what is being tested after this commit.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d33321\n\nApproved-By: Tom de Vries \u003ctdevries@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ad9ae9b71e5779ea620f803c4a24f4d65db6cf64",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.python/py-color-pagination.exp",
      "new_id": "e7a9e4fec5fbeec754861218e1c3a074ebe8a5ad",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-color-pagination.exp"
    }
  ]
}
