This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch, microblaze]: Add support of microblaze software single stepping
- From: Michael Eager <eager at eagerm dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Vinod Kathail <vinodk at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Mon, 15 Sep 2014 09:06:08 -0700
- Subject: Re: [Patch, microblaze]: Add support of microblaze software single stepping
- Authentication-results: sourceware.org; auth=none
- References: <a0a86472-2b0f-4a69-bd7d-ddea295e0f5e at BN1BFFO11FD011 dot protection dot gbl> <20140707145634 dot GF6038 at adacore dot com> <35bccb81-cae6-4581-b5fd-16dea7171d28 at BN1AFFO11FD012 dot protection dot gbl> <20140711135114 dot GA4888 at adacore dot com> <ab8da1f0-cade-46f8-97e0-888662ff368e at BY2FFO11FD002 dot protection dot gbl> <53C041BD dot 4060303 at eagercon dot com> <65f50a75-1a6c-4c32-8139-296b64e7fe99 at BN1AFFO11FD047 dot protection dot gbl>
On 07/14/14 03:27, Ajit Kumar Agarwal wrote:
Here are the dump of the disassembly and the output of single step command for branch with delay slot and imm instructions.
Once again, please do not top post.
Please provide a disassembly of the test case and a log of the commands to gdb and gdb's output, showing stepping over imm and delay slot instructions
BRANCH WITH DELAY SLOT
Breakpoint 1, main () at ../src/helloworld.c:28
28 init_platform();
(gdb) display /i $pc
1: x/i $pc
=> 0xc00001b0 <main+16>: brlid r15, 172 // 0xc000025c
(gdb) si
init_platform () at ../src/platform.c:53
53 {
1: x/i $pc
=> 0xc000025c <init_platform>: addik r1, r1, -32
I see the same behavior on a bare-metal MicroBlaze target without
your patch.
The same disassembly with <main> function given above
Without Single Stepping implementation there is a warning with the "warning: Remote failure reply: E01" with branch with delay slot.
(gdb) display /i $pc
1: x/i $pc
=> 0xc00001b0 <main+16>: brlid r15, 172 // 0xc000025c
(gdb) si
warning: Remote failure reply: E01
[Thread <main>] #1 stopped.
init_platform () at ../src/platform.c:53
53 {
1: x/i $pc
=> 0xc000025c <init_platform>: addik r1, r1, -32
WITH IMM instruction : There is a same warning without the single stepping patch "warning:Remote failure reply : E01".
I'm not able to reproduce this error on a bare-metal system
either big-endian or little-endian. The test case which
you sent me offline does not show this error. Single-stepping
on MicroBlaze appears to work correctly.
It appears that the "passing" test you show above was run on a
bare-metal system, while the "failing" test was run on a multi-threaded
system, presumably Linux using gdbserver. Perhaps the error you are
seeing is in gdbserver.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077