This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Problems with gdb-4.18: set $pc=start


Hi,

I built a toolchain for the Hitachi H8/300 microcontroller series and 
now wanted to use gdb-4.18 as a debugger, since it features binary 
download (as opposed to gdb-4.17) to the remote target.

So far everything worked. After downloading the binary it could be 
started and debugged. From gdb-4.17 I was used to issue the 
command "set $pc=start" in order to reset the program counter to 
the position where the startup code begins.
I could not manage this to work on gdb-4.18 which after set 
"$pc=start" sets the PC to 0x0000000.

Does anybody have an idea why this happens ?
Is there something I missed or a bug in the program ?

In the objectfile of the startup code the symbol _start is reported by
objdump:
[ 17](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _start .

It also seems that gdb-4.18 recognizes the symbol (without the 
undersore). When trying the start label with underscore: "set 
$pc=_start" gdb complains: "No symbol "_start" in current context."

This is what gdb-4.18 issues when loading the binary:
Loading section .uservec, size 0x8 lma 0x400010
Loading section .vecptr, size 0x4 lma 0x4004d4
Loading section .vectors, size 0xf4 lma 0x400e00
Loading section .text, size 0x10d84 lma 0x401000
Loading section .data, size 0x37e2 lma 0x411d84
Loading section .stack, size 0x4 lma 0x43fffc
Loading section .config, size 0x20 lma 0x400f00
Loading section .fastvar, size 0x8 lma 0xffff00
Start address 0x41082c , load size 83602
Transfer rate: 41801 bits/sec.
Reading symbols from os.x...done.
Reading in symbols for crt0_ram.s...done.
Current language:  auto; currently asm

Here os.x is the binary generated after linking, crt0_ram.s is the 
assembler file of my startup code.

Please let me know any idea to get rid of this problem, since I would 
like to have a fast binary download to the target hardware and also 
be able to comfortably reset the PC.

Thanks,

Hansjuergen


__________________________________________________________________________
Dr. Hansjuergen Dreuth
Simplify Technologies GmbH, Tulpenweg 2, D-35630 Ehringshausen, Germany
Tel.: (+49) (0)6443-811712, FAX: (+49) (0)6443-811716
Email: hansjuergen.dreuth@simplify-technologies.de

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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