Skip to content

DWARF: Canonicalize tombstone values #4155

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

DWARF: Canonicalize tombstone values #4155

wants to merge 1 commit into from

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 15, 2021

This uses LLVM-style tombstone values in more places, and avoids
doing math on tombstone values incorrectly. This reduces a large
amount of dwarfdump verification errors that currently happen even on
hello world.

cc @pfaffe

@@ -336,7 +336,7 @@ Abbrev table for offset: 0x00000000

0x0000011f: DW_TAG_lexical_block [22] *
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000030)
DW_AT_high_pc [DW_FORM_data4] (0xffffffd0)
DW_AT_high_pc [DW_FORM_data4] (0x00000000)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a case of doing math with a tombstone.

@@ -141,7 +141,7 @@ Abbrev table for offset: 0x00000000
DW_AT_high_pc [DW_FORM_data4] (0x00000000)

0x00000026: DW_TAG_subprogram [2]
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_low_pc [DW_FORM_addr] (0x00000000ffffffff)
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks odd, but is what LLVM does, and LLVM's current dwarfdump (newer than the dumping code we are using here) will actually print (dead code) for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant