On Mon, Mar 02, 2015 at 10:02:27AM +0000, Daniel Thompson wrote:
> On Thu, 2015-02-26 at 14:16 +0300, Dan Carpenter wrote:
> >    353                                          break;
> >    354                                  kdb_printf("%s ", p_tmp);
> > 
> > Presumably we print the same thing over and over "count" times.
> 
> kallsyms_symbol_next() internally maintains a static iterator  (the
> second argument is used to reset-or-not the iterator) so it will not
> yield the same result when called.
> 
> 
> > 
> >    355                                  *(p_tmp + len) = '\0';
> >                                                   ^^^
> > "len" was calculated back on line 337.  We don't need to update it?  I'm
> > not sure I understand this line.
> 
> Whilst kallsyms_symbol_next() maintains a static iterator to record the
> position of the search within the symbol table it does *not* record the
> search string that it is looking for. Line 355 shortens the search
> string (which currently contains a search *result* rather than the
> search target) back to its original value ready to do the next search.
> 

Ah.  You're, of course, correct.  I missed the static.  Thanks for
taking the time on this.

regards,
dan carpenter


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to