Hi all, this long patch provides a fix for a very annoying fact, that GDB on x86-64 can't do backtraces from hand-optimized assembler functions (that applies for example to glibc's memset, str*, etc as well as to syscall wrappers). This is caused by the lack of a valid debug_frame/eh_frame FDE entry for such a function (noone really writes .debug_frame section in his assembler code :-) My approach to fix this behaviour is based on the fortunate fact, that most of those affected glibc's functions don't touch the stack at all, so creating an artifical FDE for them is easy. Since this debug info is hardware dependent, I introduce a new gdbarch item: dwarf2_create_fde. Any architecture using Dwarf2 CFI that will like to profit from it must have it's own _dwarf2_create_fde() function, very similar to the one I did for x86-64. In x86_64_dwarf2_create_fde() I handle two cases: functions that have a prologue and those that don't (the most usual case). Soon I'll try to create FDE for signal handler caller there as well. Advantages of this approach are simplicity and cleanliness. There is no need to "manually" fill in values in CFI's context structure - just provide a valid, simple FDE and everything else will be done automagically. This new FDE is of course joined to all other FDEs read from the file before and is automatically used when needed again. The patch is transparent to architectures that are not prepared to have advantage of it and shouldn't hurt anything. OK to commit to branch and mainline? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz