[PATCH] D54187: Add debuginfo-tests that use cdb on Windows

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 6 15:56:56 PST 2018


rnk added a comment.

In https://reviews.llvm.org/D54187#1289607, @aprantl wrote:

> It would be nice if instead of having a set of windows-only tests, we could wrap cdb similar to llgdb.py wraps LLDB, so these tests run on all platforms. If the Windows debugger is just too different for this to make sense, let me know.


In the long run, I want to have both cross-debugger integration tests and debugger specific ones.

We're already having issues writing CHECK lines that match with both gdb and lldb. Take a look at asan.c, for example:

  // DEBUGGER: r
  // DEBUGGER: p s
  // CHECK: a =
  // DEBUGGER: p s.a[0]
  // CHECK: = 0
  // DEBUGGER: p s.a[1]
  // CHECK: = 1
  // DEBUGGER: p s.a[7]

It's written that way to avoid relying on format differences, and it's pretty limiting. See also the way that cdb prints decimal integers as "0n42". The wrapper would have to reformat cdb output or do... something, it's not clear what yet. Even simple commands like "break 13" would need a lot of work to translate into cdb commands. At least, I can never set breakpoints by line number manually in windbg. =P I always give up and do it by symbol name or by jamming __debugbreak() into the source as I've done here.

We've been talking about setting up debugger integration tests for years, and we have never done it, so I really just wanted to float the idea and do the absolute minimum amount of work to get it set up and running.


https://reviews.llvm.org/D54187





More information about the cfe-commits mailing list