[lldb-dev] [Bug 35037] New: lldb provides imprecise informations to reproduce problems
https://bugs.llvm.org/show_bug.cgi?id=35037 Bug ID: 35037 Summary: lldb provides imprecise informations to reproduce problems Product: lldb Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: dav...@freebsd.org CC: apra...@apple.com, lha...@gmail.com, llvm-b...@lists.llvm.org, r...@google.com, ztur...@google.com I haven't (yet) looked into how hard this is to fix, but the current state is definitely not ideal. A failure will look like: AssertionError: False is not True : Command 'expression auto $add = [](int a, int b) { return a + b; }' returns successfully Config=x86_64-/usr/bin/ccache Session info generated @ Mon Oct 23 09:28:31 2017 To rerun this test, issue the following command from the 'test' directory: ./dotest.py -A x86_64 -C /usr/bin/ccache -v -t -N dsym lang/cpp/lambdas If you copy-paste the command you get an error, because of: dotest.py: error: unrecognized arguments: -N Removing the `-N` bit from the invocation is not really enough, because by default dotest.py picks the first `lldb` in $PATH, which is not necessarily the correct one (it's actually, almost never the correct one in development). $ python dotest.py -A x86_64 -C /usr/bin/ccache -v -t lang/cpp/lambdas ['dotest.py', '-A', 'x86_64', '-C', '/usr/bin/ccache', '-v', '-t', 'lang/cpp/lambdas'] LLDB library dir: /usr/bin LLDB import library dir: /usr/bin Traceback (most recent call last): File "", line 1, in ImportError: No module named lldb.embedded_interpreter lldb version 3.8.0 ( revision ) Last but not least, I'm currrently bulding with an in-tree clang, so I'm expecting tests to be run with that very clang. Either they're not (in which case this might be taken in consideration for fix) or the cmdline to reproduce lacks some relevant informations (again). -- You are receiving this mail because: You are the assignee for the bug.___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] [Bug 35040] New: lldb tests are failing when an in-tree clang is specified (missing ar/objcopy)
https://bugs.llvm.org/show_bug.cgi?id=35040 Bug ID: 35040 Summary: lldb tests are failing when an in-tree clang is specified (missing ar/objcopy) Product: lldb Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: dav...@freebsd.org CC: apra...@apple.com, dblai...@gmail.com, lha...@gmail.com, llvm-b...@lists.llvm.org, r...@google.com, ztur...@google.com Example: == ERROR: test_dwarf (TestBSDArchives.BSDArchivesTestCase) Break inside a() and b() defined within libfoo.a. -- Error when building test subject. Build Command: make MAKE_DSYM=NO ARCH=x86_64 CC="/home/davide/work/build-lldb/bin/clang-5.0" Build Command Output: make: /home/davide/work/build-lldb/bin/ar: Command not found make: *** [libfoo.a(a.o)] Error 127 Test Directory: /home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/functionalities/archives == ERROR: test_dwo (TestBSDArchives.BSDArchivesTestCase) Break inside a() and b() defined within libfoo.a. -- Error when building test subject. Build Command: make MAKE_DSYM=NO MAKE_DWO=YES ARCH=x86_64 CC="/home/davide/work/build-lldb/bin/clang-5.0" Build Command Output: make: /home/davide/work/build-lldb/bin/ar: Command not found make: *** [libfoo.a(a.o)] Error 127 There's a bunch of these failing, and it's a little weird. They're failing because they're assuming that `ar` and `objcopy` (and maybe other bits of binutils` live in the llvm `bin/` directory, rather than `/usr/lib` (or `/usr/local/lib`, or anywhere else in $PATH). I'm not sure if this is intended, but, that said, I don't think it's great. We might: a) Add options to `dotest.py` to override the binaries, or, more generally the binutils directory in which the tests should look b) Fallback to $PATH in case there's no `ar` or `objcopy`. c) Create symlinks from `llvm-ar` and `llvm-objcopy` to `ar` and `objcopy` in the `bin` directory (I really don't like this one) d) If the compiler used is clang (dotest already has logic for that, prepend the `llvm-` prefix to the executables) e) you name it -- You are receiving this mail because: You are the assignee for the bug.___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] [Bug 35043] New: lldb incorrectly reports multiple symbols when evaluating expressions (on Linux)
https://bugs.llvm.org/show_bug.cgi?id=35043 Bug ID: 35043 Summary: lldb incorrectly reports multiple symbols when evaluating expressions (on Linux) Product: lldb Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: dav...@freebsd.org CC: llvm-b...@lists.llvm.org I think this is a bug in the expression parser/symtab handling, but I can't say for sure. given the test in lambdas/main.cpp, after we set a breakpoint on the printf() and we try to evaluate the lambda, we get: (lldb) target create "made" Current executable set to 'made' (x86_64). (lldb) b main.cpp:14 Breakpoint 1: where = made`main + 32 at main.cpp:14, address = 0x004005f0 (lldb) r Process 32489 launched: '/home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/made' (x86_64) Process 32489 stopped * thread #1, name = 'made', stop reason = breakpoint 1.1 frame #0: 0x004005f0 made`main(argc=1, argv=0x7fffe128) at main.cpp:14 11 12 int main (int argc, char const *argv[]) 13 { -> 14 printf("Stop here\n"); //% self.runCmd("expression auto $add = [](int a, int b) { return a + b; }") 15 //% self.expect("expression $add(2,3)", substrs = ['= 5']) 16 return 0; 17 } (lldb) expression auto $add = [](int a, int b) { return a + b; } error: Multiple internal symbols found for 'a' id = {0x03cf}, range = [0x777ec290-0x777ec298), name="a" id = {0x051b}, range = [0x777ec290-0x777ec298), name="a" id = {0x00fe}, range = [0x777ec290-0x777ec298), name="a" error: Multiple internal symbols found for 'b' id = {0x051a}, range = [0x777cfe70-0x777cfe78), name="b" id = {0x03ce}, range = [0x777cfe70-0x777cfe78), name="b" id = {0x00fd}, range = [0x777cfe70-0x777cfe78), name="b" I don't think that's quite right, as `b` is not really redefined, it's just a temporary binding that we use for the lambda argument. This requires a little more knowledge of the internals than I currently have, so hints on where to look would be appreciated. I can attach the ELF object, if it's helpful -- You are receiving this mail because: You are the assignee for the bug.___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] What's the best way to use "--all-files" option from python?
The only way I've been able to do it is by using the CommandInterpreter, i.e., res = lldb.SBCommandReturnObject() lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint set -p "diag::%s" --all-files -N %s' % (name, name), res); lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint disable %s' % name, res); Is this the best way to do it? Can't seem to figure out how to use SBTarget.BreakpointCreateBySourceRegex() for all files. thanks... don ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] What's the best way to use "--all-files" option from python?
Just pass an invalid FileSpec for the source file spec, like: lldb.target.BreakpointCreateBySourceRegex("printf", lldb.SBFileSpec()) and it acts the same way as the --all-files option. That was pretty non-obvious, I'll update the docs. Actually, the thing you CAN'T do is get the command line behavior where lldb uses the "default file" i.e. when you run "break set -p" but don't supply a file or the --all-files option. That seemed to me less useful for a programming interface since the default file is history dependent (it's the file with "main" in it before you run, then it's where you last set a breakpoint, or where you last stopped, etc.) If you needed this behavior it would be better to have the target vend the default file, though right now that's really only maintained by the breakpoint command... Jim > On Oct 23, 2017, at 5:31 PM, Don Hinton via lldb-dev > wrote: > > The only way I've been able to do it is by using the CommandInterpreter, i.e., > > res = lldb.SBCommandReturnObject() > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint set -p > "diag::%s" --all-files -N %s' % (name, name), res); > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint disable %s' > % name, res); > > Is this the best way to do it? Can't seem to figure out how to use > SBTarget.BreakpointCreateBySourceRegex() for all files. > > thanks... > don > ___ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] What's the best way to use "--all-files" option from python?
Ah, great, thanks. I just figured the default was the same for both. Just wish I could use a regex for the filename as well, which would cut down the number of files about about half. thanks again... don On Mon, Oct 23, 2017 at 6:02 PM, Jim Ingham wrote: > Just pass an invalid FileSpec for the source file spec, like: > > lldb.target.BreakpointCreateBySourceRegex("printf", lldb.SBFileSpec()) > > and it acts the same way as the --all-files option. That was pretty > non-obvious, I'll update the docs. > > Actually, the thing you CAN'T do is get the command line behavior where > lldb uses the "default file" i.e. when you run "break set -p" but don't > supply a file or the --all-files option. That seemed to me less useful for > a programming interface since the default file is history dependent (it's > the file with "main" in it before you run, then it's where you last set a > breakpoint, or where you last stopped, etc.) If you needed this behavior > it would be better to have the target vend the default file, though right > now that's really only maintained by the breakpoint command... > > Jim > > > > On Oct 23, 2017, at 5:31 PM, Don Hinton via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > > > The only way I've been able to do it is by using the CommandInterpreter, > i.e., > > > > res = lldb.SBCommandReturnObject() > > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint set > -p "diag::%s" --all-files -N %s' % (name, name), res); > > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint > disable %s' % name, res); > > > > Is this the best way to do it? Can't seem to figure out how to use > SBTarget.BreakpointCreateBySourceRegex() for all files. > > > > thanks... > > don > > ___ > > lldb-dev mailing list > > lldb-dev@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev > > ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] What's the best way to use "--all-files" option from python?
Yeah, that would be easy to implement from the command line, maybe add a --file-is-regex flag or something. From the SB API it would be better to have something like: SBFileList SBTarget.GetFileListMatchingRegex("regex") Please file an enhancement request for these of hack'em in if you're so motivated. Jim > On Oct 23, 2017, at 6:13 PM, Don Hinton wrote: > > Ah, great, thanks. I just figured the default was the same for both. > > Just wish I could use a regex for the filename as well, which would cut down > the number of files about about half. > > thanks again... > don > > On Mon, Oct 23, 2017 at 6:02 PM, Jim Ingham wrote: > Just pass an invalid FileSpec for the source file spec, like: > > lldb.target.BreakpointCreateBySourceRegex("printf", lldb.SBFileSpec()) > > and it acts the same way as the --all-files option. That was pretty > non-obvious, I'll update the docs. > > Actually, the thing you CAN'T do is get the command line behavior where lldb > uses the "default file" i.e. when you run "break set -p" but don't supply a > file or the --all-files option. That seemed to me less useful for a > programming interface since the default file is history dependent (it's the > file with "main" in it before you run, then it's where you last set a > breakpoint, or where you last stopped, etc.) If you needed this behavior it > would be better to have the target vend the default file, though right now > that's really only maintained by the breakpoint command... > > Jim > > > > On Oct 23, 2017, at 5:31 PM, Don Hinton via lldb-dev > > wrote: > > > > The only way I've been able to do it is by using the CommandInterpreter, > > i.e., > > > > res = lldb.SBCommandReturnObject() > > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint set -p > > "diag::%s" --all-files -N %s' % (name, name), res); > > lldb.debugger.GetCommandInterpreter().HandleCommand('breakpoint disable > > %s' % name, res); > > > > Is this the best way to do it? Can't seem to figure out how to use > > SBTarget.BreakpointCreateBySourceRegex() for all files. > > > > thanks... > > don > > ___ > > lldb-dev mailing list > > lldb-dev@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev > > ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] how to automate all testcases using lldb-server
I want to run the test suite on iOS devices, I know how to run testcase using lldb-server one by one, but I don't know how to auto reset lldb-server, can anyone tell me how to automate all testcases using lldb-server? Thanks a lot!___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] How to automate all testcases using lldb-server
I want to run the test suite on iOS devices, I know how to run testcase using lldb-server one by one, but I don't know how to auto reset lldb-server, can anyone tell me how to automate all testcases using lldb-server? Thanks a lot!___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev