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: Avoid decode_objc clobbering current language


Hi Andreas,

> The problem is that sal_decode_line_1 (here called from
> breakpoint_re_set_one) calls decode_objc, which indirectly calls
> get_selected_frame.  Since the program is just being started there is no
> selected frame yet, thus get_selected_frame called select_frame, which
> re-sets current_language (typically to language_c).  Thus the
> set_language call in breakpoint_re_set_one is useless.

This is an issue that I'm planning to address properly. I had some plans
earlier this year to do it, but then decided to think about it some more.
Basically, the idea is to reduce the use of the current_language to
the minimum, which is use it as the context when the user enters a
command.

It's one of the things that I want to get done around July to September.

> 2008-05-21  Andreas Schwab  <schwab@suse.de>
> 
> 	* linespec.c (decode_objc): Save current language around call to
> 	get_selected_block.

In the meantime, I think that this is reasonable. Eventually when
the change mentioned above gets under way, I will remove your change.
I feel confident that it will not be missed, because I will have to
review all the uses of current_language anyway. I hope I'm not missing
something!

So, if you confirm that this caused no regression, please go ahead and
commit.

-- 
Joel


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