aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-01-15 12:00:05 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-01-15 12:31:47 -0300
commita8a7e605bb4500ea0eacb6b569677273b45ee48a (patch)
tree0e9b63b325bfc1db1cc1507c513dacb3a10da5dd
parent0dc327e382f8d5f1904305912bf06475a1a26369 (diff)
downloadpahole-a8a7e605bb4500ea0eacb6b569677273b45ee48a.tar.gz
pahole: Make --find_pointers_to consider unions
I.e.: $ pahole --find_pointers_to ehci_qh ehci_hcd: qh_scan_next ehci_hcd: async ehci_hcd: dummy $ Wasn't considering: $ pahole -C ehci_shadow union ehci_shadow { struct ehci_qh * qh; /* 0 8 */ struct ehci_itd * itd; /* 0 8 */ struct ehci_sitd * sitd; /* 0 8 */ struct ehci_fstn * fstn; /* 0 8 */ __le32 * hw_next; /* 0 8 */ void * ptr; /* 0 8 */ }; $ Fix it: $ pahole --find_pointers_to ehci_qh ehci_hcd: qh_scan_next ehci_hcd: async ehci_hcd: dummy ehci_shadow: qh $ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--pahole.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pahole.c b/pahole.c
index fb2e29d..1c232f6 100644
--- a/pahole.c
+++ b/pahole.c
@@ -679,7 +679,7 @@ static void print_structs_with_pointer_to(const struct cu *cu, uint32_t type)
struct class_member *pos_member;
uint32_t id;
- cu__for_each_struct(cu, id, pos) {
+ cu__for_each_struct_or_union(cu, id, pos) {
bool looked = false;
struct structure *str;