[PATCH] addr2line: -C should not try to handle optional (ignored) argument

2023-01-23 Thread Mark Wielaard
The --demangle option takes an option (ignored) argument. Since -C is the short option of --demangle it also takes that optional argument. But that means that something like -Cfi is like -C got fi as argument, while the user expects -Cfi to be like -C -f -i. Separate the --demangle and -C options.

[PATCH] libdw: Search for abstract origin in the correct CU

2023-01-23 Thread Mark Wielaard
With gcc -flto the abstract origin of an inlined subroutine could be in a different CU. dwarf_getscopes might return an empty scope if it cannot find the abstract origin scope. So make sure to search in the We also tried to add the origin match in pc_record directly in the current inlined scope. T