Also mark ELF solib trampoline minimal symbols special
authorMaciej W. Rozycki <macro@codesourcery.com>
Fri, 3 Oct 2014 16:38:39 +0000 (17:38 +0100)
committerMaciej W. Rozycki <macro@codesourcery.com>
Fri, 3 Oct 2014 16:38:39 +0000 (17:38 +0100)
In installing minimal symbols for ELF shared library trampolines
we "forget" to make individual symbols special where required.  This
leads to problems on the MIPS target using microMIPS SVR4 lazy stubs.
Lacking the special annotation these stubs are treated as standard
MIPS code and this makes GDB insert the wrong software breakpoint
instruction, breaking e.g. single-stepping through these stubs.  This
is not a very frequent scenario as microMIPS SVR4 lazy stubs are
typically only used in shared libraries with the main executable
using PLT, handled elsewhere.  Still it triggers e.g. when a software
watchpoint has been installed.  The symptom is SIGILL or the program
going astray, depending on the endianness.  Disassembly of these stubs
is also wrong.

* elfread.c (elf_symtab_read): Also mark solib trampoline minimal
symbols special.

gdb/ChangeLog
gdb/elfread.c

index 757cc690f22fd48c3702a39115c0c238af1b8a9a..6387550c5b6babd99d41332dffdee621459f0f00 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-03  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * elfread.c (elf_symtab_read): Also mark solib trampoline minimal
+       symbols special.
+
 2014-10-03  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * breakpoint.h (bp_target_info): Add `reqstd_address' member,
index 9b8233cc829208a30d0899412ffdaf40b1cd7d88..19aaed35dc837ed40d60d097a1dd2efa892659f4 100644 (file)
@@ -328,7 +328,10 @@ elf_symtab_read (struct objfile *objfile, int type,
            (sym->name, strlen (sym->name), copy_names,
             symaddr, mst_solib_trampoline, sect, objfile);
          if (msym != NULL)
-           msym->filename = filesymname;
+           {
+             msym->filename = filesymname;
+             gdbarch_elf_make_msymbol_special (gdbarch, sym, msym);
+           }
          continue;
        }
 
This page took 0.03703 seconds and 4 git commands to generate.