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: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units


On Monday 23 January 2006 14:17, Jim Blandy wrote:
> Are you sure you're not misunderstanding your typescript?  When you
> have a core file, you have a frame, so it's always using the frame
> context. I think that's the correct behavior.

Agreed.

The problem isn't that it shouldn't be using the frame context, the
issues are (1) it behaves differently when using and not using a core
file (2) there is no way to print the type in other contexts.  I.E. if
you are poking around in the sources with the print command and want
to print a type using the source context, you can't easily do that.

This is why I think the correct and complete solution is to allow the
user to directly specify the context.

> When there is a frame,
> the source position (as established by 'list' commands) generally
> doesn't override the frame position when deciding scopes.  It's the
> same for (say) printing static variables.

Yup, which is why you can print static variables using the 'file'::var
syntax.

> So I don't think there's a problem with your patch.

I guess we could still use that patch to fall back to using the source
context when there is no overriding frame context, while working on
allowing the user to directly specify the source context.

-Fred



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