This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] [patch] 'info symbol' to print more info


On Sat, Nov 15, 2008 at 11:01 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>
> > But here, the message is already built up from 3 separate conditions,
> > and I am adding one more. What you are proposing then leads to a
> > chain of 16 if/then/else clauses. I don't think that's really
> > appropriate ...
>
> I haven't looked very closely at the details of the patch since Michael
> and Eli already did, so I can't comment on the exact number of if
> branches.

Note that the patch merely adds one more clause to existing three.
What Andreas is asking me to do here is rewrite existing code ...

> But, generally speaking, we just don't have much choice if
> we want to support i18n well.

Maybe 'info symbol' is sufficiently obscure that we don't need to
support i18n well for it?

> That being said, I agree that 16 branches is a large number, and perhaps
> we should let go of some of them.

If we always print symbol offset (even when 0), that eliminates
one branch.

> For instance, there was this discussion
> about not printing the name of the objfile if MULTI_OBJFILE_P. If we
> get rid of that, does it reduce the number of cases?

I think the answer is no, because we still have to check for:

	    && osect->objfile && osect->objfile->name

> The idea itself
> is nice, but perhaps code simplicity is more important in this case.
> Are there any other cosmectic features that we can get rid of to
> reduce the number of cases further?

Except for the offset mentioned above, I don't see what else could
be cut.

Thanks,
--
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]