Page MenuHomePhabricator

schweitz (Eric Schweitz)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 22 2015, 10:25 AM (173 w, 5 d)

Recent Activity

Nov 27 2018

schweitz added a comment to D54327: Adding debug info to support Fortran (part 3).

I believe all the comments have been addressed. Is there anything else required on our end with this one?

Nov 27 2018, 2:26 PM · debug-info
schweitz added a comment to D54043: Adding debug info to support Fortran (part 1).

Or this could go in first and supply additional tests for your new bit format. :)

Nov 27 2018, 2:23 PM · debug-info
schweitz added a comment to D54043: Adding debug info to support Fortran (part 1).

I believe all the comments have been addressed. Is there anything else required on our end?

Nov 27 2018, 11:04 AM · debug-info

Nov 16 2018

schweitz updated the diff for D54327: Adding debug info to support Fortran (part 3).

Remove alignment (not needed for DW_TAG_common_block).
Remove default dtor. (not needed)
Add both an llc test and a llvm-as | llvm-dis loop test.

Nov 16 2018, 2:43 PM · debug-info
schweitz updated the diff for D54043: Adding debug info to support Fortran (part 1).

minor fix to a comment in the new test

Nov 16 2018, 12:36 PM · debug-info
schweitz added a comment to D54043: Adding debug info to support Fortran (part 1).

Looks like this could use an LLVM CodeGen test too (similar to, or extending/renaming test/DebugInfo/Generic/mainsubprogram.ll)

Nov 16 2018, 12:10 PM · debug-info
schweitz updated the diff for D54043: Adding debug info to support Fortran (part 1).

Added an assembler test.

Nov 16 2018, 12:07 PM · debug-info

Nov 9 2018

schweitz added inline comments to D54327: Adding debug info to support Fortran (part 3).
Nov 9 2018, 1:21 PM · debug-info
schweitz added a comment to D54327: Adding debug info to support Fortran (part 3).

I don't understand the need for the "common alpha" global variable.

Nov 9 2018, 1:17 PM · debug-info
schweitz created D54327: Adding debug info to support Fortran (part 3).
Nov 9 2018, 9:17 AM · debug-info

Nov 6 2018

schweitz added inline comments to D54114: Adding debug info to support Fortran (part 2).
Nov 6 2018, 9:50 AM · debug-info
schweitz added a comment to D54043: Adding debug info to support Fortran (part 1).

Please note that D also has the pure attribute on functions, so I would like the pure flag to not be Fortran-specific such that we can use it for D too. Thanks!

Nov 6 2018, 9:27 AM · debug-info
schweitz updated the diff for D54043: Adding debug info to support Fortran (part 1).

Use bit 15 as the "extends" bit and free up bit 30.

Nov 6 2018, 9:18 AM · debug-info

Nov 5 2018

schweitz added a comment to D54114: Adding debug info to support Fortran (part 2).

As I commented in the dev email list, these "Fortran" features are actually useful for other languages. We use similar DWARF for Pascal "schema types", BASIC string types, etc. on OpenVMS Itanium and we'll want to leverage all of these for our x86 target. I suggested that the names be make more neutral or folded into the matching metadata tag. I'll give inline comments next.

Nov 5 2018, 3:33 PM · debug-info
schweitz added a comment to D54114: Adding debug info to support Fortran (part 2).

I'm not a Fortran expert. The last Fortran I used was 77 and didn't have all these newfangled features. :) Some questions come up on our end so I'll relay them.

Does this support handle non-contiguous arrays? Arrays can have "holes" in them. I believe the dope vectors ("array descriptors") hold that information but the description makes it sound like only upper and lower bounds are supported.

Nov 5 2018, 3:28 PM · debug-info
schweitz created D54114: Adding debug info to support Fortran (part 2).
Nov 5 2018, 9:49 AM · debug-info
schweitz updated the diff for D54043: Adding debug info to support Fortran (part 1).

Add the new flags to the C API.

Nov 5 2018, 9:23 AM · debug-info

Nov 2 2018

schweitz created D54043: Adding debug info to support Fortran (part 1).
Nov 2 2018, 11:57 AM · debug-info

Aug 14 2017

schweitz abandoned D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.
Aug 14 2017, 3:20 PM
schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

The argument that the DWARF presentation to existing Fortran debug vendors must be changed doesn't seem too compelling.

Aug 14 2017, 12:50 PM

Aug 11 2017

schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Some notes:
Section 5.10 of the DWARF standard specifies the correct, vendor-neutral handling of Fortran's CHARACTER string type.
Section 4.4.3 of the Fortran standard explains the semantics of the CHARACTER type.
For what it's worth, the DW_AT_encoding, while not listed in Appendix A of DWARF (Ver. 4), might actually be quite desirable for Fortran compilers and debuggers for encoding the KIND of the CHARACTER type (in particular when supporting unicode).

Aug 11 2017, 3:46 PM

Aug 9 2017

schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

I made quick experiment using this representation:

!21 = !DIDerivedType(tag: DW_TAG_string_type, name: "character(3)", size: 24, baseType: !DIBasicType(size: 8, align: 8, encoding: DW_ATE_signed))

which comes out as

0x00000056:   DW_TAG_string_type
                DW_AT_type	(cu + 0x0060 => {0x00000060})
                DW_AT_name	( .debug_str[0x00000026] = "character(3)")
                DW_AT_byte_size	(0x03)

0x00000060:   DW_TAG_base_type
                DW_AT_encoding	(DW_ATE_signed)
                DW_AT_byte_size	(0x00)

This still has the superfluous base type, but it appears to conform to the DWARF specification. Would something like this work for you?

Aug 9 2017, 10:31 AM
schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

It is understood that LLVM will add a superfluous DW_AT_encoding attribute as well. This has not been a real issue when testing existing debuggers with our Fortran compilers. It is generally expected that debuggers will ignore attributes that they don't understand in context. This patch enables the display of CHARACTER type variables under gdb when using flang, for example.

Aug 9 2017, 10:05 AM
schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

With this patch's encoding I'm a little worried by the discrepancy between the size and tag.
What about representing strings as !DIDerivedType(tag: DW_TAG_string_type, baseType: !DIBasicType(name: "character", size: 8, align: 8, encoding: DW_ATE_signed) instead?
The patch would be just as simple (allowing the string type tag in DIDerivedType instead), but the representation would be closer to what will be emitted in the end.

Aug 9 2017, 9:26 AM

Aug 8 2017

schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Hmm.. when I'm running your test I get:

0x00000056:   DW_TAG_string_type [4]  
                DW_AT_name [DW_FORM_strp]	( .debug_str[0x00000026] = "character")
                DW_AT_encoding [DW_FORM_data1]	(DW_ATE_signed)
                DW_AT_byte_size [DW_FORM_data1]	(0x01)

0x0000005d:   NULL

But the standard says in 5.11:

A string type entry may have a DW_AT_type attribute describing how each
character is encoded and is to be interpreted. The value of this attribute is a
reference to a DW_TAG_base_type base type entry. If the attribute is absent, then
the character is encoded using the system default.

Aug 8 2017, 5:48 PM
schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

It looks like the proper protocol is to note here that I don't have commit privileges and need someone to do that for me. Thanks in advance.

Aug 8 2017, 5:14 PM
schweitz updated the diff for D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Fixes for Adrian's comments and cut-n-paste errors. (I'm learning Phabricator.)

Aug 8 2017, 5:10 PM
schweitz updated the diff for D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Attach both change and test.

Aug 8 2017, 3:30 PM
schweitz updated the diff for D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Adding a test case.

Aug 8 2017, 3:25 PM
schweitz added a comment to D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.

Generally, we have test cases in flang that would exercise this, so it's a little chicken and egg in that regard. I'll try to whittle something down.

Aug 8 2017, 1:19 PM
schweitz created D36480: [LLVM] Change to Verifier to allow Fortran CHARACTER types in debug information.
Aug 8 2017, 12:09 PM