This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OB PATCH] Fix c++ build


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]