]> granicus.if.org Git - strace/blobdiff - strace.c
tprint_iov*: change address argument type from unsigned long to kernel_ureg_t
[strace] / strace.c
index 5e081ab4738d93ecafc2dce8af996cff99155d92..56fdfdee29aae98b2ce69bebc7903692b7334408 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -1639,7 +1639,7 @@ init(int argc, char *argv[])
                        break;
                case 'r':
                        rflag = 1;
-                       /* fall through to tflag++ */
+                       break;
                case 't':
                        tflag++;
                        break;
@@ -1762,9 +1762,21 @@ init(int argc, char *argv[])
                        error_msg("-%c has no effect with -c", 'y');
        }
 
+       if (rflag) {
+               if (tflag > 1)
+                       error_msg("-tt has no effect with -r");
+               tflag = 1;
+       }
+
 #ifdef USE_LIBUNWIND
-       if (stack_trace_enabled)
+       if (stack_trace_enabled) {
+               unsigned int tcbi;
+
                unwind_init();
+               for (tcbi = 0; tcbi < tcbtabsize; ++tcbi) {
+                       unwind_tcb_init(tcbtab[tcbi]);
+               }
+       }
 #endif
 
        /* See if they want to run as another user. */
@@ -1828,8 +1840,7 @@ init(int argc, char *argv[])
        }
 
        if (!outfname || outfname[0] == '|' || outfname[0] == '!') {
-               char *buf = xmalloc(BUFSIZ);
-               setvbuf(shared_log, buf, _IOLBF, BUFSIZ);
+               setvbuf(shared_log, NULL, _IOLBF, 0);
        }
        if (outfname && argv[0]) {
                if (!opt_intr)
@@ -2089,8 +2100,7 @@ print_signalled(struct tcb *tcp, const int pid, int status)
        }
 
        if (cflag != CFLAG_ONLY_STATS
-        && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)
-       ) {
+           && is_number_in_set(WTERMSIG(status), &signal_set)) {
                printleader(tcp);
 #ifdef WCOREDUMP
                tprintf("+++ killed by %s %s+++\n",
@@ -2125,8 +2135,7 @@ print_stopped(struct tcb *tcp, const siginfo_t *si, const unsigned int sig)
 {
        if (cflag != CFLAG_ONLY_STATS
            && !hide_log(tcp)
-           && (qual_flags[sig] & QUAL_SIGNAL)
-          ) {
+           && is_number_in_set(sig, &signal_set)) {
                printleader(tcp);
                if (si) {
                        tprintf("--- %s ", signame(sig));