2011-09-12 Pedro Alves <pedro@codesourcery.com>
Matt Rice <ratmice@gmail.com>
PR gdb/13175
* interps.c (struct interp) <interpreter_out>: Delete field.
(interp_new): Remove the data and uiout parameters and adjust.
(interp_set): Only set the current_uiout from the interpreter's
uiout after initializing the interpreter. Adjust call to
init_proc.
(interp_ui_out): Adjust to call procs->ui_out_proc.
(interp_data, interp_name): New.
* interps.h (interp_init_ftype): Add `self' parameter.
(interp_ui_out_ftype): New typedef.
(struct interp_procs) <ui_out_proc>: New method pointer.
(interp_new): Remove the data and uiout parameters.
(interp_data, interp_name): Declare.
* tui/tui-interp.c (tui_init): Adjust prototype.
(tui_ui_out): New.
(_initialize_tui_interp): Install tui_ui_out. Don't instanciate
tui_out here. Adjust call to interp_new.
* tui/tui-io.c (tui_initialize_io): Don't set current_uiout here.
* cli/cli-interp.c (cli_interpreter_init): Adjust prototype.
(cli_ui_out): New.
(_initialize_cli_interp): Install it. Adjust call to interp_new.
* mi/mi-common.h (struct mi_interp) <uiout>: New field.
* mi/mi-interp.c (mi_interpreter_init): Adjust prototype.
Initialize mi->uiout depending on the mi_version as extracted from
the interpreter's name.
(mi_ui_out): New.
(_initialize_mi_interp): Install mi_ui_out. Adjust calls to
interp_new. Don't allocate the ui_out's of the interpreters here.
gdb/testsuite/
2011-09-12 Matt Rice <ratmice@gmail.com>
Pedro Alves <pedro@codesourcery.com>
PR gdb/13175
* gdb.base/interp.exp: New tests.
* gdb.base/interp.c: New file.
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.