diff options
author | Luis Machado <luisgpm@br.ibm.com> | 2012-03-08 21:07:25 +0000 |
---|---|---|
committer | Luis Machado <luisgpm@br.ibm.com> | 2012-03-08 21:07:25 +0000 |
commit | 52323be946ffc98caecb4c76ec0801e424b913ae (patch) | |
tree | 2fdd6fbef4f6e0a5ac41f1a6c462cc4bf10c6fd1 | |
parent | 4bb99ac688514ccfe849f83d1e58c908e47e30f6 (diff) | |
download | gdb-52323be946ffc98caecb4c76ec0801e424b913ae.zip gdb-52323be946ffc98caecb4c76ec0801e424b913ae.tar.gz gdb-52323be946ffc98caecb4c76ec0801e424b913ae.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ax-gdb.c | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9eb949b..611c900 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 37882be..cc057f8 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -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)); } } |