public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Default debug format
@ 2019-06-26  5:42 Florian Doersch
  2019-06-26 12:41 ` Segher Boessenkool
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Doersch @ 2019-06-26  5:42 UTC (permalink / raw)
  To: gcc-help

Hi,

on my AIX gcc, there are multiple "-g" variants available.

The problem is, that only "-gxcoff" creates proper (with AIX debugger 
dbx) debuggable binaries.

How can I tell the gcc (i.e while building the gcc itself) that it 
should use xcoff as the default? I havent found anything working about it.

I already tried to set PREFERRED_DEBUGGING_TYPE in 
gcc/config/rs6000/aix72.h to XCOFF_DEBUG, but it did not make any 
difference?

Thank you


Regards

Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default debug format
  2019-06-26  5:42 Default debug format Florian Doersch
@ 2019-06-26 12:41 ` Segher Boessenkool
  2019-06-26 21:22   ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2019-06-26 12:41 UTC (permalink / raw)
  To: Florian Doersch; +Cc: gcc-help

Hi Florian,

On Wed, Jun 26, 2019 at 07:42:38AM +0200, Florian Doersch wrote:
> on my AIX gcc, there are multiple "-g" variants available.
> 
> The problem is, that only "-gxcoff" creates proper (with AIX debugger 
> dbx) debuggable binaries.
> 
> How can I tell the gcc (i.e while building the gcc itself) that it 
> should use xcoff as the default? I havent found anything working about it.
> 
> I already tried to set PREFERRED_DEBUGGING_TYPE in 
> gcc/config/rs6000/aix72.h to XCOFF_DEBUG, but it did not make any 
> difference?

aix72.h has

/* AIX 7.2 supports DWARF3 debugging, but XCOFF remains the default.  */
#define DWARF2_DEBUGGING_INFO 1
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG

so it *already* defaults to XCOFF debugging.  Does this not work for you?


Segher

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default debug format
  2019-06-26 12:41 ` Segher Boessenkool
@ 2019-06-26 21:22   ` Jim Wilson
  2019-06-28  9:31     ` Florian Doersch
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 2019-06-26 21:22 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Florian Doersch, gcc-help

On Wed, Jun 26, 2019 at 5:41 AM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> > The problem is, that only "-gxcoff" creates proper (with AIX debugger
> > dbx) debuggable binaries.
> >
> > How can I tell the gcc (i.e while building the gcc itself) that it
> > should use xcoff as the default? I havent found anything working about it.

I think that
#define DEFAULT_GDB_EXTENSIONS 0
is what you want here.  But I also think that it would be wiser to
just use gdb instead of turning the extensions off.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default debug format
  2019-06-26 21:22   ` Jim Wilson
@ 2019-06-28  9:31     ` Florian Doersch
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Doersch @ 2019-06-28  9:31 UTC (permalink / raw)
  To: gcc-help


>>> The problem is, that only "-gxcoff" creates proper (with AIX debugger
>>> dbx) debuggable binaries.
>>>
>>> How can I tell the gcc (i.e while building the gcc itself) that it
>>> should use xcoff as the default? I havent found anything working about it.
> I think that
> #define DEFAULT_GDB_EXTENSIONS 0
> is what you want here.  But I also think that it would be wiser to
> just use gdb instead of turning the extensions off.

ah thats what I tried to find.

I cannot use gdb on that machines, I have to stick with 'dbx'.
(I always get into "During startup program terminated with signal 
SIGKILL, Killed.", even if I build the newest gdb by myself too)

Thank you

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Default debug format
@ 2019-06-26 12:52 David Edelsohn
  0 siblings, 0 replies; 5+ messages in thread
From: David Edelsohn @ 2019-06-26 12:52 UTC (permalink / raw)
  To: Florian Doersch; +Cc: gcc-help

On Wed, Jun 26, 2019 at 07:42:38AM +0200, Florian Doersch wrote:
> on my AIX gcc, there are multiple "-g" variants available.

Are you referring to -gxcoff vs -gxcoff+ or are you referring to other
debug formats?

>
> The problem is, that only "-gxcoff" creates proper (with AIX debugger
> dbx) debuggable binaries.

By default, GCC generates "xcoff+", which is an extended format
understood by GNU GDB.  The default AIX XCOFF format cannot represent
some data structures properly.

>
> How can I tell the gcc (i.e while building the gcc itself) that it
> should use xcoff as the default? I havent found anything working about it.
>
> I already tried to set PREFERRED_DEBUGGING_TYPE in
> gcc/config/rs6000/aix72.h to XCOFF_DEBUG, but it did not make any
> difference?

XCOFF_DEBUG is the default for AIX. GCC generates the extended format.
Limiting GCC to the more restrictive format by default requires more
invasive changes.

Thanks, David

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-28  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  5:42 Default debug format Florian Doersch
2019-06-26 12:41 ` Segher Boessenkool
2019-06-26 21:22   ` Jim Wilson
2019-06-28  9:31     ` Florian Doersch
2019-06-26 12:52 David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).