Re: lldb equivalent of .gdbinit and future break?
Re: lldb equivalent of .gdbinit and future break?
- Subject: Re: lldb equivalent of .gdbinit and future break?
- From: Jim Ingham <email@hidden>
- Date: Fri, 08 Feb 2013 11:59:29 -0800
On Feb 8, 2013, at 11:31 AM, Sean McBride <email@hidden> wrote:
> On Fri, 8 Feb 2013 11:20:45 -0800, Jim Ingham said:
>
>> That is a known bug. Because lldb supports debugging more than one
>> executable at a time (in lldb we call them "targets), the breakpoints
>> need to be set and stored "per target". But that means that we didn't
>> have a natural place to store breakpoints which aren't associated with
>> any target. We have to add an ur-target to hold these breakpoints.
>>
>> BTW, lldb handles its init files the same way gdb does, ~/.lldbinit gets
>> run BEFORE any files you have specified on the command line get read in
>> (so that you can modify how they are read in if needed) and then if
>> there is a .lldbinit file in the CWD it gets read in after the file
>> provided on the command-line is loaded. That's why breakpoints set in
>> the ~/.lldbinit are set with NO targets available, and currently don't work.
>
> Thanks for the explanation Jim.
>
>> For now you can either make a .lldbinit in the directory from which you
>> run lldb
>
> In the context of Xcode, where would this be? That is, I don't run lldb myself, Xcode does whatever it does. :)
By default, this is nowhere in particular, but you can set the CWD in the Options tab of the Run Scheme. I'm pretty sure you can use the Xcode variables so that it can be relative to the project, though I've never actually tried it in this field.
Note, for lldb if you have a file called .lldbinit-<PROGRAM_NAME> and the lldb library is loaded into an executable called PROGRAM_NAME, that file will be preferred over the plain .lldbinit. So if you want an lldbinit for command line lldb and one for Xcode, make .lldbinit-Xcode for the Xcode specific commands.
Jim
>
>> , and put the breakpoints there, or make a file somewhere and
>> use "command source" to add the breakpoints manually.
>
> That works, thanks. I just have to remember to it, but at least it's just one command.
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng email@hidden
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden