[PATCH] [RuntimeDyldELF] Fold Placeholder into Addend

Pavel Labath labath at google.com
Mon Apr 27 01:27:55 PDT 2015


Hello,

I would compare the list of test suite failures before and after applying your patch. If the results are the same then I think you are good to go.

Also, which system are you working on? We are trying to keep the linux build green (although failures still do creep up pretty often), but the Mac build is pretty much constantly red.

Judging by the tests that were failing originally, I think the original patch broke LLDB expression evaluation completely, so I think you can reproduce it by just loading any program into LLDB and evaluating random expressions. I.e., something like this:

  labath /tmp $ cat a.cc
  #include <cstdio>
  
  int main() {
      int a = 4;
      int b = 7;
      printf("%d\n", a+b);
      return 0;
  }
  labath /tmp $ clang -g a.cc
  labath /tmp $ ~/ll/build/dbg/bin/lldb a.out
  (lldb) target create "a.out"
  Current executable set to 'a.out' (x86_64).
  (lldb) b 6
  Breakpoint 1: where = a.out`main + 39 at a.cc:6, address = 0x0000000000400557
  (lldb) r
  Process 11820 launched: '/tmp/a.out' (x86_64)
  Process 11820 stopped
  * thread #1: tid = 11820, 0x0000000000400557 a.out`main + 39 at a.cc:6, name = 'a.out', stop reason = breakpoint 1.1
      frame #0: 0x0000000000400557 a.out`main + 39 at a.cc:6
     3   	int main() {
     4   	    int a = 4;
     5   	    int b = 7;
  -> 6   	    printf("%d\n", a+b);
     7   	    return 0;
     8   	}
  (lldb) expr a
  (int) $0 = 4
  (lldb) expr a+b
  (int) $1 = 11
  (lldb) expr getpid()
  error: 'getpid' has unknown return type; cast the call to its declared return type
  error: 1 errors parsing expression
  (lldb) expr (int)getpid()
  (int) $2 = 11820
  ...

Is this what you had in mind? If you want to reproduce a specific test case, you can go into the test/ directory and find the corresponding .py file. Inside you should find the exact expressions it is trying to evaluate, and in the same folder you can find the .c file, which it is testing. However, it is usually just easier to use the test runner (dotest.py) to run a single test case (you can run dotest in a debugger if you like).

Also, feel free to drop me a revised version of the patch. I'd be happy to check it out locally and see if things work now.

cheers,
pl


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9028

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list