public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/11608] gcore does not support build-id
[not found] <bug-11608-4717@http.sourceware.org/bugzilla/>
@ 2012-08-09 8:42 ` jan.kratochvil at redhat dot com
2013-11-13 6:23 ` jan.kratochvil at redhat dot com
1 sibling, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-08-09 8:42 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=11608
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan.kratochvil at redhat
| |dot com
Version|unknown |7.5
--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-08-09 08:41:34 UTC ---
In practice it works now although it depends on something accidentally
happening in Linux kernel:
echo 'const int i[2000]={0};void _start(void){}'|gcc -Wall -nostdlib
-fno-asynchronous-unwind-tables -Wl,--build-id -x c -;gdb -nx ./a.out -ex 'b
*_start' -ex r -ex 'gcore core' -ex 'set confirm no' -ex q;eu-unstrip -n
--core=core
[...]
0x400000+0x400000 2fb48d92cfa19eb24524f14211565853e3da3deb@0x400284 - - [exe]
It works since:
http://sourceware.org/ml/gdb-patches/2012-08/msg00225.html
But it is more accidental:
$ cat /proc/22440/smaps
00400000-00401000 r-xp 00000000 fd:02 15079087 /home/jkratoch/t/a.out
Shared_Dirty: 0 kB
Private_Dirty: 4 kB
Anonymous: 4 kB
Swap: 0 kB
Despite it is r-x Linux kernel had to write there some data - see Private_Dirty
and Anonymous. I do not know why, Linux kernel hackers could advice.
gcc (GCC) 4.7.2 20120809 (prerelease)
GNU gdb (GDB) 7.5.50.20120809-cvs
binutils-2.22.52.0.4-8.fc18.x86_64
kernel-3.4.6-1.fc16.x86_64
The right fix would be to see the '[exe]' line even with gdb-7.5 or earlier
(not FSF GDB HEAD where is committed the patch for PR 11804 above). Earlier
GDBs did not pay attention to the 4 lines in smaps and thus they did not dump
the build-id page so that the '[exe]' line was not visible.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug corefiles/11608] gcore does not support build-id
[not found] <bug-11608-4717@http.sourceware.org/bugzilla/>
2012-08-09 8:42 ` [Bug corefiles/11608] gcore does not support build-id jan.kratochvil at redhat dot com
@ 2013-11-13 6:23 ` jan.kratochvil at redhat dot com
1 sibling, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-11-13 6:23 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=11608
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-13
Blocks| |16092
Ever confirmed|0 |1
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
At least with Fedora 19 x86_64 /usr/bin/sleep it does not work:
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000000fc4 0x0000000000400000 0x0000000000000000
0x0000000000000000 0x0000000000007000 R E 1
Shared libraries also do not have the first page dumped:
/lib64/libc.so.6:
LOAD 0x0000000000047fc4 0x0000003347200000 0x0000000000000000
0x0000000000000000 0x00000000001b6000 R E 1
Although some shared libraries have it dumped:
/lib64/ld-linux-x86-64.so.2
LOAD 0x0000000000023fc4 0x0000003346e00000 0x0000000000000000
0x0000000000021000 0x0000000000021000 R E 1
Bug 16092 is related.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug corefiles/11608] New: gcore does not support build-id
@ 2010-05-17 13:17 jan dot kratochvil at redhat dot com
2010-05-17 13:52 ` [Bug corefiles/11608] " mjw at redhat dot com
2010-05-24 4:53 ` ppluzhnikov at google dot com
0 siblings, 2 replies; 4+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-05-17 13:17 UTC (permalink / raw)
To: gdb-prs
gcore omits whole readonly-executable-code segments.
It should dump their first page so that:
eu-unstrip -n --core=corefile
works as for the kernel-dumped core files.
GDB:
Type Offset VirtAddr PhysAddr FileSiz MemSiz
Flg Align
LOAD 0x000b10 0x0000000000400000 0x0000000000000000 0x000000
0x006000 R E 0x1
Linux kernel:
Type Offset VirtAddr PhysAddr FileSiz MemSiz
Flg Align
LOAD 0x001000 0x0000000000400000 0x0000000000000000 0x001000
0x006000 R E 0x1000
--
Summary: gcore does not support build-id
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: corefiles
AssignedTo: unassigned at sourceware dot org
ReportedBy: jan dot kratochvil at redhat dot com
CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-fedora12-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=11608
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-13 6:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-11608-4717@http.sourceware.org/bugzilla/>
2012-08-09 8:42 ` [Bug corefiles/11608] gcore does not support build-id jan.kratochvil at redhat dot com
2013-11-13 6:23 ` jan.kratochvil at redhat dot com
2010-05-17 13:17 [Bug corefiles/11608] New: " jan dot kratochvil at redhat dot com
2010-05-17 13:52 ` [Bug corefiles/11608] " mjw at redhat dot com
2010-05-24 4:53 ` ppluzhnikov at google dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).