>I want to examine and switch a variable in ddb. The variable is static
>to a source file, I don't have a symbol in ddb.
You should have static symbols in ddb, except in the following broken
cases:
1) elf kernel booted with -d. There are no symbols at the initial
breakpoint because elf symbols are loaded by a sysinit.
2) elf kernel booted directly by boot2. Static symbols require
special handling which seems to only be done in boot/loader.
I don't use boot/loader, so I had to fix this. I use the pre-kld
method of loading elf symbols (ddb/db_elf.c). This also fixes
(1). It probably breaks symbols in modules.
>I see the address of the symbol with `nm /kernel | grep symname`, but
>the addresses listed here are obviously subject to file-specific
>offsets. The addresses show up twice and I can verify that the data is
>wrong when I just use the hex address in ddb.
The symbol values are offset in the file. but not in memory.
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message