This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] Assume thread-db loaded over a live process


On Mon, Sep 13, 2004 at 10:51:39PM +0000, Michael Snyder wrote:
> Andrew Cagney wrote:
> >>Andrew Cagney wrote:
> >>
> >>>Hello,
> >>>
> >>>This patch changes:
> >>>
> >>>-      /* We can only poke around if there actually is a child process.
> >>>-         If there is no child process alive, postpone the steps below
> >>>-         until one has been created.  */
> >>>-      if (proc_handle.pid != 0)
> >>>-       {
> >>>-         enable_thread_event_reporting ();
> >>>-         thread_db_find_new_threads ();
> >>>-       }
> >>>+      enable_thread_event_reporting ();
> >>>+      thread_db_find_new_threads ();
> >>>
> >>>this code is only executed when there is a child process so the guard 
> >>>isn't needed.    Tested on GNU/Linux, no change in test results.
> >>>
> >>>ok?
> >>
> >>
> >>
> >>From memory, I think this code was to guard against the corefile case.
> >>When you load a corefile, you may call thread_db_new_objfile, but
> >>you won't have a child process.  Is that no longer the case?  Does
> >>loading a corefile no longer cause this function to be called?
> >
> >
> >This code is only executed when there is a child process.  As you note, 
> >when loading a core file there is no child process (and as daniel 
> >pointed out, !target_has_execution holds) so this code is not executed.
> 
> That's what I don't understand, Andrew.  This code *used to* get
> called for a corefile.  What's changed?  As far as I can see,
> it will get called from symbol_file_add.  In my existing July
> build, it does.

Um, is that July of _this_ year?  There's a !target_has_execution check
up above it.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]