* [PATCH] Fix byte_order issue of traceframe_info of tfile
@ 2013-03-04 4:13 Hui Zhu
2013-03-04 12:45 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Hui Zhu @ 2013-03-04 4:13 UTC (permalink / raw)
To: gdb-patches; +Cc: lgustavo
Hi,
The function build_traceframe_info doesn't convert the byte_order. So if the tfile is read from different byte_order arch. It will get error.
This patch will fix this issue.
Thanks,
Hui
2013-03-04 Luis Machado <lgustavo@codesourcery.com>
* tracepoint.c (build_traceframe_info): Add code for byte order.
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -4705,7 +4705,14 @@ build_traceframe_info (char blocktype, v
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix byte_order issue of traceframe_info of tfile
2013-03-04 4:13 [PATCH] Fix byte_order issue of traceframe_info of tfile Hui Zhu
@ 2013-03-04 12:45 ` Pedro Alves
2013-03-04 13:54 ` Hui Zhu
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2013-03-04 12:45 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches, lgustavo
On 03/04/2013 04:12 AM, Hui Zhu wrote:
>
> * tracepoint.c (build_traceframe_info): Add code for byte order.
OK, thanks.
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix byte_order issue of traceframe_info of tfile
2013-03-04 12:45 ` Pedro Alves
@ 2013-03-04 13:54 ` Hui Zhu
0 siblings, 0 replies; 3+ messages in thread
From: Hui Zhu @ 2013-03-04 13:54 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, lgustavo
On 03/04/13 20:44, Pedro Alves wrote:
> On 03/04/2013 04:12 AM, Hui Zhu wrote:
>>
>> * tracepoint.c (build_traceframe_info): Add code for byte order.
>
> OK, thanks.
>
Checked in. http://sourceware.org/ml/gdb-cvs/2013-03/msg00016.html
Thanks,
Hui
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-04 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 4:13 [PATCH] Fix byte_order issue of traceframe_info of tfile Hui Zhu
2013-03-04 12:45 ` Pedro Alves
2013-03-04 13:54 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox