Skip to content

Spurious failure in debug-info/limited-debuginfo.rs with newer gdb (7.7). #12787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Florob opened this issue Mar 9, 2014 · 2 comments · Fixed by #12895
Closed

Spurious failure in debug-info/limited-debuginfo.rs with newer gdb (7.7). #12787

Florob opened this issue Mar 9, 2014 · 2 comments · Fixed by #12895
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@Florob
Copy link
Contributor

Florob commented Mar 9, 2014

Apparently new versions of gdb (I'm seeing this with 7.7) changed the output of of info functions.
E.g. instead of static void limited-debuginfo::main(); it now outputs static void limited-debuginfo::main(void);.

Output is as follows:

---- [debug-info] debug-info/limited-debuginfo.rs stdout ----

    error: line not found in debugger output: static void limited-debuginfo::main();
    command: gdb -quiet -batch -nx -command=x86_64-unknown-linux-gnu/test/debug-info/limited-debuginfo.debugger.script x86_64-unknown-linux-gnu/test/debug-info/limited-debuginfo.stage2-x86_64-unknown-linux-gnu
    stdout:
    ------------------------------------------
    All defined functions:

    File src/test/debug-info/limited-debuginfo.rs:
    static void limited-debuginfo::main(void);
    static void limited-debuginfo::some_function(void);
    static void limited-debuginfo::some_other_function(void);
    static void limited-debuginfo::zzz(void);

    Non-debugging symbols:
    0x0000000000400880  _init
    0x00000000004008b0  uvio::new_loop::h616534f7e6ab76adGIa::v0.10.pre@plt
    0x00000000004008c0  __libc_start_main@plt
    0x00000000004008d0  __gmon_start__@plt
    0x00000000004008e0  rust_stack_exhausted@plt
    0x00000000004008f0  lang_start::hf9e7230acaab0452Bwc::v0.10.pre@plt
    0x0000000000400900  _start
    0x0000000000400930  deregister_tm_clones
    0x0000000000400960  register_tm_clones
    0x00000000004009a0  __do_global_dtors_aux
    0x00000000004009c0  frame_dummy
    0x0000000000400b70  __libc_csu_init
    0x0000000000400be0  __libc_csu_fini
    0x0000000000400be4  __morestack
    0x0000000000400bf4  _fini
    Breakpoint 1 at 0x400b00: file src/test/debug-info/limited-debuginfo.rs, line 44.
    static void limited-debuginfo::zzz(void);
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    [New Thread 0x7ffff7f56700 (LWP 5320)]
    [New Thread 0x7ffff625c700 (LWP 5323)]
    [New Thread 0x7ffff615b700 (LWP 5324)]
    [New Thread 0x7ffff605a700 (LWP 5325)]
    [New Thread 0x7ffff5f59700 (LWP 5326)]
    [New Thread 0x7ffff5e58700 (LWP 5327)]
    [New Thread 0x7ffff5d57700 (LWP 5328)]
    [New Thread 0x7ffff5c56700 (LWP 5329)]
    [Switching to Thread 0x7ffff7f56700 (LWP 5320)]

    Breakpoint 1, limited-debuginfo::zzz () at src/test/debug-info/limited-debuginfo.rs:44
    44  fn zzz() {()}
    0x0000000000400af1 in limited-debuginfo::some_function () at src/test/debug-info/limited-debuginfo.rs:49
    49      zzz();
    No locals.
    [Thread 0x7ffff7f56700 (LWP 5320) exited]
    [Thread 0x7ffff605a700 (LWP 5325) exited]
    [Thread 0x7ffff615b700 (LWP 5324) exited]
    [Thread 0x7ffff5c56700 (LWP 5329) exited]
    [Thread 0x7ffff5d57700 (LWP 5328) exited]
    [Thread 0x7ffff5e58700 (LWP 5327) exited]
    [Thread 0x7ffff625c700 (LWP 5323) exited]
    [Thread 0x7ffff5f59700 (LWP 5326) exited]
    [Inferior 1 (process 5280) exited normally]

    ------------------------------------------
    stderr:
    ------------------------------------------
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?

    ------------------------------------------

    task '[debug-info] debug-info/limited-debuginfo.rs' failed at 'explicit failure', /home/florian/devel/rust/src/compiletest/runtest.rs:950
@jdm
Copy link
Contributor

jdm commented Mar 9, 2014

We could change the output to static void limited-debuginfo::main([...]) I suppose.

@michaelwoerister
Copy link
Member

We could change the output to static void limited-debuginfo::main([...]) I suppose.

Yes, I'd also fix it like this for now (I'll do so the day after tomorrow, at the latest). In the future, pretty printers should make this deterministic anyway.

michaelwoerister added a commit to michaelwoerister/rust that referenced this issue Mar 14, 2014
@bors bors closed this as completed in 2682c47 Mar 15, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Aug 16, 2022
…, r=Veykril

Make `Name` hold escaped name

Resolves rust-lang#12787
Resolves rust-lang#99361

This PR effectively swaps `Name` and `EscapedName` in hir. In other words, it makes `Name` hold and print escaped raw identifiers and introduces another struct `UnescapedName` for cases where you need to print names without "r#" prefix.

My rationale is that it makes it easier for us to format an escaped name into string, which is what we want when we serialize names in general. This is because we format a name into string usually when we are presenting it to the users and arguably they expect its escaped form as that's what they see and write in the source code.

I split the change for `Name` into 3 commits to make it easier to follow but it also made some tests fail in the intermediate commits. I can squash them into a commit after the review if desired. I've also made similar changes for `ModPath` and `EscapedModPath` as it makes them consistent with `Name`.

For reference, there was a brief discussion on this in [a zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/escaping.20.60Name.60s).
flip1995 pushed a commit to flip1995/rust that referenced this issue May 17, 2024
make [`from_str_radix_10`] skip constant context

fixes: rust-lang#12731

---

changelog: make [`from_str_radix_10`] skip constant context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
4 participants