Re: It seems no Windows buildfarm members are running find_typedefs

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: It seems no Windows buildfarm members are running find_typedefs
Date: 2014-04-03 01:30:48
Message-ID: 533CB9C8.4050407@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 04/02/2014 08:43 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> BTW, three animals are currently trying to contribute typedefs but
>> aren't in fact contributing anything: okapi, dromedary and prairiedog.
>> See <http://www.pgbuildfarm.org/cgi-bin/typedefs.pl?show_list=1>
> Man, that's a short list. I wonder if we need to encourage more people
> to do this.
>
>> I can't really help much on these as my Gentoo facilities are
>> non-existent, and my OSX facilities are not much better. I do recall
>> trying to find a way to get typedefs on OSX a few years ago, without
>> success.
> I poked around a bit, and so far as I can tell, OS X does not store debug
> symbol tables in executables. It looks like gdb goes to the .o files when
> it wants debug info. What's in the .o files is good ol' DWARF (at least
> in reasonably recent OS X releases), so it's not any harder to pull out
> the typedef names than it is on Linux. The problem is that you gotta
> iterate over all the .o files in the build tree rather than the installed
> executables. I looked at fixing find_typedefs but it seems like it's
> pretty fixated on the latter approach; any thoughts on how to revise it?
>
>

Well, the reason it's that way is that that's the way it was done before
the buildfarm took over the task. But it's not holy writ. Doing
something else would be a SMOC.

Essentially, I think the part that would need to change is this:

foreach my $bin (
glob("$installdir/bin/*"),
glob("$installdir/lib/*"),
glob("$installdir/lib/postgresql/*")
)

For OSX we'd construct the list via File::Find to recurse through the
directories.

So, something like this:

my $using_osx = [some test for OSX];
my @testfiles;
my $obj_wanted = sub {
/^.*\.o\z/s &&
push(@testfiles, $File::Find::name);
};
if ($using_osx)
{
File::Find::find($obj_wanted,$pgsql);
}
else
{
@testfiles = (
glob("$installdir/bin/*"),
glob("$installdir/lib/*"),
glob("$installdir/lib/postgresql/*");
}
foreach my $bin (@testfiles)

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Wim Lewis 2014-04-03 01:30:55 Re: It seems no Windows buildfarm members are running find_typedefs
Previous Message Tom Lane 2014-04-03 00:43:08 Re: It seems no Windows buildfarm members are running find_typedefs