RFC: bfd_section should not be NULL in call to prim_record_minimal_*

Pedro Alves palves@redhat.com
Tue Apr 17 14:29:00 GMT 2012


On 04/17/2012 03:15 PM, Tom Tromey wrote:

> Pedro> Like in the patch below.  When testing it, I ran linespec.exp
> Pedro> first, and that revealed that msymbol_objfile had a bug in that
> Pedro> it didn't look at all the pspaces, only the current (the test
> Pedro> adds a second inferior, therefore a second pspace).  Not good
> Pedro> when you want to look up the objfile because you want to know the
> Pedro> msyms' pspace to begin with.
> 
> This seems odd to me.  And, with the split objfile stuff, it would be
> actively wrong, since a given msymbol could appear in multiple pspaces.
> Now, normally I wouldn't mention a patch that isn't checked in yet,
> but...


Indeed.

> 
> I think it would be better to pass the pspace around with the minimal
> symbol in linespec.c.  We certainly know it at the time we actually find
> the minsym, so it is just a matter of not losing the information.
> 
> Ok, I just looked at linespec.c again, and this is why there is an
> objfile in minsym_and_objfile.
> 
> Here's a totally untested patch based on this idea.


I definitely like this even more.

-- 
Pedro Alves



More information about the Gdb-patches mailing list