get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/114622/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 114622,
    "url": "http://patchwork.dpdk.org/api/patches/114622/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220804134430.6192-7-adwivedi@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220804134430.6192-7-adwivedi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220804134430.6192-7-adwivedi@marvell.com",
    "date": "2022-08-04T13:44:30",
    "name": "[6/6] devtools: add trace function check in checkpatch",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c2023f92ae47db83fcb9b3a5b834778f3aee3094",
    "submitter": {
        "id": 1561,
        "url": "http://patchwork.dpdk.org/api/people/1561/?format=api",
        "name": "Ankur Dwivedi",
        "email": "adwivedi@marvell.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patchwork.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220804134430.6192-7-adwivedi@marvell.com/mbox/",
    "series": [
        {
            "id": 24204,
            "url": "http://patchwork.dpdk.org/api/series/24204/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=24204",
            "date": "2022-08-04T13:44:24",
            "name": "add trace points in ethdev library",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/24204/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/114622/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/114622/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0D676A00C4;\n\tThu,  4 Aug 2022 15:50:24 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EE09342BDB;\n\tThu,  4 Aug 2022 15:50:23 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 2BF484282B\n for <dev@dpdk.org>; Thu,  4 Aug 2022 15:50:23 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 274Dj2Dr020893;\n Thu, 4 Aug 2022 06:48:05 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hqgf1xr9g-5\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 04 Aug 2022 06:48:05 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Thu, 4 Aug 2022 06:48:02 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 4 Aug 2022 06:48:02 -0700",
            "from hyd1349.t110.caveonetworks.com.com (unknown [10.29.45.13])\n by maili.marvell.com (Postfix) with ESMTP id 5C73C5B6932;\n Thu,  4 Aug 2022 06:47:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=+5nM1zZfVytYlqWtKajNou6+mxfw77/VB0G2gu3QCjE=;\n b=dcVGHG5dTz8A620OKlmVomRzFk1i2umqfOH7rx1VYDPw3s5afdPwPSruHs2cAfslUw4q\n 5vH0nkag2+zKaVnhyzlutZu7306zHYjmnITODYGEOCz3SqFyYFnD7cOQkbetGsR3sfao\n sfTb/9M9SGUWXNkjYpywb2IkM/UuwtyG+0Nkfe1v+79JT4mFjKMfAcio5vn8QbK3PCVy\n 1QmSK7jIKvwV6rJo5j8Wpvldgg9x9hKuz4+ek8sSVB943gdyGCMMcLDvuyHH4/KuLLXS\n sXTL682ev9bhVTjbZYFtSOhjaYVweMiHzgpM/gkuPSD2QUWAlAhgaft68YCu8pcUOxPq uQ==",
        "From": "Ankur Dwivedi <adwivedi@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, <mdr@ashroe.eu>, <orika@nvidia.com>,\n <ferruh.yigit@xilinx.com>, <chas3@att.com>, <humin29@huawei.com>,\n <linville@tuxdriver.com>, <ciara.loftus@intel.com>,\n <qi.z.zhang@intel.com>, <mw@semihalf.com>, <mk@semihalf.com>,\n <shaibran@amazon.com>, <evgenys@amazon.com>, <igorch@amazon.com>,\n <chandu@amd.com>, <irusskikh@marvell.com>,\n <shepard.siegel@atomicrules.com>, <ed.czeck@atomicrules.com>,\n <john.miller@atomicrules.com>, <ajit.khaparde@broadcom.com>,\n <somnath.kotur@broadcom.com>, <jerinj@marvell.com>,\n <mczekaj@marvell.com>, <sthotton@marvell.com>,\n <srinivasan@marvell.com>, <hkalra@marvell.com>,\n <rahul.lakkireddy@chelsio.com>, <johndale@cisco.com>,\n <hyonkim@cisco.com>, <liudongdong3@huawei.com>,\n <yisen.zhuang@huawei.com>, <xuanziyang2@huawei.com>,\n <cloud.wangxiaoyun@huawei.com>, <zhouguoyang@huawei.com>,\n <simei.su@intel.com>, <wenjun1.wu@intel.com>, <qiming.yang@intel.com>,\n <Yuying.Zhang@intel.com>, <beilei.xing@intel.com>,\n <xiao.w.wang@intel.com>, <jingjing.wu@intel.com>,\n <junfeng.guo@intel.com>, <rosen.xu@intel.com>,\n <ndabilpuram@marvell.com>, <kirankumark@marvell.com>,\n <skori@marvell.com>, <skoteshwar@marvell.com>, <lironh@marvell.com>,\n <zr@semihalf.com>, <radhac@marvell.com>, <vburru@marvell.com>,\n <sedara@marvell.com>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,\n <sthemmin@microsoft.com>, <longli@microsoft.com>, <spinler@cesnet.cz>,\n <chaoyong.he@corigine.com>, <niklas.soderlund@corigine.com>,\n <hemant.agrawal@nxp.com>, <sachin.saxena@oss.nxp.com>,\n <g.singh@nxp.com>, <apeksha.gupta@nxp.com>, <sachin.saxena@nxp.com>,\n <aboyer@pensando.io>, <rmody@marvell.com>, <shshaikh@marvell.com>,\n <dsinghrawat@marvell.com>, <andrew.rybchenko@oktetlabs.ru>,\n <jiawenwu@trustnetic.com>, <jianwang@trustnetic.com>,\n <jbehrens@vmware.com>, <maxime.coquelin@redhat.com>,\n <chenbo.xia@intel.com>, <steven.webster@windriver.com>,\n <matt.peters@windriver.com>, <bruce.richardson@intel.com>,\n <mtetsuyah@gmail.com>, <grive@u256.net>, <jasvinder.singh@intel.com>,\n <cristian.dumitrescu@intel.com>, <jgrajcia@cisco.com>,\n Ankur Dwivedi <adwivedi@marvell.com>, <tduszynski@marvell.com>",
        "Subject": "[PATCH 6/6] devtools: add trace function check in checkpatch",
        "Date": "Thu, 4 Aug 2022 19:14:30 +0530",
        "Message-ID": "<20220804134430.6192-7-adwivedi@marvell.com>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20220804134430.6192-1-adwivedi@marvell.com>",
        "References": "<20220804134430.6192-1-adwivedi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "GNPgkHsABX81LKYCgB1-1HVoG9In8bBZ",
        "X-Proofpoint-ORIG-GUID": "GNPgkHsABX81LKYCgB1-1HVoG9In8bBZ",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1\n definitions=2022-08-04_03,2022-08-04_02,2022-06-22_01",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "This patch adds a check in checkpatch tool, to check if trace\nfunction is added in any new function added in ethdev library.\n\nIt uses the existing build_map_changes() function and version.map\nfile to create a list of newly added functions. The definition of\nthese functions are checked if they contain trace calls or not.\nThe checkpatch return error if the trace calls are not present.\n\nCc: tduszynski@marvell.com\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\n---\n devtools/check-symbol-change.sh | 76 +-------------------------------\n devtools/check-trace-func.py    | 52 ++++++++++++++++++++++\n devtools/check-trace-func.sh    | 50 +++++++++++++++++++++\n devtools/checkpatches.sh        |  9 ++++\n devtools/common-func.sh         | 77 +++++++++++++++++++++++++++++++++\n 5 files changed, 190 insertions(+), 74 deletions(-)\n create mode 100755 devtools/check-trace-func.py\n create mode 100755 devtools/check-trace-func.sh\n create mode 100644 devtools/common-func.sh",
    "diff": "diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh\nindex 8992214ac8..4bdd0d727a 100755\n--- a/devtools/check-symbol-change.sh\n+++ b/devtools/check-symbol-change.sh\n@@ -2,80 +2,8 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>\n \n-build_map_changes()\n-{\n-\tlocal fname=\"$1\"\n-\tlocal mapdb=\"$2\"\n-\n-\tcat \"$fname\" | awk '\n-\t\t# Initialize our variables\n-\t\tBEGIN {map=\"\";sym=\"\";ar=\"\";sec=\"\"; in_sec=0; in_map=0}\n-\n-\t\t# Anything that starts with + or -, followed by an a\n-\t\t# and ends in the string .map is the name of our map file\n-\t\t# This may appear multiple times in a patch if multiple\n-\t\t# map files are altered, and all section/symbol names\n-\t\t# appearing between a triggering of this rule and the\n-\t\t# next trigger of this rule are associated with this file\n-\t\t/[-+] [ab]\\/.*\\.map/ {map=$2; in_map=1; next}\n-\n-\t\t# The previous rule catches all .map files, anything else\n-\t\t# indicates we left the map chunk.\n-\t\t/[-+] [ab]\\// {in_map=0}\n-\n-\t\t# Triggering this rule, which starts a line and ends it\n-\t\t# with a { identifies a versioned section.  The section name is\n-\t\t# the rest of the line with the + and { symbols removed.\n-\t\t# Triggering this rule sets in_sec to 1, which actives the\n-\t\t# symbol rule below\n-\t\t/^.*{/ {\n-\t\t\tgsub(\"+\", \"\");\n-\t\t\tif (in_map == 1) {\n-\t\t\t\tsec=$(NF-1); in_sec=1;\n-\t\t\t}\n-\t\t}\n-\n-\t\t# This rule identifies the end of a section, and disables the\n-\t\t# symbol rule\n-\t\t/.*}/ {in_sec=0}\n-\n-\t\t# This rule matches on a + followed by any characters except a :\n-\t\t# (which denotes a global vs local segment), and ends with a ;.\n-\t\t# The semicolon is removed and the symbol is printed with its\n-\t\t# association file name and version section, along with an\n-\t\t# indicator that the symbol is a new addition.  Note this rule\n-\t\t# only works if we have found a version section in the rule\n-\t\t# above (hence the in_sec check) And found a map file (the\n-\t\t# in_map check).  If we are not in a map chunk, do nothing.  If\n-\t\t# we are in a map chunk but not a section chunk, record it as\n-\t\t# unknown.\n-\t\t/^+[^}].*[^:*];/ {gsub(\";\",\"\");sym=$2;\n-\t\t\tif (in_map == 1) {\n-\t\t\t\tif (in_sec == 1) {\n-\t\t\t\t\tprint map \" \" sym \" \" sec \" add\"\n-\t\t\t\t} else {\n-\t\t\t\t\tprint map \" \" sym \" unknown add\"\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n-\n-\t\t# This is the same rule as above, but the rule matches on a\n-\t\t# leading - rather than a +, denoting that the symbol is being\n-\t\t# removed.\n-\t\t/^-[^}].*[^:*];/ {gsub(\";\",\"\");sym=$2;\n-\t\t\tif (in_map == 1) {\n-\t\t\t\tif (in_sec == 1) {\n-\t\t\t\t\tprint map \" \" sym \" \" sec \" del\"\n-\t\t\t\t} else {\n-\t\t\t\t\tprint map \" \" sym \" unknown del\"\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}' > \"$mapdb\"\n-\n-\t\tsort -u \"$mapdb\" > \"$mapdb.2\"\n-\t\tmv -f \"$mapdb.2\" \"$mapdb\"\n-\n-}\n+selfdir=$(dirname $(readlink -f $0))\n+. $selfdir/common-func.sh\n \n is_stable_section() {\n \t[ \"$1\" != 'EXPERIMENTAL' ] && [ \"$1\" != 'INTERNAL' ]\ndiff --git a/devtools/check-trace-func.py b/devtools/check-trace-func.py\nnew file mode 100755\nindex 0000000000..d38d8616cd\n--- /dev/null\n+++ b/devtools/check-trace-func.py\n@@ -0,0 +1,52 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (C) 2022 Marvell.\n+\n+import sys\n+\n+patch = sys.argv[1]\n+fn = sys.argv[2]\n+\n+with open(patch, 'r') as fr:\n+\tfstr = fr.read()\n+\n+def find_fn_def():\n+\tfound = 0\n+\ttmp = 0\n+\tidx = 0\n+\twhile found == 0:\n+\t\tidx = fstr.find(\"+\"+fn+\"(\", idx)\n+\t\tif (idx != -1):\n+\t\t\ttmp = fstr.find(')', idx)\n+\t\t\tif (fstr[tmp + 1] == ';'):\n+\t\t\t\tidx = tmp\n+\t\t\t\tcontinue\n+\t\t\telse:\n+\t\t\t\tfound = 1\n+\t\telse:\n+\t\t\tbreak\n+\treturn idx\n+\n+def find_trace(index):\n+\tfp = fstr.find(\"{\", index)\n+\tsp = fstr.find(\"}\", fp)\n+\tfd = fstr[fp:sp]\n+\n+\ti = fd.find(\"_trace_\")\n+\tif (i != -1):\n+\t\treturn 0\n+\telse:\n+\t\treturn 1\n+\n+\n+def __main():\n+\tret=0\n+\tindex = find_fn_def()\n+\tif (index != -1):\n+\t\t# If function definition is present,\n+\t\t# check if trace call is present\n+\t\tret = find_trace(index)\n+\treturn ret\n+\n+if __name__ == \"__main__\":\n+\tsys.exit(__main())\ndiff --git a/devtools/check-trace-func.sh b/devtools/check-trace-func.sh\nnew file mode 100755\nindex 0000000000..777b9a03e0\n--- /dev/null\n+++ b/devtools/check-trace-func.sh\n@@ -0,0 +1,50 @@\n+#!/bin/sh\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (C) 2022 Marvell.\n+\n+selfdir=$(dirname $(readlink -f $0))\n+. $selfdir/common-func.sh\n+\n+libdir=\"ethdev\"\n+check_for_trace_call()\n+{\n+\tmapdb=\"$2\"\n+\tret=0\n+\n+\twhile read -r mname symname secname ar; do\n+\t\tlibp=0\n+\t\tlibname=$(echo $mname | awk 'BEGIN {FS=\"/\"};{print $3}')\n+\n+\t\tfor i in $libdir; do\n+\t\t\tif [ $i = $libname ]; then\n+\t\t\t\tlibp=1\n+\t\t\t\tbreak\n+\t\t\tfi\n+\t\tdone\n+\n+\t\tif [ $libp -eq 1 ] && [ \"$ar\" = \"add\" ]; then\n+\t\t\tif [ \"$secname\" = \"EXPERIMENTAL\" ]; then\n+\t\t\t\t# Check if new API is added with trace function call\n+\t\t\t\tif ! devtools/check-trace-func.py $1 $symname; then\n+\t\t\t\t\tret=1\n+\t\t\t\t\techo -n \"ERROR: Function $symname \"\n+\t\t\t\t\techo \"is added without trace call\"\n+\t\t\t\tfi\n+\t\t\tfi\n+\t\tfi\n+\tdone < \"$mapdb\"\n+\n+\treturn $ret\n+}\n+\n+clean_and_exit_on_sig()\n+{\n+\trm -rf \"$mapfile\"\n+}\n+\n+trap clean_and_exit_on_sig EXIT\n+\n+mapfile=$(mktemp -t dpdk.mapdb.XXXXXX)\n+\n+build_map_changes \"$1\" \"$mapfile\"\n+check_for_trace_call \"$1\" \"$mapfile\"\ndiff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh\nindex 1edc5810ad..35c47b3e85 100755\n--- a/devtools/checkpatches.sh\n+++ b/devtools/checkpatches.sh\n@@ -10,6 +10,7 @@\n . $(dirname $(readlink -f $0))/load-devel-config\n \n VALIDATE_NEW_API=$(dirname $(readlink -f $0))/check-symbol-change.sh\n+VALIDATE_TRACE_FUNC=$(dirname $(readlink -f $0))/check-trace-func.sh\n \n # Enable codespell by default. This can be overwritten from a config file.\n # Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path\n@@ -338,6 +339,14 @@ check () { # <patch> <commit> <title>\n \t\tret=1\n \tfi\n \n+\t! $verbose || printf '\\nChecking API additions with trace function call :\\n'\n+\treport=$($VALIDATE_TRACE_FUNC \"$tmpinput\")\n+\tif [ $? -ne 0 ] ; then\n+\t\t$headline_printed || print_headline \"$3\"\n+\t\tprintf '%s\\n' \"$report\"\n+\t\tret=1\n+\tfi\n+\n \tif [ \"$tmpinput\" != \"$1\" ]; then\n \t\trm -f \"$tmpinput\"\n \t\ttrap - INT\ndiff --git a/devtools/common-func.sh b/devtools/common-func.sh\nnew file mode 100644\nindex 0000000000..c88e949890\n--- /dev/null\n+++ b/devtools/common-func.sh\n@@ -0,0 +1,77 @@\n+#!/bin/sh\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>\n+\n+build_map_changes()\n+{\n+\tlocal fname=\"$1\"\n+\tlocal mapdb=\"$2\"\n+\n+\tcat \"$fname\" | awk '\n+\t\t# Initialize our variables\n+\t\tBEGIN {map=\"\";sym=\"\";ar=\"\";sec=\"\"; in_sec=0; in_map=0}\n+\n+\t\t# Anything that starts with + or -, followed by an a\n+\t\t# and ends in the string .map is the name of our map file\n+\t\t# This may appear multiple times in a patch if multiple\n+\t\t# map files are altered, and all section/symbol names\n+\t\t# appearing between a triggering of this rule and the\n+\t\t# next trigger of this rule are associated with this file\n+\t\t/[-+] [ab]\\/.*\\.map/ {map=$2; in_map=1; next}\n+\n+\t\t# The previous rule catches all .map files, anything else\n+\t\t# indicates we left the map chunk.\n+\t\t/[-+] [ab]\\// {in_map=0}\n+\n+\t\t# Triggering this rule, which starts a line and ends it\n+\t\t# with a { identifies a versioned section.  The section name is\n+\t\t# the rest of the line with the + and { symbols removed.\n+\t\t# Triggering this rule sets in_sec to 1, which actives the\n+\t\t# symbol rule below\n+\t\t/^.*{/ {\n+\t\t\tgsub(\"+\", \"\");\n+\t\t\tif (in_map == 1) {\n+\t\t\t\tsec=$(NF-1); in_sec=1;\n+\t\t\t}\n+\t\t}\n+\n+\t\t# This rule identifies the end of a section, and disables the\n+\t\t# symbol rule\n+\t\t/.*}/ {in_sec=0}\n+\n+\t\t# This rule matches on a + followed by any characters except a :\n+\t\t# (which denotes a global vs local segment), and ends with a ;.\n+\t\t# The semicolon is removed and the symbol is printed with its\n+\t\t# association file name and version section, along with an\n+\t\t# indicator that the symbol is a new addition.  Note this rule\n+\t\t# only works if we have found a version section in the rule\n+\t\t# above (hence the in_sec check) And found a map file (the\n+\t\t# in_map check).  If we are not in a map chunk, do nothing.  If\n+\t\t# we are in a map chunk but not a section chunk, record it as\n+\t\t# unknown.\n+\t\t/^+[^}].*[^:*];/ {gsub(\";\",\"\");sym=$2;\n+\t\t\tif (in_map == 1) {\n+\t\t\t\tif (in_sec == 1) {\n+\t\t\t\t\tprint map \" \" sym \" \" sec \" add\"\n+\t\t\t\t} else {\n+\t\t\t\t\tprint map \" \" sym \" unknown add\"\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\t# This is the same rule as above, but the rule matches on a\n+\t\t# leading - rather than a +, denoting that the symbol is being\n+\t\t# removed.\n+\t\t/^-[^}].*[^:*];/ {gsub(\";\",\"\");sym=$2;\n+\t\t\tif (in_map == 1) {\n+\t\t\t\tif (in_sec == 1) {\n+\t\t\t\t\tprint map \" \" sym \" \" sec \" del\"\n+\t\t\t\t} else {\n+\t\t\t\t\tprint map \" \" sym \" unknown del\"\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}' > \"$mapdb\"\n+\n+\t\tsort -u \"$mapdb\" > \"$mapdb.2\"\n+\t\tmv -f \"$mapdb.2\" \"$mapdb\"\n+}\n",
    "prefixes": [
        "6/6"
    ]
}