This moves the producer_is_realview to producer.c.
#include "value.h"
#include "record.h"
#include "extract-store-integer.h"
+#include "producer.h"
#include "complaints.h"
#include "dwarf2/frame.h"
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 {
Sets MAJOR and MINOR accordingly, if not NULL. */
extern bool producer_is_clang (const char *producer, int *major, int *minor);
+/* Return true if the supplied producer string matches the ARM
+ RealView compiler (armcc). */
+extern bool producer_is_realview (const char *producer);
+
#endif /* GDB_PRODUCER_H */
return info->language_of_main;
}
-/* Return 1 if the supplied producer string matches the ARM RealView
- compiler (armcc). */
-
-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;
-}
-
\f
/* The next index to hand out in response to a registration request. */
const char *name,
const domain_search_flags domain);
-/* Return 1 if the supplied producer string matches the ARM RealView
- compiler (armcc). */
-bool producer_is_realview (const char *producer);
-
extern unsigned int symtab_create_debug;
/* Print a "symtab-create" debug statement. */