This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem building GDB on Power64


On Thu, Sep 02, 2004 at 10:52:04AM -0700, Paul Gilliam wrote:
> On Thursday 02 September 2004 10:21, Daniel Jacobowitz wrote:
> > On Thu, Sep 02, 2004 at 09:20:53AM -0700, Paul Gilliam wrote:
> > > On a ppc64 system, GDB builds as a 32-bit application.  This is OK if the
> > > 64-bit dev. env. is not available.  But if it is, this is wrong: GDB
> > > should build as a 64-bit application so that both 64 and 32 bit apps can
> > > be debugged.
> > >
> > > If I understood the configure process, I would have tried submitting a
> > > patch. It should be easy: just include -m64 in the CFLAGS.  And make sure
> > > to link with the 64-bit libraries (which had better be there).
> >
> > IMO, if your 64-bit environment defaults to building 32-bit code, it's
> > your responsibility to set -m64 yourself.
> 
> Normally I would agree with you, but this is kind of a special case.
> 
> The reason the 64-bit environment defaults to building 32-bit code is that it 
> was felt that most applications running on a 64-bit processor will be 32-bit 
> applications. (at least that's what the gcc person in the next cube explained 
> to me).
> 
> But, if possible, the debugger should handle either.  In fact, the gdb 
> installed with the 64-bit dev. system is a 64-bit app. and can debug both 64 
> and 32 bit apps.
> 
> In this case, then, I think it makes more sense for gdb to build atomaticly as 
> a 64-bit app, if it can be.

I really don't agree - I think it's the packager's or builder's job to do this.

> PS:  I'm not asking for someone to post patches to configure.in or what ever, 
> (hinting maybe), but I am asking for some pointers on where to look.

This would be very tricky to do.  GDB links to libraries built in the
same tree, so nothing in gdb/configure.in would work.  It would have to
be in the top level, which is shared with binutils and gcc and so on. 
You don't want them to default to being 64-bit apps, because they
should obey the system policy of defaulting to 32-bit.

I really think this is your responsibility when building GDB if you
want it to support 64-bit binaries.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]