~ubuntu-branches/ubuntu/saucy/strace/saucy-proposed

« back to all changes in this revision

Viewing changes to strace.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-05-05 10:21:37 UTC
  • mfrom: (0.1.6 upstream) (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090505102137-ransgzeynrwa2yww
Tags: 4.5.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Add lpia as supported architecture

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
28
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
 *
30
 
 *      $Id: strace.c,v 1.86 2008/07/18 00:25:10 roland Exp $
 
30
 *      $Id: strace.c,v 1.88 2008/08/06 21:38:52 kratochvil Exp $
31
31
 */
32
32
 
33
33
#include "defs.h"
622
622
        extern char *optarg;
623
623
        struct tcb *tcp;
624
624
        int c, pid = 0;
 
625
        int optF = 0;
625
626
        struct sigaction sa;
626
627
 
627
628
        static char buf[BUFSIZ];
660
661
                        debug++;
661
662
                        break;
662
663
                case 'F':
663
 
                        /* Obsoleted, acts as `-f'.  */
 
664
                        optF = 1;
 
665
                        break;
664
666
                case 'f':
665
667
                        followfork++;
666
668
                        break;
757
759
        if ((optind == argc) == !pflag_seen)
758
760
                usage(stderr, 1);
759
761
 
 
762
        if (!followfork)
 
763
                followfork = optF;
 
764
 
760
765
        if (followfork > 1 && cflag) {
761
766
                fprintf(stderr,
762
767
                        "%s: -c and -ff are mutually exclusive options\n",
2416
2421
                        }
2417
2422
                        if (!cflag
2418
2423
                            && (qual_flags[WSTOPSIG(status)] & QUAL_SIGNAL)) {
2419
 
                                unsigned long addr = 0, pc = 0;
 
2424
                                unsigned long addr = 0;
 
2425
                                long pc = 0;
2420
2426
#if defined(PT_CR_IPSR) && defined(PT_CR_IIP) && defined(PT_GETSIGINFO)
2421
2427
#                               define PSR_RI   41
2422
2428
                                struct siginfo si;
2423
 
                                unsigned long psr;
 
2429
                                long psr;
2424
2430
 
2425
2431
                                upeek(pid, PT_CR_IPSR, &psr);
2426
2432
                                upeek(pid, PT_CR_IIP, &pc);