summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/itrace.c11
-rw-r--r--runtime/map.c2
-rw-r--r--runtime/unwind.c27
3 files changed, 25 insertions, 15 deletions
diff --git a/runtime/itrace.c b/runtime/itrace.c
index 68f85301..3014f9e5 100644
--- a/runtime/itrace.c
+++ b/runtime/itrace.c
@@ -20,6 +20,11 @@
#include <linux/utrace.h>
#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
@@ -182,8 +187,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);
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;
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))