For objcopy and relocatable link, we should also preserve the
SHF_COMPRESSED bit if not decompress.
* elf.c (_bfd_elf_init_private_section_data): Also preserve the
SHF_COMPRESSED bit if not decompress.
This paramater is no longer useful after the previous commit, so remove
it as a cleanup.
gdb/ChangeLog:
* gdbtypes.c (is_dynamic_type_internal): Remove the unused
"top_level" parameter.
(resolve_dynamic_type_internal): Remove the unused "top_level"
parameter. Update call to is_dynamic_type_internal.
(is_dynamic_type): Update call to is_dynamic_type_internal.
(resolve_dynamic_range): Update call to
resolve_dynamic_type_internal.
(resolve_dynamic_union): Likewise.
(resolve_dynamic_struct): Likewise.
(resolve_dynamic_type): Likewise.
Even when referenced types are dynamic, the corresponding referencing
type should not be considered as dynamic: it's only a pointer. This
prevents reference type for values not in memory to be resolved.
gdb/ChangeLog:
* gdbtypes.c (is_dynamic_type_internal): Remove special handling
of TYPE_CODE_REF types so that they are not considered as
dynamic depending on the referenced type.
(resolve_dynamic_type_internal): Likewise.
gdb/testsuite/ChangeLog:
* gdb.ada/funcall_ref.exp: New file.
* gdb.ada/funcall_ref/foo.adb: New file.
Way back in aba6488e0b, a bunch of signal
defines were changed to TARGET_SIGNAL_xxx. For d10v, the transition was
incomplete which lead to sim_stop_reason using the new set but sim_resume
still using the old set. Which meant in some cases, the sim would never
actually stop.
Convert all the remaining SIGxxx defines in here to TARGET_SIGNAL_xxx.
This has the nice side effect of fixing the testsuite.
2015-03-27 Renlin Li <renlin.li@arm.com>
gas/
* config/tc-aarch64.c (mapping_state): Emit MAP_DATA within text section in order.
(mapping_state_2): Don't emit MAP_DATA here.
(s_aarch64_inst): Align frag during state transition.
(md_assemble): Likewise.
I see these two fails in no-unwaited-for-left.exp in remote testing
for aarch64-linux target.
...
continue
Continuing.
warning: Remote failure reply: E.No unwaited-for children left.
[Thread 1084] #2 stopped.
(gdb) FAIL: gdb.threads/no-unwaited-for-left.exp: continue stops when thread 2 exits
....
continue
Continuing.
warning: Remote failure reply: E.No unwaited-for children left.
[Thread 1081] #1 stopped.
(gdb) FAIL: gdb.threads/no-unwaited-for-left.exp: continue stops when the main thread exits
I checked the gdb.log on buildbot, and find that these two fails also
appear on Debian-i686-native-extended-gdbserver and Fedora-ppc64be-native-gdbserver-m64.
I recall that they are about local/remote parity, and related RSP is missing.
There has been already a PR 14618 about it. This patch is to kfail them
on remote target.
gdb/testsuite:
2015-04-02 Yao Qi <yao.qi@linaro.org>
* gdb.threads/no-unwaited-for-left.exp: Set up kfail if target
is remote.
This commit makes GDB default to a sysroot of "target:".
One testcase needed updating as a result of this change.
gdb/ChangeLog:
* main.c (captured_main): Set gdb_sysroot to "target:"
if not otherwise set.
gdb/testsuite/ChangeLog:
* gdb.base/break-probes.exp: Cope with "target:" sysroot.
This commit adds support for filenames prefixed with "target:" to
exec_file_attach. This is required to correctly follow inferior
exec* calls when a gdb_sysroot prefixed with "target:" is set.
gdb/ChangeLog:
* exec.c (exec_file_attach): Support "target:" filenames.
This commit updates solib_find to strip the "target:" prefix from
gdb_sysroot when accessing local files. This ensures that the same
search algorithm is used for local files regardless of whether a
"target:" prefix was used or not. It also avoids cluttering GDB's
output with unnecessary "target:" prefixes on paths.
gdb/ChangeLog:
* solib.c (solib_find): Strip "target:" prefix from sysroot
if accessing local files.
symfile_bfd_open handled what were remote files as a special case.
Converting from "remote:" files to "target:" made symfile_bfd_open
look like this:
if remote:
open bfd, check format, etc
return
local-specific stuff
open bfd, check format, etc
return
This commit rearranges symfile_bfd_open to remove the duplicated
code, like this:
if local:
local-specific stuff
open bfd, check format, etc
return
gdb/ChangeLog:
* symfile.c (symfile_bfd_open): Reorder to remove duplicated
checks and error messages.
The functionality of "target:" sysroots is a superset of the
functionality of "remote:" sysroots. This commit causes the
"set sysroot" command to rewrite "remote:" sysroots as "target:"
sysroots and replaces "remote:" specific code with "target:"
specific code where still necessary.
gdb/ChangeLog:
* remote.h (REMOTE_SYSROOT_PREFIX): Remove definition.
(remote_filename_p): Remove declaration.
(remote_bfd_open): Likewise.
* remote.c (remote_bfd_iovec_open): Remove function.
(remote_bfd_iovec_close): Likewise.
(remote_bfd_iovec_pread): Likewise.
(remote_bfd_iovec_stat): Likewise.
(remote_filename_p): Likewise.
(remote_bfd_open): Likewise.
* symfile.h (gdb_bfd_open_maybe_remote): Remove declaration.
* symfile.c (separate_debug_file_exists): Use gdb_bfd_open.
(gdb_bfd_open_maybe_remote): Remove function.
(symfile_bfd_open): Replace remote filename check with
target filename check.
(reread_symbols): Use gdb_bfd_open.
* build-id.c (gdbcore.h): New include.
(build_id_to_debug_bfd): Use gdb_bfd_open.
* infcmd.c (attach_command_post_wait): Remove remote filename
check.
* solib.c (solib_find): Replace remote-specific handling with
target-specific handling. Update comments where necessary.
(solib_bfd_open): Replace remote-specific handling with
target-specific handling.
(gdb_sysroot_changed): New function.
(_initialize_solib): Call the above when gdb_sysroot changes.
* windows-tdep.c (gdbcore.h): New include.
(windows_xfer_shared_library): Use gdb_bfd_open.
This commit updates gdb_bfd_open to access files using target
fileio functions if the supplied path starts with "target:"
and if the local and target filesystems are not the same.
This allows users to specify "set sysroot target:" and have
GDB access files locally or from the remote as appropriate.
The new functions in gdb_bfd.c are copies of functions from
remote.c. This duplication is intentional and will be removed
by the next commit in this series.
gdb/ChangeLog:
* gdb/gdb_bfd.h (TARGET_SYSROOT_PREFIX): New definition.
(is_target_filename): New declaration.
(gdb_bfd_has_target_filename): Likewise.
(gdb_bfd_open): Update documentation comment.
* gdb_bfd.c (target.h): New include.
(gdb/fileio.h): Likewise.
(is_target_filename): New function.
(gdb_bfd_has_target_filename): Likewise.
(fileio_errno_to_host): Likewise.
(gdb_bfd_iovec_fileio_open): Likewise.
(gdb_bfd_iovec_fileio_pread): Likewise.
(gdb_bfd_iovec_fileio_close): Likewise.
(gdb_bfd_iovec_fileio_fstat): Likewise.
(gdb_bfd_open): Use target fileio to access paths prefixed
with "target:" where necessary.
This commit introduces a new target method target_filesystem_is_local
which can be used to determine whether or not the filesystem accessed
by the target_fileio_* methods is the local filesystem.
gdb/ChangeLog:
* target.h (struct target_ops) <to_filesystem_is_local>:
New field.
(target_filesystem_is_local): New macro.
* target-delegates.c: Regenerate.
* remote.c (remote_filesystem_is_local): New function.
(init_remote_ops): Initialize to_filesystem_is_local.
This commit introduces a new target method target_fileio_fstat
which can be used to retrieve information about files opened with
target_fileio_open.
gdb/ChangeLog:
* target.h (struct target_ops) <to_fileio_fstat>: New field.
(target_fileio_fstat): New declaration.
* target.c (target_fileio_fstat): New function.
* inf-child.c (inf_child_fileio_fstat): Likewise.
(inf_child_target): Initialize to_fileio_fstat.
* remote.c (init_remote_ops): Likewise.
My all-stop-on-top-of-non-stop series manages to shows regressions due
to this latent bug. currently_stepping returns true if
stepped_breakpoint is set. Obviously we should clear
it before checking currently_stepping, not after.
Tested on x86_64 Fedora 20.
gdb/ChangeLog:
2015-04-01 Pedro Alves <palves@redhat.com>
* infrun.c (resume): Check currently_stepping after clearing
stepped_breakpoint, not before.
If interrupt_and_wait manages to trigger the FAIL path, we get:
ERROR OCCURED: can't read "test": no such variable
gdb/testsuite/ChangeLog:
2015-04-01 Pedro Alves <palves@redhat.com>
* gdb.threads/manythreads.exp (interrupt_and_wait): Pass $message
to fail instead of non-existent $test.
By inspection, I noticed a path where we return without discarding the
cleanups.
gdb/ChangeLog:
2015-04-01 Pedro Alves <palves@redhat.com>
* infrun.c (keep_going): Also discard cleanups if inserting
breakpoints fails.
Noticed that if an error is thrown out of target_wait, we miss running
finish_thread_state_cleanup.
Tested on x86_64 Fedora 20, with "maint set target-async off".
gdb/ChangeLog:
2015-04-01 Pedro Alves <palves@redhat.com>
* infrun.c (wait_for_inferior): Install the
finish_thread_state_cleanup cleanup across the whole function, not
just around handle_inferior_event.