This is the mail archive of the
mailing list for the GDB project.
Re: Disassemble branch delay slot instructions automatically
- From: Daniel Jacobowitz <drow at false dot org>
- To: "Maciej W. Rozycki" <macro at mips dot com>
- Cc: gdb-patches at sourceware dot org, insight at sourceware dot org, Nigel Stephens <nigel at mips dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>, Eli Zaretskii <eliz at gnu dot org>
- Date: Wed, 20 Jun 2007 10:09:25 -0400
- Subject: Re: Disassemble branch delay slot instructions automatically
- References: <Pine.LNX.email@example.com> <20070516153242.GA8062@caradoc.them.org> <Pine.LNX.firstname.lastname@example.org> <20070613165622.GA1023@caradoc.them.org> <Pine.LNX.email@example.com>
On Wed, Jun 20, 2007 at 02:56:20PM +0100, Maciej W. Rozycki wrote:
> On Wed, 13 Jun 2007, Daniel Jacobowitz wrote:
> > I think the patch is pretty much OK, except for the use of
> > TARGET_PRINT_INSN. We're trying to eliminate the gdbarch macros now.
> > I think the best solution would be to add the extra argument to
> > gdb_print_insn; it's only used here and in the TUI.
> And also in Insight; I have updated that too. I suppose the plan is to
> substitute TARGET_PRINT_INSN with gdbarch_print_insn(), but that should be
> done separately, so that it is not mixed with functional changes.
In fact, it happened yesterday.
2007-06-19 Markus Deuling <firstname.lastname@example.org>
* gdbarch.sh (TARGET_PRINT_INSN): Replace by
* disasm.c (dump_insns, gdb_print_insn): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
So I imagine you need to refresh this patch. I was actually
suggesting you add the disassemble_info argument to gdb_print_insn,
not the number of delay slots; but this way seems fine too.
This version is OK, if Eli likes the NEWS entry and you add a
Makefile.in update (since you added #include's). Eli, is the below
> Index: binutils-quilt/src/gdb/NEWS
> --- binutils-quilt.orig/src/gdb/NEWS 2007-06-19 12:24:32.000000000 +0100
> +++ binutils-quilt/src/gdb/NEWS 2007-06-19 15:16:19.000000000 +0100
> @@ -41,6 +41,9 @@
> layout. It also supports a TextSeg= and DataSeg= response when only
> segment base addresses (rather than offsets) are available.
> +* The /i format now outputs any trailing branch delay slot instructions
> +immediately following the last instruction within the count specified.
> * New commands
> set remoteflow