This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog cp-abi.c cp-abi.h cp-valprin ...
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 14 Feb 2011 11:35:45 -0000
- Subject: src/gdb ChangeLog cp-abi.c cp-abi.h cp-valprin ...
CVSROOT: /cvs/src
Module name: src
Changes by: palves@sourceware.org 2011-02-14 11:35:45
Modified files:
gdb : ChangeLog cp-abi.c cp-abi.h cp-valprint.c
exceptions.h gdbtypes.c gnu-v2-abi.c
gnu-v3-abi.c p-valprint.c valops.c valprint.c
valprint.h value.c
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.trace: unavailable.cc unavailable.exp
Log message:
gdb/
* exceptions.h (NOT_AVAILABLE_ERROR): New error.
* value.c: Include "exceptions.h".
(require_available): Throw NOT_AVAILABLE_ERROR instead of a
generic error.
* cp-abi.c: Include gdb_assert.h.
(baseclass_offset): Add `embedded_offset' and `val' parameters.
Assert the method is implemented. Wrap NOT_AVAILABLE_ERROR
errors.
* cp-abi.h (baseclass_offset): Add `embedded_offset' and `val'
parameters. No longer returns -1 on error.
(struct cp_abi_ops) <baseclass_offset>: Add `embedded_offset' and
`val' parameters.
* cp-valprint.c: Include exceptions.h.
(cp_print_value): Handle NOT_AVAILABLE_ERROR errors when fetching
the baseclass_offset. Handle unavailable base classes. Use
val_print_invalid_address.
* p-valprint.c: Include exceptions.h.
(pascal_object_print_value): Handle NOT_AVAILABLE_ERROR errors
when fetching the baseclass_offset. No longer expect
baseclass_offset returning -1. Handle unavailable base classes.
Use val_print_invalid_address.
* valops.c (dynamic_cast_check_1): Rename `contents' parameter to
`valaddr' parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust.
(dynamic_cast_check_2): Rename `contents' parameter to `valaddr'
parameter, and change its type to gdb_byte pointer. Add
`embedded_offset' and `val' parameters. Adjust. No longer expect
baseclass_offset returning -1.
(value_dynamic_cast): Use value_contents_for_printing rather than
value_contents. Adjust.
(search_struct_field): No longer expect baseclass_offset returning
-1.
(search_struct_method): If reading memory from the target is
necessary, wrap it in a new value to pass to baseclass_offset. No
longer expect baseclass_offset returning -1.
(find_method_list): No longer expect baseclass_offset returning
-1. Use value_contents_for_printing rather than value_contents.
* valprint.c (val_print_invalid_address): New function.
* valprint.h (val_print_invalid_address): Declare.
* gdbtypes.c (is_unique_ancestor_worker): New `embedded_offset'
and `val' parameters. No longer expect baseclass_offset returning
-1. Adjust.
* gnu-v2-abi.c: Include "exceptions.h".
(gnuv2_baseclass_offset): Add `embedded_offset' and `val'
parameters. Handle unavailable memory. Recurse through
gnuv2_baseclass_offset directly, rather than through
baseclass_offset. No longer returns -1 on not found, instead
throw an error.
* gnu-v3-abi.c (gnuv3_baseclass_offset): Add `embedded_offset' and
`val' parameters. Adjust.
gdb/testsuite/
* gdb.trace/unavailable.cc (class Base, class Middle, class
Derived): New types.
(derived_unavail, derived_partial, derived_whole): New globals.
(virtual_partial): New global.
(virtualp): Point at virtual_partial.
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Add tests
related to unavailable vptr.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12574&r2=1.12575
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-abi.c.diff?cvsroot=src&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-abi.h.diff?cvsroot=src&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-valprint.c.diff?cvsroot=src&r1=1.77&r2=1.78
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/exceptions.h.diff?cvsroot=src&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbtypes.c.diff?cvsroot=src&r1=1.213&r2=1.214
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gnu-v2-abi.c.diff?cvsroot=src&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gnu-v3-abi.c.diff?cvsroot=src&r1=1.64&r2=1.65
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/p-valprint.c.diff?cvsroot=src&r1=1.86&r2=1.87
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valops.c.diff?cvsroot=src&r1=1.271&r2=1.272
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.c.diff?cvsroot=src&r1=1.109&r2=1.110
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.h.diff?cvsroot=src&r1=1.35&r2=1.36
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/value.c.diff?cvsroot=src&r1=1.132&r2=1.133
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2582&r2=1.2583
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/unavailable.cc.diff?cvsroot=src&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/unavailable.exp.diff?cvsroot=src&r1=1.5&r2=1.6