Re: [commit] fix for "info threads" printing multiple headers

Tom Tromey
2011-02-22T17:37:22Z

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> Thanks! A few comments below. If you don't want to
Pedro> fix these, I'll try to find a bit later on myself.

Pedro> - get_number_or_range mantains an internal state machine
Pedro> using static variables. I think that as long as you
Pedro> always pass in the same list string, and the list spec
Pedro> string is correctly formed, you're not hitting stale
Pedro> state inside get_number_or_range. It'd be nicer
Pedro> if get_number_or_range (or a variant which get_number_or_range
Pedro> would then be implemented on top of) took an additional
Pedro> struct pointer that pointed to a struct that held
Pedro> all the currently static state.

I almost did this when moving stuff to cli-utils, but decided against it
on the basis of least change.

If Michael doesn't want to implement this, I'd be happy to.
Just let me know.

Tom