aboutsummaryrefslogtreecommitdiff
path: root/gdb/producer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/producer.c')
-rw-r--r--gdb/producer.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/gdb/producer.c b/gdb/producer.c
index 2ca701f..5d754fa 100644
--- a/gdb/producer.c
+++ b/gdb/producer.c
@@ -1,6 +1,6 @@
/* Producer string parsers for GDB.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -195,6 +195,30 @@ producer_is_clang (const char *producer, int *major, int *minor)
return false;
}
+/* See producer.h. */
+
+bool
+producer_is_realview (const char *producer)
+{
+ static const char *const arm_idents[] = {
+ "ARM C Compiler, ADS",
+ "Thumb C Compiler, ADS",
+ "ARM C++ Compiler, ADS",
+ "Thumb C++ Compiler, ADS",
+ "ARM/Thumb C/C++ Compiler, RVCT",
+ "ARM C/C++ Compiler, RVCT"
+ };
+
+ if (producer == NULL)
+ return false;
+
+ for (const char *ident : arm_idents)
+ if (startswith (producer, ident))
+ return true;
+
+ return false;
+}
+
#if defined GDB_SELF_TEST
namespace selftests {
namespace producer {
@@ -311,9 +335,7 @@ Version 18.0 Beta";
}
#endif
-void _initialize_producer ();
-void
-_initialize_producer ()
+INIT_GDB_FILE (producer)
{
#if defined GDB_SELF_TEST
selftests::register_test