mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 20:12:01 +08:00
gdb: get_frame_language now takes a frame parameter.
As part of a drive to remove deprecated_safe_get_selected_frame, make the get_frame_language function take a frame parameter. Given the name of the function this actually seems to make a lot of sense. The task of fetching a suitable frame is then passed to the calling functions. For get_frame_language there are not many callers, these are updated to get the selected frame in a suitable way. gdb/ChangeLog: * language.c (show_language_command): Find selected frame before asking for the language of that frame. (set_language_command): Likewise. * language.h (get_frame_language): Add frame parameter. * stack.c (get_frame_language): Add frame parameter, assert parameter is not NULL, update comment and reindent. * top.c (check_frame_language_change): Pass the selected frame into get_frame_language.
This commit is contained in:
@ -544,7 +544,7 @@ extern const char *language_str (enum language);
|
||||
|
||||
extern void add_language (const struct language_defn *);
|
||||
|
||||
extern enum language get_frame_language (void); /* In stack.c */
|
||||
extern enum language get_frame_language (struct frame_info *frame); /* In stack.c */
|
||||
|
||||
/* Check for a language-specific trampoline. */
|
||||
|
||||
|
Reference in New Issue
Block a user