)]}'
{
  "commit": "29ef4c0699e1b46d41ade00ae07a54f979ea21cc",
  "tree": "d658df2d8acdca50335f28c836e5f877fc82769d",
  "parents": [
    "e4028336b19998e74a51dd0918a8b3922e08a537"
  ],
  "author": {
    "name": "Dominik \u0027Disconnect3d\u0027 Czarnota",
    "email": "dominik.b.czarnota@gmail.com",
    "time": "Wed Feb 23 00:43:25 2022 +0100"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Wed Feb 23 09:10:43 2022 -0500"
  },
  "message": "gdb/linux-tdep.c: Add Perms to the \u0027info proc mappings\u0027 output\n\nFixes #28914 and so it adds a \u0027Perms\u0027 (permissions) column to the\n\u0027info proc mappings\u0027 command output. This will allow users to know\nthe memory pages permissions right away from GDB instead of having\nto fetch them from the /proc/$pid/maps file (which is also what GDB\ndoes internally, but it just did not print that column).\n\nBelow I am also showing how an example output looks like before and\nafter this commit in case someone wonders.\n\nOn i386 targets - before this commit:\n```\n(gdb) info proc mappings\nprocess 3461464\nMapped address spaces:\n\n    Start Addr   End Addr        Size     Offset objfile\n    0x56555000 0x56556000      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out\n    0x56556000 0x56557000      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out\n    0x56557000 0x56558000      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n    0x56558000 0x5655a000      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n    0xf7fc4000 0xf7fc8000      0x4000        0x0 [vvar]\n    0xf7fc8000 0xf7fca000      0x2000        0x0 [vdso]\n    0xf7fca000 0xf7fcb000      0x1000        0x0 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7fcb000 0xf7fee000     0x23000     0x1000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7fee000 0xf7ffb000      0xd000    0x24000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7ffb000 0xf7ffe000      0x3000    0x30000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xfffdc000 0xffffe000     0x22000        0x0 [stack]\n(gdb)\n```\n\nOn i386 targets - after this commit:\n```\n(gdb) info proc mappings\nprocess 3461464\nMapped address spaces:\n\n    Start Addr   End Addr   Perms       Size     Offset objfile\n    0x56555000 0x56556000   r--p      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out\n    0x56556000 0x56557000   r-xp      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out\n    0x56557000 0x56558000   r--p      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n    0x56558000 0x5655a000   rw-p      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n    0xf7fc4000 0xf7fc8000   r--p      0x4000        0x0 [vvar]\n    0xf7fc8000 0xf7fca000   r-xp      0x2000        0x0 [vdso]\n    0xf7fca000 0xf7fcb000   r--p      0x1000        0x0 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7fcb000 0xf7fee000   r-xp     0x23000     0x1000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7fee000 0xf7ffb000   r--p      0xd000    0x24000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xf7ffb000 0xf7ffe000   rw-p      0x3000    0x30000 /usr/lib/i386-linux-gnu/ld-2.33.so\n    0xfffdc000 0xffffe000   rw-p     0x22000        0x0 [stack]\n(gdb)\n```\n\nOn amd64 targets - after this commit:\n```\n(gdb) info proc mappings\nprocess 3461869\nMapped address spaces:\n\n          Start Addr           End Addr   Perms       Size     Offset objfile\n      0x555555554000     0x555555555000   r--p      0x1000        0x0 /home/dc/src/binutils-gdb/build/a.out\n      0x555555555000     0x555555556000   r-xp      0x1000     0x1000 /home/dc/src/binutils-gdb/build/a.out\n      0x555555556000     0x555555557000   r--p      0x1000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n      0x555555557000     0x555555559000   rw-p      0x2000     0x2000 /home/dc/src/binutils-gdb/build/a.out\n      0x7ffff7fc3000     0x7ffff7fc7000   r--p      0x4000        0x0 [vvar]\n      0x7ffff7fc7000     0x7ffff7fc9000   r-xp      0x2000        0x0 [vdso]\n      0x7ffff7fc9000     0x7ffff7fca000   r--p      0x1000        0x0 /usr/lib/x86_64-linux-gnu/ld-2.33.so\n      0x7ffff7fca000     0x7ffff7ff1000   r-xp     0x27000     0x1000 /usr/lib/x86_64-linux-gnu/ld-2.33.so\n      0x7ffff7ff1000     0x7ffff7ffb000   r--p      0xa000    0x28000 /usr/lib/x86_64-linux-gnu/ld-2.33.so\n      0x7ffff7ffb000     0x7ffff7fff000   rw-p      0x4000    0x31000 /usr/lib/x86_64-linux-gnu/ld-2.33.so\n      0x7ffffffdd000     0x7ffffffff000   rw-p     0x22000        0x0 [stack]\n  0xffffffffff600000 0xffffffffff601000   --xp      0x1000        0x0 [vsyscall]\n(gdb)\n```\n\nSigned-off-by: Dominik \u0027Disconnect3d\u0027 Czarnota \u003cdominik.b.czarnota@gmail.com\u003e\nChange-Id: I4991f6cc758cd532eae3ae98c29d22e7bd9d9c36\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1b48b7fef25ef03d021793374f00e0b4b97d815a",
      "old_mode": 33188,
      "old_path": "gdb/linux-tdep.c",
      "new_id": "060f60e753a2692ddd542c4919616fbe69f14605",
      "new_mode": 33188,
      "new_path": "gdb/linux-tdep.c"
    }
  ]
}
