diff options
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r-- | gdb/p-valprint.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index f7e2aae..043f98b 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -749,14 +749,16 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, { boffset = baseclass_offset (type, i, valaddr, offset, address, val); } - if (ex.reason < 0 && ex.error == NOT_AVAILABLE_ERROR) - skip = -1; - else if (ex.reason < 0) - skip = 1; - else + if (ex.reason < 0) { - skip = 0; + if (ex.error == NOT_AVAILABLE_ERROR) + skip = -1; + else + skip = 1; + } + if (skip == 0) + { /* The virtual base class pointer might have been clobbered by the user program. Make sure that it still points to a valid memory location. */ |