-
Notifications
You must be signed in to change notification settings - Fork 297
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
gcc13 defaults to the latest version of dwarf #9261
Comments
default dwarf version seems to be 4 which is specified here:
see: |
should we try something like this? diff --git a/gcc/config/haiku.c b/gcc/config/haiku.c
index af14c02..bdd6f08 100644
--- a/gcc/config/haiku.c
+++ b/gcc/config/haiku.c
@@ -28,7 +28,7 @@ haiku_override_options (void)
if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
if (!global_options_set.x_dwarf_version)
- dwarf_version = 4;
+ dwarf_version = 3;
/* PIE does not work on Haiku, but PIC does the right thing for position
* independant executables. So if asked for PIE, do PIC instead. before
after
|
I think @waddlesplash identified that it is actually not the case that we previously set dwarf version 2, but we have been at dwarf version 4 for a while now. Only it seems that GCC is now using Dwarf version 4 output for lineinfo, and our Debugger does not support that. I suggest the actual solution is not to downgrade the default dwarf output, but to patch Debugger to support the lineinfo. |
This was on the haiku-commits list: https://www.freelists.org/post/haiku-commits/haiku-hrev57242-srckitsdebuggerdwarf,2 |
yes you're right, that would be a better way forward |
Can this be closed thanks to https://cgit.haiku-os.org/haiku/commit/?h=hrev57248&id=3f2464f759bbb21f49e8abf5bad429ba7d344952 ? |
I don't know about that; last I was seeing, without explicitly specifying |
yep that seems to be the case: |
This smells like a GCC bug, but spending about an hour looking through the code and to be honest, nothing really stands out. There seems to be a global variable, Am I looking at the right code? And if so, does that mean that somewhere during outputting dwarf info the global variable is changed, unless the option was set by command line? |
While at here, the code for other OSes was updated to use An alternative like vxworks would be to set DWARF_VERSION_DEFAULT in gcc/gcc/config/haiku.h |
DWARF_VERSION_DEFAULT sounds like the best solution. |
Meanwhile Debugger now should be able to parse v5 line number info, see: hrev57309 |
Arguably the better solution anyway ;-) |
Albeit only in nightlies... or do you intend to bring this into the beta4 branch? |
not sure. is there a description of the backporting process/policy for the beta maintenance branches? i.e. what kind of backports can be accepted, who makes the decision etc. |
The process is to push some changes to the refs/for/r1beta4 branch on Gerrit and it gets reviewed and merged as usual (someone has to vote +2 and merge, anyone who has commit permissions can do it). There isn't really a policy except for "don't break things". So, no ABI changes, mainly bugfixes, and usually changes that have been deployed on the nightlies for a few days/weeks to make sure there is no regressions. And, "Debugger does not show any sourcecode" can be considered a bug, so, we can put it in the bugfix category? |
I see 7 commits in src/kits/debugger since r1beta4, they look well concentrated on src/kits/debugger/dwarf. Debugger code isn't affected it seems. Gerrit lets the user cherry-pick changes for review in the UI. |
The patches for parsing lineinfo v4 have been cherry-picked to r1beta branch. |
Can we close this? |
Fine from my side |
Unlike gcc11, gcc13 seems to default to dwarf 5 that is incompatible with Debugger.
-gdwarf-3 must be passed manually and works for me.
From the recipe I can see the patch forces gcc to dwarf 2, do we know if version 3 has any issue?
The text was updated successfully, but these errors were encountered: