Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit standard DWARF3 opcode for TLS address #11087

Closed
wants to merge 1 commit into from

Conversation

Geod24
Copy link
Member

@Geod24 Geod24 commented May 1, 2020

DW_OP_GNU_push_tls_address is a GNU extension prior to DWARF2.
DWARF3 introduced DW_OP_form_tls_address with the exact same semantic, as can be seen here:

Caveat: GDB support was "only" added in 7.12, which was released on 2016-10-07.

Since I don't use DMD (debug infos are utterly broken on MacOSX), I didn't observe any downside of this, but I was going over the DWARF code and found this oddity and figured it was time to replace it.

CC @ibuclaw

DW_OP_GNU_push_tls_address is a GNU extension prior to DWARF2.
DWARF3 introduced DW_OP_form_tls_address with the exact same semantic, as can be seen here:
- https://sourceware.org/legacy-ml/gdb-patches/2016-08/msg00222.html
- https://reviews.llvm.org/rL274366
@Geod24 Geod24 requested a review from ibuclaw May 1, 2020 07:22
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @Geod24!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11087"

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Compiler should support the latest gdb/dwarf features, and gdb should support old versions of compilers. Not the other way around.

@thewilsonator
Copy link
Contributor

Test runnable/gdb4181.d failed.  The logged output:
/media/disk1/braddr/sandbox/at-client/pull-4031940-Linux_32/dmd/generated/linux/release/32/dmd -conf= -m32 -Irunnable -g  -odgenerated/runnable -ofgenerated/runnable/gdb4181_0  runnable/gdb4181.d 
gdb generated/runnable/gdb4181_0 --batch -x generated/runnable/gdb4181_0.gdb
Breakpoint 1 at 0x8048687: file runnable/gdb4181.d, line 22.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, D main () at runnable/gdb4181.d:23
23	}
RESULT=generated/runnable/gdb4181_0.gdb:5: Error in sourced command file:
Unhandled dwarf expression opcode 0x9b


==============================
Test runnable/gdb4181.d failed: 
GDB regex: 'RESULT=.*33' didn't match output:
----
Breakpoint 1 at 0x8048687: file runnable/gdb4181.d, line 22.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, D main () at runnable/gdb4181.d:23
23	}
RESULT=generated/runnable/gdb4181_0.gdb:5: Error in sourced command file:
Unhandled dwarf expression opcode 0x9b

----

@Geod24
Copy link
Member Author

Geod24 commented May 1, 2020

gdb (gdb): GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1

Sigh
So I guess we can't do that.

@Geod24 Geod24 closed this May 1, 2020
@Geod24 Geod24 deleted the no-gnu-ext branch May 1, 2020 10:35
@WalterBright WalterBright added the Review:Phantom Zone Has value/information for future work, but closed for now label May 1, 2020
@WalterBright
Copy link
Member

Saved it for the future.

@WalterBright
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review:Phantom Zone Has value/information for future work, but closed for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants