Commit Graph

96541 Commits

Author SHA1 Message Date
Tom Tromey d238133d02 Remove remaining cleanup from fetch_inferior_event
This removes the remaining cleanup from fetch_inferior_event,
replacing it with a SCOPE_EXIT.  This required introducing a new scope
and reindenting.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* infrun.c (reinstall_readline_callback_handler_cleanup): Remove
	parameter.
	(fetch_inferior_event): Use SCOPE_EXIT.
2019-01-23 19:14:44 +00:00
Tom Tromey 9885e6bb5b Remove cleanup from stop_all_threads
This removes the cleanup from stop_all_threads, replacing it with a
scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* infrun.c (disable_thread_events): Delete.
	(stop_all_threads): Use SCOPE_EXIT.
2019-01-23 19:14:44 +00:00
Tom Tromey 286526c1e5 Remove clear_symtab_users_cleanup
This removes clear_symtab_users_cleanup, replacing it with uses of
forward_scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* symfile.c: Include forward-scope-exit.h.
	(clear_symtab_users_cleanup): Replace forward declaration with
	a FORWARD_SCOPE_EXIT.
	(syms_from_objfile_1): Use the forward_scope_exit and
	gdb::optional instead of cleanup_function.
	(reread_symbols): Use the forward_scope_exit instead of
	cleanup_function.
	(clear_symtab_users_cleanup): Remove function.
2019-01-23 19:07:05 +00:00
Tom Tromey 1db93f14fa Remove cleanup from linux-nat.c
This removes a cleanup from linux-nat.c, replacing it with a
scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* linux-nat.c: Include scope-exit.h.
	(cleanup_target_stop): Remove.
	(linux_nat_target::static_tracepoint_markers_by_strid): Use
	SCOPE_EXIT.
2019-01-23 19:06:41 +00:00
Tom Tromey 2cc83d1e0e Remove cleanup_delete_std_terminate_breakpoint
This removes cleanup_delete_std_terminate_breakpoint, replacing it
with a use of SCOPE_EXIT.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* infcall.c (cleanup_delete_std_terminate_breakpoint): Remove.
	(call_function_by_hand_dummy): Use SCOPE_EXIT.
2019-01-23 19:06:11 +00:00
Tom Tromey 694c6bf542 Remove make_bpstat_clear_actions_cleanup
This removes make_bpstat_clear_actions_cleanup, replacing it with uses
of scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>
	    Pedro Alves  <palves@redhat.com>

	* infrun.c (fetch_inferior_event): Use scope_exit.
	* utils.h (make_bpstat_clear_actions_cleanup): Don't declare.
	* top.c (execute_command): Use scope_exit.
	* breakpoint.c (bpstat_do_actions): Use scope_exit.
	* utils.c (do_bpstat_clear_actions_cleanup)
	(make_bpstat_clear_actions_cleanup): Remove.
2019-01-23 19:05:50 +00:00
Tom Tromey 4c41382ac1 Remove delete_just_stopped_threads_infrun_breakpoints_cleanup
v3: sorted earlier in the series, and replaces the cleanup in
fetch_inferior_event here too instead of in some other patch.

This removes delete_just_stopped_threads_infrun_breakpoints_cleanup,
replacing it with uses of scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* infrun.c: Include "common/scope-exit.h"
	(delete_just_stopped_threads_infrun_breakpoints_cleanup): Remove.
	(wait_for_inferior): Use SCOPE_EXIT.
	(fetch_inferior_event): Use scope_exit.
2019-01-23 19:05:07 +00:00
Tom Tromey 89f8fb50fa Remove remaining cleanup from gdb/breakpoint.c
In v3: remove the "have BKPT_CHAIN already discarded" comment too.

The remaining null cleanup in breakpoint.c does not seem to protect
anything, so remove it.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* breakpoint.c (create_breakpoint): Remove cleanup.
2019-01-23 19:04:48 +00:00
Tom Tromey 5419bdae55 Replace delete_longjmp_breakpoint_cleanup with a forward_scope_exit type
This removes delete_longjmp_breakpoint_cleanup in favor of forward_scope_exit.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>
	    Pedro Alves  <palves@redhat.com>

	* breakpoint.c (until_break_command): Use
	delete_longjmp_breakpoint_cleanup class.
	* infcmd.c (delete_longjmp_breakpoint_cleanup): Remove function.
	(until_next_command): Use delete_longjmp_breakpoint_cleanup class.
	* inferior.h: Include forward-scope-exit.h.
	(delete_longjmp_breakpoint_cleanup): Replace function declaration
	with FORWARD_SCOPE_EXIT type.
2019-01-23 19:04:26 +00:00
Pedro Alves e587ef421e Use SCOPE_EXIT in gdbarch-selftest.c
Replace the custom local class with a SCOPE_EXIT.

gdb/ChangeLog:
2019-01-23  Pedro Alves  <palves@redhat.com>

	* gdbarch-selftests.c (struct on_exit): Use SCOPE_EXIT.
2019-01-23 19:04:07 +00:00
Pedro Alves 77f0e74cbe Use forward_scope_exit for scoped_finish_thread_state
This reimplements the manually-written scoped_finish_thread_state
class as a forward_scope_exit instantiation.  forward_scope_exit has
the same interface as scoped_finish_thread_state, so nothing else has
to change.

A forward_scope_exit is preferred over make_scope_exit here because
infrun.c:normal_stop needs to wrap scoped_finish_thread_state in a
gdb::optional.  Since we need the type there, might as well use it
everywhere.

gdb/ChangeLog:
2019-01-23  Pedro Alves  <palves@redhat.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>

	* gdbthread.h: Include "common/forward-scope-exit.h".
	(scoped_finish_thread_state): Redefine custom class in terms of
	forward_scope_exit.
2019-01-23 19:03:48 +00:00
Pedro Alves 5b9b3e53a6 Introduce forward_scope_exit
This adds a template that can be used to automatically instantiate
scope_exit-like types that wrap some cleanup function.  The
instantiated type has a ctor that has the same interface as the
wrapped function.  While the "magic" is just straight C++11, the
intended use is via the FORWARD_SCOPE_EXIT macro, which is a minimal
macro that avoids spelling out the wrapped function name more than
once:

 void some_function (int foo, object *bar);
 using some_function_fce = FORWARD_SCOPE_EXIT (some_function);
 some_function_fce cleanup (some_int, some_obj_ptr);

The above runs:
  some_function (some_int, some_obj_ptr);
at scope exit.

This is mainly useful as opposed to a simpler SCOPE_EXIT when you need
to:
  - cancel the scope_exit, in which case you need the object's name
  - wrap the scope_exit in a gdb::optional, in which case you need the
    scope_exit's type in advance.

More details in the code comments.

gdb/ChangeLog:
2019-01-23  Pedro Alves  <palves@redhat.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>

	* common/forward-scope-exit.h: New file.
2019-01-23 19:03:20 +00:00
Pedro Alves 54b65c9b51 Introduce scope_exit
This add a new template class scope_exit.  scope_exit is a
general-purpose scope guard that calls its exit function at the end of
the current scope.  A scope_exit may be canceled by calling the
"release" method.  The API is modeled on P0052R5 - Generic Scope Guard
and RAII Wrapper for the Standard Library, which is itself based on
Andrej Alexandrescu's ScopeGuard/SCOPE_EXIT.

The main advantage of scope_exit is avoiding writing single-use RAII
classes and its boilerplate.  Following patches will remove a few of
such classes.

There are two forms available:

 - The "make_scope_exit" form allows canceling the scope guard.  Use
   it like this:

     auto cleanup = make_scope_exit ( <function, function object, lambda> );
     ...
     cleanup.release (); // cancel

 - If you don't need to cancel the guard, you can use the SCOPE_EXIT
   macro, like this:

     SCOPE_EXIT { /* any code you like here. */ }

Note: scope_exit instances do not allocate anything on the heap.

gdb/ChangeLog:
2019-01-23  Pedro Alves  <palves@redhat.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>
	    Tom Tromey  <tom@tromey.com>

	* common/scope-exit.h: New file.
2019-01-23 19:02:58 +00:00
Pedro Alves cf08fb29f8 Rename ESC -> ESC_PARENS
A following patch will include common/preprocessor.h in some .c file
that also includes readline.h, and that revealed a conflict -- ESC is
defined by readline.h as well (actually readline's chardefs.h) with a
completely unrelated meaning:

 #define ESC CTRL('[')

Rename our version to avoid the conflict.

gdb/ChangeLog:
2019-01-23  Pedro Alves  <palves@redhat.com>

	* common/preprocessor.h (ESC): Rename to ...
	(ESC_PARENS): ... this.
	* common/valid-expr.h (CHECK_VALID_EXPR_1, CHECK_VALID_EXPR_2)
	(CHECK_VALID_EXPR_3, CHECK_VALID_EXPR_4): Adjust.
2019-01-23 18:58:28 +00:00
Tom Tromey ae73e2e243 Remove a warning from symtab.c
When building symtab.c, I get:

../../binutils-gdb/gdb/language.h: In function ‘void print_symbol_info(search_domain, symbol*, int, const char*)’:
../../binutils-gdb/gdb/language.h:738:20: warning: ‘*((void*)& l +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       set_language (m_lang);
       ~~~~~~~~~~~~~^~~~~~~~
../../binutils-gdb/gdb/symtab.c:4613:41: note: ‘*((void*)& l +4)’ was declared here
   scoped_switch_to_sym_language_if_auto l (sym);
                                         ^

This is another instance of the std::optional problem, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635.

However, it seemed straightforward and inexpensive to me to silence
this one, which is what this patch does.

gdb/ChangeLog
2019-01-23  Tom Tromey  <tom@tromey.com>

	* language.h (class scoped_switch_to_sym_language_if_auto):
	Initialize m_lang in both cases.
2019-01-23 10:34:55 -07:00
Alan Hayward 6594e12286 AArch64: Ensure lwp info is created zeroed
The code to not set empty hardware BPs/WPs on new threads will only work
if the newly allocated struct is empty.

Ensure the structure is created zeroed.

This patch removes the remaining racy behaviour on gdb.threads tests
when run on AArch64 Ubuntu.

gdb/ChangeLog:

	* nat/aarch64-linux.c (aarch64_linux_new_thread): Replace XNEW
	with XCNEW.
2019-01-23 11:51:34 +00:00
Nick Clifton d99386305c Updated translations for some of the binutils subdirectory. 2019-01-23 10:26:54 +00:00
Sebastian Huber 6406a2701b ld: Add LTO warning to --wrap documentation
ld/

	* ld.texi (--wrap): Add warning that LTO may make this feature
	ineffective.
2019-01-23 09:47:28 +01:00
Tom Tromey a7c9855d03 corelow.c does not need sys/file.h
I did not see any reason that corelow.c should include <sys/file.h>.
The provided explanatory comment seems to be wrong.  This patch
removes the include.

2019-01-22  Tom Tromey  <tom@tromey.com>

	* corelow.c: Do not include sys/file.h.
2019-01-22 20:35:59 -07:00
Tom Tromey 71ba91e1c0 Include coff/sym.h from coff/ecoff.h
coff/ecoff.h refers to some names defined in coff/sym.h.  Include the
latter from the former, so that users of the header don't need to know
this detail.

2019-01-22  Tom Tromey  <tom@tromey.com>

	* coff/ecoff.h: Include coff/sym.h.
2019-01-22 20:35:59 -07:00
Tom Tromey 93cc1d53f5 Include gdb_curses.h in tui-wingeneral.h
tui-wingeneral.h uses WINDOW, which is defined by curses.  So, include
gdb_curses.h from tui-wingeneral.h.

2019-01-22  Tom Tromey  <tom@tromey.com>

	* tui/tui-wingeneral.h: Include gdb_curses.h.
2019-01-22 20:35:59 -07:00
Tom Tromey 38561778f3 Rename "lines" parameter in source-cache.h
A compile in the TUI somehow had "lines" defined as a macro.  This
caused a compile error when including source-cache.h after whatever
header did that.  I tracked this down to a #define in
/usr/include/term.h, so I just changed source-cache.h to avoid the
clash.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* source-cache.h (class source_cache) <get_source_lines,
	get_plain_source_lines, extract_lines>: Rename "lines" parameter.
2019-01-22 20:35:59 -07:00
Tom Tromey 37b3ab5b54 Declare remote_target in remote-fileio.h
remote-fileio.h refers to remote_target, so forward-declare it.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* remote-fileio.h (struct remote_target): Declare.
2019-01-22 20:35:21 -07:00
Tom Tromey 3fabc0163a Do not include py-ref.h in most files
py-ref.h can really only be included from a specific spot in
python-internal.h.  The other includes are not useful, and cause
compilation errors if the includes are ever sorted.  So, remove these
includes.

Arguably, py-ref.h should simply not be a separate header.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* python/py-arch.c: Do not include py-ref.h.
	* python/py-bpevent.c: Do not include py-ref.h.
	* python/py-cmd.c: Do not include py-ref.h.
	* python/py-continueevent.c: Do not include py-ref.h.
	* python/py-event.h: Do not include py-ref.h.
	* python/py-evtregistry.c: Do not include py-ref.h.
	* python/py-finishbreakpoint.c: Do not include py-ref.h.
	* python/py-frame.c: Do not include py-ref.h.
	* python/py-framefilter.c: Do not include py-ref.h.
	* python/py-function.c: Do not include py-ref.h.
	* python/py-infevents.c: Do not include py-ref.h.
	* python/py-linetable.c: Do not include py-ref.h.
	* python/py-objfile.c: Do not include py-ref.h.
	* python/py-param.c: Do not include py-ref.h.
	* python/py-prettyprint.c: Do not include py-ref.h.
	* python/py-progspace.c: Do not include py-ref.h.
	* python/py-symbol.c: Do not include py-ref.h.
	* python/py-symtab.c: Do not include py-ref.h.
	* python/py-type.c: Do not include py-ref.h.
	* python/py-unwind.c: Do not include py-ref.h.
	* python/py-utils.c: Do not include py-ref.h.
	* python/py-value.c: Do not include py-ref.h.
	* python/py-varobj.c: Do not include py-ref.h.
	* python/py-xmethods.c: Do not include py-ref.h.
	* python/python.c: Do not include py-ref.h.
	* varobj.c: Do not include py-ref.h.
2019-01-22 20:35:21 -07:00
Tom Tromey 6b4d777433 Use "struct bcache" in objfiles.h
If objfiles.h is included after bcache.h, then the "bcache" function
will cause a compiler error because "bcache" will be seen as a
function, not a type.  Fix this error by using the "struct" keyword.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* objfiles.h (struct objfile_per_bfd_storage): Use "struct"
	keyword for bcache.
2019-01-22 20:35:20 -07:00
Tom Tromey 7af7e9b5d8 Remove a comment in compile/compile-cplus-types.c
The include sorter can't handle multi-line comments on the same line
as a #include.  This patch removes the only such comment.

In general I think these sorts of comments do not provide much value:
more often than not, I find that the comment is obsolete in one way or
another, and so the include sorter removes them in most cases.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* compile/compile-cplus-types.c: Remove a comment by #include.
2019-01-22 20:35:20 -07:00
Tom Tromey 951d1049fa Include compile-internal.h in gcc-c-plugin.h
gcc-c-plugin.h refers to some types defined in compile-internal.h.
This patch changes the former to include the latter.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* compile/gcc-c-plugin.h: Include compile-internal.h.
2019-01-22 20:35:19 -07:00
GDB Administrator 2e8db3703b Automatic date update in version.in 2019-01-23 00:00:31 +00:00
Tom Tromey d65d5705cd Remove the EXTERN define from stabsread.h
This removes the EXTERN define from stabsread.h.  This is the only
spot that still uses this approach, and it interfered with sorting the
includes in stabsread.c.

Tested by rebuilding.

gdb/ChangeLog
2019-01-22  Tom Tromey  <tom@tromey.com>

	* stabsread.c (EXTERN): Do not define.
	(symnum, next_symbol_text_func, processing_gcc_compilation)
	(within_function, global_sym_chain, global_stabs)
	(previous_stab_code, this_object_header_files)
	(n_this_object_header_files)
	(n_allocated_this_object_header_files): Define.
	* stabsread.h (EXTERN): Never define.  Use "extern".
2019-01-22 16:00:05 -07:00
GDB Administrator b1afaa3566 Automatic date update in version.in 2019-01-22 00:00:30 +00:00
Philippe Waroquiers b6fb1ee51c Fix leak in event-top.c history expansion
E.g. in gdb.base/default.exp, valgrind detects leaks such as
==17663== 1,438 bytes in 101 blocks are definitely lost in loss record 2,804 of 2,884
==17663==    at 0x4C2BE6D: malloc (vg_replace_malloc.c:309)
==17663==    by 0x418A17: xmalloc (common-utils.c:44)
==17663==    by 0x4E6F19C: history_expand (histexpand.c:1061)
==17663==    by 0x4B4490: handle_line_of_input(buffer*, char const*, int, char const*) (event-top.c:685)
==17663==    by 0x4B4562: command_line_handler(std::unique_ptr<char, gdb::xfree_deleter<char> >&&) (event-top.c:753)
...

Fix the leak by using an unique_xmalloc_ptr for history_value.

gdb/ChangeLog
2019-01-22  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* event-top.c (handle_line_of_input): use unique_xmalloc_ptr for
	history_value.
2019-01-21 21:19:13 +01:00
Tom Tromey be6d4f74c7 Remove duplicate or commented-out #includes
I wrote a little script to detect duplicate or commented-out #includes
and ran it on gdb.  This patch is the result.  Tested by rebuilding.

gdb/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

	* ui-out.c: Fix includes.
	* tui/tui-source.c: Fix includes.
	* target.c: Fix includes.
	* remote.c: Fix includes.
	* regcache.c: Fix includes.
	* python/py-block.c: Fix includes.
	* printcmd.c: Fix includes.
	* or1k-tdep.c: Fix includes.
	* mi/mi-main.c: Fix includes.
	* m32r-tdep.c: Fix includes.
	* csky-tdep.c: Fix includes.
	* compile/compile-cplus-types.c: Fix includes.
	* cli/cli-interp.c: Fix includes.

gdb/gdbserver/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

	* tracepoint.c: Fix includes.
	* remote-utils.c: Fix includes.
	* linux-x86-low.c: Fix includes.

gdb/stubs/ChangeLog
2019-01-21  Tom Tromey  <tom@tromey.com>

	* ia64vms-stub.c: Fix includes.
2019-01-21 11:14:07 -07:00
Tom Tromey d7167c671d Fix leak in splay-tree
Philippe Waroquiers noticed a memory leak in gdb, which he tracked
down to a bug in splay-tree.  splay_tree_remove does not call the
`delete_key' function when it removes the old node; but it should.

I looked at every splay tree in GCC and there is only one that passes
a non-NULL delete function -- the one in lto.c.  That file does not
call splay_tree_remove.  So, I think this is safe to check in.

I re-ran the LTO tests to double check.

libiberty/
	* splay-tree.c (splay_tree_remove): Delete the key if necessary.
2019-01-21 09:05:01 -07:00
Alan Hayward 73021deb50 AArch64 AAPCS: Empty structs have non zero size in C++
When gdb.base/infcall-nested-structs.c is complied as C++, the compiler
will not pass structs containing empty structs via float arguments.
This is because structs in C++ have a minimum size of 1, causing padding
in the struct once compiled.  The AAPCS does not allow structs with
padding to be passed in float arguments.

Add padding checks to AArch64 and add C++ compile variant to the test.

Some of the tests fail on X86_64. This has been raised as bug gdb/24104.

gdb/ChangeLog:

	* aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
	for padding.

gdb/testsuite/ChangeLog:

	* gdb.base/infcall-nested-structs.exp: Test C++ in addition to C.
2019-01-21 15:51:49 +00:00
Nick Clifton a6c9b40429 Updated Brazilian Portuguese translation for the ld/ subdirectory. 2019-01-21 13:05:44 +00:00
Nick Clifton 375cd4233d Updated translations for various binutils subdirectories. 2019-01-21 12:59:20 +00:00
Yuri Chornoivan acef8081ec Fix spelling mistakes in BFD library.
PR 24108
bfd	* elf32-nds32.c (nds32_relocate_section): Add space between words
	in error message.
	* elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
	error message.
	(riscv_i_or_e_p): Likewise.
	(riscv_merge_arch_attr_info): Likewise.

ld	* testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Update
	expected error message.
2019-01-21 12:39:24 +00:00
Alan Hayward fc65c7dbe0 Testsuite: Ensure stack protection is off for GCC
Using -fstack-protector-strong will cause GDB to break on the wrong line
when placing a breakpoint on a function.  This is due to inadequate dwarf
line numbering, and is being tracked by the GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88432

GCC (and Clang) provided by Debian/Ubuntu default to stack protector
being enabled.

Ensure that when running the GDB testsuite, stack protector is always
turned off for GCC 4.1.0 (when stack protector was added) and above.

Ensure that this does not cause infinite recursion due to
test_compiler_info having to compile a file itself.

Add a test to explicitly test breakpoints with various levels of stack
protection on both GCC and Clang, with xfail for the known errors.

Restore change in ovldbreak.exp which worked around the issue.

gdb/testsuite/ChangeLog:

2019-01-18  Alan Hayward  <alan.hayward@arm.com>

	* gdb.base/stack-protector.c: New test.
	* gdb.base/stack-protector.exp: New file.
	* gdb.cp/ovldbreak.exp: Only allow a single break line.
	* lib/gdb.exp (get_compiler_info): Use getting_compiler_info
	option.
	(gdb_compile): Remove stack protector for GCC and prevent
	recursion.
2019-01-21 10:43:53 +00:00
GDB Administrator 111f47f3e4 Automatic date update in version.in 2019-01-21 00:00:29 +00:00
Chenghua Xu 57299f4831 [MIPS] fix typo in mips_arch_choices.
opcodes/
	* mips-dis.c (mips_arch_choices): Fix typo in
	gs464, gs464e and gs264e descriptors.
2019-01-20 02:36:40 +00:00
GDB Administrator 3e80dafbfe Automatic date update in version.in 2019-01-20 00:01:16 +00:00
Nick Clifton f48dfe417e Change version to 2.32.51 and regenerate configure and pot files. 2019-01-19 16:51:42 +00:00
Nick Clifton f974f26cb1 Add markers for 2.32 branch to NEWS and ChangeLog files. 2019-01-19 15:55:50 +00:00
GDB Administrator f3be6050c8 Automatic date update in version.in 2019-01-19 00:00:46 +00:00
GDB Administrator 241110d6cd Automatic date update in version.in 2019-01-18 00:00:50 +00:00
Tom Tromey 7932255de5 Make minimal symbol range adapter a method on objfile
This removes class objfile_msymbols in favor of a method on the
objfile.

2019-01-16  Tom Tromey  <tom@tromey.com>

	* objfiles.h (struct minimal_symbol_iterator): Rename.  Move
	earlier.
	(struct objfile) <msymbols_range>: Move from top level.
	<msymbols>: New method.
	(class objfile_msymbols): Remove.
	* symtab.c (default_collect_symbol_completion_matches_break_on):
	Update.
	* symmisc.c (dump_msymbols): Update.
	* stabsread.c (scan_file_globals): Update.
	* objc-lang.c (info_selectors_command, info_classes_command)
	(find_methods): Update.
	* minsyms.c (find_solib_trampoline_target): Update.
	* hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Update.
	* coffread.c (coff_symfile_read): Update.
	* ada-lang.c (ada_lookup_simple_minsym)
	(ada_collect_symbol_completion_matches): Update.
2019-01-17 15:43:37 -07:00
Tom Tromey 604b1bfb46 Simplify minsym iteration
This simplifies the minimal symbol iterator, by using
minimal_symbol_count and just doing a somewhat ordinary array-like
iteration.  array_view is nearly usable, except that it is more
convenient for this iterator to return pointers rather than
references.

gdb/ChangeLog
2019-01-16  Tom Tromey  <tom@tromey.com>

	* objfiles.h (class objfile_msymbols) <iterator>: Change argument
	type.  Remove no-argument constructor.
	<iterator::operator++>: Simplify.
	<begin>: Update.
	<end>: Use minimal_symbol_count.
2019-01-17 15:42:26 -07:00
Tom Tromey f252c6d5dc Make psymtab range adapter a method on objfile
This removes the objfile_psymtabs class in favor of a method on
objfile and on psymtab_storage.

2019-01-16  Tom Tromey  <tom@tromey.com>

	* objfiles.h (struct objfile) <psymtabs>: New method.
	(class objfile_psymtabs): Remove.
	* psymtab.h (class psymtab_storage) <partial_symtab_range>: New
	typedef.
	<range>: New method.
	(require_partial_symbols): Change return type.
	* psymtab.c (require_partial_symbols)
	(psym_expand_symtabs_matching): Update.
	* mdebugread.c (parse_partial_symbols): Update.
	* dbxread.c (dbx_end_psymtab): Update.
2019-01-17 15:42:05 -07:00
Tom Tromey b669c95337 Add compunits range adapter to objfile
This removes the objfile_compunits range adapter in favor of using a
method on objfile.

2019-01-15  Tom Tromey  <tom@tromey.com>

	* symtab.c (lookup_objfile_from_block)
	(lookup_symbol_in_objfile_symtabs)
	(basic_lookup_transparent_type_1, find_pc_sect_compunit_symtab)
	(find_line_symtab, info_sources_command)
	(default_collect_symbol_completion_matches_break_on)
	(make_source_files_completion_list): Update.
	* symmisc.c (print_objfile_statistics, dump_objfile)
	(maintenance_print_symbols, maintenance_info_symtabs)
	(maintenance_check_symtabs, maintenance_info_line_tables):
	Update.
	* source.c (select_source_symtab)
	(forget_cached_source_info_for_objfile): Update.
	* objfiles.h (class objfile_compunits): Remove.
	(struct objfile) <compunits_range>: New typedef.
	(compunits): New method.
	* objfiles.c (objfile_relocate1): Update.
	* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
	* maint.c (count_symtabs_and_blocks): Update.
	* linespec.c (iterate_over_all_matching_symtabs): Update.
	* cp-support.c (add_symbol_overload_list_qualified): Update.
	* coffread.c (coff_symtab_read): Update.
	* ada-lang.c (add_nonlocal_symbols)
	(ada_collect_symbol_completion_matches)
	(ada_add_global_exceptions): Update.
2019-01-17 15:42:05 -07:00
Tom Tromey 7e955d83c4 Change all_objfiles_safe adapter to be a method on program_space
This changes the all_objfiles_safe range adapter to be a method on the
program space, and fixes up all the users.

gdb/ChangeLog
2019-01-15  Tom Tromey  <tom@tromey.com>

	* progspace.h (program_space) <objfiles_safe_range>: New
	typedef.
	<objfiles_safe>: New method.
	* objfiles.h (class all_objfiles_safe): Remove.
	* objfiles.c (free_all_objfiles, objfile_purge_solibs): Update.
	* jit.c (jit_inferior_exit_hook): Update.
2019-01-17 15:42:00 -07:00