This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

I can't set the breakpoint in insight


Hi, ALL,

I am porting the eCos redboot to the mips STB board But i encounted a strange problem when debuging the source code using insight.

I download the redboot.elf to the ram via EJTAG using insight. For the *.c file, I can see the Source code in insight but assembly,mixed,SRC+ASM code is unavailable with only "Select function name to disassemble" displayed in the insight window which seems that insight can't disassemble the machine code. what more, the break point I set seems incorrect, for example,when i set a break point in cyg_start() in main.c, there is not a red point displayed in the left line number, but when check the breakpoint window, a new break point was set to in drv_api.c. It look like that the Source code can not respond to the machine code corrently.

anybody can tell me why ?

the following is my target.ld file and the redboot.elf header info:


OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips",
              "elf32-littlemips")
OUTPUT_ARCH(mips:3000)
STARTUP(vectors.o)
ENTRY(reset_vector)
INPUT(extras.o)
GROUP(libtarget.a libgcc.a libsupc++.a)
MEMORY
{
    ram : ORIGIN = 0x80000000, LENGTH = 0x400000
}
SECTIONS
{
    __reserved_vectors = 0x80000200; . = __reserved_vectors + 0x200;
    __reserved_vsr_table = ALIGN (0x10); . = __reserved_vsr_table + 0x100;
    __reserved_virtual_table = ALIGN (0x10); . = __reserved_virtual_table + 0x100;
    __reserved_for_rom = ALIGN (0x10); . = __reserved_for_rom + 0x1fc00;
    .rom_vectors ALIGN (0x10) : { KEEP (*(.reset_vector))  KEEP (*(.utlb_vector)) . = ALIGN(0x80); KEEP(*(.other_vector)) KEEP(*(.debug_vector))} > ram
    .interp ALIGN (0x4) : { *(.interp) } > ram .hash : AT ((LOADADDR (.interp) + SIZEOF (.interp) + 8 - 1) & ~ (8 - 1)) { *(.hash) } > ram .dynsym : AT ((LOADADDR (.hash) + SIZEOF (.hash) + 8 - 1) & ~ (8 - 1)) { *(.dynsym) } > ram .dynstr : AT ((LOADADDR (.dynsym) + SIZEOF (.dynsym) + 8 - 1) & ~ (8 - 1)) { *(.dynstr) } > ram .gnu.version : AT ((LOADADDR (.dynstr) + SIZEOF (.dynstr) + 8 - 1) & ~ (8 - 1)) { *(.gnu.version) } > ram .gnu.version_d : AT ((LOADADDR (.gnu.version) + SIZEOF (.gnu.version) + 8 - 1) & ~ (8 - 1)) { *(.gnu.version_d) } > ram .gnu.version_r : AT ((LOADADDR (.gnu.version_d) + SIZEOF (.gnu.version_d) + 8 - 1) & ~ (8 - 1)) { *(.gnu.version_r) } > ram .plt : AT ((LOADADDR (.gnu.version_r) + SIZEOF (.gnu.version_r) + 8 - 1) & ~ (8 - 1)) { *(.plt) } > ram
    .rel.text : { *(.rel.text) *(.rel.text.*) *(.rel.gnu.linkonce.t*) } > ram .rela.text : { *(.rela.text) *(.rela.text.*) *(.rela.gnu.linkonce.t*) } > ram .rel.data : { *(.rel.data) *(.rel.data.*) *(.rel.gnu.linkonce.d*) } > ram .rela.data : { *(.rela.data) *(.rela.data.*) *(.rela.gnu.linkonce.d*) } > ram .rel.rodata : { *(.rel.rodata) *(.rel.rodata.*) *(.rel.gnu.linkonce.r*) } > ram .rela.rodata : { *(.rela.rodata) *(.rela.rodata.*) *(.rela.gnu.linkonce.r*) } > ram .rel.got : { *(.rel.got) } > ram .rela.got : { *(.rela.got) } > ram .rel.ctors : { *(.rel.ctors) } > ram .rela.ctors : { *(.rela.ctors) } > ram .rel.dtors : { *(.rel.dtors) } > ram .rela.dtors : { *(.rela.dtors) } > ram .rel.init : { *(.rel.init) } > ram .rela.init : { *(.rela.init) } > ram .rel.fini : { *(.rel.fini) } > ram .rela.fini : { *(.rela.fini) } > ram .rel.bss : { *(.rel.bss) } > ram .rela.bss : { *(.rela.bss) } > ram .rel.plt : { *(.rel.plt) } > ram .rela.plt : { *(.rela.plt) } > ram .rel.dyn : { *(.rel.dyn) } > ram
    .init ALIGN (0x4) : { . = .; KEEP (*(.init)) } > ram =0
    .text ALIGN (0x4) : { _stext = .; _ftext = . ; *(.text) *(.text.*) *(.stub) *(.gnu.warning) *(.gnu.linkonce.t*) *(.mips16.fn.*) *(.mips16.call.*) } > ram =0 _etext = .; PROVIDE (etext = .);
    .fini ALIGN (0x4) : { . = .; KEEP (*(.fini)) } > ram =0
    .rodata ALIGN (0x8) : { . = .; *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } > ram
    .rodata1 ALIGN (0x8) : { . = .; *(.rodata1) *(.rodata1.*) } > ram
    .data ALIGN (0x8) : { __ram_data_start = ABSOLUTE (.); _fdata = . ; *(.data) *(.data.*) *(.gnu.linkonce.d*) *( .2ram.*) . = ALIGN (8); SORT(CONSTRUCTORS) } > ram __rom_data_start = LOADADDR(.data);
    .data1 ALIGN (0x8) : { . = .; *(.data1) *(.data1.*) } > ram
    .eh_frame ALIGN (0x4) : { . = .; *(.eh_frame) } > ram
    .gcc_except_table ALIGN (0x4) : { . = .; *(.gcc_except_table) } > ram
    .ctors ALIGN (0x4) : { . = .; KEEP (*crtbegin.o(.ctors)) KEEP (*_ctors.o(.ctors)) __CTOR_LIST__ = .; PROVIDE (__CTOR_LIST__ = .); KEEP (*(.ctors)); KEEP (*(SORT(.ctors.*))) __CTOR_END__ = .; PROVIDE (__CTOR_END__ = .); } > ram
    .dtors ALIGN (0x4) : { . = .; KEEP (*crtbegin.o(.dtors)) __DTOR_LIST__ = .; PROVIDE (__DTOR_LIST__ = .); KEEP (*(SORT(.dtors.*))) __DTOR_END__ = .; KEEP (*(.dtors)); PROVIDE (__DTOR_END__ = .); } > ram
    .devtab ALIGN (0x4) : { . = .; KEEP(*( SORT (.ecos.table.*))) ; } > ram
    _gp = ALIGN(16) + 0x7ff0; .got ALIGN (0x4) : { . = .; *(.got.plt) *(.got) } > ram
    .dynamic ALIGN (0x4) : { . = .; *(.dynamic) } > ram
    .sdata ALIGN (0x4) : { . = .; *(.sdata) *(.sdata.*) *(.gnu.linkonce.s*) } > ram
    .lit8 ALIGN (0x8) : { . = .; *(.lit8) } > ram
    .lit4 : AT ((LOADADDR (.lit8) + SIZEOF (.lit8) + 8 - 1) & ~ (8 - 1)) { . = .; *(.lit4) } > ram __ram_data_end = .; _edata = . ; PROVIDE (edata = .);
    __bss_start = .; _fbss = .; .sbss ALIGN (0x8) : { . = .; *(.dynsbss) *(.sbss) *(.sbss.*) *(.scommon) } > ram
    .bss ALIGN (0x8) : { *(.dynbss) *(.bss) *(.bss.*) *(COMMON) } > ram __bss_end = .;

    . = ALIGN(4); _end = .; PROVIDE (end = .); .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } .debug 0 : { *(.debug) } .line 0 : { *(.line) } .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_sfnames 0 : { *(.debug_sfnames) } .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_info 0 : { *(.debug_info) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } .mdebug 0 : { *(.mdebug) }
}
hal_vsr_table = 0x80000400;
hal_virtual_vector_table = 0x80000500;

the redboot.elf header info:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x80020200
  Start of program headers:          52 (bytes into file)
  Start of section headers:          284192 (bytes into file)
  Flags:                             0x1001, noreorder, o32, mips1
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         2
  Size of section headers:           40 (bytes)
  Number of section headers:         25
  Section header string table index: 22

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .rom_vectors      PROGBITS        80020200 000200 0000bc 00  AX  0   0  1
  [ 2] .init             PROGBITS        800202c0 00c72c 000000 00   W  0   0  1
  [ 3] .text             PROGBITS        800202c0 0002c0 00a0d8 00  AX  0   0  4
  [ 4] .fini             PROGBITS        8002a398 00c72c 000000 00   W  0   0  1
  [ 5] .rodata           PROGBITS        8002a398 00a398 001fc0 00   A  0   0  8
  [ 6] .rodata1          PROGBITS        8002c358 00c72c 000000 00   W  0   0  1
  [ 7] .data             PROGBITS        8002c358 00c358 000230 00  WA  0   0  4
  [ 8] .data1            PROGBITS        8002c588 00c72c 000000 00   W  0   0  1
  [ 9] .eh_frame         PROGBITS        8002c588 00c72c 000000 00   W  0   0  1
  [10] .gcc_except_table PROGBITS        8002c588 00c72c 000000 00   W  0   0  1
  [11] .ctors            PROGBITS        8002c588 00c588 000004 00  WA  0   0  4
  [12] .dtors            PROGBITS        8002c58c 00c72c 000000 00   W  0   0  1
  [13] .devtab           PROGBITS        8002c58c 00c58c 00019c 00  WA  0   0  8
  [14] .got              PROGBITS        8002c728 00c72c 000000 00  Wp  0   0  1
  [15] .dynamic          DYNAMIC         8002c728 00c72c 000000 00   W  0   0  1
  [16] .sdata            PROGBITS        8002c728 00c72c 000000 00 WAp  0   0  1
  [17] .lit8             PROGBITS        8002c728 00c72c 000000 00 WAp  0   0  1
  [18] .lit4             PROGBITS        8002c728 00c72c 000000 00 WAp  0   0  1
  [19] .sbss             NOBITS          8002c728 00c728 00003c 00 WAp  0   0  8
  [20] .bss              NOBITS          8002c768 00c72c 003a98 00  WA  0   0 16
  [21] .mdebug           MIPS_DEBUG      00000000 00c72c 038e34 01      0   0  4
  [22] .shstrtab         STRTAB          00000000 045560 0000be 00      0   0  1
  [23] .symtab           SYMTAB          00000000 045a08 0020e0 10     24  f8  4
  [24] .strtab           STRTAB          00000000 047ae8 0017b0 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x80020000 0x80020000 0x0c728 0x10200 RWE 0x1000
  RTPROC         0x000000 0x00000000 0x00000000 0x00000 0x00000     0x4

 Section to Segment mapping:
  Segment Sections...
   00     .rom_vectors .text .rodata .data .ctors .devtab .sbss .bss 
   01     







.

 best regards 				

        sam
        samule_chen@163.com
          2005-01-30

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]