[PATCH] Add register dumping support to SuspendedThreadsList.

Sergey Matveev earthdok at google.com
Fri Mar 29 11:37:20 PDT 2013


  > can you use sizeof(user_regs_struct) instead of RegisterCount()?

  Since we're passing an array of uptrs, I think it makes more sense to talk in terms of array's length rather than its size in bytes. But I can change that if it's bothering you.

  > why do you need to extract SP separately here?

  Because LSan needs to know the stack pointer (to distinguish between live and stale stack regions) but can't know its index in the array.

  I guess we could make a convention to put it at index 0, but explicit is better than implicit, right?

  Also, if we decided to filter out some registers like you suggest, the array wouldn't contain the SP anymore (since it doesn't normally point into heap).

http://llvm-reviews.chandlerc.com/D593



More information about the llvm-commits mailing list