* [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board
@ 2003-09-09 7:31 Andrea Sorio
2003-09-09 8:11 ` Wolfgang Denk
2003-09-09 13:24 ` Detlev Zundel
0 siblings, 2 replies; 5+ messages in thread
From: Andrea Sorio @ 2003-09-09 7:31 UTC (permalink / raw)
To: u-boot
Dear Wolfgang
I followed your advice, but they doesn't work for me:
[u-boot-0.4.6]$ arm-linux-gdb u-boot
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-redhat-linux --target=arm-linux"...
(gdb) target remote bdi:2001
Remote debugging using bdi:2001
0x00000000 in ?? ()
(gdb) symbol-file
Discard symbol table from `/home/sorio/Devel/UBoot/u-boot-0.4.6/u-boot'? (y or n) y
No symbol file now.
(gdb) add-symbol-file u-boot 0x0
add symbol table from file "u-boot" at
.text_addr = 0x0
(y or n) y
Reading symbols from u-boot...done.
(gdb) b start_armboot
Breakpoint 1 at 0x80000cb4: file board.c, line 214.
(gdb) x/16i 0x0
0x0: b 0x54
0x4: ldr pc, [pc, #20] ; 0x20
0x8: ldr pc, [pc, #20] ; 0x24
0xc: ldr pc, [pc, #20] ; 0x28
0x10: ldr pc, [pc, #20] ; 0x2c
0x14: ldr pc, [pc, #20] ; 0x30
0x18: ldr pc, [pc, #20] ; 0x34
0x1c: ldr pc, [pc, #20] ; 0x38
0x20: andmi r0, r0, r0, lsl #2
0x24: andmi r0, r0, r0, ror #2
0x28: andmi r0, r0, r0, asr #3
0x2c: andmi r0, r0, r0, lsr #4
0x30: andmi r0, r0, r0, lsl #5
0x34: andmi r0, r0, r0, ror #5
0x38: andmi r0, r0, r0, asr #6
0x3c: cdple 14, 10, cr11, cr13, cr15, {7}
(gdb)
The breackpoint is set to "0x80000cb4", so the bdi never stop!
My code is built to run on 0x40000000 address.
Any idea?
Thank you in advance
Best Regards
Andrea Sorio
In message <3F575E48.1060507@na...> you wrote:
>
> Thanks Wolfgang and Kyle for your advice. Now, I can debug the boot
> process from the first instruction. Finally I've created two binaries:
> u-boot to execute and u-boot.debug (with TEXTBASE=0x0), to debug the
> first part of boot process. When the boot process arrives to the
> start_armboot function, I discard the current symbol file(u-boot.debug)
> and load the new one(u-boot).
You don't need to recompile or relink with TEXTBASE=0x0; the
"add-symbol-file" GDB command allows you to specify an arbitrary
target address.
--
Ing. Andrea Sorio
Hardware & Software Engineer
Free Consultant
http://www.cocay.it
email: a.sorio at cocay.it
Phone: 348 8703449
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board
2003-09-09 7:31 [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board Andrea Sorio
@ 2003-09-09 8:11 ` Wolfgang Denk
2003-09-09 8:23 ` Andrea Sorio
2003-09-09 13:24 ` Detlev Zundel
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2003-09-09 8:11 UTC (permalink / raw)
To: u-boot
Dear Andrea,
in message <3F5D81C3.4050604@cocay.it> you wrote:
>
> I followed your advice, but they doesn't work for me:
Well, I can only speculate...
> [u-boot-0.4.6]$ arm-linux-gdb u-boot
> GNU gdb 5.1.1
Where did you get this version of a cross debugger from?
> (gdb) symbol-file
> Discard symbol table from `/home/sorio/Devel/UBoot/u-boot-0.4.6/u-boot'? (y or n) y
> No symbol file now.
> (gdb) add-symbol-file u-boot 0x0
> add symbol table from file "u-boot" at
> .text_addr = 0x0
> (y or n) y
> Reading symbols from u-boot...done.
> (gdb) b start_armboot
> Breakpoint 1 at 0x80000cb4: file board.c, line 214.
It seems to me that your GDB is broken.
Some versions don't know how to deal with a 0x0 address because they
confuse this with a NULL pointer.
> The breackpoint is set to "0x80000cb4", so the bdi never stop!
That's a bug in GDB.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
The nice thing about standards is that there are so many to choose
from. - Andrew S. Tanenbaum
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board
2003-09-09 8:11 ` Wolfgang Denk
@ 2003-09-09 8:23 ` Andrea Sorio
2003-09-09 9:06 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Sorio @ 2003-09-09 8:23 UTC (permalink / raw)
To: u-boot
Dear Wolfgang
>
>
>>[u-boot-0.4.6]$ arm-linux-gdb u-boot
>>GNU gdb 5.1.1
>>
>>
>
>Where did you get this version of a cross debugger from?
>
I installed your ELDK! :-)
Thank you in advance
Best regards
Andrea
--
Ing. Andrea Sorio
Hardware & Software Engineer
Free Consultant
http://www.cocay.it
email: a.sorio at cocay.it
Phone: 348 8703449
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board
2003-09-09 8:23 ` Andrea Sorio
@ 2003-09-09 9:06 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2003-09-09 9:06 UTC (permalink / raw)
To: u-boot
Dear Andrea,
in message <3F5D8E13.6060609@cocay.it> you wrote:
>
> >Where did you get this version of a cross debugger from?
> >
> I installed your ELDK! :-)
Yes, this version is still broken.
I think it will be fixed in the next release of the ELDK.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
You're too beautiful to ignore. Too much woman.
-- Kirk to Yeoman Rand, "The Enemy Within", stardate unknown
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board
2003-09-09 7:31 [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board Andrea Sorio
2003-09-09 8:11 ` Wolfgang Denk
@ 2003-09-09 13:24 ` Detlev Zundel
1 sibling, 0 replies; 5+ messages in thread
From: Detlev Zundel @ 2003-09-09 13:24 UTC (permalink / raw)
To: u-boot
Hello Andrea,
> [u-boot-0.4.6]$ arm-linux-gdb u-boot
> GNU gdb 5.1.1
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "--host=i386-redhat-linux --target=arm-linux"...
> (gdb) target remote bdi:2001
> Remote debugging using bdi:2001
> 0x00000000 in ?? ()
> (gdb) symbol-file
> Discard symbol table from `/home/sorio/Devel/UBoot/u-boot-0.4.6/u-boot'? (y or n) y
> No symbol file now.
> (gdb) add-symbol-file u-boot 0x0
> add symbol table from file "u-boot" at
> .text_addr = 0x0
> (y or n) y
> Reading symbols from u-boot...done.
> (gdb) b start_armboot
> Breakpoint 1 at 0x80000cb4: file board.c, line 214.
> (gdb) x/16i 0x0
> 0x0: b 0x54
> 0x4: ldr pc, [pc, #20] ; 0x20
> 0x8: ldr pc, [pc, #20] ; 0x24
> 0xc: ldr pc, [pc, #20] ; 0x28
> 0x10: ldr pc, [pc, #20] ; 0x2c
> 0x14: ldr pc, [pc, #20] ; 0x30
> 0x18: ldr pc, [pc, #20] ; 0x34
> 0x1c: ldr pc, [pc, #20] ; 0x38
> 0x20: andmi r0, r0, r0, lsl #2
> 0x24: andmi r0, r0, r0, ror #2
> 0x28: andmi r0, r0, r0, asr #3
> 0x2c: andmi r0, r0, r0, lsr #4
> 0x30: andmi r0, r0, r0, lsl #5
> 0x34: andmi r0, r0, r0, ror #5
> 0x38: andmi r0, r0, r0, asr #6
> 0x3c: cdple 14, 10, cr11, cr13, cr15, {7}
> (gdb)
>
> The breackpoint is set to "0x80000cb4", so the bdi never stop!
> My code is built to run on 0x40000000 address.
> Any idea?
It is just something I seem to remember, but can you try to do the
symbol-file manipulations _before_ you give the "target remote"
command? I know it sounds unlikely, but I think I stumbled across
something like this before.
Cheers
Detlev
--
Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C
or Fortran program contains an ad-hoc, informally-specified bug-ridden
slow implementation of half of Common Lisp."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-09 13:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-09 7:31 [U-Boot-Users] Re: u-boot debugging boot with gdb and bdi2000 in lubbock(PXA255) board Andrea Sorio
2003-09-09 8:11 ` Wolfgang Denk
2003-09-09 8:23 ` Andrea Sorio
2003-09-09 9:06 ` Wolfgang Denk
2003-09-09 13:24 ` Detlev Zundel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox