This is the mail archive of the
mailing list for the GDB project.
Re: instructions logged by Intel PT not always in the address range of NT_FILES
- From: 慕冬亮 <mudongliangabcd at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 19 Sep 2016 00:19:56 -0400
- Subject: Re: instructions logged by Intel PT not always in the address range of NT_FILES
- Authentication-results: sourceware.org; auth=none
- References: <CAD-N9QXCEEwmiiTh-B=1HUVno0ufvac7DQqUQC=NFkYWAJUvdw@mail.gmail.com>
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!
2016-09-18 23:47 GMT-04:00 慕冬亮 <firstname.lastname@example.org>:
> 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
> gcore core <= gcore to generate codeump, maybe the problem, not sure.
> info record
> set record instruction-history-size unlimited
> record instruction-history
> $ readelf -n core (Get all the address range of NT_FILES)
> Page size: 1
> Start End Page Offset
> 0x08048000 0x08049000 0x00000000
> 0x08049000 0x0804a000 0x00000000
> 0xb7fb4000 0xb7fb6000 0x001ac000
> 0xb7fb6000 0xb7fb7000 0x001ae000
> 0xb7fdb000 0xb7ffd000 0x00000000
> 0xb7ffe000 0xb7fff000 0x00022000
> 0xb7fff000 0xb8000000 0x00023000
> 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