This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/5] Save trace into CTF format
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 15 Mar 2013 16:44:48 -0700
- Subject: Re: [PATCH 2/5] Save trace into CTF format
- References: <1361931459-3953-1-git-send-email-yao@codesourcery.com> <1361931459-3953-3-git-send-email-yao@codesourcery.com> <512F38CE.5030802@codesourcery.com> <87621avsam.fsf@fleche.redhat.com> <51332381.6010101@codesourcery.com>
> 2013-03-03 Hui Zhu <hui_zhu@mentor.com>
> Yao Qi <yao@codesourcery.com>
>
> * Makefile.in (REMOTE_OBS): Add ctf.o.
> (SFILES): Add ctf.c.
> (HFILES_NO_SRCDIR): Add ctf.h.
> * ctf.c, ctf.h: New files.
> * tracepoint.c : Include 'ctf.h'.
> (collect_pseudocommand): Remove static.
> (trace_save_command): Parse option "-ctf".
> Produce different trace file writers per option.
> Adjust output message.
> (trace_save_tfile, trace_save_ctf): New.
> * tracepoint.h (trace_save_tfile, trace_save_ctf): Declare.
> * mi/mi-main.c: Include 'ctf.h'.
> (mi_cmd_trace_save): Handle option '-ctf'. Call either
> trace_save_tfile or trace_save_ctf.
[...]
> + ctf_save_fwrite_format (handler->metadata_fd, metadata_fmt,
> + CTF_SAVE_MAJOR, CTF_SAVE_MINOR,
> + BYTE_ORDER == LITTLE_ENDIAN ? "le" : "be");
This is causing a build failure on ppc-aix, for instance, due to:
/[...]ctf.c:223:28: error: 'BYTE_ORDER' undeclared (first use in this function)
/[...]ctf.c:223:28: note: each undeclared identifier is reported only once for each function it appears in
/[...]ctf.c:223:42: error: 'LITTLE_ENDIAN' undeclared (first use in this function)
I don't know how to fix this, because I am not sure whether host
or target endianness were meant. I asssume from the code that it
was host, but not sure how the host endianess would make sense...
What also worries me is that I don't seem to see approval for commit
for this patch. I know both of you are very careful, so perhaps in
a separate message not linked to this sub-thread?
--
Joel