Code cleanup.
* amd64-tdep.c (amd64_skip_prologue): Move the XMM code to ...
(amd64_skip_xmm_prologue): ... this new function. Describe its
parameters. No longer use amd64_prologue_line_bug.
* defs.h (producer_is_gcc_ge_4): New declaration.
* dwarf2read.c (producer_is_gcc_ge_4): Move to utils.c.
(process_full_comp_unit): Update its caller. Remove
amd64_prologue_line_bug initialization.
* symtab.h (struct symtab): Remove field amd64_prologue_line_bug.
* utils.c (producer_is_gcc_ge_4): Moved here from dwarf2read.c.
2011-09-09 Pedro Alves <pedro@codesourcery.com>
* linux-nat.h (enum resume_kind): New.
(struct lwp_info) <last_resume_kind>: New field.
* linux-nat.c (linux_child_follow_fork): Set last_resume_kind to
resume_stop on the new lwp.
(add_lwp): Set last_resume_kind as resume_continue by default.
(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
(resume_lwp): New, factored out from resume_callback. Also check
for pending status in lp->waitstatus.
(resume_callback): Reimplement.
(resume_clear_callback): Set last_resume_kind as resume_stop.
(resume_set_callback): Set last_resume_kind as resume_continue.
(linux_nat_resume, linux_handle_extended_wait): Set
last_resume_kind.
(running_callback): Also check lp->waitstatus for pending events.
(select_singlestep_lwp_callback): Check that lp->last_resume_kind
is resume_step.
(stop_and_resume_callback): Don't re-resume if the core wanted the
lwp stopped. Use resume_lwp instead of resume_callback. Avoid
using an invalidated pointer.
(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
SIGSTOPs if the core wanted the LWP to stop.
(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
wanted the lwp to stop. If the core wanted the lwp to stop, and
the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
of TARGET_SIGNAL_STOP.
(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
here. Instead, signal the lwp, and set the last_resume_kind to
resume_stop.
* linux-nat.h (enum resume_kind): New.
(struct lwp_info) <last_resume_kind>: New field.
(linux_child_follow_fork): Set last_resume_kind to resume_stop on
the new lwp.
(add_lwp): Set last_resume_kind as resume_continue by default.
(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
(resume_lwp): New, factored out from resume_callback. Also check
for pending status in lp->waitstatus.
(resume_callback): Reimplement.
(resume_clear_callback): Set last_resume_kind as resume_stop.
(resume_set_callback): Set last_resume_kind as resume_continue.
(linux_nat_resume, linux_handle_extended_wait): Set
last_resume_kind.
(running_callback): Also check lp->waitstatus for pending events.
(select_singlestep_lwp_callback): Check that lp->last_resume_kind
is resume_step.
(stop_and_resume_callback): Don't re-resume if the core wanted the
lwp stopped. Use resume_lwp instead of resume_callback. Avoid
using an invalidated pointer.
(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
SIGSTOPs if the core wanted the LWP to stop.
(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
wanted the lwp to stop. If the core wanted the lwp to stop, and
the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
of TARGET_SIGNAL_STOP.
(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
here. Instead, signal the lwp, and set the last_resume_kind to
resume_stop.
* sparc-opc.c (sparc_opcodes): Add entry for 'save simm13,regrs1,regrd'
This has been reported as being accepted by the Sun assmebler.
gas/testsuite/
* gas/sparc/save-args.[sd]: New test.
* gas/sparc/sparc.exp: Run new test.
The changes below bring 'mov' and 'ticc' instructions into line
with the V8 SPARC Architecture Manual.
* sparc-opc.c (sparc_opcodes): Add entry for 'ticc imm + regrs1'.
* sparc-opc.c (sparc_opcodes): Add alias entries for
'mov regrs2,%asrX'; 'mov regrs2,%y'; 'mov regrs2,%prs';
'mov regrs2,%wim' and 'mov regrs2,%tbr'.
* sparc-opc.c (sparc_opcodes): Move/Change entries for
'mov imm,%asrX'; 'mov imm,%y'; 'mov imm,%prs'; 'mov imm,%wim'
and 'mov imm,%tbr'.
* sparc-opc.c (sparc_opcodes): Add wr alias entries to match above
mov aliases.
gas/testsuite/
* gas/sparc/ticc-imm-reg.[sd]: New test.
* gas/sparc/v8-movwr-imm.[sd]: New test.
* gas/sparc/sparc.exp: Run new tests.
* config/tc-sparc.c (sparc_ip): Handle 'i' + r<0..31>
in addition to 'i' + [goli]<0..7>.
gas/testsuite/
* gas/sparc/imm-plus-rreg.[sd]: New test.
* gas/sparc/sparc.exp: Run new test.
PR breakpoints/12435
* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
next_sal, buf, offset and xmmreg. Advance PC if it sees the PR.
* dwarf2read.c (process_full_comp_unit): Initialize
amd64_prologue_line_bug.
* symtab.h (struct symtab): New field amd64_prologue_line_bug.
gdb/testsuite/
PR breakpoints/12435
* gdb.arch/amd64-prologue-xmm.c: New file.
* gdb.arch/amd64-prologue-xmm.exp: New file.
* gdb.arch/amd64-prologue-xmm.s: New file.
* findvar.c (read_var_value): Never return NULL, throw an error
instead. Update the function comment. State symbol name in the error
messages.
* python/py-frame.c (frapy_read_var): Remove handling of NULL from
read_var_value.
* stack.c (print_frame_args): Likewise.
* valops.c (value_of_variable): Likewise.
* stack.c (print_frame_args): New variable except. Wrap
read_var_value and common_val_print into TRY_CATCH.
gdb/testsuite/
* gdb.dwarf2/dw2-param-error-main.c: New file.
* gdb.dwarf2/dw2-param-error.S: New file.
* gdb.dwarf2/dw2-param-error.exp: New file.
* gdb.base/annota1.exp, gdb.base/annota3.exp: Extract the
inferior's pid and look for a core dump named core.$pid. Use
`remote_file' commands on the host instead of hand coding shell
commands on the build.
* gdb.base/valgrind-db-attach.exp: Kill the program before
finishing the test.
* eval.c (evaluate_subexp_standard) <OP_THIS>: Update the value_of_this
caller to value_of_this.
* p-exp.y: Update the value_of_this caller to value_of_this_silent.
Twice.
* valops.c (value_of_this): Remove parameter complain and variable ret.
Update function comment. Never return NULL by this code.
(value_of_this_silent): New function.
* value.h (value_of_this): Remove parameter complain.
(value_of_this_silent): New declaration.
PR gas/13167
* dwarf2dbg.c (dwarf2_flush_pending_lines): Use symbol_temp_new_now.
gas/testsuite/
PR gas/13167
* gas/ia64/pr13167.d, gas/ia64/pr13167.s: New test.
* gas/ia64/ia64.exp: Run it.
* event-top.h (MAXPROMPTS, struct prompts): Delete.
(set_async_annotation_level, set_async_prompt, pop_prompt)
(push_prompt, new_async_prompt): Delete declarations.
* top.h (get_prompt, set_prompt): Change prototype.
(get_prefix, set_prefix, get_suffix, set_suffix): Delete
declarations.
* top.c (command_loop):
(top_prompt): New global.
(get_prefix, set_prefix, get_suffix, ): Delete.
(get_prompt, set_prompt): Rewrite.
(show_new_async_prompt): Rename to ...
(show_prompt): ... this.
(init_main): Adjust. Don't handle --annotate=2 here.
* event-top.c (new_async_prompt): Delete.
(the_prompts): Delete.
(more_to_come): Make static.
(display_gdb_prompt): Use top_level_prompt() to compute the top
level prompt, and don't notify the before_prompt observers
directly here. Always trick readline into not trying to display
the prompt if sync_execution and displaying the primary prompt.
If displaying a local/secondary prompt, always show it, even if
sync_execution is set.
(change_annotation_level): Delete.
(top_level_prompt): New, based on change_annotation_level.
(push_prompt, pop_prompt): Delete.
(async_disable_stdin): No longer pushes prompt.
(command_line_handler): No longer pushes or pops prompt. If more
input is expected, call display_gdb_prompt with an explicit empty
prompt.
(async_stop_sig): Adjust.
(set_async_annotation_level, set_async_prompt): Delete.
* python/python.c (before_prompt_hook): Adjust.
* elf64-ppc.c (adjust_toc_syms): Delete redundant code.
(ppc64_elf_edit_toc): Fix style nit. Report some details
on linker failure due to reference in debug or non-alloc
sections to optimized away toc entry, and don't abort.