--- symbols.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/symbols.c b/symbols.c index f04e8b5..f030179 100644 --- a/symbols.c +++ b/symbols.c @@ -6617,17 +6617,17 @@ do_datatype_addr(struct datatype_member *dm, ulong addr, int count, i = 0; do { if (argc_members) { + if (argc_members > 1 && flags & SHOW_RAW_DATA) + error(FATAL, + "only up to one member-specific output allowed with -r\n"); /* This call works fine with fields * of the second, third, ... levels. * There is no need to fix it */ if (!member_to_datatype(memberlist[i], dm, - ANON_MEMBER_QUERY)) + (flags & SHOW_RAW_DATA) ? ANON_MEMBER_QUERY : 0)) error(FATAL, "invalid data structure reference: %s.%s\n", dm->name, memberlist[i]); - if (flags & SHOW_RAW_DATA) - error(FATAL, - "member-specific output not allowed with -r\n"); } /* @@ -6636,9 +6636,13 @@ do_datatype_addr(struct datatype_member *dm, ulong addr, int count, if (flags & SHOW_OFFSET) { dm->vaddr = addr; do_datatype_declaration(dm, flags | (dm->flags & TYPEDEF)); - } else if (flags & SHOW_RAW_DATA) + } else if (flags & SHOW_RAW_DATA) { + if (argc_members) { + addr += dm->member_offset; + len = dm->member_size; + } raw_data_dump(addr, len, flags & STRUCT_VERBOSE); - else if ((flags & DEREF_POINTERS) && !dm->member) { + } else if ((flags & DEREF_POINTERS) && !dm->member) { print_struct_with_dereference(addr, dm, flags); } else { if (dm->member) @@ -6849,7 +6853,7 @@ member_to_datatype(char *s, struct datatype_member *dm, ulong flags) { dm->member = s; - if ((dm->member_offset = MEMBER_OFFSET(dm->name, s)) >= 0) + if (datatype_info(dm->name, s, dm) >= 0) return TRUE; if ((flags & ANON_MEMBER_QUERY) && -- 2.24.1 -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility