Hi Dave,

 

Current I am trying to make crash support display out function param and local value while backtracing.

The idea for this patch is to mimic core dump support in gdb, teaching the crash to supply the regset to the gdb, so that gdb could have full knowledge what is going on in the panic point.

 

A few progress has been made, the first two frames could display out correctly, but while it is going on to display out the third frame, it report fail as “Cannot access memory” to the stack address.

While I use the rd command to access this range, and could correct pc value there.

 

With further check, I find it failed at value_fetch_lazy at gdb code.

Do you have any idea why gdb side couldn’t read the stack content?

 

The generated log as:

crash> bt

PID: 886    TASK: c54991a0  CPU: 0   COMMAND: "sh"

#0  sysrq_handle_crash (key=99) at drivers/tty/sysrq.c:132

No locals.

#1  0xc02da6dc in __handle_sysrq (key=99, check_mask=false) at drivers/tty/sysrq.c:522

        op_p = 0xc06dbeb8

        orig_log_level = 7

        i = -1066549576

        flags = 1610612755

Cannot access memory at address 0xd29d5f34

bt: display local fail at c02da1c0

crash> rd 0xd29d5f34 1

d29d5f34:  c02da7cc                              ..-.

crash> sym c02da7cc

c02da7cc (t) write_sysrq_trigger+40 /kernel/drivers/tty/sysrq.c: 873

 

Thanks,

Lei