diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-01-25 11:20:39 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-01-29 13:39:01 +0100 |
commit | 38360086aea4f956dcd4ba406318595ea11f7dea (patch) | |
tree | 7cab1d6ca85a5eb23cbc4f22e22a473b025dbb3c /gdb/utils.h | |
parent | 0f81d3f0a799c6e8c2a89d7f519916e3c9c0f65e (diff) | |
download | gdb-38360086aea4f956dcd4ba406318595ea11f7dea.zip gdb-38360086aea4f956dcd4ba406318595ea11f7dea.tar.gz gdb-38360086aea4f956dcd4ba406318595ea11f7dea.tar.bz2 |
Merge GCC producer parsers. Allow digits in identifiers.
Both dwarf2read.c (checkproducer) and utils.c (producer_is_gcc_ge_4)
implemented a GCC producer parser that tried to extract the major and minor
version of GCC. Merge them into one GCC producer parser used by both. Also
allow digits in the identifier after "GNU " such as used by GCC5 like:
"GNU C11 5.0.0 20150123 (experimental) -mtune=generic -march=x86-64 -gdwarf-5"
gdb/ChangeLog:
* dwarf2read.c (checkproducer): Call producer_is_gcc.
* utils.c (producer_is_gcc_ge_4): Likewise.
(producer_is_gcc): New function.
* utils.h (producer_is_gcc): New declaration.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index e58260c..6724d7c 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -302,6 +302,7 @@ extern pid_t wait_to_die_with_timeout (pid_t pid, int *status, int timeout); #endif extern int producer_is_gcc_ge_4 (const char *producer); +extern int producer_is_gcc (const char *producer, int *minor); extern int myread (int, char *, int); |