----- "Dave Anderson" <anderson@xxxxxxxxxx> wrote: > +ulong > +cpu_map_addr(const char *type) > +{ > + char cpu_map_symbol[32]; > + > + sprintf(cpu_map_symbol, "cpu_%s_map", type); > + if (symbol_exists(cpu_map_symbol)) > + return symbol_value(cpu_map_symbol); > + else > + return get_cpu_map_addr_from_mask(type); > +} > > Although, for safety's sake above, the symbol_value() call should > be replaced with kernel_symbol_value() in order to rule out the > invalid usage of stray module symbols of the same name. Sorry, I meant that the symbol_exists() function call above should be replaced with kernel_symbol_exists()... Dave -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility