2012-03-08 Luis Machado <lgustavo@codesourcery.com>
authorLuis Machado <luisgpm@br.ibm.com>
Thu, 8 Mar 2012 21:07:25 +0000 (21:07 +0000)
committerLuis Machado <luisgpm@br.ibm.com>
Thu, 8 Mar 2012 21:07:25 +0000 (21:07 +0000)
* ax-gdb.c (gen_fetch): Fail gracefully and use error instead
of internal error for unknown/unsupported types.

gdb/ChangeLog
gdb/ax-gdb.c

index 9eb949bc176948795ce4eacd761fef3d9dda4cb8..611c900e0efb33e0068509cd8d972db48227cf5e 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-08  Luis Machado  <lgustavo@codesourcery.com>
+
+       * ax-gdb.c (gen_fetch): Fail gracefully and use error instead
+       of internal error for unknown/unsupported types.
+
 2012-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix CU relative vs. absolute DIE offsets.
index 37882be0a5c12783c2e7c9d92accd22eeb5a8409..cc057f89a02a4ca57c6b2d466f11921ec713e5a3 100644 (file)
@@ -553,12 +553,11 @@ gen_fetch (struct agent_expr *ax, struct type *type)
       break;
 
     default:
-      /* Either our caller shouldn't have asked us to dereference that
-         pointer (other code's fault), or we're not implementing
-         something we should be (this code's fault).  In any case,
-         it's a bug the user shouldn't see.  */
-      internal_error (__FILE__, __LINE__,
-                     _("gen_fetch: bad type code"));
+      /* Our caller requested us to dereference a pointer from an unsupported
+        type.  Error out and give callers a chance to handle the failure
+        gracefully.  */
+      error (_("gen_fetch: Unsupported type code `%s'."),
+            TYPE_NAME (type));
     }
 }
 
This page took 0.027357 seconds and 4 git commands to generate.