Re: multithreaded programs on arm-linux

Frank Meerkoetter
2005-11-03T17:51:01Z

Quoting Daniel Jacobowitz <drow@false.org>:

> On Thu, Nov 03, 2005 at 05:28:09PM +0100, Frank Meerkoetter wrote:
>> thread_db_new_objfile() is called two times.
>> On the first run it prints the library name and
>> than branches on the falg using_thread_db
>> to the label quit.
>> There it returns without executing target_new_objfile_chain (objfile).
>>
>> The second time the same path is followed but without branching into
>> the block protected by the flag dejavu.
>>
>> In neither cases is this line executed:
>> /* Now attempt to open a connection to the thread library. */
>> err = td_ta_new_p (&proc_handle, &thread_agent);
>
> Then what set using_thread_db?

I misinterpreted the indentation level at the first try.
So the paths reported above are a little bit different.
The problem is that we end up in the block below.

static void
thread_db_new_objfile (struct objfile *objfile)
[...]
/* Don't attempt to use thread_db on targets which can not run
(core files). */
if (objfile == NULL || !target_has_execution)
{
/* All symbols have been discarded. If the thread_db target is
active, deactivate it now. */
if (using_thread_db)
{
gdb_assert (proc_handle.pid == 0);
unpush_target (&thread_db_ops);
using_thread_db = 0;
}
goto quit;
}

objfile is NULL, why i couldn't figure out.

Regards,
Frank