On Wed, 2012-11-28 at 17:03 +0100, Mark Wielaard wrote:
On Wed, 2012-11-28 at 16:35 +0100, Jan Kratochvil wrote:
> Is there still a disagreement?
I don't like a new field in struct Dwfl_Module that is only used for
this single thing. So if we can store the state somewhere else that
would be nice.
I see what you are saying can happen theoretically, but have a little
trouble imagining when this would every happen. If you are just using
parse_argp for command line parsing I don't really see how that would
happen. Are you thinking of some server program that would reuse
dwfl_standard_argp () multiple times?
Actually it doesn't really matter that I am not as imaginative. Maybe
you want to reuse the argp parser from within to parse a different
option group, or... Anyway, you are right, a global static would be bad.
I am just hoping we can get the executable state into the find_elf
callback without adding another internal field to the DWfl_Module struct
(if only because it is a little cheating, no other user can use it, it
would be just for our internal argp parser). But maybe there is no more
elegant way.
Thanks,
Mark