[Bug 1216000] New: gcc: gdb fails to track tons of variables even in gcc's -Og binaries, shows "optimized out"
https://bugzilla.suse.com/show_bug.cgi?id=1216000 Bug ID: 1216000 Summary: gcc: gdb fails to track tons of variables even in gcc's -Og binaries, shows "optimized out" Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.5 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: screening-team-bugs@suse.de Reporter: el@horse64.org QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- gdb fails to track tons of variables even in -Og or -O1 binaries, shows "optimized out" instead. I see this even in code like this: result = some_function_of_mine( "<img =\"<img >src=.png/>\"/>", &tagstart, &taglen, &suspiciousbroken, NULL, NULL ); ck_assert(result == 12); When the assert fails and it halts on the line of the assert itself, it can't even tell me the result value in that line itself because it's optimized out. Despite just halting there with SIGABRT, due to that very result value! I don't know if this is a gcc or gdb at the end of the day, I assume gcc, but it's really a huge blocker for debugging. I run into this a lot, and it eats a lot of my time in development because I just can't figure out properly what's going on with half the values missing. As a result, I just use -O0 now, which I believe defies the point of -Og as an option. I'm seeing this with gcc (SUSE Linux) 12.3.0 on Leap 15.5 and gdb 12.1. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com