Skip to content

Commit

Permalink
Setting working directory to ensure lldb remote debugging works on re…
Browse files Browse the repository at this point in the history
…lative paths in debug info etc.
  • Loading branch information
gyfelton committed Oct 1, 2020
1 parent ff8827e commit 57e637f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down
5 changes: 5 additions & 0 deletions tools/xcodeproj_shims/installers/lldb-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ set -euo pipefail
# the paths in the debug info. This lldb setting ensures that _project relative_
# paths are remapped to _project absolute_ paths.
#
# The platform settings one points the current working directory (cwd) to workspace root.
# This is needed for features relying on lldb remote debugging, such as `oso_prefix_is_pwd`.
#
# NOTE: In order to use this, add this line to `~/.lldbinit`:
#
# command source ~/.lldbinit-source-map
cat <<-END > ~/.lldbinit-source-map
platform settings -w "$BAZEL_WORKSPACE_ROOT/"
settings set target.source-map ./ "$BAZEL_WORKSPACE_ROOT/"
settings set target.sdk-path $SDKROOT
settings set target.swift-framework-search-paths $FRAMEWORK_SEARCH_PATHS
Expand Down

0 comments on commit 57e637f

Please sign in to comment.