From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Remove mips/tm-linux.h
Date: Tue, 01 May 2007 23:07:00 -0000 [thread overview]
Message-ID: <200705012307.l41N7h4n010988@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070501202710.GA23630@caradoc.them.org> from "Daniel Jacobowitz" at May 01, 2007 04:27:10 PM
Daniel Jacobowitz wrote:
> While working on mips64-linux more today, I decided to remove its
> DEPRECATED_TM_FILE setting. The problem was that it overrode
> IN_SOLIB_DYNSYM_RESOLVE_CODE, which isn't a gdbarch method; it lives
> in the solib_ops instead.
That had been on my list ;-) Thanks for beating me to it.
I'd been thinking of a somewhat different approach: the svr4
implementation checks really for two different things:
- whether the pc is inside the dynamic loader
- whether the pc is in a call stub on its way to the dynamic loader
The first is clearly a "solib" property, but the second is arguably
more of a gdbarch/osabi property. So I'd thought on removing the
in_plt_section check from svr4_in_solib_dynsym_resolve_code,
make a new gdbarch method with a default implementation to check
both in_solib_dynsym_resolve_code and in_plt_section, and use that
new method in infrun.c instead of in_solib_dynsym_resolve_code.
Then mips gdbarch could override that method, and call the
standard in_solib_dynsym_resolve_code plus its own special
check for dynamic stubs.
But I don't really object to your solution either, in particular:
> +/* Set the solib operations for GDBARCH to NEW_OPS. */
> +
> +extern void set_solib_ops (struct gdbarch *gdbarch,
> + struct target_so_ops *new_ops);
something like this is certainly a good idea. (E.g. to clean
up the mess NTO currenly has w.r.t. solib overrides ...)
Either way, there goes the last definition of
IN_SOLIB_DYNSYM_RESOLVE_CODE, so infrun.c could be cleaned
up a bit as a follow-on.
> Tested on mips64-linux, all three ABIs, no change in results.
I'm wondering why you didn't run into this #error in gdbarch.h:
#if !defined (GDB_TM_FILE) && defined (CANNOT_FETCH_REGISTER)
#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
#endif
#if !defined (GDB_TM_FILE) && defined (CANNOT_STORE_REGISTER)
#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
#endif
because the mips-linux NM file still defines those two macros,
and you just removed the TM file ...
I did run into the that problem on ia64. That's the reason
why I was recently trying to remove the mips-linux NM file,
before going after the TM -- but that still isn't quite
resolved.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-05-01 23:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 20:27 Daniel Jacobowitz
2007-05-01 23:07 ` Ulrich Weigand [this message]
2007-05-01 23:37 ` Daniel Jacobowitz
2007-05-16 14:09 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705012307.l41N7h4n010988@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox