cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ssh@sgi.com
Visitor
Visitor
6,024 Views
Registered: ‎03-28-2008

Using Microblaze linux app core files for debug

Another question related to mainline (2.3.35) Microblaze+MMU linux
implementation:    from my previous 'strace' post, I found
that 'strace' was segfaulting.    I enabled core file generation
(ulimit -c 1000000), and strace generated a core file.

I copied that back to my build platform and tried to use
the gdb included in the tool chain to examine the core
file.   I saw this message at startup:

warning: "./core": no core file handler recognizes format, using default

and I saw this message several times:

Can't fetch registers from this type of core file


Again, I used the Xilinx toolchain referenced here:
http://xilinx.wikidot.com/mb-gnu-tools

Does anyone know if this toolchain should be able
to support debugging using core files?

 

Just to be clear, this is the GDB I was running:
(gdb) show version
GNU gdb    6.5.0.20060626-cvs
Copyright (C) 2006 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-build_redhat-linux-gnu --target=microblaze-unknown-linux-gnu".
(gdb)

 

Thanks!
Steve

0 Kudos
5 Replies
linnj
Xilinx Employee
Xilinx Employee
6,020 Views
Registered: ‎09-10-2008

Hi Steve,

 

I think that GDB does need changes to support core files.  I'll look to see if I can find anymore data.

 

My apologies, but I'm not in control of the tool situation.

 

Thanks.

0 Kudos
ssh@sgi.com
Visitor
Visitor
5,980 Views
Registered: ‎03-28-2008

Hi John--

 

Do you have any more information on this?

 

I just built GDB-7.2 for Microblaze, and it still does not recognize

a core file for Microblaze.    Are there more patches needed, or

is this just not supported yet?

 

Thanks,

Steve

0 Kudos
5,967 Views
Registered: ‎10-05-2010

Hi Steve,

did you build the gdbserver as well?

Thanks,

Marco

0 Kudos
ssh@sgi.com
Visitor
Visitor
5,960 Views
Registered: ‎03-28-2008

Hi Marco--

No, I didn't build gdbserver.   I saw your other post (which is what caused me

to check out gdb-7.2 in the first place!), and I verified that there are indeed

no low-level files for Microblaze in gdbserver (as you saw).

Steve

0 Kudos
Anonymous
Not applicable
5,499 Views

Hi,

 

I have compiled GDB and GDB server which will run natively on the microblaze, please see the instructions at:

 

http://fusion.phys.tue.nl/fpga/doku.php?id=microblaze_gdb

 

This will work for GDB 7.2.  Please note that some kernel patches are needed to get "ptrace" to work.  I am at the moment working on getting these into the mainline linux kernel.

 

I hope that helps!

 

Best regards,

 

Billy.

0 Kudos