* breakpoint.c (breakpoint_re_set): Avoid setting source symtab
[deliverable/binutils-gdb.git] / gdb / m88k-pinsn.c
index bede269b0af9a539429895673e8c974966614538..70dee951b75ebc0f3b479f769e4d2473bf487f8c 100644 (file)
@@ -1,16 +1,30 @@
-/* This file has been modified by Data General Corporation, November 1989. */
+/* Print instructions for the Motorola 88000, for GDB and GNU Binutils.
+   Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
+   Contributed by Data General Corporation, November 1989.
+   Partially derived from an earlier printcmd.c.
+
+This file is part of GDB and the GNU Binutils.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
-#include "m88k-opcode.h"
 #include "defs.h"
+#include "opcode/m88k.h"
 #include "symtab.h"
 
 void sprint_address ();
 
-/* Changed hashtab to hashtable to avoid naming conflict
-   with libdc.o (used for tdesc) for m88k.
-*/
-
 INSTAB  *hashtable[HASHVAL] = {0};
 
 /*
@@ -314,7 +328,7 @@ void sprint_address (addr, buffer)
      char      *buffer;
 
 {
-       register int    i;
+       struct minimal_symbol *msymbol;
        struct symbol   *fs;
        char            *name;
        int             name_location;
@@ -324,13 +338,13 @@ void sprint_address (addr, buffer)
        fs = find_pc_function (addr);
 
        if (!fs) {
-           i = find_pc_misc_function (addr);
+           msymbol = lookup_minimal_symbol_by_pc (addr);
 
-           if (i < 0) return;  /* If nothing comes through, don't
-                                  print anything symbolic */
+           if (msymbol == NULL) return;  /* If nothing comes through, don't
+                                            print anything symbolic */
 
-           name = misc_function_vector[i].name;
-           name_location = misc_function_vector[i].address;
+           name = msymbol -> name;
+           name_location = msymbol -> address;
        } else {
            name = fs->name;
            name_location = BLOCK_START (SYMBOL_BLOCK_VALUE (fs));
This page took 0.023469 seconds and 4 git commands to generate.