logo       

[committed] Eliminate GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_: msg#00520

Subject: [committed] Eliminate GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC
Hello,

Per Fernando's bug report, the attached patch eliminates the two macros:
        GDB_TARGET_UNMASK_DISAS_PC
        GDB_TARGET_MASK_DISAS_PC
I've now tested GDB (using an old GCC mind) and removing them makes no difference to the disassemble command (well at least for 'disassemble main').

committed,
Andrew
2002-11-21  Andrew Cagney  <cagney@xxxxxxxxxx>

        * mips-tdep.c (mips_dump_tdep): Delete references to
        GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
        * config/mips/tm-mips.h (GDB_TARGET_MASK_DISAS_PC): Delete macro.
        (GDB_TARGET_UNMASK_DISAS_PC): Delete macro.
        * printcmd.c (build_address_symbolic): Delete calls to
        GDB_TARGET_UNMASK_DISAS_PC and GDB_TARGET_MASK_DISAS_PC.
        (address_info): Ditto.
        Fix PR gdb/773.
        
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.134
diff -u -r1.134 mips-tdep.c
--- mips-tdep.c 18 Nov 2002 22:19:29 -0000      1.134
+++ mips-tdep.c 21 Nov 2002 18:46:40 -0000
@@ -6215,12 +6215,6 @@
                      "mips_dump_tdep: GDB_TARGET_IS_MIPS64 = %d\n",
                      GDB_TARGET_IS_MIPS64);
   fprintf_unfiltered (file,
-                     "mips_dump_tdep: GDB_TARGET_MASK_DISAS_PC # %s\n",
-                     XSTRING (GDB_TARGET_MASK_DISAS_PC (PC)));
-  fprintf_unfiltered (file,
-                     "mips_dump_tdep: GDB_TARGET_UNMASK_DISAS_PC # %s\n",
-                     XSTRING (GDB_TARGET_UNMASK_DISAS_PC (PC)));
-  fprintf_unfiltered (file,
                      "mips_dump_tdep: GEN_REG_SAVE_MASK = %d\n",
                      GEN_REG_SAVE_MASK);
   fprintf_unfiltered (file,
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.49
diff -u -r1.49 printcmd.c
--- printcmd.c  15 Nov 2002 19:14:47 -0000      1.49
+++ printcmd.c  21 Nov 2002 18:46:41 -0000
@@ -624,15 +624,6 @@
        }
     }
 
-  /* 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
-
   /* First try to find the address in the symbol table, then
      in the minsyms.  Take the closest one.  */
 
@@ -672,14 +663,6 @@
   if (symbol == NULL && msymbol == NULL)
     return 1;
 
-  /* On some targets, mask out extra "flag" bits from PC for handsome
-     disassembly. */
-
-#ifdef GDB_TARGET_MASK_DISAS_PC
-  name_location = GDB_TARGET_MASK_DISAS_PC (name_location);
-  addr = GDB_TARGET_MASK_DISAS_PC (addr);
-#endif
-
   /* If the nearest symbol is too far away, don't print anything symbolic.  */
 
   /* For when CORE_ADDR is larger than unsigned int, we do math in
@@ -1236,14 +1219,8 @@
 
     case LOC_BLOCK:
       printf_filtered ("a function at address ");
-#ifdef GDB_TARGET_MASK_DISAS_PC
-      print_address_numeric
-       (load_addr = GDB_TARGET_MASK_DISAS_PC (BLOCK_START (SYMBOL_BLOCK_VALUE 
(sym))),
-        1, gdb_stdout);
-#else
       print_address_numeric (load_addr = BLOCK_START (SYMBOL_BLOCK_VALUE 
(sym)),
                             1, gdb_stdout);
-#endif
       if (section_is_overlay (section))
        {
          load_addr = overlay_unmapped_address (load_addr, section);
Index: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.44
diff -u -r1.44 tm-mips.h
--- config/mips/tm-mips.h       17 Sep 2002 23:26:02 -0000      1.44
+++ config/mips/tm-mips.h       21 Nov 2002 18:46:41 -0000
@@ -39,14 +39,6 @@
 #include "coff/sym.h"          /* Needed for PDR below.  */
 #include "coff/symconst.h"
 
-/* PC should be masked to remove possible MIPS16 flag */
-#if !defined (GDB_TARGET_MASK_DISAS_PC)
-#define GDB_TARGET_MASK_DISAS_PC(addr) UNMAKE_MIPS16_ADDR(addr)
-#endif
-#if !defined (GDB_TARGET_UNMASK_DISAS_PC)
-#define GDB_TARGET_UNMASK_DISAS_PC(addr) MAKE_MIPS16_ADDR(addr)
-#endif
-
 /* Return non-zero if PC points to an instruction which will cause a step
    to execute both the instruction at PC and an instruction at PC+4.  */
 extern int mips_step_skips_delay (CORE_ADDR);
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe