<div dir="ltr">Actually after a quick glance at the code, maybe it already does something like this? I hadn't really dug into the way .lldbinit works before.<br></div><br><div class="gmail_quote">On Wed Jan 28 2015 at 11:27:26 AM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Personally I'm a big fan of this model. Sort of like what git does, where you have different install files in different scopes, and it starts by parsing the global config first, then the user-level config, then the local config, overwriting values in the process.<br><div><br></div><div>So in Ted's scenario, for example, maybe lldb could load ~/.lldbinit first, then look in the same folder as the executable for a .lldbinit and load it second.</div></div><br><div class="gmail_quote">On Wed Jan 28 2015 at 11:21:13 AM Ted Woodward <<a href="mailto:ted.woodward@codeaurora.org" target="_blank">ted.woodward@codeaurora.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm sorry; I wasn't clear. When I say "global", I mean "global to this installation", not "global to the system".<br>
<br>
My idea was something like /inst/hexagon/Tools/bin/lldb would load /inst/hexagon/Tools/bin/<u></u>lldbin<u></u>it. Another lldb installation, say /inst/Xcode/bin/lldb, wouldn't see it, or be affected by it.<br>
<br>
--<br>
Qualcomm Innovation Center, Inc.<br>
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a> [mailto:<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>]<br>
Sent: Wednesday, January 28, 2015 1:12 PM<br>
To: Ted Woodward<br>
Cc: <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
Subject: Re: [lldb-dev] Global lldbinit file?<br>
<br>
This worries me a little bit. I install your Hexagon lldb, and that installs a global lldbinit, which then starts affecting my use of the other lldb's I happen to have on my system in ways that are not at all clear to me... That doesn't seem like a good idea to me.<br>
<br>
gdb had a global configuration file in /etc/conf, and Apple's gdb installation used it for a few things (this was actually done at NeXT and NOT by me...) - mainly setting some common print variables. But this just ended up causing more confusion than it was worth. It would have been better to just bake these into the gdb driver we shipped...<br>
<br>
I would suggest distributing your lldb as lldb-hex or something like that, and including a template .lldbinit-hex that folks could install, or making your own driver that sets the options you want first.<br>
<br>
Jim<br>
<br>
<br>
<br>
<br>
<br>
> On Jan 28, 2015, at 9:40 AM, Ted Woodward <<a href="mailto:ted.woodward@codeaurora.org" target="_blank">ted.woodward@codeaurora.org</a>> wrote:<br>
><br>
><br>
> When LLDB launches, it will read ~/.lldbinit (and possibly other variants of that, like ~/.lldbinit-Xcode).<br>
><br>
> In my Hexagon LLDB installation, I want LLDB to always load a global lldbinit file. Currently I do this by having lldb be a wrapper script that calls lldb with –o, but I’d like to eliminate the wrapper script, since wrapper batch files cause problems with ctrl-c handling on Windows. I use this to load a python file with utilities in it, like one to get the TLB info from the target. It sends a qXfer command to the remote GDB server to download an XML file, parses it, and prints the info from it. These utilities need to load for all users.<br>
><br>
> Do we have a global lldbinit file, or should I add code to load Host::GetProgramFileSpec()/<u></u>lld<u></u>binit?<br>
><br>
> --<br>
> Qualcomm Innovation Center, Inc.<br>
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
><br>
> ______________________________<u></u><u></u>_________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/lldb-dev</a><br>
<br>
<br>
<br>
______________________________<u></u><u></u>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/lldb-dev</a><br>
</blockquote></div></blockquote></div>