Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

SouraVX
Copy link
Collaborator

@SouraVX SouraVX commented Mar 12, 2021

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

@kiranchandramohan
Copy link
Collaborator

This needs a rebase.

@SouraVX SouraVX force-pushed the fix_debug_names branch 2 times, most recently from 5265904 to cfbe7fc Compare March 15, 2021 03:50
@SouraVX
Copy link
Collaborator Author

SouraVX commented Mar 15, 2021

I'm not sure, tried rebasing too. This one against branch release_11x is showing lot of (un-related) diff. PR against release_10 is clean.

@bryanpkc
Copy link
Collaborator

@SouraVX Try checking out release_11x and then cherry-picking cfbe7fcefe38f201d1a1439e161ca5d892b975e4. That should give you a clean branch.

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
@SouraVX
Copy link
Collaborator Author

SouraVX commented Mar 15, 2021

Thanks @bryanpkc . Yes, this seems to work, seems like the other one based on release_100 is now un-happy. Let me see that.

@@ -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");
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

@SouraVX
Copy link
Collaborator Author

SouraVX commented Apr 16, 2021

Closing this due to problems faced while reproducing things, I'll creating fresh PR for these changes. Thanks!

@SouraVX SouraVX closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants