Page MenuHomePhabricator

Support standard DWARF TLS opcode; currently, only PS4 uses it.
ClosedPublic

Authored by probinson on Mar 2 2015, 2:20 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 21040.Mar 2 2015, 2:20 PM
probinson retitled this revision from to Support standard DWARF TLS opcode; currently, only PS4 uses it..
probinson updated this object.
probinson edited the test plan for this revision. (Show Details)
probinson added reviewers: echristo, dblaikie.
probinson added a subscriber: Unknown Object (MLST).

The test change builds on the change in D8011, the rest is independent.

dblaikie edited edge metadata.Mar 3 2015, 9:35 AM

Do they have the same semantics? (their name "push" versus "form" confuses me a bit)

Have you tried this with other debuggers to see if they support the standard opcode? Perhaps this doesn't need to be PS4-specific?

Do they have the same semantics? (their name "push" versus "form" confuses me a bit)

In PR18423, you report that GCC says they are different.
Although the PR reminds me that the standard op was defined in DWARF 3; if we still support DWARF 2, it should have a version check too.

Have you tried this with other debuggers to see if they support the standard opcode? Perhaps this doesn't need to be PS4-specific?

I have not run any experiments. Making it not PS4-specific would be cool, but the GCC PR makes me hesitant.

We would like this to become the default on Darwin, too.
Paul, could you please update PR18423 and also include Darwin in the list of platforms?

To be precise, the check should be

(isDarwin || isPS4) && DwarfVersion >= 3
emaste added a subscriber: emaste.Mar 3 2015, 12:27 PM
echristo edited edge metadata.Mar 3 2015, 12:32 PM

Let's just check this with gdb and be done with it. I'd prefer not to conditionalize if at all possible.

Thanks.

-eric

I suspect we'll want this on FreeBSD as well when using DWARF>2 (we still default to DWARF2 at present to try to support ancient gdb).

Let's just check this with gdb and be done with it. I'd prefer not to conditionalize if at all possible.

I strongly agree. I've added a link back to this review in the GDB PR https://sourceware.org/bugzilla/show_bug.cgi?id=11616.

Let's just check this with gdb and be done with it. I'd prefer not to conditionalize if at all possible.

I strongly agree. I've added a link back to this review in the GDB PR https://sourceware.org/bugzilla/show_bug.cgi?id=11616.

I have GDB 7.7 on my Ubuntu 14.04, it reports "Unhandled dwarf expression opcode 0x9b"
I think we're stuck with the GNU opcode for a while.

It would have to be conditional on DWARF version anyway, for as long as we're willing to support DWARF 2.

probinson updated this revision to Diff 21204.Mar 4 2015, 8:26 AM
probinson edited edge metadata.

New rev that includes Darwin.

echristo accepted this revision.Mar 4 2015, 12:26 PM
echristo edited edge metadata.

Sadly LGTM. One inline comment.

-eric

test/DebugInfo/X86/tls.ll
31 ↗(On Diff #21204)

Can probably just regexp check for section {{.*}}debug_info and not worry about it.

This revision is now accepted and ready to land.Mar 4 2015, 12:26 PM
This revision was automatically updated to reflect the committed changes.