What is wrong with dtrace's stack()?

Slawa Olhovchenkov slw at zxy.spb.ru
Mon Oct 22 13:30:07 UTC 2018


On Mon, Oct 22, 2018 at 02:45:19PM +0300, Lev Serebryakov wrote:

> sosend() calls protocol-specific handler via function pointer, so it
> should be true call:
> 
> CURVNET_SET(so->so_vnet);
> if (!SOLISTENING(so))
> 	error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio,
> 	    top, control, flags, td);
> else {
> 	m_freem(top);
> 	m_freem(control);
> 	error = ENOTCONN;
> }
> CURVNET_RESTORE();
> return (error);
> 
>   These frames MUST be here...

(kgdb) x/80i sosend
0xffffffff8054d6b0 <sosend>:    push   %rbp
0xffffffff8054d6b1 <sosend+1>:  mov    %rsp,%rbp
0xffffffff8054d6b4 <sosend+4>:  mov    0x20(%rdi),%rax
0xffffffff8054d6b8 <sosend+8>:  mov    0x58(%rax),%rax
0xffffffff8054d6bc <sosend+12>: mov    0x98(%rax),%rax
0xffffffff8054d6c3 <sosend+19>: pop    %rbp
0xffffffff8054d6c4 <sosend+20>: jmpq   *%rax


More information about the freebsd-hackers mailing list