From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stan Shebs To: Fernando Nasser Cc: Michael Snyder , Fernando Nasser , gdb@sources.redhat.com, vinschen@redhat.com Subject: Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp Date: Wed, 26 Sep 2001 14:39:00 -0000 Message-id: <3BB24ABF.1072EE55@apple.com> References: <20010925192434.M29024@cygbert.vinschen.de> <3BB0C224.AB324D56@cygnus.com> <3BB0CB81.8385E123@redhat.com> <3BB0F122.3E45B3ED@cygnus.com> <3BB236BB.F50E045E@cygnus.com> X-SW-Source: 2001-09/msg00211.html Fernando Nasser wrote: > > >From a discussion in gdb-patches > > Michael Snyder wrote: > > > > (...) we need some kind of test that applies > > the xfails for stabs and not for dwarf. > > > > There are so many instances where this would be useful that I would > like to suggest a "gdb_debug_format" procedure to be added to gdb.exp > that would determine that. Seems like a good idea to me too. > We could use a binutils utility on the test file (which we know) and > parse the output. Does that seem reasonable? Any other suggestions? I can't think of a completely reliable test on binary files. For instance, in original a.out, stabs are plain symbols, not in a distinctly-named section. You also have the problem of an executable maybe having libraries compiled with stabs, and main prog with dwarf, and objdump can't distinguish. On the other, grepping an assembly file produced via -S seems reliable, since stabs always have at least one ".stabs" line, and dwarf-2 will always have a .debug_info section mentioned, etc. All of the compilers that GDB works with have a -S option. Stan