Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.
This repository was archived by the owner on May 23, 2024. It is now read-only.

backtrace printings #52

Closed
Closed
@gobftald

Description

@gobftald

May be I'm wrong but I cannot really understand the next code fragment in lib.rs:98

        #[cfg(all(feature = "colors", feature = "println"))]
        println!("{}0x{:x}", RED, addr - crate::arch::RA_OFFSET);

!!!!! #[cfg(not(any(feature = "colors", feature = "println")))]
println!("0x{:x}", addr - crate::arch::RA_OFFSET);

If it wants to differentiate between the "colors" and not "colors" scenario, I think it's wrong. The second #[cfg... gives false in case of no"colors", printing nothing in that case.

I think the proper #[cfg... would be:

        #[cfg(all(not(feature = "colors"), feature = "println"))]
        println!("0x{:x}", addr - crate::arch::RA_OFFSET);

But I'm quite a newbie, so may be I'm wrong and misunderstood something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions