public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-entryval: VALUE_OPTIMIZED_OUT_ERROR -> NOT_FOUND_ERROR
@ 2011-06-12 16:45 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-06-12 16:45 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-entryval has been updated
       via  e6b412e5ab0429151655f396e1ade25d3c17efdb (commit)
      from  49e84b3e6f5a8b678c9cc9dcd8f32f341b801b26 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit e6b412e5ab0429151655f396e1ade25d3c17efdb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Jun 12 18:45:32 2011 +0200

    VALUE_OPTIMIZED_OUT_ERROR -> NOT_FOUND_ERROR

-----------------------------------------------------------------------

Summary of changes:
 gdb/dwarf2loc.c  |   30 ++++++++++++++----------------
 gdb/exceptions.h |    4 ----
 gdb/valops.c     |    3 +--
 gdb/value.c      |    3 +--
 4 files changed, 16 insertions(+), 24 deletions(-)

First 500 lines of diff:
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index f95be58..4addfde 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -315,10 +315,10 @@ call_site_stuff_to_target_addr (struct call_site_stuff *specific,
 
 	dwarf_block = FIELD_DWARF_BLOCK (specific->target);
 	if (! dwarf_block)
-	  throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	  throw_error (NOT_FOUND_ERROR,
 		       _("DW_AT_GNU_call_site_target is not specified"));
 	if (! caller_frame)
-	  throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	  throw_error (NOT_FOUND_ERROR,
 		       _("DW_AT_GNU_call_site_target DWARF block resolving "
 			 "requires known frame which is currently not "
 			 "available"));
@@ -342,7 +342,7 @@ call_site_stuff_to_target_addr (struct call_site_stuff *specific,
 	physname = FIELD_STATIC_PHYSNAME (specific->target);
 	msym = lookup_minimal_symbol_text (physname, NULL);
 	if (msym == NULL)
-	  throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	  throw_error (NOT_FOUND_ERROR,
 		       _("Cannot find function \"%s\" for a call site target"),
 		       physname);
 	return SYMBOL_VALUE_ADDRESS (msym);
@@ -365,7 +365,7 @@ addr_to_func_specific (struct gdbarch *gdbarch, CORE_ADDR addr)
   struct func_type *specific;
 
   if (! sym || BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) != addr)
-    throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+    throw_error (NOT_FOUND_ERROR,
 		 _("DW_TAG_GNU_call_site resolving failed to find function "
 		   "name for address %s"),
 		 paddress (gdbarch, addr));
@@ -376,7 +376,7 @@ addr_to_func_specific (struct gdbarch *gdbarch, CORE_ADDR addr)
   specific = TYPE_MAIN_TYPE (type)->type_specific.func_stuff;
 
   if (! specific->tail_call_list_complete)
-    throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+    throw_error (NOT_FOUND_ERROR,
 		 _("DW_TAG_GNU_call_site resolving has found "
 		   "function %s at %s which does not have complete list "
 		   "of DW_AT_GNU_tail_call entries"),
@@ -443,7 +443,7 @@ func_verify_no_selftailcall (struct gdbarch *gdbarch, CORE_ADDR verify_addr)
 	      struct minimal_symbol *msym;
 	      
 	      msym = lookup_minimal_symbol_by_pc (verify_addr);
-	      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	      throw_error (NOT_FOUND_ERROR,
 			   _("DW_OP_GNU_entry_value resolving has found "
 			     "function %s at %s can call itself via tail calls"),
 			   ! msym ? "???" : SYMBOL_PRINT_NAME (msym),
@@ -710,7 +710,7 @@ call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
     }
   if (e.reason < 0)
     {
-      if (e.error == VALUE_OPTIMIZED_OUT_ERROR)
+      if (e.error == NOT_FOUND_ERROR)
 	return NULL;
       else
 	throw_exception (e);
@@ -758,8 +758,8 @@ dwarf_expr_regnum_entry_value (struct dwarf_expr_context *ctx, int regnum,
       struct minimal_symbol *msym = lookup_minimal_symbol_by_pc (caller_pc);
 
       /* DW_TAG_gnu_call_site will be missing just if GCC could not determine
-	 the call target.  So do not complain more than VALUE_OPTIMIZED_OUT_ERROR.  */
-      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	 the call target.  So do not complain more than NOT_FOUND_ERROR.  */
+      throw_error (NOT_FOUND_ERROR,
 		   _("DW_OP_GNU_entry_value resolving cannot find "
 		     "DW_TAG_GNU_call_site %s in %s"),
 		   paddress (caller_gdbarch, caller_pc),
@@ -773,7 +773,7 @@ dwarf_expr_regnum_entry_value (struct dwarf_expr_context *ctx, int regnum,
 
       target_msym = lookup_minimal_symbol_by_pc (target_addr);
       func_msym = lookup_minimal_symbol_by_pc (func_addr);
-      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+      throw_error (NOT_FOUND_ERROR,
 		   _("DW_OP_GNU_entry_value resolving expects callee %s at %s "
 		     "but the called frame is for %s at %s"),
 		   ! target_msym ? "???" : SYMBOL_PRINT_NAME (target_msym),
@@ -795,11 +795,9 @@ dwarf_expr_regnum_entry_value (struct dwarf_expr_context *ctx, int regnum,
       struct minimal_symbol *msym = lookup_minimal_symbol_by_pc (caller_pc);
 
       /* DW_TAG_GNU_call_site_parameter will be missing just if GCC could not
-         determine its value.  So do not complain more than
-         VALUE_OPTIMIZED_OUT_ERROR.  */
-      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
-		   _("Cannot find register %d at "
-		     "DW_TAG_GNU_call_site %s at %s"),
+	 determine its value.  So do not complain more than NOT_FOUND_ERROR.  */
+      throw_error (NOT_FOUND_ERROR, _("Cannot find register %d at "
+				      "DW_TAG_GNU_call_site %s at %s"),
 		   regnum, paddress (caller_gdbarch, caller_pc),
 		   ! msym ? "???" : SYMBOL_PRINT_NAME (msym)); 
     }
@@ -1687,7 +1685,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
 	  mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type));
 	  return retval;
 	}
-      else if (ex.error == VALUE_OPTIMIZED_OUT_ERROR)
+      else if (ex.error == NOT_FOUND_ERROR)
 	{
 	  if (info_verbose)
 	    exception_print (gdb_stdout, ex);
diff --git a/gdb/exceptions.h b/gdb/exceptions.h
index 96f4789..c1bc605 100644
--- a/gdb/exceptions.h
+++ b/gdb/exceptions.h
@@ -85,10 +85,6 @@ enum errors {
      traceframe.  */
   NOT_AVAILABLE_ERROR,
 
-  /* Failed to retrieve DW_OP_GNU_entry_value's value or the value is
-     unavailable for other reasons.  */
-  VALUE_OPTIMIZED_OUT_ERROR,
-
   /* Add more errors here.  */
   NR_ERRORS
 };
diff --git a/gdb/valops.c b/gdb/valops.c
index 8594b77..3676103 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -995,8 +995,7 @@ value_fetch_lazy (struct value *val)
       if (!value_bits_valid (val,
 			     TARGET_CHAR_BIT * offset + value_bitpos (val),
 			     value_bitsize (val)))
-	throw_error (VALUE_OPTIMIZED_OUT_ERROR,
-	             _("value has been optimized out"));
+	error (_("value has been optimized out"));
 
       if (!unpack_value_bits_as_long (value_type (val),
 				      value_contents_for_printing (parent),
diff --git a/gdb/value.c b/gdb/value.c
index 9fce097..ccd29c8 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -810,8 +810,7 @@ static void
 require_not_optimized_out (const struct value *value)
 {
   if (value->optimized_out)
-    throw_error (VALUE_OPTIMIZED_OUT_ERROR,
-		 _("value has been optimized out"));
+    error (_("value has been optimized out"));
 }
 
 static void


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-12 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-12 16:45 [SCM] archer-jankratochvil-entryval: VALUE_OPTIMIZED_OUT_ERROR -> NOT_FOUND_ERROR jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).