From: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>
To: Michael Eager <eager@eagercon.com>,
Joel Brobecker <brobecker@adacore.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Pedro Alves <palves@redhat.com>,
Vinod Kathail <vinodk@xilinx.com>,
Vidhumouli Hunsigida <vidhum@xilinx.com>,
Nagaraju Mekala <nmekala@xilinx.com>
Subject: RE: [Patch, microblaze]: Add support of microblaze software single stepping
Date: Mon, 14 Jul 2014 11:42:00 -0000 [thread overview]
Message-ID: <65f50a75-1a6c-4c32-8139-296b64e7fe99@BN1AFFO11FD047.protection.gbl> (raw)
In-Reply-To: <53C041BD.4060303@eagercon.com>
Here are the dump of the disassembly and the output of single step command for branch with delay slot and imm instructions.
>>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
Disassembly of main :
(gdb) disassem main
Dump of assembler code for function main:
0xc00001a0 <+0>: addik r1, r1, -32
0xc00001a4 <+4>: swi r15, r1, 0
0xc00001a8 <+8>: swi r19, r1, 28
0xc00001ac <+12>: addk r19, r1, r0
0xc00001b0 <+16>: brlid r15, 172 // 0xc000025c
0xc00001b4 <+20>: or r0, r0, r0
0xc00001b8 <+24>: imm -16384
0xc00001bc <+28>: addik r5, r0, 2548
0xc00001c0 <+32>: brlid r15, 252 // 0xc00002bc
0xc00001c4 <+36>: or r0, r0, r0
0xc00001c8 <+40>: brlid r15, 196 // 0xc000028c
0xc00001cc <+44>: or r0, r0, r0
0xc00001d0 <+48>: addk r3, r0, r0
0xc00001d4 <+52>: lwi r15, r1, 0
0xc00001d8 <+56>: addk r1, r19, r0
0xc00001dc <+60>: lwi r19, r1, 28
0xc00001e0 <+64>: addik r1, r1, 32
0xc00001e4 <+68>: rtsd r15, 8
0xc00001e8 <+72>: or r0, r0, r0
WITH IMM INSTRUCTION:
(gdb) si
main () at ../src/helloworld.c:30
30 print("Hello World\n\r");
2: x/i $pc
=> 0xc00001b8 <main+24>: imm -16384
1: x/i $pc
=> 0xc00001b8 <main+24>: imm -16384
(gdb) si
0xc00001c0 30 print("Hello World\n\r");
2: x/i $pc
=> 0xc00001c0 <main+32>: brlid r15, 252 // 0xc00002bc
1: x/i $pc
=> 0xc00001c0 <main+32>: brlid r15, 252 // 0xc00002bc
>>Is there a test case which shows single stepping failing without the 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".
[Thread <main>] #1 stopped.
main () at ../src/helloworld.c:30
30 print("Hello World\n\r");
1: x/i $pc
=> 0xc00001b8 <main+24>: imm -16384
(gdb)
warning: Remote failure reply: E01
[Thread <main>] #1 stopped.
0xc00001c0 in main () at ../src/helloworld.c:30
30 print("Hello World\n\r");
Thanks & Regards
Ajit
-----Original Message-----
From: Michael Eager [mailto:eager@eagercon.com]
Sent: Saturday, July 12, 2014 1:28 AM
To: Ajit Kumar Agarwal; Joel Brobecker
Cc: gdb-patches@sourceware.org; Pedro Alves; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Add support of microblaze software single stepping
On 07/11/14 12:34, Ajit Kumar Agarwal wrote:
>
>>> Please also explain how this patch was tested.
>
> The changes were tested with the application for barematel with remote debug with XMD debugger( internal to Xilinx)which connects to the target and opens the gdbserver connection. Single stepping command were used for next_pc in straight line code, with imm instruction and the branch with delay Slot.
Your terminology may be a bit confusing. Gdbserver is a program (part of GDB) which runs on a platform (e.g.
Linux), and which implements the GDB Remote Serial Protocol.
XMD does not run gdbserver. It has an independent implementation of the GDB Remote Serial Protocol. It would be better to say that XMD is a remote stub.
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.
Is there a test case which shows single stepping failing without the patch?
Even better would be to update the gdb regression test suite with the test case.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
next prev parent reply other threads:[~2014-07-14 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 6:13 Ajit Kumar Agarwal
2014-07-07 14:56 ` Joel Brobecker
2014-07-11 12:53 ` Ajit Kumar Agarwal
2014-07-11 14:05 ` Joel Brobecker
2014-07-11 14:42 ` Ajit Kumar Agarwal
2014-07-11 19:44 ` Ajit Kumar Agarwal
2014-07-11 20:58 ` Michael Eager
2014-07-14 11:42 ` Ajit Kumar Agarwal [this message]
2014-09-15 16:06 ` Michael Eager
2014-07-20 14:03 ` Ajit Kumar Agarwal
-- strict thread matches above, loose matches on Subject: below --
2014-06-20 6:10 Ajit Kumar Agarwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65f50a75-1a6c-4c32-8139-296b64e7fe99@BN1AFFO11FD047.protection.gbl \
--to=ajit.kumar.agarwal@xilinx.com \
--cc=brobecker@adacore.com \
--cc=eager@eagercon.com \
--cc=gdb-patches@sourceware.org \
--cc=nmekala@xilinx.com \
--cc=palves@redhat.com \
--cc=vidhum@xilinx.com \
--cc=vinodk@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox