using gdb-python script, i am trying to print data structure which includes kernel data structures and lists(e.g. struct list_head), the structure is
struct my_struct {
struct my_hardware_context ahw;
struct net_device *netdev;
struct pci_dev *pdev;
struct list_head mac_list;
struct list_head wait_list;
....
....
};
So while iterating this struct my_struct, how to identify there is a linked list inside this structure as There is no any TYPE_CODE_ constant for Linked list in gdb manual and if identified, after identification how to print the dereferenced struct while iterating the list. i am using code of scottt in this link gdb-python : Parsing structure's each field and print them with proper value, if exists