diff options
author | Tom de Vries <tdevries@suse.de> | 2023-11-01 00:33:12 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-11-01 00:33:12 +0100 |
commit | 98ef1d81d6a3970f07e98216f31c89ec77997095 (patch) | |
tree | 9f809d59ee7108324f805293a085a48c6ee6991b /gdb/dwarf2 | |
parent | 87e3cc466e8ea352639beb6db40a36e339d608d1 (diff) | |
download | gdb-98ef1d81d6a3970f07e98216f31c89ec77997095.zip gdb-98ef1d81d6a3970f07e98216f31c89ec77997095.tar.gz gdb-98ef1d81d6a3970f07e98216f31c89ec77997095.tar.bz2 |
[gdb/symtab] Add producer_is_gas
Add producer_is_gas, a generic way to get the gas version from the
producer string.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 66669e2..bd43b5b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -11250,8 +11250,8 @@ check_producer (struct dwarf2_cu *cu) cu->producer_is_codewarrior = true; else if (producer_is_clang (cu->producer, &major, &minor)) cu->producer_is_clang = true; - else if (startswith (cu->producer, "GNU AS 2.39.0")) - cu->producer_is_gas_2_39 = true; + else if (producer_is_gas (cu->producer, &major, &minor)) + cu->producer_is_gas_2_39 = major == 2 && minor == 39; else { /* For other non-GCC compilers, expect their behavior is DWARF version |