)]}'
{
  "commit": "dae2db38ebaa76ed359bb39cc40c9b5e0b072e12",
  "tree": "e509da2f828217b39c1b82cec4dab8850da6e464",
  "parents": [
    "33637ecac80f24cd2ad59d1e71714d8b5b685898"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "andrew.burgess@embecosm.com",
    "time": "Tue Sep 03 22:38:59 2019 +0100"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Tue Sep 24 20:23:37 2019 -0400"
  },
  "message": "gdb/fortran: Nested subroutine support\n\nThis patch is a rebase and update of the following three patches:\n\n   https://sourceware.org/ml/gdb-patches/2018-11/msg00298.html\n   https://sourceware.org/ml/gdb-patches/2018-11/msg00302.html\n   https://sourceware.org/ml/gdb-patches/2018-11/msg00301.html\n\nI have merged these together into a single commit as the second patch,\nadding scope support to nested subroutines, means that some of the\nchanges in the first patch are now no longer useful and would have to\nbe backed out.  The third patch is tightly coupled to the changes in\nthe second of these patches and I think deserves to live together with\nit.\n\nThere is an extra change in cp-namespace.c that is new, this resolves\nan issue with symbol lookup when placing breakpoints from within\nnested subroutines.\n\nThere is also an extra test added to this commit \u0027nested-funcs-2.exp\u0027\nthat was written by Richard Bunt from ARM, this offers some additional\ntesting of breakpoints on nested functions.\n\nAfter this commit it is possible to place breakpoints on nested\nFortran subroutines and functions by using a fully scoped name, for\nexample, given this simple Fortran program:\n\n    program greeting\n      call message\n    contains\n      subroutine message\n        print *, \"Hello World\"\n      end subroutine message\n    end program greeting\n\nIt is possible to place a breakpoint in \u0027message\u0027 with:\n\n    (gdb) break greeting::message\n    Breakpoint 1 at 0x4006c9: file basic.f90, line 5.\n\nWhat doesn\u0027t work with this commit is placing a breakpoint like this:\n\n    (gdb) break message\n    Function \"message\" not defined.\n\nMaking this work will come in a later commit.\n\ngdb/ChangeLog:\n\n\t* cp-namespace.c (cp_search_static_and_baseclasses): Only search\n\tfor nested static variables when searchin VAR_DOMAIN.\n\t* dwarf2read.c (add_partial_symbol): Add nested subroutines to the\n\tglobal scope, update comment.\n\t(add_partial_subprogram): Call add_partial_subprogram recursively\n\tfor nested subroutines when processinng Fortran.\n\t(load_partial_dies): Process the child entities of a subprogram\n\twhen processing Fortran.\n\t(partial_die_parent_scope): Handle building scope\n\tfor Fortran nested functions.\n\t(process_die): Record that nested functions have a scope.\n\t(new_symbol): Always record Fortran subprograms on the global\n\tsymbol list.\n\t(determine_prefix): How to build the prefix for Fortran\n\tsubprograms.\n\ngdb/testsuite/ChangeLog:\n\n\t* gdb.fortran/nested-funcs.exp: Tests for placing breakpoints on\n\tnested functions.\n\t* gdb.fortran/nested-funcs.f90: Update expected results.\n\t* gdb.fortran/nested-funcs-2.exp: New file.\n\t* gdb.fortran/nested-funcs-2.f90: New file.\n\ngdb/doc/ChangeLog:\n\n\t* doc/gdb.texinfo (Fortran Operators): Describe scope operator.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5b352d1d77be8f092719c3926af170947ce313f8",
      "old_mode": 33188,
      "old_path": "gdb/cp-namespace.c",
      "new_id": "e15b77e701ddd832ad12b33a4ee6ef2203423a55",
      "new_mode": 33188,
      "new_path": "gdb/cp-namespace.c"
    },
    {
      "type": "modify",
      "old_id": "f2713c03960dbe3bf4cc15714fc2bd68794db26e",
      "old_mode": 33188,
      "old_path": "gdb/doc/gdb.texinfo",
      "new_id": "cd1d1c8abeeb279bb2a44fd76f7447a1df99d77d",
      "new_mode": 33188,
      "new_path": "gdb/doc/gdb.texinfo"
    },
    {
      "type": "modify",
      "old_id": "1052501c351de0923ee79df201151337517841f0",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2read.c",
      "new_id": "2c11591475ce4ed7a74cfd6fa73512331580be20",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2read.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e23d8bad4b2bbfe4fcfa1f8b3596e87bc13b0722",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.fortran/nested-funcs-2.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c3b4e2ba05f5ce98e1e2c42121553739ea599787",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.fortran/nested-funcs-2.f90"
    },
    {
      "type": "modify",
      "old_id": "2cfd402937ab43205a00d83c9216b576d9f75f5d",
      "old_mode": 33261,
      "old_path": "gdb/testsuite/gdb.fortran/nested-funcs.exp",
      "new_id": "8d218cb0ccec86e51e2deda2a67b2b571e3ff56f",
      "new_mode": 33261,
      "new_path": "gdb/testsuite/gdb.fortran/nested-funcs.exp"
    },
    {
      "type": "modify",
      "old_id": "3431705a75638c146cd505006204995ae0beb892",
      "old_mode": 33261,
      "old_path": "gdb/testsuite/gdb.fortran/nested-funcs.f90",
      "new_id": "ce2f269e484023393cc65b5475066c5ae641f20c",
      "new_mode": 33261,
      "new_path": "gdb/testsuite/gdb.fortran/nested-funcs.f90"
    }
  ]
}
