[review v10] gdb/mi: Add -max-results parameter to some -symbol-info-* commands

Andrew Burgess (Code Review)
2019-12-03T00:00:02Z

Andrew Burgess has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/269
......................................................................

Patch Set 10:

> Patch Set 9:
>
> > Patch Set 9:
> >
> > All points raised are, I think, addressed in the new restructuring patch. I changed the max matches to 'unsigned int' instead of 'size_t' - is there a benefit for size_t that I'm missing? And use UINT_MAX as the default value. The consequence of this is that there's no truely "unlimited" matching mode any more, but I think with a limit of UINT_MAX this probably isn't a problem.
>
> Only that "size_t" is guaranteed to be able to hold the largest size an object can have on the machine, so we know it is guaranteed to be large enough to hold the number of results we can possibly return before running out of memory. In practice, unsigned int is probably large enough too, but there's no such guarantee.
>
> In any case there is no truly "unlimited" matching mode. In both cases (using -1 to denote unlimited or using SIZE_MAX as a maximum), the memory of the machine is the limit.

Converted to size_t in latest version.

--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I90a28feb55b388fb46461a096c5db08b6b0bd427
Gerrit-Change-Number: 269
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-CC: Joel Brobecker <brobecker@adacore.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Mon, 02 Dec 2019 23:59:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment