public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/11804] New: Fix -Wl,-z,relro gcore writer (+maybe reader)
@ 2010-07-10 21:14 jan dot kratochvil at redhat dot com
  2010-07-10 21:15 ` [Bug corefiles/11804] " jan dot kratochvil at redhat dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-07-10 21:14 UTC (permalink / raw)
  To: gdb-prs

Core files for -Wl,-z,relro generated by:
kernel-2.6.33.5-124.fc13.x86_64
kernel-xen-2.6.18-194.8.1.el5.x86_64
works correctly because:
Roland McGrath:
------------------------------------------------------------------------------
The kernel's default rules dump any MAP_PRIVATE file mapping that has
actually been modified (i.e. COW performed), so you should always have
.dynamic and all other parts of any data sgements that were written to,
regardless of their page protections at the time of the dump.
------------------------------------------------------------------------------

Core files generated by GDB gcore do not contain page containing DYNAMIC
containing DT_DEBUG pointing at _r_debug, therefore GDB cannot later find out
the shared library list.

(a) Fix gcore:
Roland McGrath:
------------------------------------------------------------------------------
gdb/gcore could do something similar from userland if it looks at
/proc/pid/smaps.  I think you can say that any non-shared mapping listed
with either Private_Dirty or Swap nonzero is one's that's been written to.
But we should probably double-check with the kernel VM people.
------------------------------------------------------------------------------

(b) We can possibly make GDB compatible even with current broken gcore by
    a hack depending on unique `_r_debug' symbol.  [patch attached]

-- 
           Summary: Fix -Wl,-z,relro gcore writer (+maybe reader)
           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-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11804

------- 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] 20+ messages in thread

end of thread, other threads:[~2012-08-07 13:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11804-4717@http.sourceware.org/bugzilla/>
2012-07-28  6:21 ` [Bug corefiles/11804] Fix -Wl,-z,relro gcore writer (+maybe reader) jan.kratochvil at redhat dot com
2012-07-28  7:07 ` jan.kratochvil at redhat dot com
2012-08-07 13:27 ` cvs-commit at gcc dot gnu.org
2012-08-07 13:28 ` jan.kratochvil at redhat dot com
2010-07-10 21:14 [Bug corefiles/11804] New: " jan dot kratochvil at redhat dot com
2010-07-10 21:15 ` [Bug corefiles/11804] " jan dot kratochvil at redhat dot com
2010-08-16 17:20 ` jan dot kratochvil at redhat dot com
2010-08-16 17:21 ` jan dot kratochvil at redhat dot com
2010-08-16 17:22 ` jan dot kratochvil at redhat dot com
2010-08-16 17:23 ` jan dot kratochvil at redhat dot com
2010-08-16 17:23 ` jan dot kratochvil at redhat dot com
2010-08-30  9:16 ` jan dot kratochvil at redhat dot com
2010-08-31 11:26 ` rguenth at gcc dot gnu dot org
2010-08-31 11:45 ` rguenth at gcc dot gnu dot org
2010-08-31 11:52 ` rguenth at gcc dot gnu dot org
2010-08-31 12:08 ` rguenth at gcc dot gnu dot org
2010-08-31 12:52 ` rguenth at gcc dot gnu dot org
2010-08-31 13:31 ` rguenth at gcc dot gnu dot org
2010-08-31 14:06 ` jan dot kratochvil at redhat dot com
2010-08-31 14:10 ` rguenth at gcc dot gnu dot org
2010-09-09 21:40 ` jan dot kratochvil at redhat 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).