[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] Source level debug for Microblaze in Xilinx FPGA.
Thanks a lot to all of you - I just made a stupid mistake, using
u-boot-s.elf which doesn't have debug symbols. I use just "u-boot"
without extension now and I can see source indeed:
[leonid@mylinux u-boot]$
/home/leonid/LM125/uClinux/petalinux-v0.10-rc1/tools/linux-i386/microbla
ze-uclinux-tools/bin/microblaze-uclinux-gdb u-boot
GNU gdb 5.3Xilinx EDK 8.1.01 Build EDK_I.19.4
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=i686-pc-linux-gnu
--target=microblaze-uclinux"...
(gdb) target remote 192.168.0.70:1234
Remote debugging using 192.168.0.70:1234
_start () at
/home/leonid/LM125/uClinux/petalinux-v0.10-rc1/software/petalinux-dist/u
-boot/cpu/microblaze/start.S:37
37 mts rmsr, r0
(gdb) b do_help
Breakpoint 1 at 0x23fcbbe4: file command.c, line 239.
(gdb) c
Continuing.
Breakpoint 1, do_help (cmdtp=0x1, flag=0, argc=603323388, argv=0x0) at
command.c:239
239 {
(gdb) list
234 /*
235 * Use puts() instead of printf() to avoid printf buffer
overflow
236 * for long help messages
237 */
238 int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char
*argv[])
239 {
240 int i;
241 int rcode = 0;
242
243 if (argc == 1) { /*show list of commands */
(gdb)
BTW, does anybody know how to use Eclipse-based Xilinx SDK (or to that
end any graphical interface) for such debugging? I prefer to have GUI
and not command line if I can...
Thanks,
Leonid.
-----Original Message-----
From: owner-microblaze-uclinux@xxxxxxxxxxxxxx
[mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] On Behalf Of Celia Lee
Sent: Monday, February 05, 2007 9:58 PM
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: RE: [microblaze-uclinux] Source level debug for Microblaze in
Xilinx FPGA.
Hi Leonid,
This is how I usually invoke mb-gdb for uboot:
mb-gdb -nw -symbols=u-boot.map u-boot
-nw option is not necessary.
Best Regards
Celia
-----Original Message-----
From: owner-microblaze-uclinux@xxxxxxxxxxxxxx
[mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] On Behalf Of John
Williams
Sent: Tuesday, February 06, 2007 12:16 AM
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: Re: [microblaze-uclinux] Source level debug for Microblaze in
Xilinx FPGA.
Hi Leonid,
What are you trying to do? debug u-boot?
It's just like any standalone EDK application. To debug it, run XMD on
your host and connect via JTAG/MDM to the MicroBlaze, then run mb-gdb
connecting to localhost:1234
I'm not sure why there are no debugging symbols in there - does
mb-objdump -h on the u-boot elf image show "stabs" debugging sections?
Regards,
John
Leonid wrote:
> But how can I debug application, compiled separately (u-boot)? I can
> load u-boot elf file to RAM using XMD (I'm using Spartan-3e kit), can
> run it and even set breakpoints, but I see assembler only.
>
> I tried to run mb-gdb in the directory where u-boot has been compiled
> and connect to XMD remotely. Connection goes through, but I still
cannot
> see source though I add symbol table from elf file:
>
> [leonid@mylinux u-boot]$
>
/home/leonid/LM125/uClinux/petalinux-v0.10-rc1/tools/linux-i386/microbla
> ze-uclinux-tools/bin/microblaze-uclinux-gdb u-boot-s.elf
> GNU gdb 5.3Xilinx EDK 8.1.01 Build EDK_I.19.4
> 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=i686-pc-linux-gnu
> --target=microblaze-uclinux"...(no debugging symbols found)...
> (gdb) target remote 192.168.0.70:1234
> Remote debugging using 192.168.0.70:1234
> 0x23fc0008 in ?? ()
> (gdb) add-symbol-file u-boot-s.elf 0x23fc0000
> add symbol table from file "u-boot-s.elf" at
> .text_addr = 0x23fc0000
> (y or n) y
> Reading symbols from u-boot-s.elf...(no debugging symbols
found)...done.
> (gdb)
>
> Also I didn't get this " no debugging symbols found" thing - I have -g
> as part of CFLAGS.
>
> Please advice.
>
> Thanks,
>
> Leonid.
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page :
http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/