This is a multi-part message in MIME format. --------------080908030309010104020502 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
With our current backtrace dumps I quite oftenly find that in case of segfaults, which combined with assert failures are the most common crash cause, I cannot easily see what value the dereferenced pointer held. To be able to see this I propose invoking the "disassemble" and "info registers" commands when producing a back trace. Which would give us the ability to see the precise assembly instruction that triggered the crash, together with the value of the register that was used as pointer. Attached a patch that accomplishes this. If no one objects I'll commit this next Monday (2008-06-30). --=20 Giel --------------080908030309010104020502 Content-Type: text/x-patch; name="gdb-disassemble.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="gdb-disassemble.patch" Index: lib/exceptionhandler/exceptionhandler.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/exceptionhandler/exceptionhandler.c (revision 5341) +++ lib/exceptionhandler/exceptionhandler.c (working copy) @@ -461,10 +461,16 @@ } else if (pid > (pid_t)0) { + static const char gdbCommands[] =3D "backtrace full\n" + "frame 3\n" + "disassemble\n" + "info registers\n" + "quit\n"; + close(gdbPipe[0]); // No input from pipe =20 - write(gdbPipe[1], "backtrace full\n" "quit\n", - strlen("backtrace full\n" "quit\n")); + write(gdbPipe[1], gdbCommands, + sizeof(gdbCommands)); =20 if (waitpid(pid, NULL, 0) < 0) { --------------080908030309010104020502--
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev