This is an archive of the discontinued LLVM Phabricator instance.

Make DWARF at_comp_dir symbolic links configurable via plugin.symbol-file.dwarf.comp-dir-symlink-paths setting.
ClosedPublic

Authored by ovyalov on Jul 28 2015, 4:55 PM.

Details

Reviewers
clayborg
jingham
Summary

Make DWARF at_comp_dir symbolic links configurable via newly added plugin.symbol-file.dwarf.comp-dir-symlink-paths setting.
By default, plugin.symbol-file.dwarf.comp-dir-symlink-paths is empty and can be customized by debug session.
Tests don't support Windows since symbolic links on Windows require special permissions' treatment.

Diff Detail

Event Timeline

ovyalov updated this revision to Diff 30878.Jul 28 2015, 4:55 PM
ovyalov retitled this revision from to Make DWARF at_comp_dir symbolic links configurable via plugin.process.dwarf.symlink-paths setting..
ovyalov updated this object.
ovyalov added reviewers: clayborg, jingham.
ovyalov added a subscriber: lldb-commits.
clayborg requested changes to this revision.Jul 29 2015, 10:22 AM
clayborg edited edge metadata.

We need a new "symbol-file" plug-in category. Copy how we did it for "process" and add one for "symbol-file". The setting should be "plugin.symbol-file.dwarf.symlink-paths". See inlined comments.

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
118

Is this limited only the DW_AT_comp_dir? Then we should make the setting title clearer. Should this be "comp-dir-symlink-paths"? Then the description should be a bit more verbose: "If the DW_AT_comp_dir matches any of these paths the symbolic links will be resolved at DWARF parse time."

341–344

We need a new SymbolFile based version of PluginManager::CreateSettingForProcessPlugin():

PluginManager::CreateSettingForSymbolFilePlugin(...)

Please create this function and have the setting name be "symbol-file".

This revision now requires changes to proceed.Jul 29 2015, 10:22 AM
ovyalov updated this revision to Diff 30923.Jul 29 2015, 10:56 AM
ovyalov retitled this revision from Make DWARF at_comp_dir symbolic links configurable via plugin.process.dwarf.symlink-paths setting. to Make DWARF at_comp_dir symbolic links configurable via plugin.symbol-file.dwarf.comp-dir-symlink-paths setting..
ovyalov updated this object.
ovyalov edited edge metadata.
ovyalov marked an inline comment as done.

Addressed review comments.

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
341–344

My bad - copied from ProcessGDBRemote. Fixed.

clayborg accepted this revision.Jul 29 2015, 11:17 AM
clayborg edited edge metadata.

Do you want a default value for this, or are people going to manually set this setting? Looks good though.

This revision is now accepted and ready to land.Jul 29 2015, 11:17 AM

Do you want a default value for this, or are people going to manually set this setting? Looks good though.

I propose to leave it empty by default to let users specify it manually when needed.

Thank you for the review.

ovyalov closed this revision.Jul 29 2015, 3:19 PM

Files:

/lldb/trunk/include/lldb/Core/PluginManager.h
/lldb/trunk/source/Core/PluginManager.cpp
/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/
/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/Makefile
/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/main.cpp
/lldb/trunk/test/lldbtest.py

Users:

ovyalov (Author)

http://reviews.llvm.org/rL243580