From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48092 invoked by alias); 19 Sep 2016 03:47:37 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 48065 invoked by uid 89); 19 Sep 2016 03:47:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=safe!, logging, dear, Page X-HELO: mail-oi0-f50.google.com Received: from mail-oi0-f50.google.com (HELO mail-oi0-f50.google.com) (209.85.218.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Sep 2016 03:47:35 +0000 Received: by mail-oi0-f50.google.com with SMTP id w11so180511206oia.2 for ; Sun, 18 Sep 2016 20:47:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zKLvK7p7JtubUAbNP8K/JJJWJf3hOkOyR4igObbZstE=; b=ZIPmqyGt3amrVa3Am3cIfbEcwTYsqxSAdVwY6wIHCqMmzi8O5GdTPLL+MBFdR9sfuz ptdiIl23jh7UX7I49OAXZKB3hj3sGDXDUwV4wpm7PV7pkL1VBSVpYIjri3rj3XO+lLaX ISoyh0QQAzmfnafzTQKuPFJMEg/4Jmvzr5xXgv62chrKALxlYY/p3gTh/rqWG2ftmaPd rcmaO0kgxw7zp9ScAKxK3rupCUFhvH+//xodKuzsCA/ufpeCLZC1WNjCbAIwZtr/ikJ+ I+2rCausYZBKOH7oiw/NdJXFKncE7dflwPolbuFNmM1Zd6+fXrmjBjPw6aPjztAgusRV uZcg== X-Gm-Message-State: AE9vXwNmqeDdSB+wcgBJY65K+iHfmjL7sU/sBfmFs/jYXI4t3MD7JYmRQE/Q+zpxHkHVtzom+IA5Zcs1wVPG7A== X-Received: by 10.202.226.137 with SMTP id z131mr6878681oig.52.1474256853263; Sun, 18 Sep 2016 20:47:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.97.136 with HTTP; Sun, 18 Sep 2016 20:47:02 -0700 (PDT) From: =?UTF-8?B?5oWV5Yas5Lqu?= Date: Mon, 19 Sep 2016 03:47:00 -0000 Message-ID: Subject: instructions logged by Intel PT not always in the address range of NT_FILES To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00052.txt.bz2 Dear all, When I did experiment about instructions logged by Intel PT, I found an problem: instructions logged by Intel PT are not always in the NT_FILES(executable, libraries) of coredump. I was using the following gdb script to log executed instructions and generate coredump: set pagination off set logging on set disassembly-flavor intel b _start r AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA record btrace pt continue gcore core <= gcore to generate codeump, maybe the problem, not sure. info record set record instruction-history-size unlimited record instruction-history quit $ readelf -n core (Get all the address range of NT_FILES) ...... Page size: 1 Start End Page Offset 0x08048000 0x08049000 0x00000000 /home/mdl/Work/testsuites/simple2/simple 0x08049000 0x0804a000 0x00000000 /home/mdl/Work/testsuites/simple2/simple 0xb7fb4000 0xb7fb6000 0x001ac000 /lib/i386-linux-gnu/libc-2.23.so 0xb7fb6000 0xb7fb7000 0x001ae000 /lib/i386-linux-gnu/libc-2.23.so 0xb7fdb000 0xb7ffd000 0x00000000 /lib/i386-linux-gnu/ld-2.23.so 0xb7ffe000 0xb7fff000 0x00022000 /lib/i386-linux-gnu/ld-2.23.so 0xb7fff000 0xb8000000 0x00023000 /lib/i386-linux-gnu/ld-2.23.so When I checked the executed instructions, I found there are instructions whose address is not in those NT_FILES. For example, 0xb7e1f5f3 <__libc_start_main+243>: call DWORD PTR [esp+0x70] However, this instruction is from __libc_start_main function that should be in libc library. I don't know what is problem. If I said something wrong, please correct me. -- My best regards to you. No System Is Safe! Dongliang Mu