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

Simon Marchi (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Mon Dec 2 18:40:00 GMT 2019


Simon Marchi has posted comments on this change.

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


Patch Set 8:

> The problem that worried me most here was the difference between when something needs expanding, and when something is already expanded.
> 
> So right now we expand matching symtabs within an objfile, which might do nothing is the symtabs are already expanded, then we rewalk the symtabs and add matching symbols.
> 
> If we use the current "just expanded symtab" callback then this only triggers if something gets expanded, if it was already expanded then I don't think we see the callback, so we'd then need to walk all the symtabs again to catch any already expanded symtabs.
> 
> This will create strange ordering artifacts where results will appear in a different order the first call vs later calls.
> 
> What we really need is a "visit matching symtabs" type function, that applies the same logic as expand, but triggers the callback even for symtabs that are already expanded.

Ahh good point.  So we indeed need a "visit matching symtab, expanding if needed" callback.


-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I90a28feb55b388fb46461a096c5db08b6b0bd427
Gerrit-Change-Number: 269
Gerrit-PatchSet: 8
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 18:40:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list