Skip to content

Make start address more visible #2041

@m-mueller678

Description

@m-mueller678

I have been debugging the kernel with gdb a lot recently. A few days ago I have made the kernel start address much more prominent and I find it has improved my workflow a lot. I am using this for both the initial address printing in boot_processor_main, and a second time in initd right before jumping into the application.

fn print_kenrnel_address_banner() {
	info!(
		"\n\
\x1b[1;31m####################################################\x1b[0m\n\
\x1b[1;31m====================================================\x1b[0m\n\
\x1b[1;36m>>>  KERNEL STARTS AT ADDRESS:\x1b[0m \x1b[1;35m    {:p}    \x1b[0m\n\
\x1b[1;31m====================================================\x1b[0m\n\
\x1b[1;31m####################################################\x1b[0m",
		env::get_base_address()
	);
}

I think this might be too prominent to be the default, but I think it is handy enough for gdb users to have some easy way to enable this, maybe with an option on the kernel command line .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions