* Problem building GDB on Power64 @ 2004-09-02 16:23 Paul Gilliam 2004-09-02 17:22 ` Daniel Jacobowitz 0 siblings, 1 reply; 7+ messages in thread From: Paul Gilliam @ 2004-09-02 16:23 UTC (permalink / raw) To: gdb 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). -=# Paul Gilliam #=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 16:23 Problem building GDB on Power64 Paul Gilliam @ 2004-09-02 17:22 ` Daniel Jacobowitz 2004-09-02 17:54 ` Paul Gilliam 0 siblings, 1 reply; 7+ messages in thread From: Daniel Jacobowitz @ 2004-09-02 17:22 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb 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. -- Daniel Jacobowitz ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 17:22 ` Daniel Jacobowitz @ 2004-09-02 17:54 ` Paul Gilliam 2004-09-02 17:59 ` Daniel Jacobowitz 0 siblings, 1 reply; 7+ messages in thread From: Paul Gilliam @ 2004-09-02 17:54 UTC (permalink / raw) To: gdb 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. -=# Paul #=- 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 17:54 ` Paul Gilliam @ 2004-09-02 17:59 ` Daniel Jacobowitz 2004-09-02 18:51 ` Andrew Cagney 0 siblings, 1 reply; 7+ messages in thread From: Daniel Jacobowitz @ 2004-09-02 17:59 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 17:59 ` Daniel Jacobowitz @ 2004-09-02 18:51 ` Andrew Cagney 2004-09-02 20:17 ` Michael Chastain 0 siblings, 1 reply; 7+ messages in thread From: Andrew Cagney @ 2004-09-02 18:51 UTC (permalink / raw) To: Paul Gilliam; +Cc: Daniel Jacobowitz, gdb >>> 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. Exactly. GDB's build behavior is determined by policies set by autotools, config and <top-level>. GDB isn't in a position to vary this locally. Perhaphs the thing to do is rase this on GCC (where I'd guess the <top-level> aspect should be discussed). BTW, I did once ask to the config maintainer (BJE@ibm) if config.guess could look at the compiler. That way, instead of: $ CC='cc -m64' config.guess powerpc-unknown-linux-gnu it would return: $ CC='cc -m64' config.guess powerpc64-unknown-linux-gnu and that in turn would let us specify: $ CC='cc -m64' .../configure Ben didn't agree (I don't remember why). Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 18:51 ` Andrew Cagney @ 2004-09-02 20:17 ` Michael Chastain 2004-09-02 20:30 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Michael Chastain @ 2004-09-02 20:17 UTC (permalink / raw) To: eliz, pgilliam, cagney; +Cc: gdb, drow Here's an idea from gcc: gcc has a directory named INSTALL with a file 'specific.html', which has info organized by target. If we had a file like that, then that would be the natural place for describing build choices like -m32 and -m64. It would also be a good place for the section of PROBLEMS that are about build failures and their workarounds. I'm not strongly pounding the table for this, just pointing it out. What do y'all think? Michael ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem building GDB on Power64 2004-09-02 20:17 ` Michael Chastain @ 2004-09-02 20:30 ` Eli Zaretskii 0 siblings, 0 replies; 7+ messages in thread From: Eli Zaretskii @ 2004-09-02 20:30 UTC (permalink / raw) To: Michael Chastain; +Cc: pgilliam, cagney, gdb, drow > Date: Thu, 02 Sep 2004 16:16:58 -0400 > From: Michael Chastain <mec.gnu@mindspring.com> > Cc: gdb@sources.redhat.com, drow@false.org > > Here's an idea from gcc: > > gcc has a directory named INSTALL with a file 'specific.html', which has > info organized by target. If we had a file like that, then that would > be the natural place for describing build choices like -m32 and -m64. > > It would also be a good place for the section of PROBLEMS that > are about build failures and their workarounds. I think PROBLEMS is the wrong place for this, unless there's a small number of platforms with specific build problems. Why not put this in the INSTALL file? That's where installation instructions belong, IMHO. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-09-02 20:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-09-02 16:23 Problem building GDB on Power64 Paul Gilliam 2004-09-02 17:22 ` Daniel Jacobowitz 2004-09-02 17:54 ` Paul Gilliam 2004-09-02 17:59 ` Daniel Jacobowitz 2004-09-02 18:51 ` Andrew Cagney 2004-09-02 20:17 ` Michael Chastain 2004-09-02 20:30 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox