Actions
Bug #7066
closed::dump uses incredibly annoying syntax for specifying length
Start date:
2016-06-06
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
upstream:
DLPX-40441 ::dump uses incredibly annoying syntax for specifying length
https://github.com/delphix/delphix-os/commit/e7af87cfc4c0f80585724d648e5bed7871c3cfdb
Updated by Josef Sipek almost 6 years ago
Can you include more info about the change here? I'd be nice not having to go to downstream repos for change details.
Updated by Josef Sipek almost 6 years ago
Thanks, I was hoping there would be more information about the change in the Delphix commit. Oh well.
Updated by Matthew Ahrens almost 6 years ago
When I'm debugging something with mdb, I spend a lot of time inspecting structs to see if they make sense, and sometimes I need to dump out the contents of some memory buffer to see what's stored there:
[0]> ffffff0264b15ef0::print arc_buf_t b_hdr | ::print arc_buf_hdr_t b_l1hdr.b_pabd | ::print abd_t abd_buf | ::dump \/ 1 2 3 4 5 6 7 8 9 a b c d e f v123456789abcdef ffffff0264dac000: 00000000 00000000 00000000 00000000 ................ [0]>
If I want more than the first 16 bytes, there is only one way to tell ::dump how many bytes to dump:
[0]> ffffff0264b15ef0::print arc_buf_t b_hdr | ::print arc_buf_hdr_t b_l1hdr.b_pabd | ::print abd_t abd_buf abd_buf = 0xffffff0264dac000 [0]> 0xffffff0264dac000,256::dump -g8 \/ 1 2 3 4 5 6 7 8 9 a b c d e f v123456789abcdef ffffff0264dac000: 0000000000000000 0000000000000000 ................ ffffff0264dac010: 0000000000000000 0000000000000000 ................ ffffff0264dac020: 0000000000000000 0000000000000000 ................ ...
Having to supply an argument after a comma before the ::dump command is both inconsistent with every other command in mdb (they take arguments with options like "-x 100") and unbelievably annoying (because you can't pipe an address to it). We should add a "-l" length argument to ::dump which tells it how many bytes to dump.
Updated by Electric Monk almost 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit f11ba53f80410731989b127bc0e36a178773e84a
commit f11ba53f80410731989b127bc0e36a178773e84a Author: Dan Kimmel <dan.kimmel@delphix.com> Date: 2016-06-08T16:33:05.000Z 7066 ::dump uses incredibly annoying syntax for specifying length Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Garrett D'Amore <garrett@damore.org>
Actions