Project

General

Profile

Actions

Feature #12056

closed

mdb: add mdb_dumpptr_cb as default callback for mdb_dumpptr()

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

We have 4 cases where mdb_vread is used as (mdb_dumpptr_cb_t)mdb_vread as argument for mdb_dumpptr(), unfortunately its signature does not really match for such cast. Create the proper wrapper, mdb_dumpptr_cb, to be used instead.

Actions #1

Updated by Toomas Soome over 3 years ago

  • Subject changed from mdb: add mdb_dump as wrapper for mdb_vread to mdb: add mdb_dumpptr_cb as default callback for mdb_dumpptr()
Actions #2

Updated by Toomas Soome over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome over 3 years ago

Testing done: used ipc component for this test.

Test programs are from https://beej.us/guide/bgipc/html/multi/mq.html

So I did create message queue and had some data sent:

tsoome@beastie:~$ ./kirk 
Enter lines of text, ^D to quit:
help?
hello kirk here
spock?!

now lets see with mdb if we can see the messages in the queue:

> ::ipcs -l
Message queues:
            ADDR   REF    ID      KEY  MODE PRJID ZONEID OWNER GROUP CREAT  CGRP
ffffff0de1f06000     1     2 42908003  0644    10      0   101    10   101    10
    &list: ffffff0de1f06070
    cbytes: 0t7    qnum: 0t1    qbytes: 0t65536    qmax: 0t8192
    lspid: 0t5482    lrpid: 0t5581
    stime: 2019 Dec 17 20:39:02
    rtime: 2019 Dec 17 20:38:53
    ctime: 2019 Dec 17 20:31:32
    snd_cnt: 0t0    snd_cv: 0 (ffffff0de1f060f0)
    Blocked recievers
        Thread Addr       Type          cv addr   copyout-wait?
    Blocked senders
        Thread Addr       Type          cv addr        Msg Size
    Total number of waiters: 0

Shared memory:

Semaphores:
> ffffff0de1f06070::walk list | ::msg -l
            ADDR             TEXT     SIZE     TYPE      REF
ffffff0d25a2fa70 ffffff0d22919080        7        1        1

         0 1 2 3  4 5 6 7  8 9 a b  c d e f  0123456789abcdef
    0:  68656c70 3f0000                      help?..         

ffffff0d3ce3a130 ffffff0d95a7b180       17        1        1

          0 1 2 3  4 5 6 7  8 9 a b  c d e f  0123456789abcdef
    00:  68656c6c 6f206b69 726b2068 65726500  hello kirk here.
    10:  00                                   .               

ffffff0d9a8c5dd8 ffffff0d0cac2140        9        1        1

         0 1 2 3  4 5 6 7  8 9 a b  c d e f  0123456789abcdef
    0:  73706f63 6b3f2100 00                 spock?!..       
> 

and running spock:

tsoome@beastie:~$ ./spock 
spock: ready to receive messages, captain.
spock: "help?" 
spock: "hello kirk here" 
spock: "spock?!" 

indeed, we got all. And now the list is empty:

> ffffff0de1f06070::walk list | ::msg -l
> 

Actions #4

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

git commit cf01ae8a5d067a3ba8327d8bc6be298d84204a4d

commit  cf01ae8a5d067a3ba8327d8bc6be298d84204a4d
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-17T19:02:59.000Z

    12056 mdb: add mdb_dumpptr_cb as default callback for mdb_dumpptr()
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF