This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/773: MIPS16 macro GDB_TARGET_MASK_DISAS_PC must go away
- From: fnasser at redhat dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 30 Sep 2002 21:08:21 -0000
- Subject: gdb/773: MIPS16 macro GDB_TARGET_MASK_DISAS_PC must go away
- Reply-to: fnasser at redhat dot com
>Number: 773
>Category: gdb
>Synopsis: MIPS16 macro GDB_TARGET_MASK_DISAS_PC must go away
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 30 14:18:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: fnasser@redhat.com
>Release: 5.4
>Organization:
>Environment:
>Description:
The macro GDB_TARGET_MASK_DISAS_PC was added 5 years ago and only exists for the mips16 target and was used like that in the old disassembler code:
!
! /* Dump the specified range. */
! pc = low;
!
! #ifdef GDB_TARGET_MASK_DISAS_PC
! pc_masked = GDB_TARGET_MASK_DISAS_PC (pc);
! #else
! pc_masked = pc;
! #endif
!
! for (pc_masked; pc_masked < high;)
and
- pc += print_insn (pc, gdb_stdout);
- printf_filtered ("\n");
-
- #ifdef GDB_TARGET_MASK_DISAS_PC
- pc_masked = GDB_TARGET_MASK_DISAS_PC (pc);
- #else
- pc_masked = pc;
- #endif
I moved this hack to the new disassembler code in disasm.c but I think we need to get rid of it somehow.
There is also a GDB_TARGET_UNMASK_DISAS_PC that does the opposite and is used in build_address_symbolic():
/* On some targets, add in extra "flag" bits to PC for
disassembly. This should ensure that "rounding errors" in
symbol addresses that are masked for disassembly favour the
the correct symbol. */
#ifdef GDB_TARGET_UNMASK_DISAS_PC
addr = GDB_TARGET_UNMASK_DISAS_PC (addr);
#endif
It is related to the same bug fix, dated 1997:
Added MIPS16 PC masking for disassembly.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: