From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6571 invoked by alias); 11 Dec 2012 15:19:17 -0000 Received: (qmail 6560 invoked by uid 22791); 11 Dec 2012 15:19:15 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-bk0-f41.google.com (HELO mail-bk0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 15:19:06 +0000 Received: by mail-bk0-f41.google.com with SMTP id jg9so1852939bkc.0 for ; Tue, 11 Dec 2012 07:19:05 -0800 (PST) Received: by 10.204.5.141 with SMTP id 13mr6386749bkv.35.1355239145061; Tue, 11 Dec 2012 07:19:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.226.140 with HTTP; Tue, 11 Dec 2012 07:18:24 -0800 (PST) In-Reply-To: <20121210140524.GA31945@Krystal> References: <20121205120845.GA31696@Krystal> <50C0C06A.40207@redhat.com> <20121210140524.GA31945@Krystal> From: Hui Zhu Date: Tue, 11 Dec 2012 15:19:00 -0000 Message-ID: Subject: Re: [lttng-dev] Request change name of function lookup_enum in libbabeltrace to make GDB use this lib To: Mathieu Desnoyers Cc: Pedro Alves , Julien Desfossez , lttng-dev , Tom Tromey , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00045.txt.bz2 On Mon, Dec 10, 2012 at 10:05 PM, Mathieu Desnoyers wrote: > * Hui Zhu (teawater@gmail.com) wrote: >> On Thu, Dec 6, 2012 at 11:57 PM, Pedro Alves wrote: >> > On 12/05/2012 12:08 PM, Mathieu Desnoyers 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. >> > >> > I've just built and installed babeltrace 1.0.0 (where's the mainline repository, >> > BTW?), and indeed, I'm not seeing the types.h file anywhere in the >> > installed tree: >> > >> > $ ~/src/babeltrace/install/include> find >> > . >> > ./babeltrace >> > ./babeltrace/trace-handle.h >> > ./babeltrace/list.h >> > ./babeltrace/babeltrace.h >> > ./babeltrace/context.h >> > ./babeltrace/iterator.h >> > ./babeltrace/ctf >> > ./babeltrace/ctf/callbacks.h >> > ./babeltrace/ctf/events.h >> > ./babeltrace/ctf/iterator.h >> > ./babeltrace/format.h >> > ./babeltrace/clock-types.h >> > >> > The GDB patch is including types.h explicitly: >> > >> > +#ifdef HAVE_LIBBABELTRACE >> > +#include >> > +#include >> > +#include >> > +#include >> > >> > So indeed, Hui, you'll need to make sure your patch works against an >> > installed babeltrace, making sure it does not pick up headers >> > from babeltrace's source directory. If there's really no reason to >> > include that types.h header (since it seems you don't really need any >> > function declared in that file), maybe there's actually nothing for >> > babeltrace to do. >> >> Oops, sorry for I miss something. >> I use include babeltrace/types.h because I use function >> get_int_signedness that defined inside it. > > Can you use: > > include/babeltrace/ctf/events.h: bt_ctf_get_int_signedness() instead ? > > This one is within an exported header, > > Thanks, > > Mathieu Great! My part is OK now. Thanks for your help. Best, Hui > >> >> Thanks, >> Hui >> >> >> > >> >> 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 ? >> > >> > -- >> > Pedro Alves >> > > > -- > Mathieu Desnoyers > Operating System Efficiency R&D Consultant > EfficiOS Inc. > http://www.efficios.com