public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-entryval: Use VALUE_OPTIMIZED_OUT_ERROR instead of error().
@ 2010-09-05 10:50 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-09-05 10:50 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-entryval has been updated
       via  acaf239bbbc87d909fe4d3ac1eb26bdcdcb137de (commit)
       via  7b3d10132d3ce4ffd55d93567cb70e6de0bb2e92 (commit)
      from  093ed30e1d5efdc1ebcb0fdca3b3caa7439fa7ab (commit)

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

- Log -----------------------------------------------------------------
commit acaf239bbbc87d909fe4d3ac1eb26bdcdcb137de
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Sep 5 12:49:48 2010 +0200

    Use VALUE_OPTIMIZED_OUT_ERROR instead of error().

commit 7b3d10132d3ce4ffd55d93567cb70e6de0bb2e92
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Sep 5 12:47:54 2010 +0200

    s/ENTRY_VALUE_ERROR/VALUE_OPTIMIZED_OUT_ERROR/g

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

Summary of changes:
 gdb/dwarf2loc.c  |   20 ++++++++++----------
 gdb/exceptions.h |    5 +++--
 gdb/valops.c     |    4 +++-
 gdb/value.c      |    4 +++-
 4 files changed, 19 insertions(+), 14 deletions(-)

First 500 lines of diff:
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 3096462..651c8f4 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -282,10 +282,10 @@ call_site_stuff_to_target_addr (struct call_site_stuff *specific,
 
 	dwarf_block = FIELD_DWARF_BLOCK (specific->target);
 	if (! dwarf_block)
-	  throw_error (ENTRY_VALUE_ERROR,
+	  throw_error (VALUE_OPTIMIZED_OUT_ERROR,
 		       _("DW_AT_GNU_call_site_target is not specified"));
 	if (! caller_frame)
-	  throw_error (ENTRY_VALUE_ERROR,
+	  throw_error (VALUE_OPTIMIZED_OUT_ERROR,
 		       _("DW_AT_GNU_call_site_target DWARF block resolving "
 			 "requires known frame which is currently not "
 			 "available"));
@@ -331,7 +331,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 (ENTRY_VALUE_ERROR,
+    throw_error (VALUE_OPTIMIZED_OUT_ERROR,
 		 _("DW_TAG_GNU_call_site resolving failed to find function "
 		   "name for address %s"),
 		 paddress (gdbarch, addr));
@@ -342,7 +342,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 (ENTRY_VALUE_ERROR,
+    throw_error (VALUE_OPTIMIZED_OUT_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"),
@@ -409,7 +409,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 (ENTRY_VALUE_ERROR,
+	      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
 			   _("DW_OP_GNU_entry_value resolving has found "
 			     "function %s at %s can call itself via tail calls"),
 			   ! msym ? "???" : SYMBOL_PRINT_NAME (msym),
@@ -668,7 +668,7 @@ call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
     }
   if (e.reason < 0)
     {
-      if (e.error == ENTRY_VALUE_ERROR)
+      if (e.error == VALUE_OPTIMIZED_OUT_ERROR)
 	return NULL;
       else
 	throw_exception (e);
@@ -715,8 +715,8 @@ dwarf_expr_regnum_entry_value (void *baton, int regnum, CORE_ADDR deref_size)
       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 ENTRY_VALUE_ERROR.  */
-      throw_error (ENTRY_VALUE_ERROR,
+	 the call target.  So do not complain more than VALUE_OPTIMIZED_OUT_ERROR.  */
+      throw_error (VALUE_OPTIMIZED_OUT_ERROR,
 		   _("DW_OP_GNU_entry_value resolving cannot find "
 		     "DW_TAG_GNU_call_site %s in %s"),
 		   paddress (caller_gdbarch, caller_pc),
@@ -730,7 +730,7 @@ dwarf_expr_regnum_entry_value (void *baton, int regnum, CORE_ADDR deref_size)
 
       target_msym = lookup_minimal_symbol_by_pc (target_addr);
       func_msym = lookup_minimal_symbol_by_pc (func_addr);
-      throw_error (ENTRY_VALUE_ERROR,
+      throw_error (VALUE_OPTIMIZED_OUT_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),
@@ -1445,7 +1445,7 @@ dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
     }
   if (e.reason < 0)
     {
-      if (e.error == ENTRY_VALUE_ERROR)
+      if (e.error == VALUE_OPTIMIZED_OUT_ERROR)
 	{
 	  do_cleanups (old_chain);
 
diff --git a/gdb/exceptions.h b/gdb/exceptions.h
index 319e944..30327ff 100644
--- a/gdb/exceptions.h
+++ b/gdb/exceptions.h
@@ -78,8 +78,9 @@ enum errors {
   /* Feature is not supported in this copy of GDB.  */
   UNSUPPORTED_ERROR,
 
-  /* Failed to retrieve DW_OP_GNU_entry_value's value.  */
-  ENTRY_VALUE_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 8150d7e..5fbbe3e 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -38,6 +38,7 @@
 #include "cp-support.h"
 #include "dfp.h"
 #include "user-regs.h"
+#include "exceptions.h"
 
 #include <errno.h>
 #include "gdb_string.h"
@@ -950,7 +951,8 @@ value_fetch_lazy (struct value *val)
       if (!value_bits_valid (val,
 			     TARGET_CHAR_BIT * offset + value_bitpos (val),
 			     value_bitsize (val)))
-	error (_("value has been optimized out"));
+	throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+	             _("value has been optimized out"));
 
       store_signed_integer (value_contents_raw (val), length, byte_order, num);
     }
diff --git a/gdb/value.c b/gdb/value.c
index e5754d0..cefdcd5 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -39,6 +39,7 @@
 #include "objfiles.h"
 #include "valprint.h"
 #include "cli/cli-decode.h"
+#include "exceptions.h"
 
 #include "python/python.h"
 
@@ -422,7 +423,8 @@ static void
 require_not_optimized_out (struct value *value)
 {
   if (value->optimized_out)
-    error (_("value has been optimized out"));
+    throw_error (VALUE_OPTIMIZED_OUT_ERROR,
+		 _("value has been optimized out"));
 }
 
 const gdb_byte *


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


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

only message in thread, other threads:[~2010-09-05 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-05 10:50 [SCM] archer-jankratochvil-entryval: Use VALUE_OPTIMIZED_OUT_ERROR instead of 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).