From 8b29fc9deefe42f4140a9a10e660d8ef1c3dcefc Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Thu, 24 Nov 2022 09:57:30 +0800 Subject: [PATCH 1/3] support "settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd" command. Signed-off-by: xwx1135370 --- .../Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td index 2f1ce88808b7..ef6ae3498588 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td @@ -1,6 +1,10 @@ include "../../../../include/lldb/Core/PropertiesBase.td" let Definition = "symbolfiledwarf" in { + def SymLinkPaths: Property<"comp-dir-symlink-paths", "FileSpecList">, + Global, + DefaultStringValue<"">, + Desc<"If the DW_AT_comp_dir matches any of these paths the symbolic links will be resolved at DWARF parse time.">; def IgnoreIndexes: Property<"ignore-file-indexes", "Boolean">, Global, DefaultFalse, -- Gitee From 7b939f690f808f4f0ce2abbb362a661bb2a20318 Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Tue, 6 Dec 2022 13:39:54 +0800 Subject: [PATCH 2/3] Test "settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd" command. Signed-off-by: xwx1135370 --- lldb/test/API/commands/settings/TestSettings.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py index 180d45e4e934..b3fa475cb0f8 100644 --- a/lldb/test/API/commands/settings/TestSettings.py +++ b/lldb/test/API/commands/settings/TestSettings.py @@ -742,3 +742,15 @@ class SettingsCommandTestCase(TestBase): # finally, confirm that trying to set a setting that does not exist still fails. # (SHOWING a setting that does not exist does not currently yield an error.) self.expect('settings set target.setting-which-does-not-exist true', error=True) + + def test_settings_plugin_path(self): + path = self.getBuildArtifact("/proc/self/cwd"); + self.runCmd( + "settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths %s" % + path) #Set to konw value + self.expect( + "settings show plugin.symbol-file.dwarf.comp-dir-symlink-paths", + substrs=[ + 'plugin.symbol-file.dwarf.comp-dir-symlink-paths (file-list) =', + '[0]: \proc\self\cwd']) + self.runCmd("settings clear plugin.symbol-file.dwarf.comp-dir-symlink-paths") -- Gitee From 208bc1d7c1c8a38ec6eca94e1c6d2c8c9178575d Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Wed, 7 Dec 2022 01:31:29 +0000 Subject: [PATCH 3/3] update lldb/test/API/commands/settings/TestSettings.py. Signed-off-by: xwx1135370 --- lldb/test/API/commands/settings/TestSettings.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py index b3fa475cb0f8..038240047321 100644 --- a/lldb/test/API/commands/settings/TestSettings.py +++ b/lldb/test/API/commands/settings/TestSettings.py @@ -745,12 +745,9 @@ class SettingsCommandTestCase(TestBase): def test_settings_plugin_path(self): path = self.getBuildArtifact("/proc/self/cwd"); - self.runCmd( - "settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths %s" % - path) #Set to konw value - self.expect( - "settings show plugin.symbol-file.dwarf.comp-dir-symlink-paths", - substrs=[ - 'plugin.symbol-file.dwarf.comp-dir-symlink-paths (file-list) =', - '[0]: \proc\self\cwd']) + self.runCmd("settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths %s" % + path) #Set to konw value + self.expect("settings show plugin.symbol-file.dwarf.comp-dir-symlink-paths", + substrs=['plugin.symbol-file.dwarf.comp-dir-symlink-paths (file-list) =', + '[0]: \proc\self\cwd']) self.runCmd("settings clear plugin.symbol-file.dwarf.comp-dir-symlink-paths") -- Gitee