Hi all, this (quite long) patch addresses following issues in dwarf2cfi.c: 1) Read both .debug_frame and .eh_frame if they are present. Not all frames must be covered in both frames. Example: imagine an exec linked from file1.o that was compiled with -g and file2.o that was compiled without it. Than old gdb would parse only a .debug_frame that came from file1.o and wouldn't have any frame info for code from file2.o that provided only the .eh_frame. That's the reason why to parse both of them. 2) Of course we shouldn't have duplicate FDEs (one from .debug_frame and one from .eh_frame). If the file contains only an .eh_frame it's easy, there can't be duplicates, but if we parse both sections, we must check fde_chunks before adding new FDE from eh_frame. (see comments inside the patch). 3) The original dwarf2cfi.c didn't implement CIE Augmentation correctly. The main problem was a non-standard addressing (aug. 'R') that I had to rewrite completely. This fixes many problems with backtraces through relocatable (-fPIC compiled) objects without .debug_info. 4) parse_frame_info now also recognises aug. 'L' (= LSDA pointer present in FDE) but I was told I don't need LSDA in GDB, so I ignore its content. 2002-05-31 Michal Ludvig * dwarf2cfi.c (dwarf_frame_buffer): Delete. (read_encoded_pointer): Add new argument, warn on indirect pointers. (execute_cfa_program): Warn on relative addressing, change messages. (frame_state_for, cfi_get_saved_register) (cfi_virtual_frame_pointer): Change message. (dwarf2_build_frame_info): Only call parse_frame_info for .debug_frame and .eh_frame. (parse_frame_info): New, derived from dwarf2_build_frame_info, fixed augmentation handling, added relative addressing, ignore duplicate FDEs. Added comments. OK to commit? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz