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 . do not abort() if we read a zer...



details:   https://anonhg.NetBSD.org/src/rev/2bf43b468262
branches:  trunk
changeset: 804837:2bf43b468262
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Tue Dec 02 10:34:27 2014 +0000

description:
. do not abort() if we read a zero cs or rip, or if we can't read them
. end the backtrace when encountering a soft interrupt, since they live in
  their own lwp

diffstat:

 external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 0f11d1643ae6 -r 2bf43b468262 external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c
--- a/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c       Tue Dec 02 09:05:15 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/amd64nbsd-tdep.c       Tue Dec 02 10:34:27 2014 +0000
@@ -164,8 +164,6 @@
     + amd64nbsd_tf_reg_offset[AMD64_CS_REGNUM], 8, byte_order);
   rip = read_memory_unsigned_integer (addr
     + amd64nbsd_tf_reg_offset[AMD64_RIP_REGNUM], 8, byte_order);
-  if (cs == 0 || rip == 0)
-     abort();
 
   /* The trap frame layout was changed lf the %rip value is less than 2^16 it
    * is almost certainly the %ss of the old format. */
@@ -187,9 +185,10 @@
         }
     }
 
-  if ((cs & I386_SEL_RPL) == I386_SEL_UPL)
+  if ((cs & I386_SEL_RPL) == I386_SEL_UPL ||
+       (name && strncmp(name, "Xsoft", 5) == 0))
     {
-      /* Trap from user space; terminate backtrace.  */
+      /* Trap from user space or soft interrupt; terminate backtrace.  */
       trad_frame_set_id (cache, outer_frame_id);
     }
   else



Home | Main Index | Thread Index | Old Index