public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] MIPS GDB information
@ 2001-03-07 14:20 Tim Michals
  2001-03-13 12:16 ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Michals @ 2001-03-07 14:20 UTC (permalink / raw)
  To: ecos-discuss

All,

I compile with the -g option but I'm not seeing gdb debug information in my
exe what I'm I doing wrong?

Tim

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

* Re: [ECOS] MIPS GDB information
  2001-03-07 14:20 [ECOS] MIPS GDB information Tim Michals
@ 2001-03-13 12:16 ` Jonathan Larmour
  2001-03-13 13:02   ` Tim Michals
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2001-03-13 12:16 UTC (permalink / raw)
  To: Tim Michals; +Cc: ecos-discuss

Tim Michals wrote:
> 
> I compile with the -g option but I'm not seeing gdb debug information in my
> exe what I'm I doing wrong?

Do you mean that GDB doesn't report any debug info? What happens when you
do a mipsXXX-elf-objdump -h of an executable? There should be debugging
sections listed there. Exactly which mips target is this, and what version
is gcc?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* RE: [ECOS] MIPS GDB information
  2001-03-13 12:16 ` Jonathan Larmour
@ 2001-03-13 13:02   ` Tim Michals
  2001-03-13 13:12     ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Michals @ 2001-03-13 13:02 UTC (permalink / raw)
  To: 'Jonathan Larmour'; +Cc: ecos-discuss

Jifl,

Here's what I have:

C:\idtCygnet\build>mips-elf-objdump -h boot.exe

boot.exe:     file format elf32-bigmips

Sections:
Idx Name          Size      VMA               LMA               File off
Algn
  0 .rom_vectors  00000500  ffffffffbfc00000  ffffffffbfc00000  00001000
2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .init         00000000  ffffffffbfc00500  ffffffffbfc00500  00015520
2**0
                  CONTENTS
  2 .text         0000b5cc  ffffffffbfc06000  ffffffffbfc06000  00002000
2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .fini         00000000  ffffffffbfc115d0  ffffffffbfc115d0  00015520
2**0
                  CONTENTS
  4 .rodata       00000d18  ffffffffbfc115d0  ffffffffbfc115d0  0000d5d0
2**3
                  CONTENTS, ALLOC, LOAD, DATA
  5 .rodata1      00000000  ffffffffbfc122e8  ffffffffbfc122e8  00015520
2**0
                  CONTENTS
  6 .data         00006210  ffffffffa0000200  ffffffffbfc122e8  0000f200
2**3
                  CONTENTS, ALLOC, LOAD, DATA
  7 .data1        00000000  ffffffffa0006410  ffffffffa0006410  00015520
2**0
                  CONTENTS
  8 .eh_frame     00000000  ffffffffa0006410  ffffffffa0006410  00015520
2**0
                  CONTENTS
  9 .gcc_except_table 00000000  ffffffffa0006410  ffffffffa0006410  00015520
2*
*0
                  CONTENTS
 10 .ctors        00000034  ffffffffa0006410  ffffffffbfc184f8  00015410
2**2
                  CONTENTS, ALLOC, LOAD, DATA
 11 .dtors        00000020  ffffffffa0006448  ffffffffbfc18530  00015448
2**2
                  CONTENTS, ALLOC, LOAD, DATA
 12 .devtab       00000080  ffffffffa0006468  ffffffffbfc18550  00015468
2**3
                  CONTENTS, ALLOC, LOAD, DATA
 13 .got          00000000  ffffffffa00064e8  ffffffffa00064e8  00015520
2**0
                  CONTENTS
 14 .dynamic      00000000  ffffffffa00064e8  ffffffffa00064e8  00015520
2**0
                  CONTENTS
 15 .sdata        00000038  ffffffffa00064e8  ffffffffbfc185d0  000154e8
2**2
                  CONTENTS, ALLOC, LOAD, DATA
 16 .lit8         00000000  ffffffffa0006520  ffffffffbfc18608  00015520
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 17 .lit4         00000000  ffffffffa0006520  ffffffffbfc18608  00015520
2**0
                  CONTENTS, ALLOC, LOAD, DATA
 18 .sbss         00000038  ffffffffa0006520  ffffffffa0006520  00000520
2**3
                  ALLOC
 19 .bss          00808ea8  ffffffffa0006558  ffffffffa0006558  00000520
2**4
                  ALLOC

version mips-elf-gcc --version
2.95.2

a compile example

C:\idtCygnet\build>make
make -wC ../boot
make[1]: Entering directory `/c/idtCygnet/boot'
mips-elf-gcc -EB -mgp32 -mips2 -msoft-float -g -DCYGNET_PRODUCT_ID=3  -DRAMT
EST=
1 -c -o
boot.o  -Wall -I//c/idtCygnet/idtCygnet_install/include -ffunction-secti
ons -fdata-sections  boot.c
boot.c:360: warning: `watchDog' defined but not used

if I run
C:\idtCygnet\boot>mips-elf-objdump -g boot.o

boot.o:     file format elf32-bigmips

mips-elf-objdump: boot.o: no recognized debugging information

Thanks

Tim

-----Original Message-----
From: jlarmour@cambridge.redhat.com
[ mailto:jlarmour@cambridge.redhat.com]On Behalf Of Jonathan Larmour
Sent: Tuesday, March 13, 2001 2:16 PM
To: Tim Michals
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] MIPS GDB information


Tim Michals wrote:
>
> I compile with the -g option but I'm not seeing gdb debug information in
my
> exe what I'm I doing wrong?

Do you mean that GDB doesn't report any debug info? What happens when you
do a mipsXXX-elf-objdump -h of an executable? There should be debugging
sections listed there. Exactly which mips target is this, and what version
is gcc?

Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* Re: [ECOS] MIPS GDB information
  2001-03-13 13:02   ` Tim Michals
@ 2001-03-13 13:12     ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2001-03-13 13:12 UTC (permalink / raw)
  To: Tim Michals; +Cc: ecos-discuss

Tim Michals wrote:
> 
> Jifl,
> 
> Here's what I have:
> 
> C:\idtCygnet\build>mips-elf-objdump -h boot.exe
> [snip]

It does indeed look like you've got no debug info. Odd. The most obvious
thing to try is building with alternatives like -ggdb or -gdwarf-2

After that, in your gcc sources edit gcc/config/mips/elf.h and change this:

#ifndef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#endif

to:

#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

Also try adding this to elf.h:

/* For the 'preferred' cases ("gN" and "ggdbN") we need to tell the 
   gnu assembler not to generate debugging information. */
   
#define SUBTARGET_ASM_DEBUGGING_SPEC "\
%{!mmips-as: \
  %{g:-g0} %{g0:-g0} %{g1:-g0} %{g2:-g0} %{g3:-g0} \
  %{ggdb:-g0} %{ggdb0:-g0} %{ggdb1:-g0} %{ggdb2:-g0} %{ggdb3:-g0} \
  %{gdwarf-2*:-g0}} \
%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2}
%{gstabs+3:-g3} \
%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}"


Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

end of thread, other threads:[~2001-03-13 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-07 14:20 [ECOS] MIPS GDB information Tim Michals
2001-03-13 12:16 ` Jonathan Larmour
2001-03-13 13:02   ` Tim Michals
2001-03-13 13:12     ` 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).