You are not logged in.

#1 2020-02-03 15:07:52

Registered: 2008-12-23
Posts: 8

Gdb having issues after system upgrade [SOLVED]

After a recent (2020-01-31) system upgrade my gdb stopped working correctly. The previous update was maybe 2-3 days earlier.

Specifically, stepping through code (with 'n') doesn't work correctly anymore. For example, I have the following output:

(gdb) n
/usr/include/c++/9.2.0/ext/new_allocator.h:489: Success.
../../src/compiler/list.h:497: No such file or directory.

(After pressing <enter> multiple times.).
I have no idea why it would print the allocator line, and the compiler/list.h file exists, but doesn't have 497 lines.

Even worse, it doesn't stop at every line.

My hypothesis: the debug information is broken.

Edit: this is not happening for all programs. So far I have only encountered it for the application we are developing at work. It's unfortunately not open-source, and has 100,000+ lines of code.

Observations and tests I did.
- this problem exists on two independent Arch machines. Once it happened on my first machine, I compiled on the second machine (and kept the executable), then updated and compiled again. After the update gdb wasn't working with the new executable anymore.
- the gdb executable seems fine:
  After the update the executable I compiled just before the update still worked. The one I compiled immediately afterwards didn't. (Minor note: on the second machine I hadn't updated as recently).

- the problem happens for both clang and gcc.

- old and new compiled executable have different sizes. The broken new files are bigger. (26MB -> 32MB).
  Afaik, gcc wasn't updated recently, and I don't see where the size comes from.

- Doesn't seem to be anything in my env. I created a new user and tried to compile with that one: same issue.

- Downgrading didn't help. I used the mirrorlist trick from … rch-linux/ and went back to a date where things were definitely working.

I'm completely stuck now. (And my coworkers don't have suggestions anymore either).

Last edited by priorit (2020-02-10 13:17:23)


#2 2020-02-10 13:17:11

Registered: 2008-12-23
Posts: 8

Re: Gdb having issues after system upgrade [SOLVED]

Not really a solution to the actual problem, but after switching the compilation flag from `-Og` to `-O0` I can debug the program again.
Marking as solved.


Board footer

Powered by FluxBB