OK, I have tried this again. Here is my result:
Code:
(gdb) target remote localhost:2331
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
_vec_reset () at crt.S:52
52 b _init_reset
Current language: auto; currently asm
(gdb) warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
mnitor endian little
Undefined command: "mnitor". Try "help".
(gdb) monitor endian little
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
(gdb) monitor reset
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
(gdb) break main
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
Breakpoint 7 at 0x22c: file main.c, line 40.
(gdb) warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
monitor long 0xffffff00 = 0x01
Writing 0x00000001 @ addr 0xFFFFFF00
(gdb) warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
set $pc=0
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
Value being assigned to is no longer active.
(gdb) load
Invalid download offset: and Settings/jmd.XPTESTSYS/workspace/FirstTest/a.out
My eclipse project is in the default location, so I thought that may cause a problem with the long path. I moved a.out to c:\temp\a.out and tried again. This time I got this message:
Code:
(gdb) load
Loading section .text, size 0x31c lma 0x0
Memory access error while loading section .text.
This is still indicating some problem with the memory configuration.
output of objdump -p a.out is:
Code:
jmd@xptestsys /home/jmd.xptestsys/workspace/firsttest
$ objdump -x a.out
a.out: file format elf32-little
a.out
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00000000
Program Header:
LOAD off 0x00008000 vaddr 0x00000000 paddr 0x00000000 align 2**15
filesz 0x00000340 memsz 0x00000348 flags rwx
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000031c 00000000 00000000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000024 0000031c 0000031c 0000831c 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000000 00000340 00000340 00008340 2**0
CONTENTS, ALLOC, LOAD, DATA
3 .bss 00000008 00000340 00000340 00008340 2**2
ALLOC
4 .debug_line 00000137 00000000 00000000 00008340 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 00000b4d 00000000 00000000 00008477 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 00000187 00000000 00000000 00008fc4 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_aranges 00000060 00000000 00000000 00009150 2**3
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 000000c8 00000000 00000000 000091b0 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_pubnames 0000006c 00000000 00000000 00009278 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_str 00000030 00000000 00000000 000092e4 2**0
CONTENTS, READONLY, DEBUGGING
11 .comment 00000024 00000000 00000000 00009314 2**0
CONTENTS, READONLY
SYMBOL TABLE:
00000000 l d .text 00000000 .text
0000031c l d .rodata 00000000 .rodata
00000340 l d .data 00000000 .data
00000340 l d .bss 00000000 .bss
00000000 l d .debug_line 00000000 .debug_line
00000000 l d .debug_info 00000000 .debug_info
00000000 l d .debug_abbrev 00000000 .debug_abbrev
00000000 l d .debug_aranges 00000000 .debug_aranges
00000000 l d .debug_frame 00000000 .debug_frame
00000000 l d .debug_pubnames 00000000 .debug_pubnames
00000000 l d .debug_str 00000000 .debug_str
00000000 l d .comment 00000000 .comment
00000000 l d *ABS* 00000000 .shstrtab
00000000 l d *ABS* 00000000 .symtab
00000000 l d *ABS* 00000000 .strtab
00000000 l df *ABS* 00000000 crt.S
000000d0 l F .text 00000000 $a
00000020 l .text 00000000 _init_reset
00000020 l .text 00000000 _init_stack
00000038 l .text 00000000 _init_lowlevelinit
00000044 l .text 00000000 _init_bss
0000006c l .text 00000000 _lp_bss
00000068 l .text 00000000 exit
0000006c l O .text 00000000 $d
00000074 l F .text 00000000 $a
000000c0 l O .text 00000000 $d
00000000 l df *ABS* 00000000 init.c
000000d1 l F .text 00000000 $t
000001a4 l O .text 00000000 $d
00000000 l df *ABS* 00000000 main.c
000001d1 l F .text 00000000 $t
00000340 l O .bss 00000000 $d
00000228 l O .text 00000000 $d
0000022d l F .text 00000000 $t
000002b1 l F .text 00000020 AT91F_DBGU_CfgPIO
00000295 l F .text 0000001a AT91F_US_EnableTx
00000288 l O .text 00000000 $d
00000295 l F .text 00000000 $t
000002d1 l F .text 0000004c AT91F_PIO_CfgPeriph
000002cc l O .text 00000000 $d
000002d1 l F .text 00000000 $t
0000005c g .text 00000000 __main
0000031c g .text 00000000 _etext
00000004 g .text 00000000 _vec_undef
000001d1 g F .text 0000005c AT91F_DBGU_Printk
0000031c g .rodata 00000000 _srodata
0000000c g .text 00000000 _vec_pabt
00000340 g .data 00000000 _sdata
000000b4 g .text 00000000 AT91F_Default_FIQ_handler
00000074 g .text 00000000 AT91F_Irq_Handler
00000348 g .bss 00000000 __bss_end
00000018 g .text 00000000 _vec_irq
000000b8 g .text 00000000 AT91F_Default_IRQ_handler
00000348 g *ABS* 00000000 end
00000340 g O .bss 00000001 test
00000014 g .text 00000000 _vec_rsv
00000008 g .text 00000000 _vec_swi
00000000 g .text 00000000 _text
00000340 g .bss 00000000 __bss_start
0000022d g F .text 00000068 main
00210000 g *ABS* 00000000 _stack_end
00000010 g .text 00000000 _vec_dabt
000000d1 g F .text 00000100 AT91F_LowLevelInit
00000344 g O .bss 00000004 juju
000000bc g .text 00000000 AT91F_Spurious_handler
00000340 g .data 00000000 _edata
00000348 g *ABS* 00000000 _end
00000000 g .text 00000000 _vec_reset
0000001c g .text 00000000 _vec_fiq
0000005c g .text 00000000 _main
00000340 g .rodata 00000000 _erodata
(I modified the output string by a few characters, thus the small difference in file size from what you might see.)
Does all of this look correct to you??? I'm really a novice at all this, so it is especially troubling when trying to make a simple demo work!
- Joe