> On Jan 19, 2016, at 10:58 AM, Jim Ingham <jing...@apple.com> wrote:
> 
> If you mean "Add an API that sets the source-map for a target" say to 
> SBTarget, then that sounds great.  

Indeed this is what I meant to say. Add an API to SBTarget that allows you to 
modify the source map.
> 
> But if we're going to add an API to get at settings in general, then we 
> should talk about it more broadly before anybody gets started.  There was a 
> bunch of stuff that we wanted to do with settings that we never got around 
> to, but still want to do.  In particular, we had intended some as yet 
> unspecified syntax for restricting settings to particular scenarios.  Not 
> this, but something like:
> 
> settings set target[OS=OSX].expr-prefix my_osx_prefix.h
> 
> gives you an idea of what we had in mind.  I'd rather not add a full on API 
> for the settings till we decide either how we want to do this (which I think 
> would be worth the effort but I don't think any of us have got time to 
> address this right now) or to scrap it and go with flat settings.

Settings setting should be exposed only as accessors on the objects themselves 
and not in a generic way that allows you to set settings via the API that takes 
the setting name. 

So in general I vote to always add accessors on the objects and avoid anyone 
playing with settings by name and/or string values.
> 
> Jim
> 
> 
>> On Jan 15, 2016, at 11:28 AM, Greg Clayton <gclay...@apple.com> wrote:
>> 
>> That being said, feel free to add something the SB API and propose a patch.
>> 
>> Greg
>> 
>>> On Jan 14, 2016, at 3:13 PM, Jim Ingham via lldb-dev 
>>> <lldb-dev@lists.llvm.org> wrote:
>>> 
>>> There is currently no API to access the settings.  You have to cons up 
>>> commands and use SBCommandInterpreter::HandleCommand to execute them.
>>> 
>>> This is one of the remaining holes in the SB API.
>>> 
>>> Jim
>>> 
>>>> On Jan 14, 2016, at 2:41 PM, Jeffrey Tan via lldb-dev 
>>>> <lldb-dev@lists.llvm.org> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> We are building an IDE debugger on top of lldb python API. In order to get 
>>>> the source remapping work(the source path embedded in the symbol may be 
>>>> different from the real source path), user needs to use "settings set 
>>>> target.source-map" command to remap the source. 
>>>> 
>>>> I would like users to do similar thing from our IDE debugger. However, I 
>>>> could not find a python API to specify the source remapping, and more 
>>>> important a way to access the remapping functionality. The SBSourceManager 
>>>> class only exposes a single DisplaySourceLinesWithLineNumbers() method 
>>>> which displays the source in console output. Ideally it should expose an 
>>>> API in SBSourceManager for us to provide the old FileSpec and get back a 
>>>> new remapped FileSpec.
>>>> 
>>>> Is this not exposed in Python API? Do I need to re-do the remapping logic 
>>>> in our IDE UI code? How is other IDE handling the source remapping?
>>>> 
>>>> Thanks
>>>> Jeffrey
>>>> 
>>>> _______________________________________________
>>>> lldb-dev mailing list
>>>> lldb-dev@lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>> 
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>> 
> 

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to