When examining an executable (but not running it) if you have a typedef in two different compilation units, with the same name but different types, the ptype command will print the type for the first one it finds in a scan of all the loaded symtabs, regardless of any source context you may have selected. Of course the wisdom of having writing this sort of code in the first place is somewhat suspect... :-) Attached is a patch that adds a test to the ptype.exp test for this case, by alternately listing functions from different compilation units (thus setting gdb's idea of the current source context) and verifying that ptype prints the type correctly based on the context. The patch also adds a proposed fix for the problem, which is to look in the current source symtab for the name, before scanning all the symtabs. -Fred