[swift-lldb-dev] [swift-dev] LLDB Invalid address (32 bit arm)

Todd Fiala todd.fiala at gmail.com
Mon Jan 4 12:22:49 CST 2016


On Mon, Jan 4, 2016 at 9:45 AM, William Dillon via swift-lldb-dev <
swift-lldb-dev at swift.org> wrote:

>
> On Jan 4, 2016, at 9:17 AM, Todd Fiala <tfiala at apple.com> wrote:
>
> I added some more comments to the pull request that I Think is related to
> this thread here:
> https://github.com/apple/swift-lldb/pull/3
>
> The archspec changes really need to happen in llvm.org lldb svn trunk and
> need to be put up for patch review there (along with any discussion
> particular to that).  The rest of the change (for 32-bit support specific
> to Swift LLDB) looked fine. If we get that separated out again, I’ll be
> happy to get that in.
>
>
> That sounds good.
>
> To summarize how changes in these three projects link together:
>
> there is some code in swift that tries to canonicalize armv6l and armv7l
> into just ‘armv6’ and ‘armv7’ respectively.  This was suggested by Dmitri
> and Tim.  However, armv6l isn’t represented in llvm, and I’m working on
> bringing my patch there up to standards.  However, this canonicalization
> only applies to compilation, not the REPL.  Joe Bell figured out that LLDB
> was being passed armv6l and armv7l and it didn’t know what to do with
> them.  He fixed that by adding them to lldb.  The correct approach seems to
> be performing the same transformation for the REPL as for compilation, and
> therefore the other proposed changes to LLDB are inappropriate.  I’ll back
> those out as Todd suggested.
>

Sounds good.


>
> I want to do these operations in such a way that Joe always has a set of
> repos that will build functioning binaries for ARM because he’s been great
> at releasing updates as other parts of swift for linux mature.  To that
> end, I’ll figure out the changes necessary to swift’s invocation of LLDB
> and submit a PR for that.  Then, I’ll back-out the changes to LLDB.  The
> changes to LLVM can happen any time.
>

Okay.


>
> Apologies for any incoherencies, I’ve got a cold at the moment. :)
>

I hope you feel better!  Totally coherent fwiw :-)

-Todd


>
> - Will
>
> On Jan 4, 2016, at 9:00 AM, Dmitri Gribenko via swift-lldb-dev <
> swift-lldb-dev at swift.org> wrote:
>
> On Mon, Jan 4, 2016 at 6:50 PM, Todd Fiala via swift-lldb-dev <
> swift-lldb-dev at swift.org> wrote:
>
>>
>> On Dec 28, 2015, at 10:39 AM, William Dillon via swift-lldb-dev <
>> swift-lldb-dev at swift.org> wrote:
>>
>> Hi Todd,
>>
>> Yes, I think that LLDB is more or less working with Swift on ARM.  We can
>> start the REPL and do some tasks with it, though it isn’t all that reliable
>> yet.
>>
>>
>> I’d love to hear about the reliability piece if you have more details
>> there!
>>
>>  There are two files in the swift-lldb PR that I merged in from Joe Bell
>> that fixed the REPL.  I think, however, than they would need to go to the
>>  lldb.llvm.org repo, rather than the swift one.
>>
>>
>> I think I’ve seen the llvm.org side of that patch.  Somebody else and I
>> had a question about some static casts in there, but we’ll catch up on that
>> side if it is the same patch I’m thinking about.
>>
>>  There is a question about that, though.  Joe added armv7l into the
>> ArchSpec table, but I don’t think that armv7l is a real subtype.  I’ve been
>> very confused by the ARM nomenclature on linux (I don’t think I’m alone
>> here), and I think that armv7l means armv7 little endian.  So, should these
>> get converted to armv7 somewhere else and revert the changes to the
>> ArchSpec table?
>>
>>
>> This is a great question that I am not the right resource to answer.  *Greg
>> or Jason,* any thoughts here on question of arm subtypes?  (My first
>> take is that I’d expect each subtype to represent a different set of
>> features and instructions available, and not be used solely for an
>> endianness designation, but that’s not an area I do much work in).
>>
>
> We have discussed this before with Tim Northover, and he suggested that we
> canonicalize armv7l to armv7 when parsing the triple from the command line.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>  _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>


-- 
-Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-lldb-dev/attachments/20160104/a9c0c4ca/attachment.html>


More information about the swift-lldb-dev mailing list