)]}'
{
  "commit": "17640f65fc6d42bfcaac9bcd0c72121c461c555b",
  "tree": "bb0cc4b771bda8e327f2da71a60c31029452f66b",
  "parents": [
    "7879fba359f185d674d4e981af4f23a066bfe644"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Mon Jan 15 15:55:28 2024 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Mon Mar 25 17:47:43 2024 +0000"
  },
  "message": "gdb: remove skip_quoted and skip_quoted_chars\n\nThe function skip_quoted_chars (completer.c) is only used by\nskip_quoted (also completer.c), so could be made static.  The function\nskip_quoted just calls directly to skip_quoted_chars but fills in some\ndefault arguments.\n\nThe function skip_quoted is only used by the Pascal expression parser,\nand is only used in one place.\n\nThe skip_quoted_chars function skips a single string; it either looks\nfor a string between matching quotes, or for a string up to a word\nbreak character.\n\nHowever, given how the Pascal expression parser calls this function,\nwe know that the first character will always be a single quote, in\nwhich case skip_quoted_chars will looks for a string between matching\nsingle quotes.\n\nThe skip_quoted_chars doesn\u0027t do any escaped character handling, it\nwill just stop at the next single quote character.\n\nIn this commit I propose to remove skip_quoted and skip_quoted_chars,\nand replace these with a smaller function pascal_skip_string  which\nI\u0027ve placed in p-exp.y.  This new function only skips a string between\nmatching single quotes, which is exactly the use case that we need.\n\nThe benefit of this change is to remove (some) code duplication.  It\nfeels like skip_quoted is similar in some ways to\nextract_string_maybe_quoted, however, there are some differences;\nskip_quoted uses the quotes and word break characters from the\ncompletion engine which extract_string_maybe_quoted does not.\n\nHowever, I\u0027m currently working on improving filename completion, one\npart of this is that I\u0027m looking at allowing filenames to be quoted\nwith single or double quotes, while the default string quoting in\nGDB (for expressions) can only use single quotes.  If I do end up\nallowing single and double quotes in some cases, but we retain the\nsingle quotes only for expressions then skip_quoted starts to become a\nproblem, should it accept both quote types, or only one?\n\nBut given how skip_quoted is used, I can avoid worrying about this by\nsimply removing skip_quoted.\n\nThe Pascal tests do still pass.  The code that called skip_quoted is\ncalled at least once in the Pascal tests (adding an abort() call\ncauses gdb.pascal/types.exp to fail), but I doubt the testing is\nextensive.  Not sure how widely used GDB for Pascal actually is\nthough.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "168fab74d149d6c063dd5ba2a4719602a34bdcf1",
      "old_mode": 33188,
      "old_path": "gdb/completer.c",
      "new_id": "8168f79de0ea9e01b93f5775cac69092615bacfe",
      "new_mode": 33188,
      "new_path": "gdb/completer.c"
    },
    {
      "type": "modify",
      "old_id": "f0b9e68e12062d0e1865ef1c90acceab4ad24ba0",
      "old_mode": 33188,
      "old_path": "gdb/completer.h",
      "new_id": "f604a95011fab3e98e69c21c302eb757d170620e",
      "new_mode": 33188,
      "new_path": "gdb/completer.h"
    },
    {
      "type": "modify",
      "old_id": "ea7eb8c8d7e1d517701b52eba6c18547a31c9b73",
      "old_mode": 33188,
      "old_path": "gdb/p-exp.y",
      "new_id": "bfb1cad60a773d2d9d75f7d4c9f1062cdc5d204e",
      "new_mode": 33188,
      "new_path": "gdb/p-exp.y"
    }
  ]
}
