Re: pgindent run coming

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgindent run coming
Date: 2009-06-10 19:49:58
Message-ID: 200906101949.n5AJnwc01515@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
> Bruce Momjian wrote:
> > I did a diff, attached, and found some typedefs that don't appear, like
> > PortalData. That is defined in our code as:
> >
> > typedef struct PortalData *Portal;
> >
> > typedef struct PortalData
> > {
> > /* Bookkeeping data */
> > ...
> > bool visible; /* include this portal in pg_cursors? */
> > } PortalData;
> >
> > I will try to build on Linux here and see how objdump displays that,
> > unless you can get me the output.
> >
>
>
> Well, that is almost certainly a result of the change you asked me to
> make :-)
>
> The symbol is in the run done early this morning before those changes.
> See
> <http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=dungbeetle&dt=2009-06-10%20064401&stg=typedefs>
>
> So we need to look and see what tag that symbol has in the objdump output.

OK, I got the answer for Linux. I built 8.4 RC2 and ran:

objdump -W postgres |grep -3 PortalData

and the output is attached. You will notice every mention of PortalData
has 'DW_TAG_structure_type' (stucture member) above it, and none have
DW_TAG_typedef (typedef tag). This is caused by this documented
behavior from find_typedef:

# Linux
# Unfortunately the Linux version doesn't show unreferenced typedefs.
# The problem is that they are still in the source code so should be
# indented properly. However, I think pgindent only cares about
# the typedef references, not the definitions, so I think it might
# be fine

So that is why the Linux list is shorter, but again, I think that is fine.
Andrew, let me know when your list is ready.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
unknown_filename text/plain 3.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-06-10 19:50:15 Re: pgindent run coming
Previous Message Tom Lane 2009-06-10 19:45:50 Re: pgindent run coming