From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7573 invoked by alias); 28 Feb 2009 20:17:14 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 7538 invoked by uid 9674); 28 Feb 2009 20:17:13 -0000 Date: Sat, 28 Feb 2009 20:17:00 -0000 Message-ID: <20090228201713.7523.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: *** empty log message *** X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9f08a3932eefd332b72483ccec1cad049c0c7c4a X-Git-Newrev: b05c50c829e11f33bd58d5fd2de17f761207d22b X-SW-Source: 2009-q1/txt/msg00216.txt.bz2 List-Id: The branch, master has been updated via b05c50c829e11f33bd58d5fd2de17f761207d22b (commit) via acfa7328d395311e477ec40c8e9f5d64982b6454 (commit) via cee93b972b71faa6c0e9e72fcd03e90a67377875 (commit) via 6a6b10af0464c935770d19210a7b595ae439b927 (commit) via 11e5be97098e9187c48a77716a319ac3609ab1c0 (commit) via 655a09f40df0106966807702a3a12a1d273a1b69 (commit) via a473b338ce3737481feb4d4473aa74caee758671 (commit) via 63eafe5276abca7312c6fed52cead4a9229f944e (commit) via dd9c559d2949554eb4002a671d47a7f65f6acd3c (commit) via 285bd7c3eb50e65e2a9d8c6ca9cae859349fe90b (commit) via 8e336bc6b968e678de0b4baf968a5108e3cee9be (commit) from 9f08a3932eefd332b72483ccec1cad049c0c7c4a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit b05c50c829e11f33bd58d5fd2de17f761207d22b Author: gdbadmin Date: Sat Feb 28 00:00:33 2009 +0000 *** empty log message *** commit acfa7328d395311e477ec40c8e9f5d64982b6454 Author: Alan Modra Date: Sat Feb 28 00:00:05 2009 +0000 daily update commit cee93b972b71faa6c0e9e72fcd03e90a67377875 Author: Pedro Alves Date: Fri Feb 27 20:34:40 2009 +0000 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field with a ptid_t field. * linux-thread-db.c (thread_get_info_callback): Build the ptid using the pid stored in proc_handle.ptid. (thread_from_lwp, thread_db_attach_lwp, enable_thread_event) (check_for_thread_db, thread_db_detach, check_event) (thread_db_mourn_inferior, find_new_threads_callback) (thread_db_find_new_threads_1): Adjust. * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs) (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust. commit 6a6b10af0464c935770d19210a7b595ae439b927 Author: H.J. Lu Date: Fri Feb 27 20:13:04 2009 +0000 2009-02-27 H.J. Lu * i386-dis.c (OP_EX): Call OP_E_memory instead of OP_E. commit 11e5be97098e9187c48a77716a319ac3609ab1c0 Author: pmuldoon Date: Fri Feb 27 19:33:06 2009 +0000 2009-02-27 Phil Muldoon * valprint.c (read_string): Rework clean-up logic. Use free_current_contents to clean-up buffer. commit 655a09f40df0106966807702a3a12a1d273a1b69 Author: Andreas Schwab Date: Fri Feb 27 15:03:45 2009 +0000 Update e-mail address. commit a473b338ce3737481feb4d4473aa74caee758671 Author: gdbadmin Date: Fri Feb 27 00:00:33 2009 +0000 *** empty log message *** commit 63eafe5276abca7312c6fed52cead4a9229f944e Author: Alan Modra Date: Fri Feb 27 00:00:08 2009 +0000 daily update commit dd9c559d2949554eb4002a671d47a7f65f6acd3c Author: Peter Bergner Date: Thu Feb 26 22:07:33 2009 +0000 gas/ * config/tc-ppc.c (pre_defined_registers): Add "f32" to "f63", "f.32" to "f.63", "vs0" to "vs63" and "vs.0" to "vs.63". (parse_cpu): Extend -mpower7 to accept power7 and isel instructions. gas/testsuite/ * gas/ppc/e500mc.d ("wait", "waitsrv", "waitimpl"): Add tests. * gas/ppc/e500mc.s: Likewise. * gas/ppc/power6.d ("cdtbcd", "cbcdtd", "addg6s"): Add tests. * gas/ppc/power6.s: Likewise. * gas/ppc/power7.d ("lfdpx", "mffgpr", "mftgpr"): Remove invalid tests. ("wait", "waitsrv", "waitimpl", "divwe", "divwe.", "divweo", "divweo.", "divweu", "divweu.", "divweuo", "divweuo.", "bpermd", "popcntw", "popcntd", "ldbrx", "stdbrx", "lfiwzx", "lfiwzx", "fcfids", "fcfids.", "fcfidus", "fcfidus.", "fctiwu", "fctiwu.", "fctiwuz", "fctiwuz.", "fctidu", "fctidu.", "fctiduz", "fctiduz.", "fcfidu", "fcfidu.", "ftdiv", "ftdiv", "ftsqrt", "ftsqrt", "dcbtt", "dcbtstt", "dcffix", "dcffix.", "lbarx", "lbarx", "lbarx", "lharx", "lharx", "lharx", "stbcx.", "sthcx.", "fre", "fre.", "fres", "fres.", "frsqrte", "frsqrte.", "frsqrtes", "frsqrtes.", "isel"): Add tests. * gas/ppc/power7.s: Likewise. * gas/ppc/vsx.d: New test. * gas/ppc/vsx.s: Likewise. * gas/ppc/ppc.exp: Run it. include/opcode/ * ppc.h (PPC_OPCODE_POWER7): New. opcodes/ * ppc-dis.c (powerpc_init_dialect): Extend -Mpower7 to disassemble the power7 and the isel instructions. * ppc-opc.c (insert_xc6, extract_xc6): New static functions. (insert_dm, extract_dm): Likewise. (XB6): Update comment to include XX2 form. (WC, XC6, SHW, DMEX, UIM, XX2, XX3RC, XX4, XX2_MASK, XX2UIM_MASK, XX2BF_MASK, XX3BF_MASK, XX3SHW_MASK, XX4_MASK, XWC_MASK, POWER7): New. (RemoveXX3DM): Delete. (powerpc_opcodes): <"lfdp", "lfdpx", "mcrxr", "mftb", "mffgpr", "mftgpr">: Deprecate for POWER7. <"fres", "fres.", "frsqrtes", "frsqrtes.", "fre", "fre.", "frsqrte", "frsqrte.">: Deprecate the three operand form and enable the two operand form for POWER7 and later. <"wait">: Extend to accept optional parameter. Enable for POWER7. <"waitsrv", "waitimpl">: Add extended opcodes. <"ldbrx", "stdbrx">: Enable for POWER7. <"cdtbcd", "cbcdtd", "addg6s">: Add POWER6 opcodes. <"bpermd", "dcbtstt", "dcbtt", "dcffix.", "dcffix", "divde.", "divde", "divdeo.", "divdeo", "divdeu.", "divdeu", "divdeuo.", "divdeuo", "divwe.", "divwe", "divweo.", "divweo", "divweu.", "divweu", "divweuo.", "divweuo", "fcfids.", "fcfids", "fcfidu.", "fcfidu", "fcfidus.", "fcfidus", "fctidu.", "fctidu", "fctiduz.", "fctiduz", "fctiwu.", "fctiwu", "fctiwuz.", "fctiwuz", "ftdiv", "ftsqrt", "lbarx", "lfiwzx", "lharx", "popcntd", "popcntw", "stbcx.", "sthcx.">: Add POWER7 opcodes. <"lxsdux", "lxsdx", "lxvdsx", "lxvw4ux", "lxvw4x", "stxsdux", "stxsdx", "stxvw4ux", "stxvw4x", "xsabsdp", "xsadddp", "xscmpodp", "xscmpudp", "xscpsgndp", "xscvdpsp", "xscvdpsxds", "xscvdpsxws", "xscvdpuxds", "xscvdpuxws", "xscvspdp", "xscvsxddp", "xscvuxddp", "xsdivdp", "xsmaddadp", "xsmaddmdp", "xsmaxdp", "xsmindp", "xsmsubadp", "xsmsubmdp", "xsmuldp", "xsnabsdp", "xsnegdp", "xsnmaddadp", "xsnmaddmdp", "xsnmsubadp", "xsnmsubmdp", "xsrdpi", "xsrdpic", "xsrdpim", "xsrdpip", "xsrdpiz", "xsredp", "xsrsqrtedp", "xssqrtdp", "xssubdp", "xstdivdp", "xstsqrtdp", "xvabsdp", "xvabssp", "xvadddp", "xvaddsp", "xvcmpeqdp.", "xvcmpeqdp", "xvcmpeqsp.", "xvcmpeqsp", "xvcmpgedp.", "xvcmpgedp", "xvcmpgesp.", "xvcmpgesp", "xvcmpgtdp.", "xvcmpgtdp", "xvcmpgtsp.", "xvcmpgtsp", "xvcpsgnsp", "xvcvdpsp", "xvcvdpsxds", "xvcvdpsxws", "xvcvdpuxds", "xvcvdpuxws", "xvcvspdp", "xvcvspsxds", "xvcvspsxws", "xvcvspuxds", "xvcvspuxws", "xvcvsxddp", "xvcvsxdsp", "xvcvsxwdp", "xvcvsxwsp", "xvcvuxddp", "xvcvuxdsp", "xvcvuxwdp", "xvcvuxwsp", "xvdivdp", "xvdivsp", "xvmaddadp", "xvmaddasp", "xvmaddmdp", "xvmaddmsp", "xvmaxdp", "xvmaxsp", "xvmindp", "xvminsp", "xvmovsp", "xvmsubadp", "xvmsubasp", "xvmsubmdp", "xvmsubmsp", "xvmuldp", "xvmulsp", "xvnabsdp", "xvnabssp", "xvnegdp", "xvnegsp", "xvnmaddadp", "xvnmaddasp", "xvnmaddmdp", "xvnmaddmsp", "xvnmsubadp", "xvnmsubasp", "xvnmsubmdp", "xvnmsubmsp", "xvrdpi", "xvrdpic", "xvrdpim", "xvrdpip", "xvrdpiz", "xvredp", "xvresp", "xvrspi", "xvrspic", "xvrspim", "xvrspip", "xvrspiz", "xvrsqrtedp", "xvrsqrtesp", "xvsqrtdp", "xvsqrtsp", "xvsubdp", "xvsubsp", "xvtdivdp", "xvtdivsp", "xvtsqrtdp", "xvtsqrtsp", "xxland", "xxlandc", "xxlnor", "xxlor", "xxlxor", "xxmrghw", "xxmrglw", "xxsel", "xxsldwi", "xxspltd", "xxspltw", "xxswapd">: Add VSX opcodes. commit 285bd7c3eb50e65e2a9d8c6ca9cae859349fe90b Author: pmuldoon Date: Thu Feb 26 20:45:20 2009 +0000 2009-02-26 Phil Muldoon * python/python-utils.c (python_string_to_unicode): Always return a new reference. (python_string_to_target_string): Decrement transient python instance. (python_string_to_host_string): Likewise. commit 8e336bc6b968e678de0b4baf968a5108e3cee9be Author: Pedro Alves Date: Thu Feb 26 19:44:39 2009 +0000 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to call to super_fetch_registers. (mips64_linux_store_registers): Pass `ops' to call to super_store_registers. ----------------------------------------------------------------------- Summary of changes: bfd/version.h | 2 +- gdb/ChangeLog | 82 +++++++--- gdb/MAINTAINERS | 4 +- gdb/gdb_proc_service.h | 4 +- gdb/linux-thread-db.c | 20 ++-- gdb/mips-linux-nat.c | 4 +- gdb/proc-service.c | 12 +- gdb/python/python-utils.c | 16 ++- gdb/valprint.c | 15 +-- gdb/version.in | 2 +- include/opcode/ChangeLog | 4 + include/opcode/ppc.h | 3 + opcodes/ChangeLog | 58 +++++++ opcodes/i386-dis.c | 11 +- opcodes/ppc-dis.c | 5 +- opcodes/ppc-opc.c | 369 ++++++++++++++++++++++++++++++++++++++++++--- 16 files changed, 521 insertions(+), 90 deletions(-) First 500 lines of diff: diff --git a/bfd/version.h b/bfd/version.h index 15e8afe..2f5e2a4 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20090226 +#define BFD_VERSION_DATE 20090228 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 705802d..4d537be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,40 @@ +2009-02-27 Pedro Alves + + * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field + with a ptid_t field. + * linux-thread-db.c (thread_get_info_callback): Build the ptid + using the pid stored in proc_handle.ptid. + (thread_from_lwp, thread_db_attach_lwp, enable_thread_event) + (check_for_thread_db, thread_db_detach, check_event) + (thread_db_mourn_inferior, find_new_threads_callback) + (thread_db_find_new_threads_1): Adjust. + * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs) + (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust. + +2009-02-27 Phil Muldoon + + * valprint.c (read_string): Rework clean-up logic. Use + free_current_contents to clean-up buffer. + +2009-02-27 Andreas Schwab + + * MAINTAINERS: Update e-mail address. + +2009-02-26 Phil Muldoon + + * python/python-utils.c (python_string_to_unicode): Always return + a new reference. + (python_string_to_target_string): Decrement transient python + instance. + (python_string_to_host_string): Likewise. + +2007-02-26 Pedro Alves + + * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to + call to super_fetch_registers. + (mips64_linux_store_registers): Pass `ops' to call to + super_store_registers. + 2009-02-25 Doug Evans * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint @@ -42,7 +79,6 @@ * windows-nat.c (windows_thread_alive): Fix forward declaration. (get_windows_debug_event): Add ops parameter to call to windows_resume. - 2009-02-23 Pedro Alves * remote-sim.c (gdbsim_resume): Add target_ops* argument. @@ -123,7 +159,7 @@ (target_fetch_registers, target_store_registers) (target_thread_alive, target_find_new_threads): Redeclare as function. - + * target.c (update_current_target): Do not inherit or de_fault to_resume, to_fetch_registers, to_store_registers, to_thread_alive, to_find_new_threads. @@ -135,9 +171,9 @@ (target_store_registers): New. (debug_to_thread_alive, debug_to_find_new_threads): Delete. (setup_target_debug): Adjust. - + * gdbcore.h (core_ops): Delete declaration. - + * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c, inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c, i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c, @@ -174,11 +210,11 @@ Silence a few -Wmissing-prototypes warnings. PR build/9877: - * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make + * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make it static. - * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare. - * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static. - * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ... + * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare. + * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static. + * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ... (_initialize_amd64nbsd_tdep): ... this. * arm-linux-tdep.c (arm_linux_software_single_step): Make it static. (_initialize_arm_linux_tdep): Declare. @@ -349,8 +385,8 @@ * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype. * target.h (struct target_ops): Add a prototype to the to_can_execute_reverse callback. - * macroscope.c (_initialize_macroscope): Declare before definition. - * cp-namespace.c (_initialize_cp_namespace): Declare before definition. + * macroscope.c (_initialize_macroscope): Declare before definition. + * cp-namespace.c (_initialize_cp_namespace): Declare before definition. * python/python.c (_initialize_python): Declare before definition. * tui/tui-command.c: Include "tui/tui-command.h". * tui/tui-data.c (init_content_element, init_win_info): Make them @@ -464,15 +500,15 @@ Include frame information for *stopped due to CLI commands. - * ada-tasks.c (ada_normal_stop_observer): Adjust prototype. - * infcmd.c (finish_command_continuation): Pass '1' for - 'print_frame' parameter to the observer. - * infrun.c (normal_stop): Don't print mi-specific information - here. Pass 'stop_print_frame' to the 'print_frame' parameter - of the observer. - * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype. - If we need to print frame, and current uiout is not the MI one, - print frame again. + * ada-tasks.c (ada_normal_stop_observer): Adjust prototype. + * infcmd.c (finish_command_continuation): Pass '1' for + 'print_frame' parameter to the observer. + * infrun.c (normal_stop): Don't print mi-specific information + here. Pass 'stop_print_frame' to the 'print_frame' parameter + of the observer. + * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype. + If we need to print frame, and current uiout is not the MI one, + print frame again. 2009-02-13 Pierre Muller @@ -510,7 +546,7 @@ (pascal_printstr): Handle char width of 2 or 4. * p-valprint.c (pascal_val_print): Handle char of width 2 or 4. - + 2009-02-07 Daniel Jacobowitz * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc @@ -599,7 +635,7 @@ * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o. (HFILES_NO_SRCDIR): Add linux-tdep.h. (ALLDEPFILES): Add linux-tdep.c. - + * configure.tgt (arm*-*-linux* | arm*-*-uclinux*) (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to gdb_target_obs. @@ -1553,7 +1589,7 @@ (exec_file_command): Likewise. * corefile.c (reopen_exec_file): Do cleanups before returning. * breakpoint.c (insert_breakpoint_locations): Do cleanups before - returning. + returning. (do_vec_free): New function. (update_global_location_list): Make a cleanup for old_locations. Do cleanups before returning. Remove unused variable 'e'. @@ -1564,7 +1600,7 @@ 2009-01-08 Joel Brobecker Emi Suzuki - + * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for watchpoints. diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index ad4faff..874f4b9 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -356,7 +356,7 @@ GNU/Linux/x86 native & host Mark Kettenis kettenis@gnu.org GNU/Linux MIPS native & host Daniel Jacobowitz dan@debian.org -GNU/Linux m68k Andreas Schwab schwab@suse.de +GNU/Linux m68k Andreas Schwab schwab@linux-m68k.org FreeBSD native & host Mark Kettenis kettenis@gnu.org @@ -565,7 +565,7 @@ Kei Sakamoto sakamoto.kei@renesas.com Mark Salter msalter@redhat.com Richard Sandiford richard@codesourcery.com Peter Schauer Peter.Schauer@mytum.de -Andreas Schwab schwab@suse.de +Andreas Schwab schwab@linux-m68k.org Thomas Schwinge tschwinge@gnu.org Keith Seitz keiths@redhat.com Carlos Eduardo Seo cseo@linux.vnet.ibm.com diff --git a/gdb/gdb_proc_service.h b/gdb/gdb_proc_service.h index 7495a4b..de62c9d 100644 --- a/gdb/gdb_proc_service.h +++ b/gdb/gdb_proc_service.h @@ -75,8 +75,8 @@ typedef prfpregset_t gdb_prfpregset_t; /* Structure that identifies the target process. */ struct ps_prochandle { - /* The process id is all we need. */ - pid_t pid; + /* The LWP we use for memory reads. */ + ptid_t ptid; }; #endif /* gdb_proc_service.h */ diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 5281823..22f50cc 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -265,7 +265,7 @@ thread_get_info_callback (const td_thrhandle_t *thp, void *infop) thread_db_err_str (err)); /* Fill the cache. */ - thread_ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, 0); + thread_ptid = ptid_build (GET_PID (proc_handle.ptid), ti.ti_lid, 0); thread_info = find_thread_pid (thread_ptid); /* In the case of a zombie thread, don't continue. We don't want to @@ -309,7 +309,7 @@ thread_from_lwp (ptid_t ptid) gdb_assert (GET_LWP (ptid) != 0); /* Access an lwp we know is stopped. */ - proc_handle.pid = GET_LWP (ptid); + proc_handle.ptid = ptid; err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th); if (err != TD_OK) error (_("Cannot find user-level thread for LWP %ld: %s"), @@ -352,7 +352,7 @@ thread_db_attach_lwp (ptid_t ptid) gdb_assert (GET_LWP (ptid) != 0); /* Access an lwp we know is stopped. */ - proc_handle.pid = GET_LWP (ptid); + proc_handle.ptid = ptid; /* If we have only looked at the first thread before libpthread was initialized, we may not know its thread ID yet. Make sure we do @@ -457,7 +457,7 @@ enable_thread_event (td_thragent_t *thread_agent, int event, CORE_ADDR *bp) td_err_e err; /* Access an lwp we know is stopped. */ - proc_handle.pid = GET_LWP (inferior_ptid); + proc_handle.ptid = inferior_ptid; /* Get the breakpoint address for thread EVENT. */ err = td_ta_event_addr_p (thread_agent, event, ¬ify); @@ -637,7 +637,7 @@ check_for_thread_db (void) return; /* Initialize the structure that identifies the child process. */ - proc_handle.pid = GET_PID (inferior_ptid); + proc_handle.ptid = inferior_ptid; /* Now attempt to open a connection to the thread library. */ err = td_ta_new_p (&proc_handle, &thread_agent); @@ -779,7 +779,7 @@ thread_db_detach (struct target_ops *ops, char *args, int from_tty) /* Forget about the child's process ID. We shouldn't need it anymore. */ - proc_handle.pid = 0; + proc_handle.ptid = null_ptid; /* Detach thread_db target ops. */ unpush_target (&thread_db_ops); @@ -810,7 +810,7 @@ check_event (ptid_t ptid) return; /* Access an lwp we know is stopped. */ - proc_handle.pid = GET_LWP (ptid); + proc_handle.ptid = ptid; /* If we have only looked at the first thread before libpthread was initialized, we may not know its thread ID yet. Make sure we do @@ -934,7 +934,7 @@ thread_db_mourn_inferior (struct target_ops *ops) /* Forget about the child's process ID. We shouldn't need it anymore. */ - proc_handle.pid = 0; + proc_handle.ptid = null_ptid; target_beneath->to_mourn_inferior (target_beneath); @@ -963,7 +963,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE) return 0; /* A zombie -- ignore. */ - ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, 0); + ptid = ptid_build (GET_PID (proc_handle.ptid), ti.ti_lid, 0); if (ti.ti_tid == 0) { @@ -1008,7 +1008,7 @@ thread_db_find_new_threads_1 (void) return; /* Access an lwp we know is stopped. */ - proc_handle.pid = GET_LWP (ptid); + proc_handle.ptid = ptid; /* Iterate over all user-space threads to discover new threads. */ err = td_ta_thr_iter_p (thread_agent, find_new_threads_callback, NULL, TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY, diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 1acdcbe..2db2969 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -314,7 +314,7 @@ mips64_linux_fetch_registers (struct target_ops *ops, /* If we know, or just found out, that PTRACE_GETREGS does not work, fall back to PTRACE_PEEKUSER. */ if (!have_ptrace_regsets) - super_fetch_registers (regcache, regnum); + super_fetch_registers (ops, regcache, regnum); } /* Store REGNO (or all registers if REGNO == -1) to the target @@ -331,7 +331,7 @@ mips64_linux_store_registers (struct target_ops *ops, /* If we know, or just found out, that PTRACE_GETREGS does not work, fall back to PTRACE_PEEKUSER. */ if (!have_ptrace_regsets) - super_store_registers (regcache, regnum); + super_store_registers (ops, regcache, regnum); } /* Return the address in the core dump or inferior of register diff --git a/gdb/proc-service.c b/gdb/proc-service.c index 425afd9..dc05440 100644 --- a/gdb/proc-service.c +++ b/gdb/proc-service.c @@ -97,7 +97,7 @@ ps_xfer_memory (const struct ps_prochandle *ph, psaddr_t addr, int ret; CORE_ADDR core_addr = ps_addr_to_core_addr (addr); - inferior_ptid = pid_to_ptid (ph->pid); + inferior_ptid = ph->ptid; if (write) ret = target_write_memory (core_addr, buf, len); @@ -257,7 +257,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset) struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); target_fetch_registers (regcache, -1); @@ -276,7 +276,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, const prgregset_t gregset) struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); supply_gregset (regcache, (const gdb_gregset_t *) gregset); @@ -296,7 +296,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); target_fetch_registers (regcache, -1); @@ -316,7 +316,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset); @@ -332,7 +332,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, pid_t ps_getpid (gdb_ps_prochandle_t ph) { - return ph->pid; + return ptid_get_pid (ph->ptid); } /* Provide a prototype to silence -Wmissing-prototypes. */ diff --git a/gdb/python/python-utils.c b/gdb/python/python-utils.c index b0ec7b3..ddac2f5 100644 --- a/gdb/python/python-utils.c +++ b/gdb/python/python-utils.c @@ -81,7 +81,11 @@ python_string_to_unicode (PyObject *obj) /* If obj is already a unicode string, just return it. I wish life was always that simple... */ if (PyUnicode_Check (obj)) - unicode_str = obj; + { + unicode_str = obj; + Py_INCREF (obj); + } + else if (PyString_Check (obj)) unicode_str = PyUnicode_FromEncodedObject (obj, host_charset (), NULL); else @@ -136,12 +140,15 @@ char * python_string_to_target_string (PyObject *obj) { PyObject *str; + char *result; str = python_string_to_unicode (obj); if (str == NULL) return NULL; - return unicode_to_target_string (str); + result = unicode_to_target_string (str); + Py_DECREF (str); + return result; } /* Converts a python string (8-bit or unicode) to a target string in @@ -152,12 +159,15 @@ char * python_string_to_host_string (PyObject *obj) { PyObject *str; + char *result; str = python_string_to_unicode (obj); if (str == NULL) return NULL; - return unicode_to_encoded_string (str, host_charset ()); + result = unicode_to_encoded_string (str, host_charset ()); + Py_DECREF (str); + return result; } /* Converts a target string of LENGTH bytes in the target's charset to a diff --git a/gdb/valprint.c b/gdb/valprint.c index d13dc4c..b02e9df 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1226,13 +1226,14 @@ read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit, some error, such as bumping into the end of the address space. */ found_nul = 0; - old_chain = make_cleanup (null_cleanup, 0); + *buffer = NULL; + + old_chain = make_cleanup (free_current_contents, buffer); if (len > 0) { *buffer = (gdb_byte *) xmalloc (len * width); bufptr = *buffer; - old_chain = make_cleanup (xfree, *buffer); nfetch = partial_memory_read (addr, bufptr, len * width, &errcode) / width; @@ -1243,8 +1244,6 @@ read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit, { unsigned long bufsize = 0; - *buffer = NULL; - do { QUIT; @@ -1253,13 +1252,9 @@ read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit, if (*buffer == NULL) *buffer = (gdb_byte *) xmalloc (nfetch * width); else - { - discard_cleanups (old_chain); - *buffer = (gdb_byte *) xrealloc (*buffer, - (nfetch + bufsize) * width); - } + *buffer = (gdb_byte *) xrealloc (*buffer, + (nfetch + bufsize) * width); - old_chain = make_cleanup (xfree, *buffer); bufptr = *buffer + bufsize * width; bufsize += nfetch; diff --git a/gdb/version.in b/gdb/version.in index 597970c..b64cebd 100644 --- a/gdb/version.in +++ b/gdb/version.in @@ -1 +1 @@ -6.8.50.20090226-cvs +6.8.50.20090228-cvs diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index adf3940..f7018b8 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,7 @@ +2009-02-26 Peter Bergner + + * ppc.h (PPC_OPCODE_POWER7): New. + 2009-02-06 Doug Evans * i386.h: Add comment regarding sse* insns and prefixes. diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h hooks/post-receive -- Repository for Project Archer.