On Fri, Feb 17, 2017 at 02:14:29AM -0500, Dale Rahn wrote: > Fix pieces of aarch64 ddb support: > kernel vs user mode detection > implement (optimize) 8 byte reads > cast address pointers to vaddr_t, not uint32_t (do not truncate) > remove db_fetch_reg(), not used by OpenBSD > implement ddb backtrace > > note that "ddb> trace <address>" expects a stack address, not a frame pointer > address. These two addresses are offset by 16 bytes (frame = *(sp+16))
Here are a few different traces with this boot> boot -d cannot open sd0a:/etc/random.seed: No such file or directory booting sd0a:/bsd: 3381268+473986+382632+668448 [95+403776+208655]=0x5445b8 [ using 613360 bytes of bsd ELF symbol table ] Stopped at initarm+0x390: ddb> trace Debugger() at initarm+0x38c panic: root device (e209950d424910b9) not found Stopped at panic+0x158: TID PID UID PRFLAGS PFLAGS C PU COMMAND * 0 0 0 0x10000 0x200 0 swapper Debugger() at panic+0x154 panic() at diskconf+0xac diskconf() at main+0x490 main() at $x.2+0x70 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb> tr Debugger() at panic+0x154 panic() at diskconf+0xac diskconf() at main+0x490 # sysctl ddb.trigger=1 Stopped at ddb_sysctl+0x1a4: ddb> tr Debugger() at ddb_sysctl+0x1a0 ddb_sysctl() at svc_handler+0x1cc svc_handler() at handle_el0_sync+0x68 handle_el0_sync() at __ALIGN_SIZE+0x400248 --- trap --- ddb>