Hi Dave,
I'm sorry for my poor Inglish :)
I actually haven't studied the meat of parse_for_member_new()
yet,
but in testing the patch, I've come up with a few issues that still
need addressing.
Could you please clarify your last point?
Unlike what you have done for "struct" and
"list", when the "task"
command calls task_struct_member(), if *any* of the comma-separated
members are the new complicated format, you set the call_new_parser
flag, so it somewhat defeats the purpose of having the flag at all:
if (call_new_parser) {
for (i = 0; i < argcnt; i++) {
dm.member = arglist[i];
parse_for_member_new(&dm, 0);
}
} else {
parse_task_thread(argcnt, arglist, tc);
}
If I understood you right, you want the `parse_task_thread` to be called
for every simple field and `parse_for_member_new` should be called for
complicated format only. That is if you specify line
% task -R foo,bar,baz.foo.xxx
`parse_task_thread` should be called for `foo` and `bar`, whereas
`parse_for_member_new` would be called for `baz.foo.xxx` only.
Am I right?
I still would like the confidence of knowing that the old function
will still be used with the simple "struct.member" format.
And related to the issue above, here's a bug -- the "task" command
is quite often useful to call from "foreach", where for each task,
the task's banner is displayed followed by the requested data.
...
But when I add a new extended reference, the banner doesn't get
displayed,
rendering the command useless:
...
I will fix it.
Also, similar to the "list" command, the "tree"
command also supports the
"-s struct.member" option:
crash> help tree
... [ cut ] ...
-s struct For each entry in a tree, format and print it as this type of data
structure; use the "struct.member" format in order to display a
particular member of the structure. To display multiple members
of a structure, use a comma-separated list of members.
Can you look into putting support there as well?
Ok, I will fix it.
Thanks,
Alexandr