Fix regression for gdb.cp/gdb2495.exp with gcc-4.7.
* arch-utils.c (displaced_step_at_entry_point): Incrase BP_LEN skip to
3 times.
* infcall.c (call_function_by_hand) <AT_SYMBOL>: Move it upwards and
fall through into AT_ENTRY_POINT.
(call_function_by_hand) <AT_ENTRY_POINT>: New variable bp_len. Adjust
DUMMY_ADDR with it.
* ppc-linux-tdep.c (ppc_linux_displaced_step_location): Increase
PPC_INSN_SIZE skip to 3 times.
* amd64-linux-nat.c (update_debug_registers_callback): New comment on
the return value.
* i386-linux-nat.c (update_debug_registers_callback): Likewise.
gdb/testsuite/
* gdb.python/py-finish-breakpoint.exp: Add `.' prefix for ppc64
* gdb.python/py-finish-breakpoint2.exp: Skip testcase if python support
is not enabled.
* gdb.python/py-finish-breakpoint.c (test_exec_exit): Change the
parameter to self_exec, adjust the function.
(main): Check for argv[1] "exit". Use argv[0] for test_exec_exit.
* gdb.python/py-finish-breakpoint.exp (set var self_exec = 0): New test.
(set var do_exit = 0): Remove test.
(newline at end of file): Add one.
... to avoid code duplication.
gdb/ChangeLog:
* ada-lang.c (should_use_wild_match): New function.
(ada_lookup_simple_minsym): Use should_use_wild_match.
Minor simplification. Add comment.
(ada_lookup_symbol_list): Use should_use_wild_match.
Minor simplification.
... and replace it with call to xsnprintf, following GDB's coding rules.
gdb/ChangeLog:
* py-finishbreakpoint.c (bpfinishpy_init): Replace call to
sprintf by call to xsnprintf.
gdb/ChangeLog:
* linespec.c (struct collect_minsyms) [list_mode]: New field.
(add_minsym): Ignore data symbols if not in list mode.
(search_minsyms_for_name): Set local.list_mode.
gdb/testsuite/ChangeLog:
* gdb.base/dmsym.c, gdb.base/dmsym_main.c, gdb.base/dmsym.exp:
New files.
On Windows hosts, gdb_realpath is just an xstrdup. This makes filename
comparisons on Windows very chancy. Normally, we would normalize both
paths, and then compare. But since the normalization doesn't do
anything, two equivalent names on Windows might not match. This can
happen when trying to insert a breakpoint using the fullpath of a file.
For instance, if the compiler generated debug info that says that
the compilation directory is: `c:\\some\\double\\slashes\\dir', then
trying to insert a breakpoint on `c:/some/double/slashes/dir/foo.c:4'
does not work:
(gdb) b c:/some/double/slashes/dir/foo.c:4
No source file named c:/some/double/slashes/dir/foo.c:4.
(gdb) b c:\some\double\slashes\dir\foo.c:4
No source file named c:\some\double\slashes\dir\foo.c:4.
This fixes the problem by enhancing gdb_realpath on Windows hosts.
The code is inspired from libiberty's lrealpath.
gdb/ChangeLog:
* utils.c (gdb_realpath): Add better support for Windows hosts.
Fix racy FAILs.
* gdb.threads/fork-thread-pending.c (barrier): New variable.
(thread_function, thread_forker): Call pthread_barrier_wait for it.
(main): Call pthread_barrier_init for it.
* Makefile.in (SUBDIR_PYTHON_OBS): Add py-finishbreakpoint.o.
(SUBDIR_PYTHON_SRCS): Add python/py-finishbreakpoint.c.
Add build rule for this file.
* infcmd.c (print_return_value): Split to create get_return_value.
(get_return_value): New function based on print_return_value. Handle
case where stop_registers are not set.
* inferior.h (get_return_value): New prototype.
* python/py-breakpoint.c (bppy_pending_object): Make non-static.
(gdbpy_breakpoint_created): Set is_py_finish_bp is necessary.
(struct breakpoint_object): Move to python-internal.h
(BPPY_REQUIRE_VALID): Likewise.
(BPPY_SET_REQUIRE_VALID): Likewise.
(gdbpy_breakpoint_created): Initialize is_finish_bp.
(gdbpy_should_stop): Add pre/post hooks before/after calling stop
method.
* python/python-internal.h (breakpoint_object_type): Add as extern.
(bppy_pending_object): Likewise.
(typedef struct breakpoint_object) Removed.
(struct breakpoint_object): Moved from py-breakpoint.c.
Add field is_finish_bp.
(BPPY_REQUIRE_VALID): Moved from py-breakpoint.c.
(BPPY_SET_REQUIRE_VALID): Likewise.
(frame_object_to_frame_info): New prototype.
(gdbpy_initialize_finishbreakpoints): New prototype.
(bpfinishpy_is_finish_bp): Likewise.
(bpfinishpy_pre_stop_hook): Likewise.
(bpfinishpy_post_stop_hook): Likewise.
* python/py-finishbreakpoint.c: New file.
* python/py-frame.c(frame_object_to_frame_info): Make non-static and
accept PyObject instead of frame_object.
(frapy_is_valid): Don't cast to frame_object.
(frapy_name): Likewise.
(frapy_type): Likewise.
(frapy_unwind_stop_reason): Likewise.
(frapy_pc): Likewise.
(frapy_block): Likewise.
(frapy_function): Likewise.
(frapy_older): Likewise.
(frapy_newer): Likewise.
(frapy_find_sal): Likewise.
(frapy_read_var): Likewise.
(frapy_select): Likewise.
* python/python.c (gdbpy_is_stopped_at_finish_bp): New noop function.
(_initialize_python): Add gdbpy_initialize_finishbreakpoints.
* python/python.h: Include breakpoint.h
(gdbpy_is_stopped_at_finish_bp): New prototype.
doc/
* gdb.texinfo (Finish Breakpoints in Python): New subsection.
(Python API): Add menu entry for Finish Breakpoints.
testsuite/
* Makefile.in (EXECUTABLES): Add py-finish-breakpoint and
py-finish-breakpoint2
(MISCALLANEOUS): Add py-events-shlib.so and py-events-shlib-nodebug.so
* gdb.python/py-breakpoint.exp (mult_line): Define and use variable
instead of line number.
* gdb.python/py-finish-breakpoint.c: New file.
* gdb.python/py-finish-breakpoint.exp: New file.
* gdb.python/py-finish-breakpoint.py: New file.
* gdb.python/py-finish-breakpoint2.cc: New file.
* gdb.python/py-finish-breakpoint2.exp: New file.
* gdb.python/py-finish-breakpoint2.py: New file.
Partial fix of compatibility with gcc-4.7.
* gdb.cp/templates.exp (ptype T5<int>, ptype t5i): Turn all PASS cases
into XFAIL "new without size_t". Permit size_t for the KFAIL case.
Add comment to add a PASS case in the future.
* symfile.c (objfilep): New typedef and new DEF_VEC_P.
(reread_symbols): Remove variable reread_one, new variables
new_objfiles, all_cleanups and ix. Use new_objfiles instead of
reread_one. Push changed objfiles to new_objfiles, call
observer_notify_new_objfile for them later.
We are iterating over all symbols in a partial symtab that would
match a given name, so we should match the partial symbols
search name against the given name rather than using the natural
name. In C++, that does not make a difference, but it does in
Ada, because Ada searches using the symbol encoded name...
We also update the generation of the .gdb_index file to match this
change in the search. Although technically an incompatible change,
we do not increment the gdb_index version number, because Ada is
the only language where it would make a difference - except that
this feature is not supported for Ada.
gdb/ChangeLog:
* psymtab.c (expand_symtabs_matching_via_partial): Match
the partial symbols using their SYMBOL_SEARCH_NAME.
* symfile.h (struct quick_symbol_functions): Udate the
documentation of expand_symtabs_matching.
* dwarf2read.c (write_psymbols): Use SYMBOL_SEARCH_NAME instead
of SYMBOL_NATURAL_NAME in index entry.
This patch enhances the linespec parser to recognize unqualified
operator names in linespecs. This allows the user to insert a breakpoint
on operator "+" as follow, for instance:
(gdb) break "+"
Previously, it was possible to insert such a breakpoint, but one
had to fully qualify the function name. For instance:
(gdb) break ops."+"
gdb/ChangeLog:
* linespec.c (locate_first_half): Add handling of Ada operators
when the current language is Ada.
This fixes a problem where the debugger is trying to locate a minimal
symbol from its address, when the symbol is inside a section whose
VMA is different from its LMA.
We have a program that was built on ppc-elf using a linker script
such that data sections are placed in ROM, and then loaded onto RAM
at execution. So their VMA addresses are indeed different from
their LMA address.
Unfortunately, there is one place where GDB gets slightly confused
into thinking that these data sections are overlayed, while it's
not the case here. This show up when trying to print the list of
Ada tasks, where GDB is unable to determine their names, and thus
prints a generic `Ravenscar task' instead:
(gdb) info tasks
ID TID P-ID Pri State Name
1 1d580 127 Delay Sleep Ravenscar task
2 183f8 127 Delay Sleep Ravenscar task
* 3 13268 127 Runnable Ravenscar task
We expected:
(gdb) info tasks
ID TID P-ID Pri State Name
1 1d580 127 Delay Sleep environment_task
2 183f8 127 Delay Sleep raven2
* 3 13268 127 Runnable raven1
The name of the task is determined by looking up the symbol table
using the task ID, which is the address where the symbol is defined.
So, ada-tasks calls...
msym = lookup_minimal_symbol_by_pc (task_id);
... which in turn first tries to determine the section associated
to this address (find_pc_section), which itself uses a map of sections
to find it. The map itself is recomputed every time objfiles are
loaded/changed by `update_section_map'. And `update_section_map'
relies on `insert_section_p' to determine whether the section should
be inserted in the map or not.
This is where things get interesting for us, because `insert_section_p'
simply rejects overlay sections:
if (lma != 0 && lma != bfd_section_vma (abfd, section)
&& (bfd_get_file_flags (abfd) & BFD_IN_MEMORY) == 0)
/* This is an overlay section. IN_MEMORY check is needed to avoid
discarding sections from the "system supplied DSO" (aka vdso)
on some Linux systems (e.g. Fedora 11). */
return 0;
However, it shouldn't reject our section in this case, since overlay
debugging is off. The fix is to add a check that overlay debugging
is active before rejecting the section. This is similar to what is
done in `section_is_overlay' (which takes obj_section objects), for
instance.
gdb/Changelog:
* objfiles.c (insert_section_p): Do not detect overlay sections
if overlay debugging is off.
Consider the following declaration:
package Pck is
task Dummy_Task is
entry Start;
end Dummy_Task;
end Pck;
Inserting a breakpoint on the body of that task does not currently
work:
(gdb) b pck.dummy_task
"pck.dummy_task" is not a function
Make breakpoint pending on future shared library load? (y or [n]) n
What happens here is that the compiler generates two symbols:
(a) Symbol `pck__dummy_task' which is a *variable* referencing
the task;
(b) Symbol `pck__dummy_taskTKB' which is the subprogram implementing
the body of the task.
The symbol lookup only finds the variable before of the TKB suffix in
the subprogram name. This patch fixes the problem by adjusting the
ada-lang.c:is_name_suffix routine to recognize "TKB" suffixes. But
that's not enough, because the search in the symtab is performed via
the block dictionary, using a hashing algorithm. So, for the search
to find `pck__dummy_taskTKB', I had to modify the hashing function
to ignore TKB suffixes as well.
gdb/ChangeLog:
* ada-lang.c (is_name_suffix): Add handling of "TKB" suffixes.
Update function documentation.
* dictionary.c (dict_hash): Ignore "TKB" suffixes in hash
computation.
gdb/testsuite/ChangeLog:
* gdb.ada/task_bp: New testcase.
Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-nat.c (add_lwp): Don't call linux_nat_new_thread on the
first LWP.
* amd64-linux-nat.c (update_debug_registers_callback): Instantiate
`lwp->arch_private' if NULL.
(amd64_linux_prepare_to_resume): Do nothing if `lwp->arch_private'
is NULL.
* i386-linux-nat.c (update_debug_registers_callback): Instantiate
`lwp->arch_private' if NULL.
(i386_linux_prepare_to_resume): Do nothing if `lwp->arch_private'
is NULL.
* symfile.c (reread_symbols): Move free_objfile_separate_debug,
preserve_values, sym_finish and clear_objfile_data calls before BFD
close. Move free_objfile_separate_debug as the very first call. New
comment on the ordering.
gdb/testsuite/
* gdb.base/reread.exp: If srcfile2 fails to build retry it with
-DNO_SECTIONS.
* gdb.base/reread2.c <!NO_SECTIONS>: New sections block.
* gdb.cp/ptype-cv-cp.exp (ptype v_volatile_const_my_int): Make
PR gcc/45997 XFAIL conditional for gcc <= 4.5.
* gdb.python/py-type.exp (python print ttype.template_argument(2)):
Change PR gcc/41736 to the more specific PR gcc/46955. Make it
conditional for gcc <= 4.5.
* gdbint.texinfo (Testsuite): Describe KFAIL and XFAIL in Writing
tests.
gdb/testsuite/
* gdb.cp/ptype-cv-cp.exp (ptype v_volatile_const_my_int): Replace KFAIL
by XFAIL.
* gdb.cp/static-method.exp (info addr A::func())
(list static-method.cc:xxx::(anonymous namespace)::A::func)
(list 'static-method.cc:xxx::(anonymous namespace)::A::func')
(list 'static-method.cc':'xxx::(anonymous namespace)::A::func')
(list static-method.cc:'xxx::(anonymous namespace)::A::func'): Likewise.
* gdb.cp/temargs.exp (test value of F in k2_m, test type of F in k3_m)
(test value of F in k3_m): Likewise.
* gdb.python/py-type.exp (python print ttype.template_argument(2)):
Likewise.
Comment says it all:
/* On ia64-hpux, we have discovered that the system linker
adds undefined symbols with nonzero addresses that cannot
be right (their address points inside the code of another
function in the .text section). This creates problems
when trying to determine which symbol corresponds to
a given address.
We try to detect those buggy symbols by checking which
section we think they correspond to. Normally, PLT symbols
are stored inside their own section, and the typical name
for that section is ".plt". So, if there is a ".plt"
section, and yet the section name of our symbol does not
start with ".plt", we ignore that symbol. */
gdb/ChangeLog:
* elfread.c (elf_symtab_read): Ignore undefined symbols with
nonzero addresses if they do not correspond to a .plt section
when one is available in the objfile.
* linux-low.c (linux_create_inferior): Put empty if clause for write.
Revert:
2011-12-18 Hui Zhu <teawater@gmail.com>
* linux-low.c (linux_create_inferior): Save return value to ret.
regset_from_core_section.
(amd64obsd_core_init_abi): New function that sets
regset_from_core_section.
(_initialize_amd64obsd_tdep): Use amd64obsd_core_init_abi for
traditional core dumps.
redirect stdin from /dev/null, stdout to stderr.
* remote-utils.c (remote_is_stdio): New static global.
(remote_connection_is_stdio): New function.
(remote_prepare): Handle stdio connection.
(remote_open): Ditto.
(remote_close): Don't close stdin for stdio connections.
(read_prim,write_prim): New functions. Replace all calls to
read/write to these.
* server.c (main): Watch for "-" argument. Move call to
remote_prepare before start_inferior.
* server.h (STDIO_CONNECTION_NAME): New macro.
(remote_connection_is_stdio): Declare.
(last_message): Delete.
(exception_messages, exception_messages_size): New static globals.
(throw_it): Use exception_messages array to handle nested calls.
* utils.c: #include "gdb_wait.h".
(sigalrm_handler, wait_to_die_with_timeout): New functions.
* ser-pipe.c: Don't #include "gdb_wait.h".
(pipe_close): Give child a chance to die on its own after closing
its stdin before SIGTERM'ing it.
Field found_sym in add_nonlocal_symbols's struct match_data is
used uninitialized. Rather than adding the initialization of
this field (to zero), we set the entire structure to zero first,
and then set the fields that need to be initialized to non-zero
next.
gdb/ChangeLog:
* ada-lang.c (add_nonlocal_symbols): Initialize data to
all zeros. Remove setting of data.arg_sym to NULL.
* ia64-tdep.c (ia64_memory_remove_breakpoint): Use
target_write_raw_memory.
* m32r-tdep.c (m32r_memory_remove_breakpoint): Use
target_write_raw_memory.
* microblaze-linux-tdep.c
(microblaze_linux_memory_remove_breakpoint): Use
target_write_raw_memory.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Use
target_write_raw_memory.
* gdb.texinfo (Implementing a Remote Stub): Explain that you
should transfer control to the stub in the startup code instead of
in main. Mention the need to get past the initial breakpoint.
PR remote/13492
* i386-low.c (i386_low_stopped_data_address): Avoid fetching
DR_CONTROL unless necessary. Extend comments.
* linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
The ada-lang module was using a static global called "exception_info"
for all inferiors. But each inferior might be different, and thus
this patch makes this data per-inferior.
gdb/ChangeLog:
* ada-lang.c (struct ada_inferior_data) [exception_info]:
New field.
(exception_info): Delete.
(ada_exception_support_info_sniffer): Get exception_support_info
data from our per-inferior data. Adjust code accordingly.
(ada_unhandled_exception_name_addr_from_raise): Likewise.
(ada_exception_name_addr_1, ada_exception_sym_name): Ditto.
(ada_executable_changed_observer): Delete.
(_initialize_ada_language): Remove call to
observer_attach_executable_changed.
This patch should help the user understand why the debugger is not
able to insert Ada exception catchpoints when the Ada runtime was
stripped of debugging info, as is often the case on many GNU/Linux
distros:
(gdb) catch exception
Your Ada runtime appears to be missing some debugging information.
Cannot insert Ada exception catchpoint in this configuration.
gdb/ChangeLog:
* ada-lang.c (ada_has_this_exception_support): Raise an error
if we could find the Ada exception hook in the Ada runtime,
but no debugging info for that hook.
gdb/testsuite/ChangeLog:
* gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp: Adjust
expected output for unsupported case.
This patch cleans up a bit the way we detect which type of runtime
the program uses with respect to Ada exceptions. It also removes
an unnecessary check in ada_exception_sal which is already performed
by ada_exception_support_info_sniffer.
Some of the changes are preparation work for detecting the situation
where the Ada runtime is found, but lacking debugging info.
gdb/ChangeLog:
* ada-lang.c (ada_has_this_exception_support): New function,
extracted out of ada_exception_sal and ada_exception_sal.
(ada_exception_support_info_sniffer): Simplify by using
ada_has_this_exception_support.
(ada_exception_sal): Replace unnecessary checks by assertions.
Minor simplifications.
* gdb.cp/static-method.exp (have_gcc_45682_fixed, info addr A::func()):
New variable, new test.
(list static-method.cc:xxx::(anonymous namespace)::A::func)
(list 'static-method.cc:xxx::(anonymous namespace)::A::func')
(list 'static-method.cc':'xxx::(anonymous namespace)::A::func')
(list static-method.cc:'xxx::(anonymous namespace)::A::func'): KFAIL
them if HAVE_GCC_45682_FIXED is not set.
(unpack_mips16): Correct bitfield positions used for extraction
of the immediate argument; fix sign-extension of same.
(extended_mips16_next_pc): Correct B instruction's offset
calculation. Correct register decoding of the BEQZ and BNEZ
as well as jump-register instructions. Handle compact jumps.
* gdb.ada/catch_ex.exp: Skip as unsupported if "catch exception"
throws "Cannot insert catchpoints in this configuration".
* gdb.ada/mi_catch_ex.exp: Likewise.
Fix overlapping memcpy.
* mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
the read_inferior_memory transfer.
(delete_fast_tracepoint_jump): New variable buf. Use it for the
write_inferior_memory transfer.
(set_fast_tracepoint_jump): New variable buf. Use it for the
read_inferior_memory and write_inferior_memory transfers.
(uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
(delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
Use it for the write_inferior_memory transfer.
(check_mem_read, check_mem_write): New gdb_asserts for overlapping
buffers.
The testcase is assuming that the parameter being watched isn't being
modified. But the way the test program is written, this is not true
at all. So this changes fixes the code to still reference the variable,
but in a way that does not modify its value.
gdb/testsuite:
* gdb.ada/watch_arg/pck.ads, gdb.ada/watch_arg/pck.adb: New files.
* gdb.ada/watch_arg/watch.adb: Adjust code to avoid modification
of parameter X in procedure Foo.
* gdb.base/break-entry.exp: Move the target use_gdb_stub test before
starting GDB.
* gdb.base/default.exp: Replace target use_gdb_stub checks by global
$use_gdb_stub.
* gdb.base/display.exp: Likewise.
* gdb.base/ending-run.exp: Likewise.
* gdb.base/list.exp (test_listsize): Likewise.
* gdb.base/setshow.exp: Likewise.
* gdb.base/valgrind-db-attach.exp: Set global use_gdb_stub to 1.
* lib/gdb.exp (gdb_run_cmd, gdb_start_cmd): Replace target use_gdb_stub
check by global $use_gdb_stub.
(gdb_test_multiple): Forbid run, start or attach for !$use_gdb_stub.
(default_gdb_start): Set global use_gdb_stub from target use_gdb_stub.
(default_gdb_init): Unset global $use_gdb_stub.
(gdb_continue_to_end, rerun_to_main): Replace target use_gdb_stub check
by global $use_gdb_stub.
* lib/gdbserver-support.exp: Extend comments for set_board_info
gdb_protocol and gdb,socketport.
(gdbserver_start_extended): Set global gdbserver_protocol and
gdbserver_gdbport. Clear global use_gdb_stub.
* lib/mi-support.exp (default_mi_gdb_start): Set global use_gdb_stub
from target use_gdb_stub.
(mi_run_cmd): Replace target use_gdb_stub check by global $use_gdb_stub.
Fix gdb.mi/mi-solib.exp without system debug info installed.
* lib/mi-support.exp (mi_expect_stop): Accept FILE also for `from'
expect attribute, return 0 for it. Update comments.
PR threads/13448
* dwarf2read.c (decode_locdesc): Handle DW_OP_const8u.
For DW_OP_GNU_push_tls_address increment the value, new comment for it.
gdb/testsuite/
PR threads/13448
* gdb.dwarf2/dw2-var-zero-addr.S: New file.
* gdb.dwarf2/dw2-var-zero-addr.exp: New file.
* gdb.threads/tls-var-main.c: New file.
* gdb.threads/tls-var.c: New file.
* gdb.threads/tls-var.exp: New file.
PR breakpoints/13346
* dwarf2read.c (process_psymtab_comp_unit): Set
PSYMTABS_ADDRMAP_SUPPORTED.
* psympriv.h (struct partial_symtab): Comment textlow and texthigh
validity. New field psymtabs_addrmap_supported.
* psymtab.c (find_pc_sect_psymtab_closer): New gdb_assert on
psymtabs_addrmap_supported.
(find_pc_sect_psymtab): Do not fallback to TEXTLOW and TEXTHIGH for
!PSYMTABS_ADDRMAP_SUPPORTED.
(dump_psymtab, maintenance_info_psymtabs): Print also
psymtabs_addrmap_supported.
gdb/testsuite/
PR breakpoints/13346
* gdb.dwarf2/dw2-objfile-overlap-inner.S: New file.
* gdb.dwarf2/dw2-objfile-overlap-outer.S: New file.
* gdb.dwarf2/dw2-objfile-overlap.exp: New file.
Otherwise, the compiler does not generate any debug info for them.
This fixes 3 FAILs:
FAIL: gdb.ada/homonym.exp: ptype local_type_subtype at BREAK_1
FAIL: gdb.ada/homonym.exp: ptype int_type at BREAK_1
FAIL: gdb.ada/homonym.exp: ptype local_type_subtype at BREAK_2
gdb/testsuite/ChangeLog:
* gdb.ada/homonym/pck.ads, gdb.ada/homonym/pck.adb: New files.
* gdb.ada/homonym/homonym.adb: For use of all types defined
locally inside both Get_Value subprograms.
* s390-nat.c (SUBOFF): Remove.
(s390_native_supply, s390_native_collect): New functions.
(supply_gregset, supply_fpregset): Use s390_native_supply.
(fill_gregset, fill_fpregset): Use s390_native_collect.
* s390-tdep.c (s390_pseudo_register_reggroup_p): Update comment.
(s390_unwind_pseudo_register): New function.
(s390_prologue_frame_unwind_cache): Unwind PSW address and mask
registers instead of PC and CC.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_sigtramp_frame_unwind_cache): Do not unwind PC, CC, or
full GPR pseudos.
(s390_trad_frame_prev_register): New function.
(s390_frame_prev_register): Use it.
(s390_sigtramp_frame_prev_register): Likewise.
(s390_dwarf2_prev_register): Use s390_unwind_pseudo_register.
(s390_dwarf2_frame_init_reg): Unwind PSW address and mask. Use
special callback to unwind any pseudo.
* features/s390-core32.xml: Add pswm/pswa to save/restore group.
* features/s390-core64.xml: Likewise.
* features/s390x-core64.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
gdbserver/ChangeLog:
* linux-s390-low.c (s390_collect_ptrace_register): Fully convert
PSW address/mask between 8-byte and 16-byte formats.
(s390_supply_ptrace_register): Likewise.
(s390_get_pc, s390_set_pc): 4-byte PSW address always includes
basic addressing mode bit.
* gdb.base/gdb.fortran.exp: Use shlib= flag when linking main
application. Call gdb_load_shlibs.
* gdb.mi/mi-solib.exp: Use mi_load_shlibs instead of gdb_load_shlibs.
gdb/ChangeLog:
* symfile.h (struct quick_symbol_functions): Fix the documentation
of field map_matching_symbols, as symbols are sorted using
strcmp_iw_ordered, not strcmp_iw.
Paul sent me this documentiion update when I asked him a question
about compare_names in ada-lang.c.
gdb/ChangeLog:
* symfile.h (struct quick_symbol_functions): Update the
documentation for field map_matching_symbols.
The ada-lang.c:compare_names function returns the wrong value
when the first string starts with the same contents as the second
string, followed by '_' and then some characters that do not make
a symbol name suffix. For instance:
string1 = "generics__test_generics__instance__print"
string2 = "generics__test_generics"
In that case, compare_names (string1, string2) return -1, when
clearly, string1 is greater than string2.
A consequence of this problem is that GDB may fail to lookup
"generics.test_generics" from our partial symtabs, because
partial symbols are ordered by strcmp_iw_ordered:
(gdb) b generics.test_generics
Function "generics.test_generics" not defined.
Make breakpoint pending on future shared library load? (y or [n])
gdb/ChangeLog:
* ada-lang.c (compare_names): Fix wrong return value in case
string1 starts with the same contents as string2, followed
by an underscore that do not start a symbol name suffix.
gdb/testsuite/ChangeLog:
* gdb.ada/fullname_bp: New testcase.
This function takes a VMA and was forcing us to perform a cast to
compile without warning on one platform. Except that the cast caused
a warning on sparc-solaris. This patch fixes the problem by using
phex_nz instead.
gdb/ChangeLog:
* remote.c (remote_get_tracepoint_status): Delete addrbuf
local variable. Avoid use of sprintf_vma.
Fix regression in jit.exp.
* jit.c (jit_reader_try_read_symtab, jit_bfd_try_read_symtab)
(jit_register_code): Set the jit_objfile_data field to the correct
value.
gdb/ChangeLog:
From Andrey Smirnov <andrew.smirnov@gmail.com>:
* ada-lang.c (assign_aggregate): Remove declaration of local
variable `i' which is shadowing another variable with the same
name declared in the outer scope.
This avoids shadowing issues with variables named base_type.
gdb/ChangeLog:
* ada-lang.c (get_base_type): Renames base_type. Adjust all
calls throughout this file.