This is the mail archive of the gdb@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: Does gdb 5.2 work with statically linked thread application under Linux?


On Thu, Mar 07, 2002 at 02:48:41AM -0500, Daniel Jacobowitz wrote:
> On Wed, Mar 06, 2002 at 11:30:50PM -0800, H . J . Lu wrote:
> > Does gdb 5.2 work with statically linked thread application under
> > Linux? It doesn't work for me at all. It doesn't know any thread.
> > I have a patch which works for gdb 5.1. Now it doesn't work for 5.2
> > anymore.
> 
> My fault, I think.
> 
> The problem is that in a dynamically linked binary
> thread_db_new_objfile will be called for every library is loaded.  At
> this point current_target is "child", so target_has_execution is true.
> But with a static binary, the first time the function is called objfile
> is NULL, and the second time current_target is "exec" (which has
> target_has_execution set false).
> 
> Perhaps target_has_execution was not the right check after all, if
> "exec" has it set false (which makes fairly little sense to me...) or
> perhaps we need to call the hook again later.  Michael, any idea?
> 

What is the problem if "|| !target_has_execution" is removed? I removed
it. Gdb now works on statically linked thread application as well as
core file. Did I miss soemthing?


H.J.


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