aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-10-03 17:38:39 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-10-03 17:38:39 +0100
commit9b807e7bbbc55168e91c262c98fd09397482f9c9 (patch)
treeeed9fe44490f6673bbadb3174051ba97e7e686fb
parent0d5ed1535229b7069757e04766f70a02fa60821c (diff)
downloadgdb-9b807e7bbbc55168e91c262c98fd09397482f9c9.zip
gdb-9b807e7bbbc55168e91c262c98fd09397482f9c9.tar.gz
gdb-9b807e7bbbc55168e91c262c98fd09397482f9c9.tar.bz2
Also mark ELF solib trampoline minimal symbols special
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/elfread.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 757cc69..6387550 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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,
update comments.
* breakpoint.c (one_breakpoint_xfer_memory): Use `reqstd_address'
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 9b8233c..19aaed3 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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;
}