CPYCHECKER_RETURNS_BORROWED_REF.
* python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
New define.
(pspace_to_pspace_object, objfile_to_objfile_object)
(find_thread_object): Use it.
For Fission.
* dwarf2read.c (struct dwarf2_per_cu_data): New member
reading_dwo_directly.
(struct signatured_type): New member dwo_unit.
(struct die_reader_specs): New member comp_dir.
(create_signatured_type_table_from_index): Use malloc for
all_type_units instead of objfile's obstack.
(create_all_type_units): Ditto.
(fill_in_sig_entry_from_dwo_entry): New function.
(add_type_unit): New function.
(lookup_dwo_signatured_type): New function.
(lookup_dwp_signatured_type): New function.
(lookup_signatured_type): New arg cu. All callers updated.
(init_cu_die_reader): Initialize comp_dir.
(read_cutu_die_from_dwo): New arg stub_comp_dir. All callers updated.
Change assert of matching type signatures to call error on mismatch.
(lookup_dwo_unit): Add assert.
(init_tu_and_read_dwo_dies): New function.
(init_cutu_and_read_dies): Call it.
(build_type_unit_groups): Handle case of no type unit groups created.
(hash_dwo_file, eq_dwo_file): Handle missing comp_dir.
(lookup_dwo_cutu): Tweak complaint.
(dwarf2_free_abbrev_table): Check for NULL abbrev_table.
(dwarf2_per_objfile_free): Free all_type_units.
The relocs_copied member is never assigned a non-NULL value, so
this code does not appear to be used.
bfd/ChangeLog:
2013-05-20 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
relocs_copied member.
(elf64_aarch64_link_hash_newfunc): Remove initialization of
relocs_copied member.
(elf64_aarch64_copy_indirect_symbol): Remove code to copy
relocs_copied member.
and data fixups performing shift/high adjust/sign extension on
fieldval. Sink fx_pcrel handling and checks. Use fixP->fx_size
when writing data fixups rather than recalculating size.
This makes sure that the types of the arguments are taken into account
when performing an inferior function call to a non-C (or C-like)
function. In particular, this makes sure that the arguments are
appropriatly converted to the correct type.
For instance, on x86_64-linux, with the following Ada code:
procedure Set_Float (F : Float) is
begin
Global_Float := F;
end Set_Float;
The following sequence shows that Float arguments are incorrectly
passed (Ada's Float type is the equivalent of type "float" in C):
(gdb) call set_float (2.0)
(gdb) print global_float
$1 = 0.0
Putting a breakpoint inside set_float to inspect the value of
register xmm0 gives the first hint of the problem:
(gdb) p $xmm0
$2 = (v4_float => (0 => 0.0, 2.0, 0.0, 0.0),
v2_double => (0 => 2.0, 0.0),
[...]
It shows that the argument was passed as a double.
The code responsible for doing appropriate type conversions
for the arguments (value_arg_coerce) found that our function
was not prototyped, and thus could not use typing information
for the arguments. Instead, it defaulted to the value of "set
coerce-float-to-double", which by default is true, to determine
the argument type.
This patch fixes the problem by setting the PROTOTYPE flag
for all functions of any language except C and Objective C.
gdb/ChangeLog:
* dwarf2read.c (prototyped_function_p): New function.
(read_subroutine_type): Use it.
gdb/testsuite/ChangeLog:
* gdb.ada/float_param: New testcase.
This patch de-indents the code provided as a comment explaining
how the code declaring the ld_info32_desc and ld_info64_desc globals
was generated. The intent is to avoid an ARI warning about a macro
not starting at column zero of the line.
gdb/ChangeLog:
* rs6000-aix-tdep.c: De-indent some example code provided
as a comment.
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
region is ok for a hardware watchpoint using the new ptrace interface
on Power servers.
expand-symtabs, and renamed check-psymtabs.
* psymtab.c (maintenance_check_psymtabs): Renamed from
maintenance_check_symtabs. Only process already-expanded symbol
tables.
(_initialize_psymtab): Update.
* symmisc.c (maintenance_check_symtabs): New function.
(maintenance_expand_name_matcher): New function
(maintenance_expand_file_matcher): New function
(maintenance_expand_symtabs): New function.
(_initialize_symmisc): Add "mt check-symtabs" and "mt expand-symtabs"
commands.
doc/
* gdb.texinfo (Maintenance Commands): Update doc for
"maint check-psymtabs". Add doc for "maint check-symtabs",
"maint expand-symtabs".
testsuite/
* gdb.base/maint.exp: Update test for "maint check-psymtabs".
Add tests for "maint check-symtabs", "maint expand-symtabs".
* frame.c (frame_stash): Convert to htab.
(frame_addr_hash): New function.
(frame_addr_hash_eq): New function.
(frame_stash_create): Convert function to create
a hash table.
(frame_stash_add): Convert function to add an entry to a hash
table.
(frame_stash_find): Convert function to search the hash table.
(frame_stash_invalidate): Convert function to empty the hash
table.
(get_frame_id): Only add to stash if a frame_id is created.
(_initialize_frame): Call frame_stash_create.
On ppc-lynx178, resuming the execution of a program after hitting
a breakpoint sometimes triggers a spurious SIG61 event:
(gdb) cont
Continuing.
Program received signal SIG61, Real-time event 61.
[Switching to Thread 39]
0x10002324 in a_test.task1 (<_task>=0x3ffff774) at a_test.adb:30
30 select -- Task 1
From this point on, continuing again lets the signal kill the program.
Using "signal 0" or configuring GDB to discard the signal does not
help either, as the program immediately reports the same signal again.
What happens is the following:
- GDB sends a single-step order to gdbserver: $vCont;s:31
This tells GDBserver to do a step using thread 0x31=49.
GDBserver does the step, and thread 49 receives the SIGTRAP
indicating that the step has finished.
- GDB then sends a "continue", but this time does not specify
which thread to continue: $vCont;c
GDBserver uses an arbitrary thread's ptid to resume the program's
execution (the current_inferior's ptid was chosen for that).
See lynx-low.c:lynx_resume:
if (ptid_equal (ptid, minus_one_ptid))
ptid = thread_to_gdb_id (current_inferior);
So far on all LynxOS platforms, this has been good enough. But
not so on LynxOS 178. If the ptid used to resume the execution
is not the same as the thread that did the step, we get the weird
signal.
This patch fixes the problem by saving the ptid of the thread
that last caused an event, received during a call to waitpid.
The ptid is saved in per-process private data.
gdb/gdbserver/ChangeLog:
* lynx-low.c (struct process_info_private): New type.
(lynx_add_process): New function.
(lynx_create_inferior, lynx_attach): Replace calls to
add_process by calls to lynx_add_process.
(lynx_resume): If PTID is null, then try using
current_process()->private->last_wait_event_ptid.
Add comments.
(lynx_clear_inferiors): Delete. The contents of that function
has been inlined in lynx_mourn;
(lynx_wait_1): Save the ptid in the process's private data.
(lynx_mourn): Free the process' private data. Replace call
to lynx_clear_inferiors by call to clear_inferiors.
Add -mcpu command to specify core type.
* doc/c-msp430.c: Update documentation.
* gas/msp430/opcodes.s: Use correct value for .arch pseudo.
* gas/msp430/msp430x.d: Use correct value for -mcpu option.
PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
(linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
PT_TEXT_END_ADDR guards. Update comments.
(linux_target_op) <read_offsets>: Conditionally define to
linux_read_offsets if the target is UCLIBC and if it defines
PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
This results in an internal-warning when trying the completion
when in Ada mode:
(gdb) b simple<TAB>
/[...]/cleanups.c:265: internal-warning: restore_my_cleanups has found a stale cleanup
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
gdb/ChangeLog:
* ada-lang.c (ada_make_symbol_completion_list): Make sure
all cleanups are done before returning from this function.
gdb/testsuite/ChangeLog:
* gdb.ada/complete.exp: Add test verifying completion using
the "tab" key.