Re: [PATCH v4] gdb: ADI support

Weimin Pan
2017-07-25T19:19:35Z

----- Original Message -----
> From: qiyaoltc@gmail.com
> To: jose.marchesi@oracle.com
> Cc: weimin.pan@oracle.com, gdb-patches@sourceware.org
> Sent: Tuesday, July 25, 2017 9:44:55 AM GMT -08:00 US/Canada Pacific
> Subject: Re: [PATCH v4] gdb: ADI support
>
> jose.marchesi@oracle.com (Jose E. Marchesi) writes:
>
> > General question: what's wrong with using a simple linked list of
> > structs if that is the developer's preference, and/or it follows the
> > current style of the surrounding code? (Not saying it is in this case,
> > that's up to Weimin to say.)
>
> It makes the code a little bit unnecessarily complicated, IOW, std::list
> or std::forward_list can make it simpler. My preference is to use
> standard c++ data structure rather than re-inventing it again.

Obviously I missed your comment of using std::list but it's not clear to me why
you think a simple linked list can be a little bit unnecessarily complicated.

Given the fact that we need to backport this new feature to older gdb's, e.g.
dev-toolset6, one question is do we need to resort to the linked list solution
if the std list implementation is not available in older gdb versions? As of now,
we have one diversion already - uiout->text ("\n") VS ui_out_text (uiout, "\n").