From 508e476d212146602499c9bf1283e15ee9f2f037 Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Wed, 13 May 2009 22:08:37 +0530 Subject: Initialize aptr in runtime/map.c and keep gcc-4.4 happy --- runtime/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/map.c b/runtime/map.c index 190ba91b..74467f30 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -719,7 +719,7 @@ static MAP _stp_pmap_agg (PMAP pmap) { int i, hash; MAP m, agg; - struct map_node *ptr, *aptr; + struct map_node *ptr, *aptr = NULL; struct hlist_head *head, *ahead; struct hlist_node *e, *f; -- cgit From 7b479e045e3ed49ed58cd02df4d805a94cdc5f13 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 15 May 2009 15:06:33 +0200 Subject: Tidy/tighten DEBUG_UNWIND ptrType a bit. * runtime/unwind.c (_stp_enc_hi_name): Include prefix for hi == 0. (_stp_enc_lo_name): Don't include prefix. (_stp_eh_enc_name): Always include hi_name. (unwind): Always include newline in dbug_unwind() calls. --- runtime/unwind.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'runtime') diff --git a/runtime/unwind.c b/runtime/unwind.c index aacd56f1..f03534bd 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -520,7 +520,7 @@ static u32 *_stp_search_unwind_hdr(unsigned long pc, #ifdef DEBUG_UNWIND static const char *_stp_enc_hi_name[] = { - "", + "DW_EH_PE", "DW_EH_PE_pcrel", "DW_EH_PE_textrel", "DW_EH_PE_datarel", @@ -528,15 +528,15 @@ static const char *_stp_enc_hi_name[] = { "DW_EH_PE_aligned" }; static const char *_stp_enc_lo_name[] = { - "DW_EH_PE_absptr", - "DW_EH_PE_uleb128", - "DW_EH_PE_udata2", - "DW_EH_PE_udata4", - "DW_EH_PE_udata8", - "DW_EH_PE_sleb128", - "DW_EH_PE_sdata2", - "DW_EH_PE_sdata4", - "DW_EH_PE_sdata8" + "_absptr", + "_uleb128", + "_udata2", + "_udata4", + "_udata8", + "_sleb128", + "_sdata2", + "_sdata4", + "_sdata8" }; static char *_stp_eh_enc_name(signed type) { @@ -555,8 +555,7 @@ static char *_stp_eh_enc_name(signed type) buf[0] = 0; if (type & DW_EH_PE_indirect) strlcpy(buf, "DW_EH_PE_indirect|", sizeof(buf)); - if (hi) - strlcat(buf, _stp_enc_hi_name[hi], sizeof(buf)); + strlcat(buf, _stp_enc_hi_name[hi], sizeof(buf)); if (type & DW_EH_PE_signed) low += 4; @@ -610,7 +609,7 @@ static int unwind(struct unwind_frame_info *frame, struct task_struct *tsk) startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); startLoc = adjustStartLoc(startLoc, m, s); - dbug_unwind(2, "startLoc=%lx, ptrType=%s", startLoc, _stp_eh_enc_name(ptrType)); + dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); if (!(ptrType & DW_EH_PE_indirect)) ptrType &= DW_EH_PE_FORM | DW_EH_PE_signed; endLoc = startLoc + read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); @@ -640,7 +639,7 @@ static int unwind(struct unwind_frame_info *frame, struct task_struct *tsk) ptr = (const u8 *)(fde + 2); startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); startLoc = adjustStartLoc(startLoc, m, s); - dbug_unwind(2, "startLoc=%lx, ptrType=%s", startLoc, _stp_eh_enc_name(ptrType)); + dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); if (!startLoc) continue; if (!(ptrType & DW_EH_PE_indirect)) -- cgit From cf2742ffae0f4333eb3a69a768c8a3b7aa319c49 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 18 May 2009 13:05:01 -0500 Subject: PR10091 fixes. * runtime/itrace.c (usr_itrace_report_signal): Add a workaround for ppc-specific problem. * testsuite/systemtap.base/itrace.exp: Improved tests. Improved test completeness. Will also no longer give fails for systems that don't support single or block step (will give xfails instead). --- runtime/itrace.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime') diff --git a/runtime/itrace.c b/runtime/itrace.c index 68f85301..1c8e8d87 100644 --- a/runtime/itrace.c +++ b/runtime/itrace.c @@ -182,8 +182,14 @@ static u32 usr_itrace_report_signal(u32 action, if (info->si_signo != SIGTRAP || !ui) return UTRACE_RESUME; +#if defined(UTRACE_ORIG_VERSION) && defined(CONFIG_PPC) + /* Because of a ppc utrace bug, we need to stop the task here. + usr_itrace_report_quiesce() will continue stepping the task. */ + return_flags = UTRACE_SIGNAL_IGN | UTRACE_STOP | UTRACE_ACTION_NEWSTATE; +#else /* normal case: continue stepping */ return_flags = ui->step_flag | UTRACE_SIGNAL_IGN; +#endif #ifdef CONFIG_PPC if (ui->ppc_atomic_ss.step_over_atomic) { remove_atomic_ss_breakpoint(tsk, &ui->ppc_atomic_ss.end_bpt); -- cgit From 5ec6fd73a01c7ade715ec4e0c0785faec8acc3b6 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 18 May 2009 14:55:40 -0500 Subject: PR10171 workaround. * runtime/itrace.c: To avoid ia64 lockups, disable itrace on ia64. --- runtime/itrace.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/itrace.c b/runtime/itrace.c index 1c8e8d87..3014f9e5 100644 --- a/runtime/itrace.c +++ b/runtime/itrace.c @@ -20,6 +20,11 @@ #include #include "ptrace_compatibility.h" +/* PR10171: To avoid ia64 lockups, disable itrace on ia64. */ +#if defined(__ia64__) +#error "Unsupported itrace architecture" +#endif + /* PR9974: Adapt to struct renaming. */ #ifdef UTRACE_API_VERSION #define utrace_attached_engine utrace_engine -- cgit