Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a new gdbarch method to get the length of an addressable memory unit
for a given architecture. The default implementation returns 1.
gdb/ChangeLog:
* arch-utils.h (default_addressable_memory_unit_size): New.
* arch-utils.c (default_addressable_memory_unit_size): New.
* gdbarch.sh (addressable_memory_unit_size): New.
* gdbarch.h: Re-generate.
* gdbarch.c: Re-generate.
|
|
In the commit that added PowerPC Pair Singles, Ben accidentally removed
a comment and re-added an unused MTMSRD_L macro Alan had recently deleted.
This was probably just an oversite when he was refreshing his patch to
trunk.
opcodes/
* ppc-opc.c: Add comment accidentally removed by old commit.
(MTMSRD_L): Delete.
|
|
This contains various cleanups in the target memory read and write code.
They are not directly related to the non-8-bits changes, but they
clarify things a bit down the line.
gdb/ChangeLog:
* target.c (target_read): Rename variables and use
TARGET_XFER_E_IO.
(target_read_with_progress): Same.
(read_memory_robust): Constify parameters and rename
variables.
(read_whatever_is_readable): Constify parameters,
rename variables, adjust formatting.
* target.h (read_memory_robust): Constify parameters.
|
|
|
|
A few places still refer to the configure.in file; update them.
|
|
Short synthetic vector types (i.e. those defined using GCC's
attribute ((vector_size)) instead of AltiVec vector types)
are returned in r3. Fix ppc64_sysv_abi_return_value to
correctly handle this.
gdb/ChangeLog:
* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short
synthetic (non-AltiVec) vector types.
(ppc64_sysv_abi_return_value): Likewise.
|
|
No code uses this anymore and the symbol conflicts with the new TRACE
helper. Punt it from configure.
|
|
Replace the "if (TRACE_xxx_P) trace_generic" form with "TRACE_xxx".
The output is the same, but the code is nicer to read.
|
|
This patch fixes the "Format string required" error when trying to print
a dprintf on a now resolved, pending location when set via the MI interface
even if the format string is entered correctly.
This patch also adds a test case to check that issue called
mi-dprintf-pending.exp.
gdb/ChangeLog:
PR breakpoints/16465
* breakpoint.c (create_breakpoint): Save extra_string for
pending breakpoints.
gdb/testsuite/ChangeLog:
PR breakpoints/16465
* gdb.mi/mi-dprintf-pending.c: New file.
* gdb.mi/mi-dprintf-pending.exp: New test.
* gdb.mi/mi-dprintf-pendshr.c: New file.
|
|
Now that there's common helpers for printing trace data, switch to that
to restore the insn tracing support for this target.
|
|
The Blackfin port had some TRACE_xxx macros for easily logging trace data.
Use these as a base for common ones that have a simple form and match the
existing sets of helper macros.
|
|
We want to add new common trace helpers including "TRACE", so change the
mips one to the new WITH_TRACE_ANY_P macro since they do the same thing.
|
|
We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill
out the API. This lets us wrap the internal configure symbol.
|
|
We want to add new common trace helpers including "TRACE", so rename the
moxie one to MOXIE_TRACE_INSN. This also matches what the code is doing.
|
|
ld/
* NEWS: Mention new option.
* lexsup.c (parse_args): Handle --print-memory-usage.
(ld_options): Add --print-memory-usage.
* ldmain.c (main): Call lang_print_memory_usage.
* ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE.
* ldlang.h: Add prototype of lang_print_memory_usage.
* ldlang.c (lang_print_memory_size, lang_print_memory_usage): New
functions.
* ld.texinfo (Options): Document --print-memory-usage.
* ld.h (args_type): Add print_memory_usage field.
ld/testsuite/
* ld-scripts/print-memory-usage-1.t,
* ld-scripts/print-memory-usage-1.s,
* ld-scripts/print-memory-usage-1.l,
* ld-scripts/print-memory-usage-2.t,
* ld-scripts/print-memory-usage-2.l,
* ld-scripts/print-memory-usage-3.s,
* ld-scripts/print-memory-usage-3.t,
* ld-scripts/print-memory-usage-3.l,
* ld-scripts/print-memory-usage.t: New tests.
* ld-scripts/print-memory-usage.exp: Run them.
|
|
The cgen code declares some macros/funcs using the trace_xxx prefix, but
the code isn't generic and only works with cgen targets. This is blocking
the creation of new common trace functions.
Let's blindly add cgen_xxx prefixes to all these symbols. Some already
use this convention to avoid conflicts, so it makes sense to align them.
In the future we might want to move some to the common trace core, but
one thing at a time.
|
|
Types used for some variables could not be used for 32 bits, causing a
compilation failure.
This patch adds a cast to force a quite compilation, but at the same
time it bails out in the case that the cast performed is not safe, i.e.
in the case where the debuggee is 64bit and debugger is 32bit.
Documentation was also affected, once a different version of texinfo the
docs could not be build.
2015-06-10 Walfred Tedeschi <walfred.tedeschi@intel.com>
* i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask
and bt_mask to CORE_ADDR.
doc:
* gdb.textinfo (i386): Fix "@end table" end and "@table" placement.
|
|
|
|
|
|
In aarch64.cc, Erratum_stub::STUB_ADDR_ALIGN and Reloc_stub::STUB_ADDR_ALIGN
are declared as static const int, and initialized in the class body. These
values are referenced from outside the class body, and with no optimization,
the references go unresolved.
gold/
* aarch64.cc (Erratum_stub::STUB_ADDR_ALIGN): Move initialization
outside class body.
(Reloc_stub::STUB_ADDR_ALIGN): Likewise.
|
|
When laying out .debug_* sections, we translate the names of compressed
debug sections that start with ".zdebug", but when processing input
section specs in a linker script, we do not handle the translation there.
This results in an internal error as reported in PR 17731.
gold/
PR gold/17731
* layout.cc (corresponding_uncompressed_section_name): New function.
(Layout::choose_output_section): Call it.
* layout.h (corresponding_uncompressed_section_name): New function.
* script-sections.cc (Input_section_info::set_section_name): Check
for compressed debug section (.zdebug style).
|
|
This patch adds -O0 to gold script_test_12 test, hoping that compiler
won't change the order of globel variables that the test assumes.
Changelog:
testsuite/Makefile.am: Add -O0 to compile script_test_12 test.
testsuite/Makefile.in: Regenerate.
|
|
These macros were copied from the Blackfin port but never used, so delete
them as part of the trace unification work.
|
|
First we convert the ETRACE_P to STRACE_EVENTS_P. This means we move from
using the sim_events.trace storage to the common sim_state_base.trace_data
array. With that deleted, the common trace init code can be simplified so
the sim state works the same as the sim cpu.
|
|
These are the parallel to the TRACE_xxx_P macros and fill out the full
set to match the existing debug one.
|
|
No point in duplicating the shift logic when we have macros already to
keep that all unified.
|
|
This way we can use the IDX macros everywhere and not worry about the
encoding of the WITH_TRACE define in multiple places.
|
|
This is the only sim that sets up its own WITH_TRACE mask and it conflicts
with the user setting their own list at configure time. Drop it to match
all the other sims.
|
|
The interrupts.c file has a static/fuller definition that is used,
so drop this copy in interp.c.
|
|
This code already matched the common sim reusme logic, so we can simply
drop it and pull in the common code.
|
|
Only one place used get_word/put_word, so inline the usage there.
All the rest is dead code so trim it.
|
|
This commit changes the debug printing code in linux-namespaces.c
to use pulongest instead of "%ld".
gdb/ChangeLog:
* nat/linux-namespaces.c (mnsh_send_message): Use pulongest.
(mnsh_recv_message): Likewise.
|
|
1. gdb/i386-tdep.c:8720: Do not use 'long long', instead use LONGEST
gdb/i386-tdep.c:8720: long long int size;
2. gdb/i386-tdep.c:8755: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
gdb/i386-tdep.c:8755: ui_out_field_fmt (uiout, "size", "%lld", size);
2015-06-11 Walfred Tedeschi <walfred.tedeschi@intel.com>
* i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
long long int and plongest instead of %ll.
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
|
|
The syscall path was the only code checking the custom exception state
after recent cleanups. Once we change that to the common engine halt
function, we can delete that state entirely.
This also helps highlight some other dead code that we can cull.
|
|
No point in open coding this logic here when we have common size types
already that give the right answer.
|
|
The sim-inline.h header already takes care of this for us, so punt
the local definitions.
|
|
This allows us to use the common code for all exception handling.
|
|
This commit fixes the following ARI warning:
gdb/nat/linux-namespaces.c:28: regression: Do not include
wait.h or sys/wait.h, instead include gdb_wait.h
gdb/ChangeLog:
* nat/linux-namespaces.c (gdb_wait.h): New include.
(sys/wait.h): Do not include.
|
|
If the section contains 'Q' in the name, is_cident() returns false,
__start and __stop symbols for the section are not generated..
* gold.h (is_cident): Correct typo.
|
|
|
|
Commit d9b3de22f33e400f7f409cce3acf6c7dab07dd79 introduced a behaviour
change where dwarf_finish_line was not called anymore when ending a
sequence of machine instructions. This patch restores the original
behaviour.
gdb/ChangeLog:
* dwarf2read.c (dwarf_record_line): Call dwarf_record_line if
end_sequence is true.
|
|
gdb/ChangeLog
2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup.
* solib-target.c (library_list_start_list): Use explicit NULL
comparison.
|
|
Now fixing for 843419 is fully functional.
The first part of the erratum fix CL is here -
https://sourceware.org/ml/binutils/2015-04/msg00229.html
gold/ChangeLog
2015-06-10 Han Shen <shenhan@google.com>
* aarch64.cc(global enum): New constants representing stub types.
(Stub_template): New POD struct.
(Stub_template_repertoire): New class.
(Stub_base): New class.
(Erratum_stub): New class.
(Reloc_stub): Refactored to be a subclass of Stub_base.
(Reloc_stub::Stub_type): Removed.
(Reloc_stub::offset): Moved to Stub_base.
(Reloc_stub::set_offset): Moved to Stub_base.
(Reloc_stub::destination_address): Moved to Stub_base.
(Reloc_stub::set_destination_address): Moved to Stub_base.
(Reloc_stub::reset_destination_address): Moved to Stub_base.
(Reloc_stub::stub_type): Renamed and moved to Stub_base.
(Reloc_stub::stub_size): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns): Renamed and moved to Stub_base.
(Reloc_stub::write): Moved to Stub_base.
(Reloc_stub::invalid_offset): Moved to Stub_base.
(Reloc_stub::invalid_address): Moved to Stub_base.
(Reloc_stub::stub_type_): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns_): Moved to Stub_base.
(Reloc_stub::offset_): Moved to Stub_base.
(Reloc_stub::destination_address_): Moved to Stub_base.
(Stub_table::The_aarch64_relobj): New typedef.
(Stub_table::The_erratum_stub): New typedef.
(Stub_table::The_erratum_stub_less): New typedef.
(Stub_table::The_erratum_stub_set): New typedef.
(Stub_table::The_erratum_stub_set_iter): New typedef.
(Stub_table::empty): Added emptiness testing for erratum stubs.
(Stub_table::add_erratum_stub): New method to add an erratum stub.
(Stub_table::find_erratum_stub): New method.
(Stub_table::find_erratum_stubs_for_input_section): New method.
(Stub_table::erratum_stub_address): New method.
(Stub_table::update_date_size_changed_p): Modified to handle erratum stubs.
(Stub_table::do_addralign): Modified to handle erratum stubs.
(Stub_table::erratum_stubs_): New member.
(Stub_table::erratum_stub_size_): New member.
(Stub_table::relocate_stubs): Modified to handle erratum stubs.
(Stub_table::do_write): Modified to handle erratum stubs.
(AArch64_relobj::The_erratum_stub): New typedef.
(AArch64_relobj::Erratum_stub_set_iter): New typedef.
(AArch64_relobj::fix_errata): New method.
(Target_aarch64::The_reloc_stub_type): Removed.
(Target_aarch64::The_erratum_stub): New typede.
(AArch64_relocate_functions::construct_b): New method.
|
|
While reimplementing <library-list/> I found from expat-2.0.1-11.fc15.x86_64:
warning: while parsing target library list (at line 1): Required attribute "version" of <library-list-svr4> not specified
I believe the same bug has to apply for existing FSF gdbserver but I do not
have any <library-list/> platform to test it (I did not try to build MinGW).
features/library-list.dtd:
<!ATTLIST library-list version CDATA #FIXED "1.0">
http://www.xml.com/pub/a/98/10/guide0.html?page=3 says:
In this case, the attribute is not required, but if it occurs, it must
have the specified value.
Which would suggest gdbserver is right but solib-target.c is wrong. One could
also make gdbserver explicit for the version (if those 14 bytes are not of
a concern).
gdb/ChangeLog
2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* solib-target.c (library_list_start_list): Do not dereference
variable version in its initialization. Make the VERSION check handle
NULL.
(library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL.
gdb/gdbserver/ChangeLog
2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* server.c (handle_qxfer_libraries): Set `version' attribute for
<library-list>.
|
|
This commit announces the newly added ability to directly access
executable and shared library files when attaching to processes
running in containers on GNU/Linux systems.
gdb/ChangeLog:
* NEWS: Announce support for direct access of executable and
shared library files when attaching to inferiors in containers
on GNU/Linux systems.
|
|
This commit implements the "vFile:setfs" packet in gdbserver.
gdb/gdbserver/ChangeLog:
* target.h (struct target_ops) <multifs_open>: New field.
<multifs_unlink>: Likewise.
<multifs_readlink>: Likewise.
* linux-low.c (nat/linux-namespaces.h): New include.
(linux_target_ops): Initialize the_target->multifs_open,
the_target->multifs_unlink and the_target->multifs_readlink.
* hostio.h (hostio_handle_new_gdb_connection): New declaration.
* hostio.c (hostio_fs_pid): New static variable.
(hostio_handle_new_gdb_connection): New function.
(handle_setfs): Likewise.
(handle_open): Use the_target->multifs_open as appropriate.
(handle_unlink): Use the_target->multifs_unlink as appropriate.
(handle_readlink): Use the_target->multifs_readlink as
appropriate.
(handle_vFile): Handle vFile:setfs packets.
* server.c (handle_query): Call hostio_handle_new_gdb_connection
after target_handle_new_gdb_connection.
|
|
This commit allows GDB to access executables and shared libraries
on remote targets where the remote stub does not share a common
filesystem with the inferior(s). A new packet "vFile:setfs" is
added to the remote protocol and the three remote hostio functions
with filename arguments are modified to send "vFile:setfs" packets
as necessary.
gdb/ChangeLog:
* remote.c (struct remote_state) <fs_pid>: New field.
(new_remote_state): Initialize the above.
(PACKET_vFile_setfs): New enum value.
(remote_hostio_set_filesystem): New function.
(remote_hostio_open): Call the above.
(remote_hostio_unlink): Likewise.
(remote_hostio_readlink): Likewise.
(_initialize_remote): Register new "set/show remote
hostio-setfs-packet" command.
* NEWS: Announce new vFile:setfs packet.
gdb/doc/ChangeLog:
* gdb.texinfo (Remote Configuration): Document the
"set/show remote hostio-setfs-packet" command.
(Host I/O Packets): Document the vFile:setfs packet.
|
|
This commit allows GDB to access executables and shared libraries
on native Linux targets where GDB and the inferior have different
mount namespaces.
gdb/ChangeLog:
* linux-nat.c (nat/linux-namespaces.h): New include.
(fileio.h): Likewise.
(linux_nat_filesystem_is_local): New function.
(linux_nat_fileio_pid_of): Likewise.
(linux_nat_fileio_open): Likewise.
(linux_nat_fileio_readlink): Likewise.
(linux_nat_fileio_unlink): Likewise.
(linux_nat_add_target): Initialize to_filesystem_is_local,
to_fileio_open, to_fileio_readlink and to_fileio_unlink.
(_initialize_linux_nat): New "set/show debug linux-namespaces"
commands.
* NEWS: Mention new "set/show debug linux-namespaces" commands.
gdb/doc/ChangeLog:
* gdb.texinfo (Debugging Output): Document the "set/show debug
linux-namespaces" command.
|
|
This commit adds a new argument to all target_fileio functions with
filename arguments to allow the desired inferior to be specified.
This allows GDB to support systems where processes do not necessarily
share a common filesystem.
gdb/ChangeLog:
* target.h (struct inferior): New forward declaration.
(struct target_ops) <to_filesystem_is_local>: Update comment.
(struct target_ops) <to_fileio_open>: New argument inf.
Update comment. All implementations updated.
(struct target_ops) <to_fileio_unlink>: Likewise.
(struct target_ops) <to_fileio_readlink>: Likewise.
(target_filesystem_is_local): Update comment.
(target_fileio_open): New argument inf. Update comment.
(target_fileio_unlink): Likewise.
(target_fileio_readlink): Likewise.
(target_fileio_read_alloc): Likewise.
(target_fileio_read_stralloc): Likewise.
* target.c (target_fileio_open): New argument inf.
Pass inf to implementation. Update debug printing.
(target_fileio_unlink): Likewise.
(target_fileio_readlink): Likewise.
(target_fileio_read_alloc_1): New argument inf. Pass inf
to target_fileio_open.
(target_fileio_read_alloc): New argument inf. Pass inf to
target_fileio_read_alloc_1.
(target_fileio_read_stralloc): Likewise.
* gdb_bfd.c (inferior.h): New include.
(gdb_bfd_iovec_fileio_open): Replace unused "open_closure"
argument with new argument "inferior". Pass inferior to
target_fileio_open.
(gdb_bfd_open): Supply inferior argument to
gdb_bfd_iovec_fileio_open.
* linux-tdep.c (linux_info_proc): Supply inf argument to
relevant target_fileio calls.
(linux_find_memory_regions_full): Likewise.
(linux_fill_prpsinfo): Likewise.
* remote.c (remote_filesystem_is_local): Supply inf
argument to remote_hostio_open.
(remote_file_put): Likewise.
(remote_file_get): Likewise.
(remote_file_delete): Supply inf argument to
remote_hostio_unlink.
|