diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ec7d672..246b1cd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2015-09-26  Simon Marchi  <simark@nova.polymtl.ca>
+
+	* btrace.c (parse_xml_btrace_block): Fix cast of
+	xml_find_attribute's return value.
+	* memory-map.c (memory_map_start_memory): Likewise.
+	* solib-svr4.c (library_list_start_library): Likewise.
+	* solib-target.c (library_list_start_segment): Likewise.
+	(library_list_start_section): Likewise.
+	* tracepoint.c (traceframe_info_start_memory): Likewise.
+
 2015-09-26  Iain Buclaw  <ibuclaw@gdcproject.org>
 
 	* d-namespace.c (d_lookup_symbol): New arg langdef.
diff --git a/gdb/btrace.c b/gdb/btrace.c
index da0b517..2bf7177 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1418,8 +1418,8 @@ parse_xml_btrace_block (struct gdb_xml_parser *parser,
       gdb_xml_error (parser, _("Btrace format error."));
     }
 
-  begin = (long unsigned int *) xml_find_attribute (attributes, "begin")->value;
-  end = (long unsigned int *) xml_find_attribute (attributes, "end")->value;
+  begin = (ULONGEST *) xml_find_attribute (attributes, "begin")->value;
+  end = (ULONGEST *) xml_find_attribute (attributes, "end")->value;
 
   block = VEC_safe_push (btrace_block_s, btrace->variant.bts.blocks, NULL);
   block->begin = *begin;
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index d56b14c..3de6e9d 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -61,11 +61,11 @@ memory_map_start_memory (struct gdb_xml_parser *parser,
   ULONGEST *start_p, *length_p, *type_p;
 
   start_p
-    = (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "start")->value;
   length_p
-    = (long unsigned int *) xml_find_attribute (attributes, "length")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "length")->value;
   type_p
-    = (long unsigned int *) xml_find_attribute (attributes, "type")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "type")->value;
 
   mem_region_init (r);
   r->lo = *start_p;
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 48dec25..55b8f55 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1166,11 +1166,11 @@ library_list_start_library (struct gdb_xml_parser *parser,
   const char *name
     = (const char *) xml_find_attribute (attributes, "name")->value;
   ULONGEST *lmp
-    = (long unsigned int *) xml_find_attribute (attributes, "lm")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "lm")->value;
   ULONGEST *l_addrp
-    = (long unsigned int *) xml_find_attribute (attributes, "l_addr")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "l_addr")->value;
   ULONGEST *l_ldp
-    = (long unsigned int *) xml_find_attribute (attributes, "l_ld")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "l_ld")->value;
   struct so_list *new_elem;
 
   new_elem = XCNEW (struct so_list);
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index ef9599c..7745a4a 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -83,7 +83,7 @@ library_list_start_segment (struct gdb_xml_parser *parser,
   VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *last = VEC_last (lm_info_p, *list);
   ULONGEST *address_p
-    = (long unsigned int *) xml_find_attribute (attributes, "address")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
   CORE_ADDR address = (CORE_ADDR) *address_p;
 
   if (last->section_bases != NULL)
@@ -101,7 +101,7 @@ library_list_start_section (struct gdb_xml_parser *parser,
   VEC(lm_info_p) **list = (VEC(lm_info_p) **) user_data;
   struct lm_info *last = VEC_last (lm_info_p, *list);
   ULONGEST *address_p
-    = (long unsigned int *) xml_find_attribute (attributes, "address")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "address")->value;
   CORE_ADDR address = (CORE_ADDR) *address_p;
 
   if (last->segment_bases != NULL)
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 415fa6d..6ca66e7 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -4194,9 +4194,9 @@ traceframe_info_start_memory (struct gdb_xml_parser *parser,
   ULONGEST *start_p, *length_p;
 
   start_p
-    = (long unsigned int *) xml_find_attribute (attributes, "start")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "start")->value;
   length_p
-    = (long unsigned int *) xml_find_attribute (attributes, "length")->value;
+    = (ULONGEST *) xml_find_attribute (attributes, "length")->value;
 
   r->start = *start_p;
   r->length = *length_p;
