-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
(Request for Feedback) Very slow STEP (step into) and NEXT (stepping over) operation in GDB #357
Comments
Please try again with mold 1.1. Does running |
Thank you for the feedback, I tried with and without updating, but sorry if there is a bit of improvement is less than 10% and overall debug xp is still not ideal. (using mold 1.1 89612b7 ) I tried to add this gdb-add-index to the various qt so, but it fails as they do not have debug symbol. |
Sorry to add even more uncertainty, but I tried another program and here MOLD is running flawlessly -.- |
I'm experiencing very slow behavior of gdb with mold-linked binary too. With mold-1.1.1 and gdb-8.1.1, it takes more than a minute to read symbols (actually the delay is mostly after "Reading symbols from my-binary...done." is printed and before the prompt appears). Setting a breakpoint is instantaneous. Stepping, again, takes more than a minute. gdb-add-index doesn't significantly change it. With mold-1.1.1 and gdb-11.2.90.20220303-git, it takes about 7 seconds to read symbols. Setting a breakpoint is instantaneous. Stepping, again, takes more than a minute. gdb-add-index actually make loading symbols much longer again. |
I wonder if this issue is related to #402. Can you guys check if the link command line contains the |
Ciao rui314, sorry but this switch is not present. |
Not using |
Thank you guys for the input. It's unfortunate that that wasn't related. Have you see this to happen in any open-source program? I want to reproduce the issue locally to debug. |
I committed another change as you can see above for this issue. I'm not sure if this is the right fix because I haven't succeeded to reproduce the issue locally. Do you mind if I ask you to try again with this change? |
It's still reproducible with mold 1.1.1 (d0e4eee). Unfortunately, the issue didn't occur with any open-source projects I tried to build. |
Did you compile with |
Yes, I compile all with |
@d3m3t3r Thank you very much for confirming! That's a huge step towards fixing this mysterious issue. |
Excellent guys! I totally overlooked that parameter! Thank you very much! |
@RoyBellingan I submitted a change to workaround this issue. Do you mind if I ask you to rebuild mold and try again? I'm curious about
For (2), can you share the output of |
Mold 1.2.0 (f9768c6) fixed the issue for me.
|
Great. The |
This is funny, and I have yet no idea how to track and debug but in short machine is super high spec (ryzen 5950 16 core / 32gb ram 3600)
compiler gcc11.2
linker bfd / gold
gdb 11.1
The stepping over / into is very fast, overall experience is super snappy and reactive
When I link with mold, for... I have no idea why but the first time "certain" function are encountered the next is super slow, and I mean 2/3 second, instead if I put a breakpoint on the next line and do c (continue so restart execution), super fast.
No idea how to dig and how to debug this one, if you can please point me in some direction.
I noticed this tend to happen MORE when using function that involves call with QtLibraries object, even something like
if (QString("x") == "x") {
Take a good 0.7second to be stepped over...
I will cross post this on qt libraries but tracker and try to mix and match compiler and debugger too.
Edit forge to add I am using the mold version 1.0.1, I will recheck asap with the latest 1.0.3 and master
The text was updated successfully, but these errors were encountered: