pahole: Don't add anonymous structs to the list of known structs
Replicating the comment added to the source code: No sense in adding an anonymous struct to the list of structs already printed, as we look for the name... The right fix probably will be to call class__fprintf on a in-memory FILE, do a hash, and look it by full contents, not by name. And this is needed for CTF as well, but its late now and I'm sleepy, will leave for later... Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
73548f6be3
commit
2f7ffdb088
10
pahole.c
10
pahole.c
|
@ -295,6 +295,16 @@ static void print_classes(struct cu *cu)
|
|||
print_packable_info(pos, cu, id);
|
||||
else if (formatter != NULL)
|
||||
formatter(pos, cu, id);
|
||||
/*
|
||||
* FIXME: No sense in adding an anonymous struct to the list of
|
||||
* structs already printed, as we look for the name... The
|
||||
* right fix probably will be to call class__fprintf on a
|
||||
* in-memory FILE, do a hash, and look it by full contents, not
|
||||
* by name. And this is needed for CTF as well, but its late now
|
||||
* and I'm sleepy, will leave for later...
|
||||
*/
|
||||
if (pos->type.namespace.name == 0)
|
||||
continue;
|
||||
|
||||
if (structures__add(pos, cu) == NULL) {
|
||||
fprintf(stderr, "pahole: insufficient memory for "
|
||||
|
|
Loading…
Reference in New Issue