Skip to content

no debug-info on locals in stack frames when stepping though rust-msgpack #9641

Closed
@glycerine

Description

@glycerine

Josh asked for where I was seeing debug-info goes missing. Most places, in my experience. An easy to repro example is just to debug the msgpack bindings, as below. The rust compiler itself, I'm told from rust/irc, is another prime example.

me@host:/tmp/rust-msgpack$ uname -a
Linux i7 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 18:32:41 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
me@host:/tmp/rust-msgpack$ rustc -v
rustc 0.8 (48499c7 2013-09-26 15:36:10 -0700)
host: x86_64-unknown-linux-gnu
me@host:/tmp/rust-msgpack$
me@host:/tmp$ git clone https://github.com/glycerine/rust-msgpack
Cloning into 'rust-msgpack'...
remote: Counting objects: 85, done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 85 (delta 33), reused 84 (delta 32)
Unpacking objects: 100% (85/85), done.
me@host:/tmp$ cd rust-msgpack/
me@host:/tmp/rust-msgpack$ git branch -v
* master 802d91b add license to readme
me@host:/tmp/rust-msgpack$ ls
example.rs  msgpack.rs  README.md
me@host:/tmp/rust-msgpack$ rustc -Zextra-debug-info -Z no-opt example.rs
me@host:/tmp/rust-msgpack$ lh
total 488
drwxr-xr-x  3 jaten jaten   4096 Sep 30 18:16 ./
drwxrwxrwt 90 root  root   53248 Sep 30 18:16 ../
-rwxrwxr-x  1 jaten jaten 403433 Sep 30 18:16 example*
drwxrwxr-x  8 jaten jaten   4096 Sep 30 18:15 .git/
-rw-rw-r--  1 jaten jaten  19994 Sep 30 18:15 msgpack.rs
-rw-rw-r--  1 jaten jaten   1530 Sep 30 18:15 example.rs
-rw-rw-r--  1 jaten jaten    164 Sep 30 18:15 README.md
me@host:/tmp/rust-msgpack$ gdb example
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /tmp/rust-msgpack/example...done.
(gdb) break msgpack.rs:587
Breakpoint 1 at 0x4163e7: msgpack.rs:587. (84 locations)
(gdb) run # 84 locations??
Starting program: /tmp/rust-msgpack/example
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fc4700 (LWP 26993)]
[New Thread 0x7ffff5d67700 (LWP 26994)]
[New Thread 0x7ffff4fff700 (LWP 26995)]
[New Thread 0x7ffff4efe700 (LWP 26996)]
[Switching to Thread 0x7ffff7fc4700 (LWP 26993)]

Breakpoint 1, std..hashmap..HashMap$LT$u32$C$u32$GT$::glue_drop::hf62265217cbfd21aaB ()
    at msgpack.rs:587
587           f(self, len)
(gdb) list
582         #[inline(always)]
583         fn read_seq<T>(&mut self, f: &fn(&mut Decoder,uint) -> T) -> T {
584           //println!("in read_seq.");
585           let len = self._read_vec_len();
586           //printfln!("I see length of %?", len);
587           f(self, len)
588         }
589
590         #[inline(always)]
591         fn read_seq_elt<T>(&mut self, _idx: uint, f: &fn(&mut Decoder) -> T) -> T { f(self) }
(gdb) bt
#0  std..hashmap..HashMap$LT$u32$C$u32$GT$::glue_drop::hf62265217cbfd21aaB () at msgpack.rs:587
#1  0x000000000042b257 in hashmap::Clone$HashMap::clone::h7953e8b94478d0bcx7aM::v0.0 ()
    at example.rs:41
#2  0x0000000000429036 in example::main () at example.rs:41
#3  0x00007ffff75a1ee0 in rt::task::__extensions__::build_start_wrapper::anon::anon::expr_fn::a0 ()
   from /tmp/rust-msgpack/../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so
#4  0x00007ffff75a03a7 in rt::task::__extensions__::run::anon::expr_fn::ai ()
   from /tmp/rust-msgpack/../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so
#5  0x00007ffff6d7fb13 in rust_try (f=<optimized out>, fptr=<optimized out>, env=<optimized out>)
    at /usr/cn/rust/github-master/rust/src/rt/rust_builtin.cpp:499
#6  0x00007ffff75a02dc in rt::task::Unwinder::try::h199ab8d6eb226980Vqah::v0.8 ()
   from /tmp/rust-msgpack/../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so
#7  0x00007ffff75a0151 in rt::task::Task::run::h199ab8d6eb226980Z1ag::v0.8 ()
   from /tmp/rust-msgpack/../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so
#8  0x00007ffff75a1a7c in rt::task::__extensions__::build_start_wrapper::anon::expr_fn::aR ()
   from /tmp/rust-msgpack/../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so
#9  0x0000000000000000 in ?? ()
(gdb) list
592
593         #[inline(always)]
594         fn read_struct<T>(&mut self, _name: &str, len: uint, f: &fn(&mut Decoder) -> T) -> T {
595             //printfln!("in read_struct");
596           if len != self._read_map_len() { fail!() }
597 >>>       f(self)
598         }
599
600         #[inline(always)]
601         fn read_struct_field<T>(&mut self, _name: &str, _idx: uint, f: &fn(&mut Decoder) -> T) -> T {
(gdb) i lo
No symbol table info available.
(gdb) p len
No symbol "len" in current context.
(gdb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions