Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb@sources.redhat.com
Subject: Re: corelow and threads question
Date: Fri, 05 Jun 2009 19:20:00 -0000	[thread overview]
Message-ID: <h0br5g$sj8$1@ger.gmane.org> (raw)
In-Reply-To: <20090605190339.GA32500@caradoc.them.org>

Daniel Jacobowitz wrote:
> On Fri, Jun 05, 2009 at 02:54:54PM -0400, Aleksandar Ristovski wrote:
>> Hello,
>>
>> Since: http://sourceware.org/ml/gdb-patches/2009-06/msg00101.html  
>> diverged from original intention, I would like to ask a question regarding 
>> core_ops and possible solution to my problem.
>>
>> Right now, we are treating core_ops somewhat specially since we add 
>> threads before calling target_find_new_threads in core_open; but why don't 
>> we let target_find_new_threads add the threads instead of adding them in 
>> core_open?
>>
>> Wouldn't that actually be the right solution?
> 
> I think the version you have now will cause "info threads" to
> duplicate threads every time you type it.  The current version
> reflects that threads are only added when the target is opened.

I missed to add to the example code that I set
core_ops->to_find_new_threads = nto_find_new_threads_in_core;

I tested on neutrino, it doesn't duplicate threads: notice I 
removed snippet with bfd_map_over_sections from core_open 
and moved it into new core_find_new_threads which represents 
default to_find_new_threads; then I override it in nto-tdep.c

> 
> That said, I think either way is fine - but you'll have to detect
> already-added threads.
> 

I don't think there would be any already added threads? If 
core_open doesn't add them, but defers that to 
target_find_new_threads, I believe (and my test with 
neutrino shows that) we wouldn't have any threads at 
"find_new_threads" time.

However, I am still unclear on whether overriding core_ops 
the way I implemented it is the right way, or should I 
somewhere do a "push_target (&nto_core_ops)"?

-- 
Aleksandar Ristovski
QNX Software Systems


  reply	other threads:[~2009-06-05 19:20 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 [this message]
2009-06-05 19:24 ` Pedro Alves
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='h0br5g$sj8$1@ger.gmane.org' \
    --to=aristovski@qnx.com \
    --cc=gdb@sources.redhat.com \
    /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