[lldb-dev] Querying build configuration of (lib)lldb from tests.

Greg Clayton via lldb-dev lldb-dev at lists.llvm.org
Wed Feb 14 10:43:09 PST 2018


I second Jim's idea for a static function on SBDebugger that returns a SBStructuredData

> On Feb 14, 2018, at 10:31 AM, Jim Ingham via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> The idea of having a static function in SBDebugger that returns lldb configuration information seems good to me.
> 
> Having the API return an SBStructuredData with the full configuration information seems like a pretty future-proof way to do this.  I can't see that this data will get sufficiently large that consing up the whole set of config options to answer a single question is going to be a problem, and the info is constant for the run of lldb, so you can cache the result.
> 
> Jim
> 
> 
>> On Feb 5, 2018, at 4:01 AM, Pavel Labath via lldb-dev <lldb-dev at lists.llvm.org> wrote:
>> 
>> Hello all,
>> 
>> In <https://reviews.llvm.org/D42145> we have a feature that only works
>> when lldb was built with xml support. To  test this, we need the test
>> to know whether we were build with xml support.
>> 
>> The typical llvm solution would be to generate some dotest equivalent
>> of lit.site.cfg at build time, which we could then load from the test
>> and query for build settings.
>> 
>> However, it has occurred to me that the information about various
>> build properties (xml suport, libedit support, list of llvm targets we
>> support) is something that could be useful to other liblldb clients as
>> well. So, another way of exposing this would be to have a function
>> (maybe a static function on SBDebugger ?) that the test can call and
>> get the required information that way.
>> 
>> Do you have any thoughts on how this should be handled? Or maybe know
>> of an existing way that we could check this information already?
>> 
>> regards,
>> pavel
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev



More information about the lldb-dev mailing list