Skip to content

lldb debugging is not working from version 1.46 #76006

@douglascorrea

Description

@douglascorrea

I tried this code:

rust-lldb target/debug/rust-str-vs-string

I expected to see this happen: To be able to use lldb commands as I can if I use lldb directly

Instead, this happened: error: file specified in --source (-s) option doesn't exist: 'lldb_commands'

Meta

rustc --version --verbose:

rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0

The same happens on a macOS machine


I saw that lldb_commands is on src/etc/ directory together with rust-lldb shell script, and I also saw that script calls it directly, but I'm not sure how it should behaves in my machine since the lldb_commands is not there (rustup is not installing it)

I've asked it on Rust users forum, and also in the discord chat, but no answers, so I'm considering it a bug, feel free to close it if it is something wrong with my installation and, if possible, guide me on where should I look to fix it.

Activity

ehuss

ehuss commented on Aug 27, 2020

@ehuss
Contributor

cc @ortem who introduced lldb_commands in #72357. I also notice the script references $RUSTC_SYSROOT which isn't set anywhere.

douglascorrea

douglascorrea commented on Aug 28, 2020

@douglascorrea
Author

The issue happens because rust-lldb expects lldb_commands and its dependencies resides on the current directory.

Just to let you know that I got it working doing this:

  • Cloned this repo on ~/repos/rust:
  • Edit ~/repos/rust/src/etc/lldb_commands changing the first line to: command script import ./lldb_lookup.py
  • Then run the following to link the files to the current directory:
$ cargo new foobar
$ cd foobar
$ cargo build -v
$ ln -s ~/repos/rust/src/etc/lldb_commands ./
$ ln -s ~/repos/rust/src/etc/lldb_providers.py ./
$ ln -s ~/repos/rust/src/etc/lldb_lookup.py ./
$ ln -s ~/repos/rust/src/etc/lldb_batchmode.py ./
$ rust-lldb rust-lldb target/debug/foobar
douglascorrea

douglascorrea commented on Aug 28, 2020

@douglascorrea
Author

Another important highlight, as @ehuss mentioned, this is a recent change, so 1.45 was working fine and the issue appeared only on 1.46

added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Aug 28, 2020
added
T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
on Aug 28, 2020
added 3 commits that reference this issue on Aug 29, 2020
53f2dc8
3de529d
063313b
removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ehuss@douglascorrea@jyn514@LeSeulArtichaut@rustbot

      Issue actions

        lldb debugging is not working from version 1.46 · Issue #76006 · rust-lang/rust