daily update
[deliverable/binutils-gdb.git] / gdb / parse.c
index 856c24dba518cd5fee00dd010fcaa9d4cbe63b08..4815854c83105cedc92a8f6b6e688e2c4455be24 100644 (file)
@@ -487,9 +487,22 @@ write_exp_msymbol (struct minimal_symbol *msymbol)
   pc = gdbarch_convert_from_func_ptr_addr (gdbarch, addr, &current_target);
   if (pc != addr)
     {
+      struct minimal_symbol *ifunc_msym = lookup_minimal_symbol_by_pc (pc);
+
       /* In this case, assume we have a code symbol instead of
         a data symbol.  */
-      type = mst_text;
+
+      if (ifunc_msym != NULL && MSYMBOL_TYPE (ifunc_msym) == mst_text_gnu_ifunc
+         && SYMBOL_VALUE_ADDRESS (ifunc_msym) == pc)
+       {
+         /* A function descriptor has been resolved but PC is still in the
+            STT_GNU_IFUNC resolver body (such as because inferior does not
+            run to be able to call it).  */
+
+         type = mst_text_gnu_ifunc;
+       }
+      else
+       type = mst_text;
       section = NULL;
       addr = pc;
     }
@@ -521,6 +534,11 @@ write_exp_msymbol (struct minimal_symbol *msymbol)
       write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
       break;
 
+    case mst_text_gnu_ifunc:
+      write_exp_elt_type (objfile_type (objfile)
+                                              ->nodebug_text_gnu_ifunc_symbol);
+      break;
+
     case mst_data:
     case mst_file_data:
     case mst_bss:
@@ -528,6 +546,10 @@ write_exp_msymbol (struct minimal_symbol *msymbol)
       write_exp_elt_type (objfile_type (objfile)->nodebug_data_symbol);
       break;
 
+    case mst_slot_got_plt:
+      write_exp_elt_type (objfile_type (objfile)->nodebug_got_plt_symbol);
+      break;
+
     default:
       write_exp_elt_type (objfile_type (objfile)->nodebug_unknown_symbol);
       break;
@@ -1160,7 +1182,7 @@ parse_exp_in_context (char **stringptr, struct block *block, int comma,
   expout->nelts = expout_ptr;
   expout = (struct expression *)
     xrealloc ((char *) expout,
-             sizeof (struct expression) + EXP_ELEM_TO_BYTES (expout_ptr));;
+             sizeof (struct expression) + EXP_ELEM_TO_BYTES (expout_ptr));
 
   /* Convert expression from postfix form as generated by yacc
      parser, to a prefix form.  */
This page took 0.024581 seconds and 4 git commands to generate.