tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GDB single-step fails on alpha (Re: CVS commit: src/share/mk)
On 2016/10/19 3:11, Martin Husemann wrote:
On Tue, Oct 18, 2016 at 09:06:03AM +0900, Rin Okuyama wrote:
a patch to mimic it. Could you please test it? It builds, but not
tested since I have no alpha boxes ;-).
I tried, but gdb does not work at all, can't even set breakpoints, so
not easy to test this case right now.
Matt said it partly works for him, not sure what is different in my build.
I bought an alpha box at last! Could you try the attached patch? It
works for me with kernel and userland from yesterday's current on
AlphaServer DS10. Note that the symbol to be skipped is changed from
"_rtld_bind" to "_rtld_bind_start". This change can also be applied
to ARM. If it works for you, {alpha,arm}nbsd_skip_solib_resolver()
should be merged and moved into nbsd-tdep.c.
Thanks,
Rin
====
--- src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c.orig 2016-10-27 18:27:07.705747846 +0900
+++ src/external/gpl3/gdb/dist/gdb/alphanbsd-tdep.c 2016-10-27 23:25:44.194687905 +0900
@@ -22,6 +22,7 @@
#include "defs.h"
#include "frame.h"
#include "gdbcore.h"
+#include "objfiles.h"
#include "osabi.h"
#include "regcache.h"
#include "regset.h"
@@ -36,6 +37,19 @@
#include "tramp-frame.h"
#include "target.h"
+/* from obsd-tdep.c with symbol name adjusted to ours */
+static CORE_ADDR
+alphanbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ struct bound_minimal_symbol msym;
+
+ msym = lookup_minimal_symbol("_rtld_bind_start", NULL, NULL);
+ if (msym.minsym && BMSYMBOL_VALUE_ADDRESS (msym) == pc)
+ return frame_unwind_caller_pc (get_current_frame ());
+ else
+ return find_solib_trampoline_target (get_current_frame (), pc);
+}
+
/* Core file support. */
/* Even though NetBSD/alpha used ELF since day one, it used the
@@ -333,6 +347,7 @@
/* NetBSD/alpha has SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
+ set_gdbarch_skip_solib_resolver (gdbarch, alphanbsd_skip_solib_resolver);
#ifdef notyet
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
Home |
Main Index |
Thread Index |
Old Index