flang
flang copied to clipboard
flang generated executable shows wrong value for character type in debugger
For fortran character type DW_TAG_string_type should be generated, in absence of this, debugger doesnt differentiate between character(kind=1) and integer(kind=1). Due to this debugger displays value as an integer.
ex.
actual output
(gdb) p cvar $1 = 97
expected output
(gdb) p cvar $1 = 'a'
Required code was present under macro FLANG_LLVM_EXTENSIONS. The code is now free'd from macro.
Testing:
- make check-flang
@jiel-nv can you look this over when you return to the office?
Has LLLVM HEAD been changed to allow DW_TAG_string_type as a valid tag now? (That change wasn't allowed to go in when I tried a few years ago, thus I'm asking.) That's good news if it was. Do you happen to know the phabricator link?
Has LLLVM HEAD been changed to allow DW_TAG_string_type as a valid tag now? (That change wasn't allowed to go in when I tried a few years ago, thus I'm asking.) That's good news if it was. Do you happen to know the phabricator link?
Yes, It is available in LLVM HEAD. I shall try to find the phabricator link.
It'll be great if the extension has been merged into LLVM HEAD.
I am able to verify that extension DW_TAG_string type is present in LLVM HEAD.
It'll be great if the extension has been merged into LLVM HEAD.
Please let me know if there is anything pending on me to get this pull request approved.
We need to hold it for now for merging. The opensource LLVM has only partial support not enough to support it. Sorry for my earlier assessment.
@gklimowicz The last comment asks to hold on merging this. If the issue is fixed in upstream llvm there might be a requirement for a new version of LLVM.
@alokkrsharma Given that we do not test release_10, is this patch expected to work?
@alokkrsharma Does this problem still exist in release_13x and release_14x? If the problem is no longer relevant, please close the PR; otherwise, please rebase it.
Closing this.