This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ada-lang.c: Introduce type_as_string and use it


*** TEST RESULTS FOR COMMIT 99bbb428d4412b79e59df321f9e83c13342e4612 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 99bbb428d4412b79e59df321f9e83c13342e4612

ada-lang.c: Introduce type_as_string and use it

A couple wrong things here

  - We should not use target_terminal_ours when all we want is output.
    We should use target_terminal_ours_for_output instead, which
    preserves raw/cooked terminal modes, and SIGINT forwarding.

  - Most importantly, relying on stderr output immediately preceding
    the error/exception print isn't correct.  The exception could be
    caught and handled, for example; MI frontends won't display the
    stderr part in an error dialog box.  Etc.

This commit introduces a type_as_string helper that allows building a
full error string including type info.

gdb/ChangeLog:
2016-04-12  Pedro Alves  <palves@redhat.com>

	* ada-lang.c (type_as_string, type_as_string_and_cleanup): New
	functions.
	(ada_lookup_struct_elt_type): Use type_as_string_and_cleanup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]