public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/26735] New: Strange behaviour of the "-symbol-list-lines" machine interface command
@ 2020-10-15 12:43 stoyan.shopov at gmail dot com
  2020-10-15 12:44 ` [Bug mi/26735] " stoyan.shopov at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: stoyan.shopov at gmail dot com @ 2020-10-15 12:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26735

            Bug ID: 26735
           Summary: Strange behaviour of the "-symbol-list-lines" machine
                    interface command
           Product: gdb
           Version: 9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: stoyan.shopov at gmail dot com
  Target Milestone: ---

Created attachment 12900
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12900&action=edit
Rust language elf file that exhibits the behavior described in the PR
description

I am observing strange behaviour when using the "-symbol-list-lines" machine
interface command. I am using gdb 9.2:

```
(gdb) show configuration
This GDB was configured as follows:
   configure --host=x86_64-pc-msys --target=arm-none-eabi
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/usr/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/lib/gdb (relocatable)
             --without-libunwind-ia64
             --with-lzma
             --without-babeltrace
                             --without-intel-pt
             --without-mpfr
             --without-xxhash
             --with-python=/usr (relocatable)
             --without-guile
             --disable-source-highlight
             --with-separate-debug-dir=/usr/lib/debug (relocatable)
```


I am trying to use gdb over some minimal rust sample program (I am attaching
the elf file). In one run, I see this:

```
$ arm-none-eabi-gdb-9.2-with-expat-and-python-msys-build.exe --interpreter=mi3
cortex-m-quickstart
........
(gdb)
-symbol-list-lines
"/c/Users/sshopov/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-semihosting-0.3.5/src/hio.rs"
^done,lines=[]
(gdb)
```

In another run, I see this:

```
$ arm-none-eabi-gdb-9.2-with-expat-and-python-msys-build.exe --interpreter=mi3
cortex-m-quickstart
........
(gdb)
-symbol-list-lines
"/rustc/adef9da30f1ecbfeb81312d01ed94ac53f7161ba/library/core/src/ptr/const_ptr.rs"
^done,lines=[]
(gdb)
-symbol-list-lines
"/c/Users/sshopov/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-0.6.3/src/interrupt.rs"
^done,lines=[{pc="0x0800149a",line="23"},{pc="0x080014a2",line="0"}]
(gdb)
-symbol-list-lines
"/c/Users/sshopov/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-semihosting-0.3.5/src/hio.rs"
^done,lines=[{pc="0x080014a2",line="60"},{pc="0x080014b4",line="0"}]
(gdb)
```

In other words, in one of the runs, gdb reports no addresses for file "hio.rs",
and in the other run, it reports some addresses. I tried to supply a minimal
example of this behavior.

Note that, in the case above where some addresses are reported for file
"hio.rs", there are three "-symbol-list-lines" commands issued. I found, that
removing any other command (other than the on for thr "hio.rs" file), or
exchanging the order of the two commands before the command for file "hio.rs",
results in no addresses reported for file "hio.rs".

Thanks, I hope this helps

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug mi/26735] Strange behaviour of the "-symbol-list-lines" machine interface command
  2020-10-15 12:43 [Bug mi/26735] New: Strange behaviour of the "-symbol-list-lines" machine interface command stoyan.shopov at gmail dot com
@ 2020-10-15 12:44 ` stoyan.shopov at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: stoyan.shopov at gmail dot com @ 2020-10-15 12:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26735

Stoyan Shopov <stoyan.shopov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stoyan.shopov at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-15 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 12:43 [Bug mi/26735] New: Strange behaviour of the "-symbol-list-lines" machine interface command stoyan.shopov at gmail dot com
2020-10-15 12:44 ` [Bug mi/26735] " stoyan.shopov at gmail dot com

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).