From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Aleksandar Ristovski <aristovski@qnx.com>
Subject: Re: corelow and threads question
Date: Fri, 05 Jun 2009 19:24:00 -0000 [thread overview]
Message-ID: <200906052025.10264.pedro@codesourcery.com> (raw)
In-Reply-To: <h0bplu$o36$1@ger.gmane.org>
On Friday 05 June 2009 19:54:54, Aleksandar Ristovski wrote:
> With corelow.c patched as proposed, on Neutrino I could do this:
>
> For NTO, I "hijack" core_ops:
> static void
> init_nto_core_ops ()
> {
> struct target_ops *core_ops;
>
> core_ops = find_core_target ();
> gdb_assert (core_ops && core_ops->to_shortname != NULL
> && !!"core_ops must be initialized first!");
> original_core_ops = *core_ops;
> core_ops->to_extra_thread_info =
> nto_target_extra_thread_info;
> core_ops->to_open = nto_core_open;
> core_ops->to_xfer_partial = nto_core_xfer_partial;
> core_ops->to_pid_to_str = nto_pid_to_str;
> }
As I mentioned in the other threads, this is fine as a local change,
but not so to have in GDB proper, so it does go against
your goal of pushing all your local changes. :-/
This is depending on the order of which the _initialize
routines are called, hence the gdb_assert. I just cleaned
up the only left over target that was doing a similar hack
(sol-threads.c) a couple of months ago, to not do so.
Again, it's hard to come up with a better alternative
without knowing what you're doing in those overrides. Maybe
what you need is a thread_stratum target sitting on top of
nto-procfs.c or corelow.c. Maybe we need new gdbarch
callbacks.
--
Pedro Alves
next prev parent reply other threads:[~2009-06-05 19:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 18:55 Aleksandar Ristovski
2009-06-05 19:03 ` Daniel Jacobowitz
2009-06-05 19:20 ` Aleksandar Ristovski
2009-06-05 19:24 ` Pedro Alves [this message]
2009-06-05 19:41 ` Aleksandar Ristovski
2009-06-06 0:01 ` Pedro Alves
2009-06-06 0:27 ` Pedro Alves
2009-06-09 16:10 ` Aleksandar Ristovski
2009-06-10 16:49 ` Pedro Alves
2009-06-10 20:38 ` Aleksandar Ristovski
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=200906052025.10264.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=aristovski@qnx.com \
--cc=gdb@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