-
Notifications
You must be signed in to change notification settings - Fork 30
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
[DebugInfo] -gpubnames option support in Driver #25
Conversation
This needs a rebase. |
5265904
to
cfbe7fc
Compare
I'm not sure, tried rebasing too. This one against branch |
@SouraVX Try checking out |
This option controls the production of .debug_names section (in DWARFv5) and .debug_pubnames section (in DWARFv4). Flang side support is provided in flang-compiler/flang#934
cfbe7fc
to
c85bf16
Compare
Thanks @bryanpkc . Yes, this seems to work, seems like the other one based on |
@@ -355,6 +355,9 @@ void ClassicFlang::ConstructJob(Compilation &C, const JobAction &JA, | |||
CommonCmdArgs.push_back("0x1000000"); | |||
else if (GDwarfArg->getOption().matches(options::OPT_gdwarf_5)) // -gdwarf-5 | |||
CommonCmdArgs.push_back("0x2000000"); | |||
else if (GDwarfArg->getOption().matches( | |||
options::OPT_gpubnames)) // -gpubnames | |||
CommonCmdArgs.push_back("0x40000000"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SouraVX , thanks for adding me as a reviewer. The only thing I cannot figure out is where the value of 0x4000000
comes from?
Perhaps I am looking in a wrong place, but the only place where I found the dwarf flags with similar values to these is here and the value of 040000000
is described as "Do not generate include file tables". Can you point me to the code or documentation of this flag value, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @michalpasztamobica for reviewing this. This PR is pretty old and hence might be missing pieces(Apologies for that) . In this PR intent is to use/bind an available bit to this option more details: https://github.com/flang-compiler/flang/blob/master/tools/flang2/docs/xflag.n#L3306 bit.
This piece of diff is missing from flang-compiler/flang#934, I'll update the PR soon.
diff --git a/tools/flang2/docs/xflag.n b/tools/flang2/docs/xflag.n
index 2ad1b02e..eddf910b 100644
--- a/tools/flang2/docs/xflag.n
+++ b/tools/flang2/docs/xflag.n
@@ -3254,7 +3254,7 @@ Generating eh_frame.
.XB 0x20000000:
Generating eh_frame with .cfi directives: requires 120,0x10000000 to be on
.XB 0x40000000
-AVAILABLE
+Generate .debug_names/.debug_pubnames section.
.XB 0x80000000:
no license check in executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifications/rebase Done @michalpasztamobica . Now you can apply these 2 PR in order and test :)
Order: Apply this one first -> then 934. Build and test.
Closing this due to problems faced while reproducing things, I'll creating fresh PR for these changes. Thanks! |
This option controls the production of .debug_names section (in DWARFv5)
and .debug_pubnames section (in DWARFv4).
Flang side support is provided in
flang-compiler/flang#934