This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add pretty printers for the NPTL lock types
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- Cc: <libc-alpha at sourceware dot org>, Tom Tromey <tom at tromey dot com>, Carlos O'Donell <carlos at redhat dot com>, Torvald Riegel <triegel at redhat dot com>, Pedro Alves <palves at redhat dot com>, <vapier at gentoo dot org>, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- Date: Tue, 19 May 2015 13:29:03 +0000
- Subject: Re: [PATCH] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <1431716828-12854-1-git-send-email-martin dot galvan at tallertechnologies dot com> <alpine dot DEB dot 2 dot 10 dot 1505152029300 dot 2211 at digraph dot polyomino dot org dot uk> <CAOKbPbax0Sw_GzTnoggSyYoEtFxbApSGE=zacRM71WRC=KwQxQ at mail dot gmail dot com> <CAOKbPbbJd4oeM+4Wph3ZnspgPJM9BLK1FEHQ+rHBm2do-BMq2g at mail dot gmail dot com> <CAOKbPbajmxGm9bMTK1G2tvLB2sYnrV_zEGbNnOzHveRBU=7Fdg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1505181633560 dot 20209 at digraph dot polyomino dot org dot uk> <CAOKbPba6m0-KDhrAwSf4w5oL_RMKofCu8FR8MibJKuYrSQQynw at mail dot gmail dot com>
On Tue, 19 May 2015, Martin Galvan wrote:
> > It generates a C source file that uses the C constant as an asm operand,
> > in an asm containing special text that can then be matched in the compiler
> > output to extract the value of a constant.
>
> So if I understood correctly, what you're asking me to do is to take
> the macros out of the header files, place them in a .sym file and have
> a script generate both a .h and a .py with those values?
No. The numerical values stay in the .h files. The .sym file contains
only the names, and the gen-as-const machinery uses the compiler to
extract the corresponding values. The only header changes needed are to
comments, to say that if the *set of values in the enum (etc.)* changes
then the pretty printers should be updated.
--
Joseph S. Myers
joseph@codesourcery.com