From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48853 invoked by alias); 19 Sep 2016 04:20:30 -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 48844 invoked by uid 89); 19 Sep 2016 04:20:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=1.5 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy==ac=e4=ba=ae, dear, Page, Dear?= X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Sep 2016 04:20:28 +0000 Received: by mail-oi0-f47.google.com with SMTP id t83so52605915oie.3 for ; Sun, 18 Sep 2016 21:20:27 -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:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=z9gLl78bkeu6spzAC63ybttIu0cWbLx2OyO5ajqEusU=; b=ZuWdY7ruwQu8LeR8HO4WF3ss04k4z7+lxFjh0DoaJhPiOOMl4FtIzAYL3sKU6ZhsWE RYJK8nlQpnTr5qGLE6w8veJd1aWnZs8DD0oOSrXXPzHs8j+qmMfWenk3q5wLWwwb4Jg9 TtYy2wjReTSGzsGoxZ3cKsl3JBRII5VRflhzObASYCNOuS0LcOYX04njvL6Gjz2nszpN GzHQQJUkKvqm+bkR96QQJ+mC4OXcRaxmBMOWyIZ5jgM7KYFhv5gTSn+uBpVMaQIj7CTw TYAXTf3H3CMwpGX1SkYY5lbbMNoMD/XIenU+avLIj2WUBP9zS/R/SDuHER1QHcqF7YJ9 taSg== X-Gm-Message-State: AE9vXwM0fJctEkfhD9Iuaqw8009ky4GFeZovmY/WgvK8LNGUYs9oYsrbvT798a8+6YbKKtdFGY+iGcnOclEKMg== X-Received: by 10.202.206.73 with SMTP id e70mr26425980oig.183.1474258826458; Sun, 18 Sep 2016 21:20:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.97.136 with HTTP; Sun, 18 Sep 2016 21:19:56 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?B?5oWV5Yas5Lqu?= Date: Mon, 19 Sep 2016 04:20:00 -0000 Message-ID: Subject: Re: 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 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00053.txt.bz2 I guess that in coredump generated by `gcore`, there is a missing segment item which contains: 0xb7e1e740 - 0xb7f476dd is .text in /lib/i386-linux-gnu/libc.so.6 The above line is from `info files` when I did `gdb exec coredump`. -- My best regards to you. No System Is Safe! Dongliang Mu 2016-09-18 23:47 GMT-04:00 =E6=85=95=E5=86=AC=E4=BA=AE : > 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 <=3D 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 m= e. > > -- > My best regards to you. > > No System Is Safe! > Dongliang Mu