2013-03-04 Luis Machado <lgustavo@codesourcery.com>
authorHui Zhu <teawater@gmail.com>
Mon, 4 Mar 2013 13:52:46 +0000 (13:52 +0000)
committerHui Zhu <teawater@gmail.com>
Mon, 4 Mar 2013 13:52:46 +0000 (13:52 +0000)
* tracepoint.c (build_traceframe_info): Add code for byte order.

gdb/ChangeLog
gdb/tracepoint.c

index 2a354777fddab2f22bd3fe7039cba31e32c3deca..848fa3d02cdced5428a60a69111fc260146b3432 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-04  Luis Machado  <lgustavo@codesourcery.com>
+
+       * tracepoint.c (build_traceframe_info): Add code for byte order.
+
 2013-03-02  Kevin Buettner  <kevinb@redhat.com>
 
        * v850-tdep.c: (v850e2_register_name): Revise system register
index 9a80aa333a9a90c88b35c178f583c47f14613859..a2122279d346a037e9c0443887000b0d9aef771b 100644 (file)
@@ -4716,7 +4716,14 @@ build_traceframe_info (char blocktype, void *data)
        unsigned short mlen;
 
        tfile_read ((gdb_byte *) &maddr, 8);
+       maddr = extract_unsigned_integer ((gdb_byte *) &maddr, 8,
+                                         gdbarch_byte_order
+                                         (target_gdbarch ()));
        tfile_read ((gdb_byte *) &mlen, 2);
+       mlen = (unsigned short)
+               extract_unsigned_integer ((gdb_byte *) &mlen,
+                                         2, gdbarch_byte_order
+                                         (target_gdbarch ()));
 
        r = VEC_safe_push (mem_range_s, info->memory, NULL);