Skip to content

Commit 12bb802

Browse files
committed
Don't let property evaluation affect the current language
On PPC, we saw that calling an inferior function could sometimes change the current language, because gdb would select the call dummy frame -- associated with _start. This patch changes gdb so that the current language is never affected by DWARF property evaluation.
1 parent 7f22044 commit 12bb802

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gdb/dwarf2/loc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,11 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
16411641
if (prop == NULL)
16421642
return false;
16431643

1644+
/* Evaluating a property should not change the current language.
1645+
Without this here this could happen if the code below selects a
1646+
frame. */
1647+
scoped_restore_current_language save_language;
1648+
16441649
if (frame == NULL && has_stack_frames ())
16451650
frame = get_selected_frame (NULL);
16461651

0 commit comments

Comments
 (0)