flang icon indicating copy to clipboard operation
flang copied to clipboard

flang support for pointers to scalar variables during debug info generation

Open bhuvanendrakumarn opened this issue 5 years ago • 6 comments

This fix handles pointer to scalar variable (of symbol type:ST_VAR) during debug info generation. It address 2 issues.

  1. flang is not emitting DW_AT_name attribute for pointer variable DIE, hence inside GDB, "print cqe_int_allocatable_scalar" command fails as shown below
  2. flang is emitting DW_TAG_array_type for a pointer variable instead of DW_TAG_pointer_type

Test case:

program test_cqe integer, allocatable :: cqe_int_allocatable_scalar cqe_int_allocatable_scalar=5 print *,cqe_int_allocatable_scalar print *,"End of printing" end program test_cqe

sample GDB session:

  • without fix : (gdb) p cqe_int_allocatable_scalar No symbol "cqe_int_allocatable_scalar" in current context.

  • with fix : (gdb) p cqe_int_allocatable_scalar $1 = (PTR TO -> ( integer )) 0x21be90 (gdb) p *cqe_int_allocatable_scalar $2 = 5

bhuvanendrakumarn avatar May 07 '20 20:05 bhuvanendrakumarn

@schweitzpgi FYI

sscalpone avatar May 08 '20 04:05 sscalpone

Gentle reminder for review request

bhuvanendrakumarn avatar May 15 '20 10:05 bhuvanendrakumarn

@jiel-nv, Thanks a lot for the review. @schweitzpgi, Gentle reminder for review request.

bhuvanendrakumarn avatar May 18 '20 10:05 bhuvanendrakumarn

@jiel-nv, @schweitzpgi, Thanks a lot for the review.

bhuvanendrakumarn avatar May 23 '20 17:05 bhuvanendrakumarn

Hi all,

Sent: Wednesday, June 10, 2020 11:26 AM Subject: Re: [flang-compiler/flang] flang support for pointers to scalar variables during debug info generation (#887) @bhuvanendrakumarn pushed 1 commit. • 38f0962 flang support for Assumed length string type during debug info generation

i have accidentally pushed some other changes to feature-pointertoscalar branch which was created for approved PR (887). is there anyway i can revert it back under feature-pointertoscalar branch?

any help/suggestion in this regard will be helpful

bhuvanendrakumarn avatar Jun 10 '20 07:06 bhuvanendrakumarn

@bhuvanendrakumarn Is this PR still relevant? Would you like to update it, or close it?

bryanpkc avatar Jul 27 '22 12:07 bryanpkc

@bhuvanendrakumarn Should we close this PR?

bryanpkc avatar Oct 18 '22 18:10 bryanpkc

@shivaramaarao As discussed, please check the status of this PR and determine whether we should try to merge it.

bryanpkc avatar Oct 04 '23 14:10 bryanpkc

@bryanpkc Hi, the fix for this issue(#887) is already merged. hence closing this ticket

bhuvanendrakumarn avatar Oct 15 '23 12:10 bhuvanendrakumarn

Fix for this issue already merged

bhuvanendrakumarn avatar Oct 15 '23 12:10 bhuvanendrakumarn