Re: graceful unwind termination when we'd need unavailable/uncollect memory or registers to unwind further

Pedro Alves
2011-02-28T15:56:06Z

On Monday 28 February 2011 15:41:32, Jan Kratochvil wrote:
> In my case:
>
> (gdb) tfind 0
> Found trace frame 0, tracepoint 2
> #0 f () at 1.c:11
> 11 v++;
> (gdb) bt
> #0 f () at 1.c:11
> Backtrace stopped: Not enough registers or memory available to unwind further
> (gdb)
>
> That is without that <unavailable>. I think it is a bug.

That's expected. In my example, the _PC_ was not
unwoundable in the outermost unwindable frame, but other
registers were. In your example, it was, and I'm going
to guess that since you haven't collected any registers,
you're seeing the dwarf unwinder not being able to compute
the CFA.

In my example, notice info registers in the outermost
frame:

(gdb) bt
#0 begin () at ../../../src/gdb/testsuite/gdb.trace/unavailable.cc:180
#1 0x0000000000400b69 in main (argc=1, argv=0x7fffa180ace8, envp=0x7fffa180acf8) at ../../../src/gdb/testsuite/gdb.trace/unavailable.cc:329
#2 <unavailable> in ?? ()
Backtrace stopped: Not enough registers or memory available to unwind further
(gdb) up
#1 0x0000000000400b69 in main (argc=1, argv=0x7fffa180ace8, envp=0x7fffa180acf8) at ../../../src/gdb/testsuite/gdb.trace/unavailable.cc:329
329 begin ();
(gdb)
#2 <unavailable> in ?? ()
(gdb) info registers
rax 0x7fa45460eec8 140343767002824
rbx 0x0 0
rcx 0x5 5
rdx 0x7fffa180acf8 140735902952696
rsi 0x7fffa180ace8 140735902952680
rdi 0x1 1
rbp *value not available*
rsp 0x7fffa180ac10 0x7fffa180ac10
r8 0x7fa45460d300 140343766995712
r9 0x7fa454dc05c0 140343775069632
r10 0x7fffa180a8f0 140735902951664
r11 0x7fa4542c8770 140343763568496
r12 0x4006b0 4196016
r13 0x7fffa180ace0 140735902952672
r14 0x0 0
r15 0x0 0
rip *value not available*
eflags 0x203 [ CF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0

--
Pedro Alves