[lldb-dev] Patch to fix REPL for ARMv7 & ARMv6 on linux

Todd Fiala via lldb-dev lldb-dev at lists.llvm.org
Wed Jan 27 08:00:55 PST 2016


Hi Pavel,

Will is trying to get this working downstream of here IIRC.

Greg, can you have a look and see what you think of the patch?  (Also see
Pavel's comments).

Thanks!

-Todd

On Wed, Jan 27, 2016 at 1:28 AM, Omair Javaid via lldb-dev <
lldb-dev at lists.llvm.org> wrote:

> Hi Will,
>
> I dont understand REPL and thus the benefits it will have by making
> change to architecture name. I would not recommend to drop any
> information that we get from the host operating system.
>
> LLDB maintains core information alongwith triple in ArchSpec, may be
> you can parse triple to reflect correct core and use core instead of
> architecture name where needed.
>
> Kindly elaborate in a bit detail what are we getting out of this
> change for more accurate comments.
>
> Thanks!
>
> On 26 January 2016 at 14:47, Pavel Labath <labath at google.com> wrote:
> > + Omair
> >
> > I don't really understand arm (sub)-architectures or REPL. The patch
> > seems mostly harmless, but it also feels like a hack to me. A couple
> > of questions:
> > - why does this only pose a problem for REPL?
> > - If I understand correctly, the problem is that someone is looking at
> > the architecture string contained in the Triple, and not finding what
> > it expects. Is that so? Could you point me to (some of) the places
> > that do that.
> >
> > Omair, any thoughts on this?
> >
> > cheers,
> > pl
> >
> >
> > On 25 January 2016 at 18:55, Hans Wennborg <hans at chromium.org> wrote:
> >> This patch looks reasonable to me, but I don't know enough about LLDB
> >> to actually review it.
> >>
> >> +Renato or Pavel maybe?
> >>
> >> On Thu, Jan 14, 2016 at 11:32 AM, William Dillon via lldb-dev
> >> <lldb-dev at lists.llvm.org> wrote:
> >>> Hi again, everyone
> >>>
> >>> I’d like to ping on this patch now that the 3.8 branch is fairly new,
> and merging it over is fairly straight-forward.
> >>>
> >>> Thanks in advance for your comments!
> >>> - Will
> >>>
> >>>> There is a small change that enables correct calculation of arm sub
> architectures while using the REPL on arm-linux.  As you may of may or may
> not know, linux appends ‘l’ to arm architecture versions to denote little
> endian.  This sometimes interferes with the determination of the
> architecture in the triple.  I experimented with adding sub architecture
> entries for these within lldb, but I discovered a simpler (and less
> invasive) method.  Because LLVM already knows how to handle some of these
> cases (I have a patch submitted for review that enables v6l; v7l already
> works), I am relying on llvm to clean it up.  The gist of it is that the
> llvm constructor (when given a triple string) retains the provided string
> unless an accessor mutates it.  Meanwhile, the accessors for the components
> go through the aliasing and parsing logic.  This code detects whether the
> sub-architecture that armv6l or armv7l aliases to is detected, and re-sets
> the architecture in the triple.  This overwrites the architecture that
> comes from linux, thus sanitizing it.
> >>>>
> >>>> Some kind of solution is required for the REPL to work on arm-linux.
> Without it, the REPL crashes.
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>



-- 
-Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160127/487c38a6/attachment-0001.html>


More information about the lldb-dev mailing list