On 01/21/10 14:41, Peter Memishian wrote:
> Hey Brian,
>
>  > Here is my C code:
>  > typedef struct mptsas_target_dma_cookie_cache {
>  >    ddi_dma_handle_t    dmahandle;
>  >    ddi_dma_cookie_t    cookie;
>  >    pfn_t            pagenum;
>  >    clock_t            timestamp;
>  >    list_node_t        node;
>  > } mptsas_target_dma_cookie_cache_t;
>
> As an aside: please prefix these field names so that cscope will be able
> to find uses easily.
>
>   
Understood.
>  > typedef    struct mptsas_target {
>  > ...
>  >    list_t            m_tgt_dma_cookie_cache_list;
>  >        int            m_tgt_dma_cookie_cache_n;
>  > 
>  > } mptsas_target_t;
>  > 
>  > In mdb,
>  >  > 0x6003ea22bc8::print mptsas_hash_node_t data|::print -a mptsas_target_t
>  > 6003ecce188 {
>  > ...
>  > 6003ecce1c8 m_tgt_dma_cookie_cache_list = {
>  >        6003ecce1c8 list_size = 0x40
>  >        6003ecce1d0 list_offset = 0x30
>  >        6003ecce1d8 list_head = {
>  >            6003ecce1d8 list_next = 0x6003d9f3eb0
>  >            6003ecce1e0 list_prev = 0x6003ee03670
>  >        }
>  >    }
>  >    6003ecce1e8 m_tgt_dma_cookie_cache_n = 0xd
>  > }
>
> Try 6003ecce1c8::walk list
>
>   
Yes, that's it. I must have ever used this command :-( .
> The '::list' dcmd is for walking singly-linked (and possibly circular)
> lists of objects that refer to one another through traditional pointers.
> In contrast, '::walk list' is for walking a list_t.
>   
Thanks for the clarifying. I think I will not forget it anymore.

Thanks,
Brian
> Hope things are well,
> --
> meem
>   

Reply via email to