From 958b761d3392495c3bf635e97fb9bd0e45714295 Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Tue, 4 Sep 2018 15:51:38 -0300 Subject: [PATCH] [postmortem] add postmortem metadata for symbols As discussed in https://github.com/nodejs/llnode/issues/156, we need postmortem metadata for Symbols to properly print Symbol property names in postmortem debugging tools. Patch suggested by Ben Noordhuis (https://github.com/nodejs/llnode/issues/156#issuecomment-350467852). R=bmeurer@google.com, yangguo@google.com Change-Id: Ied6d3c079e8b23a9c796bc632c37785ed7dbc118 Reviewed-on: https://chromium-review.googlesource.com/1205052 Reviewed-by: Benedikt Meurer Reviewed-by: Yang Guo Commit-Queue: Yang Guo Cr-Commit-Position: refs/heads/master@{#55632} --- BUILD.gn | 2 ++ tools/gen-postmortem-metadata.py | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 4b28b67a534a..efdd18919607 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -859,6 +859,8 @@ action("postmortem-metadata") { "src/objects/js-regexp-string-iterator.h", "src/objects/map.h", "src/objects/map-inl.h", + "src/objects/name.h", + "src/objects/name-inl.h", "src/objects/scope-info.h", "src/objects/script.h", "src/objects/script-inl.h", diff --git a/tools/gen-postmortem-metadata.py b/tools/gen-postmortem-metadata.py index 8191c8152f59..9bc1dd66d599 100644 --- a/tools/gen-postmortem-metadata.py +++ b/tools/gen-postmortem-metadata.py @@ -417,15 +417,10 @@ def load_objects_from_file(objfilename, checktypes): # way around. # for type in types: - # - # Symbols and Strings are implemented using the same classes. - # - usetype = re.sub('SYMBOL_', 'STRING_', type); - # # REGEXP behaves like REG_EXP, as in JS_REGEXP_TYPE => JSRegExp. # - usetype = re.sub('_REGEXP_', '_REG_EXP_', usetype); + usetype = re.sub('_REGEXP_', '_REG_EXP_', type); # # Remove the "_TYPE" suffix and then convert to camel case,