This is an archive of the discontinued LLVM Phabricator instance.

Don't pack the structs of the jit debug interface
ClosedPublic

Authored by tberghammer on Dec 22 2015, 6:51 AM.

Details

Summary

Don't pack the structs of the jit debug interface

None of the documentation mentions that the entries are packed structs and also none of the other implementation I found pack them.

LLVM implementation: https://github.com/llvm-mirror/llvm/blob/master/lib/ExecutionEngine/GDBRegistrationListener.cpp

Diff Detail

Event Timeline

tberghammer retitled this revision from to Don't pack the structs of the jit debug interface.
tberghammer updated this object.
tberghammer added a subscriber: lldb-commits.
loladiro edited edge metadata.Dec 22 2015, 7:09 AM

I don't think that was part of the code I originally had, but I suppose this was added for 32bit compatibility? Would this do the right thing with a 32bit target?

I hit the problem when debugging an arm32 target from an x86_64 host and this CL fixes that issue. It will break if a 32bit target use the same "pragma pack" attribute I just removed.

The change have no effect for 64bit targets because symfile_size will be 8 byte aligned independently of the "pragma pack" (because all previous member is 8 byte).

loladiro accepted this revision.Dec 22 2015, 7:18 AM
loladiro edited edge metadata.

Ok, I see. Yes, I agree with this change. LGTM.

This revision is now accepted and ready to land.Dec 22 2015, 7:18 AM
This revision was automatically updated to reflect the committed changes.
tfiala edited edge metadata.Dec 23 2015, 11:16 AM

Sorry, late to the party. All the same, LGTM.