diff options
author | Tom Tromey <tom@tromey.com> | 2021-06-25 12:23:04 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-06-25 12:23:04 -0600 |
commit | bf1dcdb3910e003c29c278ddb48eb56cfd045138 (patch) | |
tree | 62737349a9aa423cc10b9627593ad0b1a765778b /gdb/ChangeLog | |
parent | gdb/python: allow for catchpoint type breakpoints in python (diff) | |
download | binutils-gdb-bf1dcdb3910e003c29c278ddb48eb56cfd045138.tar.gz binutils-gdb-bf1dcdb3910e003c29c278ddb48eb56cfd045138.tar.bz2 binutils-gdb-bf1dcdb3910e003c29c278ddb48eb56cfd045138.zip |
Consolidate CU language setting
The DWARF reader currently sets the CU's language in two different
spots. It is primarily done in prepare_one_comp_unit, but
read_file_scope also checks the producer and may change the language
based on the result.
This patch consolidates all language-setting into
prepare_one_comp_unit. set_cu_language is renamed and changed not to
set language_defn; instead that is done in prepare_one_comp_unit after
the correct language enum value is chosen.
This fixes a minor latent bug, which is that read_file_scope could set
the language enum value to language_opencl, but then neglected to
reset language_defn in this case.
gdb/ChangeLog
2021-06-25 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (read_file_scope): Don't call set_cu_language.
(dwarf_lang_to_enum_language): Rename from set_cu_language. Don't
set language_defn. Handle DW_LANG_OpenCL.
(prepare_one_comp_unit): Check producer and set language_defn.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5045e713a64..721aca30698 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2021-06-25 Tom Tromey <tom@tromey.com> + + * dwarf2/read.c (read_file_scope): Don't call set_cu_language. + (dwarf_lang_to_enum_language): Rename from set_cu_language. Don't + set language_defn. Handle DW_LANG_OpenCL. + (prepare_one_comp_unit): Check producer and set language_defn. + 2021-06-25 Andrew Burgess <andrew.burgess@embecosm.com> * NEWS: Mention Python BP_CATCHPOINT feature. |