[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-mdb-discuss
Subject: Re: [mdb-discuss] Is there a regression introduced for mdb
From: Brian Xu - Sun Microsystems - Beijing China <Brian.Xu () Sun ! COM>
Date: 2010-01-21 10:35:03
Message-ID: 4B582DD7.2010608 () sun ! com
[Download RAW message or body]
To memorize, I list the mdb pipe I used here, which includes ¨::list¨
and ¨::walk list¨ :-)
> *mptsas_state::softstate 0|::print mptsas_t m_active|::print -a
mptsas_slots_t m_tgttbl|::array mptsas_hash_node_t* 0t16 |/Kn|::list
mptsas_hash_node_t next|::print mptsas_hash_node_t data|::print
mptsas_target_t m_tgt_dma_cookie_cache_list|::walk list|::print
mptsas_target_dma_cookie_cache_t timestamp
timestamp = 0x1008d4
timestamp = 0x1008d5
timestamp = 0x1008d5
timestamp = 0x1008d6
timestamp = 0x1008d6
timestamp = 0x1008d7
timestamp = 0x1008d7
...
I like mdb...
-Brian
On 01/21/10 14:59, Brian Xu - Sun Microsystems - Beijing China wrote:
> 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
>>
>
> _______________________________________________
> mdb-discuss mailing list
> mdb-discuss@opensolaris.org
_______________________________________________
mdb-discuss mailing list
mdb-discuss@opensolaris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic