public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "summers.ryan.m at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug rust/26148] New: Unable to break within rust source code
Date: Mon, 22 Jun 2020 10:26:59 +0000 [thread overview]
Message-ID: <bug-26148-4717@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=26148
Bug ID: 26148
Summary: Unable to break within rust source code
Product: gdb
Version: 9.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rust
Assignee: unassigned at sourceware dot org
Reporter: summers.ryan.m at gmail dot com
Target Milestone: ---
When using gdb-multiarch to debug an embedded Rust target, GDB may fail to set
breakpoints when specifying source code lines.
A demonstration project has been created at
https://github.com/ryan-summers/rust-rtic-gdb-bug to reproduce the bug. When
attempting to set a breakpoint within the src/main.rs file using `b
main.rs:38`, a breakpoint is instead created at `main.rs:49`.
> Breakpoint 1 at 0x80006cc: file /home/ryan/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rt-0.6.12/src/lib.rs, line 562.
> Breakpoint 2 at 0x8002846: file src/main.rs, line 49.
> Breakpoint 3 at 0x8002552: file /home/ryan/.cargo/registry/src/github.com-1ecc6299db9ec823/panic-halt-0.2.0/src/lib.rs, line 32.
> Loading section .vector_table, size 0x298 lma 0x8000000
> Loading section .text, size 0x25d0 lma 0x8000298
> Loading section .rodata, size 0xebc lma 0x8002868
> Start address 0x08000664, load size 14116
> Transfer rate: 12 KB/sec, 4705 bytes/write.
> target halted due to debug-request, current mode: Thread
> xPSR: 0x01000000 pc: 0x08000664 msp: 0x20020000, semihosting
> (gdb) b main.rs:38
> Note: breakpoint 2 also set at pc 0x8002846.
> Breakpoint 4 at 0x8002846: file src/main.rs, line 49.
> (gdb)
When the rust source at
https://github.com/ryan-summers/rust-rtic-gdb-bug/blob/4a6cb53c0f4a2bb1c4e1c998246db007dc68621a/src/main.rs#L26
is changed from
```
test_object: Container<Object<'static>,>,
```
to
```
test_object: Container<Object<'static>>,
```
GDB is again able to set breakpoints within the `main.rs` file.
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2020-06-22 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 10:26 summers.ryan.m at gmail dot com [this message]
2020-06-22 13:04 ` [Bug rust/26148] " summers.ryan.m at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-26148-4717@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).