[Lldb-commits] [PATCH] D91742: [lldb] Add examples and reword source-map help string

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 18 14:04:30 PST 2020


kastiglione created this revision.
kastiglione added reviewers: aprantl, keith.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
kastiglione requested review of this revision.
Herald added a subscriber: JDevlieghere.

Update the help string for `target.source-map` to remove the use of the word
"duple" and to add examples. Additionally I rewrote parts with the goal of
making the description more concrete.

rdar://68736012


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91742

Files:
  lldb/source/Target/TargetProperties.td


Index: lldb/source/Target/TargetProperties.td
===================================================================
--- lldb/source/Target/TargetProperties.td
+++ lldb/source/Target/TargetProperties.td
@@ -36,7 +36,7 @@
     Desc<"Skip function prologues when setting breakpoints by name.">;
   def SourceMap: Property<"source-map", "PathMap">,
     DefaultStringValue<"">,
-    Desc<"Source path remappings are used to track the change of location between a source file when built, and where it exists on the current system.  It consists of an array of duples, the first element of each duple is some part (starting at the root) of the path to the file when it was built, and the second is where the remainder of the original build hierarchy is rooted on the local system.  Each element of the array is checked in order and the first one that results in a match wins.">;
+    Desc<"Source path remappings are used to substitute path prefixes of source files, typically needed to debug from a different host than the one that built the target.  The source-map property consists of an array of pairs, the first element is a path prefix, and the second is its replacement.  The syntax is `prefix1 replacement1 prefix2 replacement2...`.  The pairs are checked in order, the first prefix that matches is used, and that prefix is substituted with the replacement.  A common pattern is to use source-map in conjunction with the clang -fdebug-prefix-map flag.  In the build, use `-fdebug-prefix-map=/path/to/build_dir=.` to rewrite the host specific build directory to `.`.  Then for debugging, use `settings set target.source-map . /path/to/local_dir` to convert `.` to a valid local path.">;
   def ExecutableSearchPaths: Property<"exec-search-paths", "FileSpecList">,
     DefaultStringValue<"">,
     Desc<"Executable search paths to use when locating executable files whose paths don't match the local file system.">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91742.306219.patch
Type: text/x-patch
Size: 1914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201118/9e7ce2bd/attachment.bin>


More information about the lldb-commits mailing list