This is the mail archive of the gdb-patches@sourceware.org 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] no frame needed when computing address of subprogram


> > Still, your question still stands, who sets the block? I found
> > inside write_var_or_type the following code:
> > 
> >   if (block == NULL)
> >     block = expression_context_block;
> > 
> > Which at first sight would seem reasonable.  This code predates me,
> > so I'm not sure of the consequence of removing it. And there might
> > be some other places down the road where we actually do the same.
> > I will investigate more.

Mamia mia, mucho complicacion if you remove this code... The function
relies on the block being set properly to do the lookup. For instance,
just slightly further down in that function, you have the following
code:

          nsyms = ada_lookup_symbol_list (encoded_name, block,
                                          VAR_DOMAIN, &syms);

If the block is not set, then the local symbols will not be found.
There may be other places where we have the same issue, I didn't
look further.  Sooooo....

> Yes, I agree; the patch is OK.  I just wanted to understand the
> difference for Ada.

... Thanks! I checked the patch in.

-- 
Joel


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