> > This uncovered what I think is a latent bug in the "how-did-we-never- > > see-this-before" category. > > Wow! Indeed. Many thanks for tracking this down and fixing it. > > A couple minor comments below, but this looks good to me. And thanks for the super-quick review. Attached is what I ended up pushing. It should address all your comments, and also add a comment in the testcase script to explain its purpose. If this isn't sufficient for Luis and Sergio, then we can try to find other solutions (including renaming the testcase, if necessary). gdb/ChangeLog: * amd64-tdep.c (amd64_displaced_step_fixup): Fix the mask used to compute RETADDR. gdb/testsuite/ChangeLog: * gdb.base/dso2dso-dso2.c, gdb.base/dso2dso-dso2.h, gdb.base/dso2dso-dso1.c, gdb.base/dso2dso-dso1.h, gdb.base/dso2dso.c, gdb.base/dso2dso.exp: New files. Re-tested on x86_64-linux. One last thought: Should we put it in GDB 7.10? Seems fairly safe, but is it worth it? -- Joel