Hi Mahesh, On Thu, 28 Jul 2011 16:08:15 +0530 Mahesh Jagannath Salgaonkar <mahesh at linux.vnet.ibm.com> wrote: > > > > If adding the searching method to the blow position and removing the code > > from init_dwarf_info(), I guess it makes the code simple. > > > > @ process_config_file() > > 9402 if (!set_dwarf_debuginfo(config->module_name, > > 9403 NULL, -1)) { > > 9404 ERRMSG("Skipping to next Module section\n"); > > 9405 skip_section = 1; > > 9406 free_config(config); > > 9407 continue; > > 9408 } > > 9409 << HERE >> > > This may not be the correct place to call search method. We may end up > calling search method multiple times for same kernel module. I think > moving the search method inside set_dwarf_debuginfo() routine at below > position is a better place: > > @set_dwarf_debuginfo() > ...... > ...... > if (!strcmp(dwarf_info.module_name, "vmlinux") || > !strcmp(dwarf_info.module_name, "xen-syms")) > return TRUE; > + << HERE >> > - /* check to see whether module debuginfo is available */ > - if (!init_dwarf_info()) > - return FALSE; > - else > - clean_dwfl_info(); > return TRUE; > } > > And then we can remove search routine from init_dwarf_info(). What do > you think? I think the above change will be good, thanks in advance. Thanks Ken'ichi Ohmichi