Re: [PATCH v3 08/10] gdb: add objfile -> solib backlink
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Simon" == simon marchi <[email protected]> writes: Simon> + /* Return the list of struct solib associated to this objfile. */ Simon> + std::vector<solib *> &solibs () { return m_solibs; } It's kind of bad to expose this as a non-const vector, since it means that unscrupulous code can just modify it. Simon> + if (const auto &solibs = objfile->solibs (); Simon> + !solibs.empty ()) Simon> + return solibs.front (); I wonder if instead you would consider exposing something like this as a method on objfile. Tom