stlw wrote:
Yes, I am asking about debug_symbols.
Ok, I like that better anyway. That works for all executable formats and for kernels that are splitted into multiple files too (like a modular kernel).
Just an idea, but it would be great if that could also support an array indexed by CR3 values, like
Code:
debug_symbols: ... # (common, always used, no matter what's in CR3 or if paging is disabled, just like now)
debug_symbols[0x1000]: ... # (additional symbols, only used when CR3==0x1000)
debug_symbols[0x2000]: ... # (additional symbols, only used when CR3==0x2000)
That would allow using symbols with microkernels too (which typically use separate servers with separate address spaces).
stlw wrote:
Because I don't have any kernel around with or without debug symbols I cannot even try to use this command ...
I've downloaded the latest 2.6.11 source from bochs.sourceforge.net, I compiled it and it's looking good at first glance. (I hope I haven't mixed up the executable because I have quite a lot bochs variants on my machine...)
You can download a minimal bootable
disk image that I've used (disk-x86.img.gz 184 Kb), and I've attached a debug_symbols file too so that you can test your bochs builds with. The well-commented Assembly source of the code is
here. This has 16 bit, 32 bit and also 64 bit code labels, data labels, physical address as well as linear address labels, so it's good for testing all kinds of debug symbols. The
kernel is a minimal, upper-half "Hello World" kernel, therefore most of the symbols are from the boot loader.
Cheers,
bzt