public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] EPI's ICE + gcc
@ 2000-10-17  5:30 Xavier Wang
  2000-10-17  7:31 ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Wang @ 2000-10-17  5:30 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I'm using EPI's MAJIC ICE with a Lexra Lx4180 (mips) evaluation board.
I've built gcc 2.95.2 and other GNU tools with target for Toshiba Tx39. I
want to
debug the code generated by mips-tx39-elf-gcc using the EPI's debugger.

The debugger's manual said that it supports both ELF and COFF formats. But
when I tried to load the program, the debugger complained that the ELF file
does
not contain .mdebug, .debug or .stab section. There are indeed many .debug*
sections in the file but no one is exactly .debug, and the .mdebug is
explicitly
discarded by the link script (target.ld). I removed the discard command to
add
back the .mdebug section and then the debugger could load the program, but I
could only see the source/symbols of vectors.S
(in eCos\packages\hal\mips\arch\v1_3_1\src), all other parts of the program
were
in disassembly form only. It's very strange.

I'd searched the archives database of this mailing list and tried some other
options
found there, such as -gdwarf-2, -gcoff, -gstabs, etc. but still failed. Did
I miss
something?

I'm sorry for my poor English.
Thanks a lot.

--
Xavier


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

* Re: [ECOS] EPI's ICE + gcc
  2000-10-17  5:30 [ECOS] EPI's ICE + gcc Xavier Wang
@ 2000-10-17  7:31 ` Jonathan Larmour
  2000-10-18  2:11   ` Xavier Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2000-10-17  7:31 UTC (permalink / raw)
  To: Xavier Wang; +Cc: ecos-discuss

Xavier Wang wrote:
> The debugger's manual said that it supports both ELF and COFF formats. But
> when I tried to load the program, the debugger complained that the ELF file
> does
> not contain .mdebug, .debug or .stab section. There are indeed many .debug*
> sections in the file but no one is exactly .debug, and the .mdebug is
> explicitly
> discarded by the link script (target.ld). I removed the discard command to
> add
> back the .mdebug section and then the debugger could load the program, but I
> could only see the source/symbols of vectors.S
> (in eCos\packages\hal\mips\arch\v1_3_1\src), all other parts of the program
> were
> in disassembly form only. It's very strange.
> 
> I'd searched the archives database of this mailing list and tried some other
> options
> found there, such as -gdwarf-2, -gcoff, -gstabs, etc. but still failed. Did
> I miss
> something?

It looks like the EPI debugger only supports the stabs debugging format. If
-gstabs isn't working for you, then you'll have to dig deeper. Perhaps on
the GDB list ( http://sources.redhat.com/gdb )

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

* Re: [ECOS] EPI's ICE + gcc
  2000-10-17  7:31 ` Jonathan Larmour
@ 2000-10-18  2:11   ` Xavier Wang
  2000-10-18  9:37     ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Wang @ 2000-10-18  2:11 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: ecos-discuss

>Xavier Wang wrote:
>> The debugger's manual said that it supports both ELF and COFF formats.
But
>> when I tried to load the program, the debugger complained that the ELF
file
>> does
>> not contain .mdebug, .debug or .stab section. There are indeed many
.debug*
>> sections in the file but no one is exactly .debug, and the .mdebug is
>> explicitly
>> discarded by the link script (target.ld). I removed the discard command
to
>> add
>> back the .mdebug section and then the debugger could load the program,
but I
>> could only see the source/symbols of vectors.S
>> (in eCos\packages\hal\mips\arch\v1_3_1\src), all other parts of the
program
>> were
>> in disassembly form only. It's very strange.
>>
>> I'd searched the archives database of this mailing list and tried some
other
>> options
>> found there, such as -gdwarf-2, -gcoff, -gstabs, etc. but still failed.
Did
>> I miss
>> something?
>
>It looks like the EPI debugger only supports the stabs debugging format. If
>-gstabs isn't working for you, then you'll have to dig deeper. Perhaps on
>the GDB list ( http://sources.redhat.com/gdb )
>
>Jifl

Thanks, Jifl.

I've asked EPI about this problem. The support man said the debugger now can
handle DWARF1 (.debug, .line), Mdebug (.mdebug) and Stabs (.stab, .stabstr),
but DWARF2 is not supported. So if I can produce an executable that has one
of these supported format, the debugger will like to accept it.

The default debug option (-g) of mips-tx39-elf-gcc seems to produce DWARF2
format, and doesn't support -gdwarf or -gdwarf-1 option. So how should I
config
the link script and the compiler options to produce an executable with
either
Mdebug or Stabs debug format in it?

Thanks a lot.

-- Xavier



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

* Re: [ECOS] EPI's ICE + gcc
  2000-10-18  2:11   ` Xavier Wang
@ 2000-10-18  9:37     ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-10-18  9:37 UTC (permalink / raw)
  To: Xavier Wang; +Cc: ecos-discuss

Xavier Wang wrote:
> The default debug option (-g) of mips-tx39-elf-gcc seems to produce DWARF2
> format, and doesn't support -gdwarf or -gdwarf-1 option. So how should I
> config
> the link script and the compiler options to produce an executable with
> either
> Mdebug or Stabs debug format in it?

If your linker script already contains bits for .stab*, .debug, .line and
.mdebug then there's nothing more you can do there.

If -gstabs isn't actually producing valid stabs output, then perhaps try
going to your gcc sources and editing gcc/config/mips/r3900.h to change:

#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

to:

#define DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG

To try dwarf-1, change the above to DWARF_DEBUGGING_INFO/DWARF_DEBUG.

Obviously you need to rebuild gcc completely (use a clean build tree) after
this.

You could try fiddling with SUBTARGET_ASM_DEBUGGING_SPEC in r3900.h as well
if the above doesn't work.

In my mind your more likely to get stabs working than any other debugging
format.

If the toolchain is still not able to produce valid stabs output, then I
suggest asking on gcc@gcc.gnu.org for help (see http://gcc.gnu.org/ ).

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

end of thread, other threads:[~2000-10-18  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-17  5:30 [ECOS] EPI's ICE + gcc Xavier Wang
2000-10-17  7:31 ` Jonathan Larmour
2000-10-18  2:11   ` Xavier Wang
2000-10-18  9:37     ` Jonathan Larmour

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).