This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OB PATCH] Fix c++ build
- From: Doug Evans <dje at google dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org, eliz at gnu dot org, cole945 at gmail dot com
- Date: Wed, 16 Mar 2016 17:36:11 +0000
- Subject: [OB PATCH] Fix c++ build
- Authentication-results: sourceware.org; auth=none
Sergio Durigan Junior writes:
> On Monday, February 29 2016, Doug Evans wrote:
>
> > Hi.
> >
> > This is the main patch to add support for multibit and enum bitfields
> > to "flags" register specs.
>
> Hi Doug,
>
> This patch (or a newer version of it; I couldn't find it in the mailing
> list) broke the C++ build:
>
>
<http://gdb-build.sergiodj.net/builders/Fedora-x86_64-cxx-build-m64/builds/2139>
Fixed thusly (and committed), thanks.
2016-03-16 Doug Evans <dje@google.com>
* xml-tdesc.c (tdesc_start_enum): Fix c++ build.
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index a0fd08a..aa58385 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -300,8 +300,8 @@ tdesc_start_enum (struct gdb_xml_parser *parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *)
user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
int size = * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
struct tdesc_type *type;