mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.6k stars 2.38k forks source link

dwarf2_find_location_expression: Corrupted DWARF expression. when printing registers using gdb #122

Closed h9nara closed 1 year ago

h9nara commented 2 years ago

I tried to follow the gdb run in the traps & system call lecture and when I tried to print some registers with gdb, it gave 'dwarf2_find_location_expression: Corrupted DWARF expression.'. I'm using a M1 Mac if that helps. It seems to me that tweaking some options for the compiler might fix the problem but not sure where to change. Not familiar with makefile at all.

rapidclock commented 1 year ago

Give this a try(https://github.com/mit-pdos/xv6-riscv/pull/129). It solved it for me.

h9nara commented 1 year ago

Thanks, I gave it another try recently and the exact change in your PR did fix the problem for me.