target.c: Add a cast and change a type
[deliverable/binutils-gdb.git] / gdb / symmisc.c
index 5e0cc7a8d3ac97002d1fd0b3e20960dbedc0499e..53d8c03f8126693e9449459a84ce140291cbee3f 100644 (file)
@@ -1,6 +1,6 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
 
-   Copyright (C) 1986-2014 Free Software Foundation, Inc.
+   Copyright (C) 1986-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -466,8 +466,12 @@ print_symbol (void *args)
   struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
   int depth = ((struct print_symbol_args *) args)->depth;
   struct ui_file *outfile = ((struct print_symbol_args *) args)->outfile;
-  struct obj_section *section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (symbol),
-                                                   symbol);
+  struct obj_section *section;
+
+  if (SYMBOL_OBJFILE_OWNED (symbol))
+    section = SYMBOL_OBJ_SECTION (symbol_objfile (symbol), symbol);
+  else
+    section = NULL;
 
   print_spaces (depth, outfile);
   if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
@@ -872,7 +876,7 @@ static int
 maintenance_expand_file_matcher (const char *filename, void *data,
                                 int basenames)
 {
-  const char *regexp = data;
+  const char *regexp = (const char *) data;
 
   QUIT;
 
@@ -922,7 +926,7 @@ maintenance_expand_symtabs (char *args, int from_tty)
        {
          objfile->sf->qf->expand_symtabs_matching
            (objfile, maintenance_expand_file_matcher,
-            maintenance_expand_name_matcher, ALL_DOMAIN, regexp);
+            maintenance_expand_name_matcher, NULL, ALL_DOMAIN, regexp);
        }
     }
 
This page took 0.025338 seconds and 4 git commands to generate.