public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>,
	lttng-dev <lttng-dev@lists.lttng.org>,
		Tom Tromey <tromey@redhat.com>,
	gdb@sourceware.org
Subject: Re: [lttng-dev] Request change name of function lookup_enum in libbabeltrace to make GDB use this lib
Date: Wed, 05 Dec 2012 12:22:00 -0000	[thread overview]
Message-ID: <CANFwon2P3z+74CYdqaoU6pzLRv0CLMeD3N0t7FAzkYe5e9=QcQ@mail.gmail.com> (raw)
In-Reply-To: <20121205120845.GA31696@Krystal>

On Wed, Dec 5, 2012 at 8:08 PM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> * Hui Zhu (teawater@gmail.com) wrote:
>> Hi,
>>
>> I am working on add CTF support to GDB.  You can see my patch review threads in:
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00552.html
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00554.html
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00553.html
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00555.html
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00556.html
>>
>> To make GDB support CTF read, I use libbabeltrace with GDB.  You can
>> see the patch in
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00555.html.
>> I have a issue is  libbabeltrace have a function called lookup_enum
>> that is same with a GDB function.
>> I change the function name of GDB to handle this issue in my patch.
>>
>> But Tom said let libbabeltrace to change function name is better.
>> So I send this mail to ask do you mind change the function name of
>> lookup_enum?   If you can change the function name that will be really
>> helpful for us.  Thanks a lot.
>> And I post a patch about change the function name in libbabeltrace.
>
> I'm CCing Julien Desfossez on this one. From what I see,
> include/babeltrace/types.h is not included into the system, so it should
> not be considered to be a public header of libbabeltrace.
>
> Julien, is there an publically exposed babeltrace API that performs
> something similar to the internal lookup_enum() ?
>
> Hui, are you using other functions from include/babeltrace/types.h ?

No, my patch didn't use any function in this file.

Thanks,
Hui

>
> Thanks,
>
> Mathieu
>
>>
>> Thanks,
>> Hui
>>
>> --- a/formats/ctf/ctf.c
>> +++ b/formats/ctf/ctf.c
>> @@ -423,7 +423,7 @@ int ctf_read_event(struct stream_pos *pp
>>               } else {
>>                       struct definition_enum *enum_definition;
>>
>> -                     enum_definition = lookup_enum(&stream->stream_event_header->p, "id", FALSE);
>> +                     enum_definition = ctf_lookup_enum(&stream->stream_event_header->p,
>> "id", FALSE);
>>                       if (enum_definition) {
>>                               id = enum_definition->integer->value._unsigned;
>>                       }
>> --- a/include/babeltrace/types.h
>> +++ b/include/babeltrace/types.h
>> @@ -513,7 +513,7 @@ struct definition *lookup_definition(con
>>  struct definition_integer *lookup_integer(const struct definition *definition,
>>                                         const char *field_name,
>>                                         int signedness);
>> -struct definition_enum *lookup_enum(const struct definition *definition,
>> +struct definition_enum *ctf_lookup_enum(const struct definition *definition,
>>                                   const char *field_name,
>>                                   int signedness);
>>  struct definition *lookup_variant(const struct definition *definition,
>> --- a/types/types.c
>> +++ b/types/types.c
>> @@ -634,7 +634,7 @@ struct definition_integer *lookup_intege
>>       return lookup_integer;
>>  }
>>
>> -struct definition_enum *lookup_enum(const struct definition *definition,
>> +struct definition_enum *ctf_lookup_enum(const struct definition *definition,
>>                                   const char *field_name,
>>                                   int signedness)
>>  {
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com

  reply	other threads:[~2012-12-05 12:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 11:38 Hui Zhu
2012-12-05 12:08 ` [lttng-dev] " Mathieu Desnoyers
2012-12-05 12:22   ` Hui Zhu [this message]
2012-12-06 15:57   ` Pedro Alves
2012-12-06 16:21     ` Pedro Alves
2012-12-06 16:25       ` Mathieu Desnoyers
2012-12-10  8:31     ` Hui Zhu
2012-12-10 14:05       ` Mathieu Desnoyers
2012-12-11 15:19         ` Hui Zhu
2012-12-20 13:47           ` Hui Zhu
2012-12-20 14:16             ` Mathieu Desnoyers
2012-12-21  2:58               ` Hui Zhu
2013-01-07 21:19                 ` Mathieu Desnoyers
2013-01-09 19:48                   ` [BABELTRACE PATCH] Namespace the lookup_enum function Julien Desfossez
2013-01-13 17:58                     ` Mathieu Desnoyers
2013-01-24 17:43                       ` [lttng-dev] " Julien Desfossez
2013-01-25 11:17                         ` Hui Zhu
2012-12-06 10:51 ` Request change name of function lookup_enum in libbabeltrace to make GDB use this lib John Gilmore
2012-12-06 12:13   ` Hui Zhu
2012-12-06 15:38   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANFwon2P3z+74CYdqaoU6pzLRv0CLMeD3N0t7FAzkYe5e9=QcQ@mail.gmail.com' \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jdesfossez@efficios.com \
    --cc=lttng-dev@lists.lttng.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).