This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: print_symbol_info patch for source code not current language



>   easy (its a fake one !)
> 
>  static int test(int a;double c);
> would give
> if pascal is current laguage in auto mode
> 
>   static int test(a : longint;c : double);
> 
>  The function syntax is C but thesyntax of args is the pascal one !!

Yeah, that's what I was afraid of.

This is a bug in GDB.  There is no plausible reason to want to print
the function using one language, and its arguments in a different
language.  Some piece of code is using current-language when it
shouldn't.  Could you track this down, and see where the inappropriate
switch from C to Pascal occurs?

I haven't actually looked at the code yet, though, so I don't know how
easy it will be to fix.  I have the feeling that C and C++ are sharing
code in some ungodly fashion which will make this difficult to fix.

> I really tried first your proposal and as I did not like the result
> above I changed the method to what I sent you !

I understand.  But in situations like this it's important to fix the
real bug, instead of kludging around it.

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