gdb/
* printcmd.c (current_display_number): Update comment.
(disable_current_display_cleanup): Delete.
(do_one_display): Use make_cleanup_restore_integer. Gracefully
catch errors thrown while evaluating and printing the display.
gdb/testsuite/
* gdb.base/display.c (do_loops): New `p_i' local.
* gdb.base/display.exp: Test displaying a variable that is
temporarily at a bad address.
* gdb.cp/formatted-ref.exp (test_p_x_ref_addr): Allow the reference
to be in memory.
* gdb.base/display.c (force_mem): New.
(do_loops): Use it. Add breakpoint comments.
(do_vars): Add a breakpoint comment.
* gdb.base/display.exp: Use gdb_get_line_number. Remove hardcoded
line numbers.