Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb Don't read data from sections wit...



details:   https://anonhg.NetBSD.org/src/rev/89e731e0d8a0
branches:  trunk
changeset: 938925:89e731e0d8a0
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 20 14:39:26 2020 +0000

description:
Don't read data from sections without contents on NetBSD. We end up reading
0's and svr4_exec_displacement read phdrs_target successfully, and we
end up in the rabbit-hole of 0 displacement for pie binaries and then we
can't load our shared libaries from the core file.

diffstat:

 external/gpl3/gdb/dist/gdb/corelow.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r e49b5410d5ee -r 89e731e0d8a0 external/gpl3/gdb/dist/gdb/corelow.c
--- a/external/gpl3/gdb/dist/gdb/corelow.c      Sun Sep 20 12:51:57 2020 +0000
+++ b/external/gpl3/gdb/dist/gdb/corelow.c      Sun Sep 20 14:39:26 2020 +0000
@@ -841,6 +841,7 @@
        if (xfer_status == TARGET_XFER_OK)
          return TARGET_XFER_OK;
 
+#ifndef __NetBSD__
        /* Finally, attempt to access data in core file sections with
           no contents.  These will typically read as all zero.  */
        auto no_contents_cb = [&] (const struct target_section *s)
@@ -853,7 +854,7 @@
                         m_core_section_table.sections,
                         m_core_section_table.sections_end,
                         no_contents_cb);
-
+#endif
        return xfer_status;
       }
     case TARGET_OBJECT_AUXV:



Home | Main Index | Thread Index | Old Index