This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PING][PATCH] Also mark ELF solib trampoline minimal symbols special
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 26 Sep 2014 23:12:34 +0100
- Subject: [PING][PATCH] Also mark ELF solib trampoline minimal symbols special
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 1 dot 10 dot 1409162318090 dot 27075 at tp dot orcam dot me dot uk>
On Thu, 18 Sep 2014, Maciej W. Rozycki wrote:
> 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.
>
> Regression-tested with the mips-linux-gnu target and the following
> multilibs:
>
> -EB
> -EB -msoft-float
> -EB -mips16
> -EB -mips16 -msoft-float
> -EB -mmicromips
> -EB -mmicromips -msoft-float
> -EB -mabi=n32
> -EB -mabi=n32 -msoft-float
> -EB -mabi=64
> -EB -mabi=64 -msoft-float
>
> and the -EL variants of same with no regressions and the following
> big-endian failures removed:
>
> (gdb) PASS: gdb.base/watchpoint-solib.exp: rerun to main
> continue
> Continuing.
>
> Program received signal SIGILL, Illegal instruction.
> 0x2aad36ab in _dl_sym () at dl-sym.c:282
> 282 {
> (gdb) FAIL: gdb.base/watchpoint-solib.exp: continue to foo again
> continue
> Continuing.
>
> Program terminated with signal SIGILL, Illegal instruction.
> The program no longer exists.
> (gdb) FAIL: gdb.base/watchpoint-solib.exp: continue to watchpoint hit again
>
> and similarly for the little endianness:
>
> (gdb) PASS: gdb.base/watchpoint-solib.exp: rerun to main
> continue
> Continuing.
> FAIL: gdb.base/watchpoint-solib.exp: continue to foo again (timeout)
> continue
> FAIL: gdb.base/watchpoint-solib.exp: continue to watchpoint hit again (timeout)
>
> -- across the -mmicromips multilibs.
>
> OK to apply?
>
> 2014-09-17 Maciej W. Rozycki <macro@codesourcery.com>
>
> gdb/
> * elfread.c (elf_symtab_read): Also mark solib trampoline minimal
> symbols special.
Ping!
Maciej