This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] fix for "info threads" printing multiple headers
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Michael Snyder <msnyder at vmware dot com>
- Date: Tue, 22 Feb 2011 10:37:05 -0700
- Subject: Re: [commit] fix for "info threads" printing multiple headers
- References: <4D62F7D6.8040705@vmware.com> <201102220851.20252.pedro@codesourcery.com>
>>>>> "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