Roland McGrath wrote: > The expected pattern is that you do: > > dwfl_report_begin > dwfl_report_foo all modules that are in the address space now > dwfl_report_end > > i.e., just like with a fresh Dwfl, but dwfl_report_begin instead of dwfl_begin. > This preserves the existing data structures for modules that haven't > changed since before dwfl_report_begin, and removes any old modules that > you didn't report again. > > dwfl_report_begin_add is intended for something like gdb's add-symbol-file, > where you are always just adding one new thing as opposed to re-synch'ing > to the new set of mappings after they've changed. It's just a shorthand > and mild optimization for re-reporting all the existing modules after > dwfl_report_begin. > > I could add something like a dwfl_report_remove to de-report a reported > module in a reporting loop (which after dwfl_report_begin_add would be > equivalent to removing the preexisting module). But I'd rather exercise > the interface as it stands a bit more before deciding to add a > microoptimization. > > >> I got an assertion failure at the dwfl_report_end stage >> /home/yyz/npremji/mainworkspace/frysk/frysk-imports/elfutils/libdwfl/dwfl_module.c:249: >> dwfl_report_end: Assertion `i == dwfl->nmodules' failed. >> > > Please send me a small C test program to reproduce this bug. > > > Thanks, > Roland > Try this. It was tested against elfutils 0.128 in fedora 7.