From ee8efd3e2be3868c3e3caf2e34b5cb5a656395d8 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Fri, 14 Oct 2022 17:00:28 -0700 Subject: [PATCH] SWDEV-362165 - Escape argument strings in the JSON file "a_string\x000" -> \"a_string\\x000\" Change-Id: I8bf054702b34577f84080080d9538b16abc996fe [ROCm/rocprofiler commit: 3b61d6bd8c6cc096a1ead981a54ae5eb77967d35] --- projects/rocprofiler/bin/tblextr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler/bin/tblextr.py b/projects/rocprofiler/bin/tblextr.py index 839217a456..0d410c7735 100755 --- a/projects/rocprofiler/bin/tblextr.py +++ b/projects/rocprofiler/bin/tblextr.py @@ -431,7 +431,8 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep mfixformat = ptrn_fixformat.match(record) if mfixformat: #replace '=' in args with parentheses - reformated_args = kernel_arg + mfixformat.group(2).replace('=','(').replace(',',')')+')' + reformated_args = kernel_arg + mfixformat.group(2).replace('=','(').replace(',',')') \ + .replace('\\', "\\\\").replace('\"', "\\\"")+')' record = mfixformat.group(1) + '( ' + reformated_args + ')' m = ptrn_val.match(record)