Re: [Lldb-commits] [PATCH] D17724: Replace getopt with llvm::cl in lldb driver
labath added a subscriber: jingham. labath added a comment. Greg, Jim, any objections? http://reviews.llvm.org/D17724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D17798: Fetch remote log files from LLGS tests
labath created this revision. labath added a reviewer: tfiala. labath added a subscriber: lldb-commits. this enables download of remote log files for llgs and debugserver tests (previously we were just passing the host file name which obviously did not work). Note this also changes the debugserver logging to work only when logging has been requested on the command line, whereas previously it would log unconditionally. I can change it back if anyone is relying on this, but I thought I'd make this consistent. http://reviews.llvm.org/D17798 Files: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py === --- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -47,6 +47,7 @@ _verbose_log_handler = None _log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s %(message)s') +_remote_server_log_file = None def setUpBaseLogging(self): self.logger = logging.getLogger(__name__) @@ -104,10 +105,35 @@ self.stub_hostname = "localhost" def tearDown(self): +if self._remote_server_log_file is not None: + lldb.remote_platform.Get(lldb.SBFileSpec(self._remote_server_log_file), +lldb.SBFileSpec(self.getLocalServerLogFile())) +lldb.remote_platform.Run(lldb.SBPlatformShellCommand("rm " + self._remote_server_log_file)) +self._remote_server_log_file = None + self.logger.removeHandler(self._verbose_log_handler) self._verbose_log_handler = None TestBase.tearDown(self) +def getLocalServerLogFile(self): +return self.log_basename + "-server.log" + +def setUpServerLogging(self, is_llgs): +if len(lldbtest_config.channels) == 0: +return # No logging requested + +if lldb.remote_platform: +log_file = lldbutil.join_remote_paths(lldb.remote_platform.GetWorkingDirectory(), "server.log") +self._remote_server_log_file = log_file +else: +log_file = self.getLocalServerLogFile() + +if is_llgs: +self.debug_monitor_extra_args.append("--log-file=" + log_file) + self.debug_monitor_extra_args.append("--log-channels={}".format(":".join(lldbtest_config.channels))) +else: +self.debug_monitor_extra_args = ["--log-file=" + self.log_file, "--log-flags=0x80"] + def get_next_port(self): return 12000 + random.randint(0,3999) @@ -214,19 +240,16 @@ self.skipTest("lldb-server exe not found") self.debug_monitor_extra_args = ["gdbserver"] - -if len(lldbtest_config.channels) > 0: - self.debug_monitor_extra_args.append("--log-file={}-server.log".format(self.log_basename)) - self.debug_monitor_extra_args.append("--log-channels={}".format(":".join(lldbtest_config.channels))) +self.setUpServerLogging(is_llgs=True) if use_named_pipe: (self.named_pipe_path, self.named_pipe, self.named_pipe_fd) = self.create_named_pipe() def init_debugserver_test(self, use_named_pipe=True): self.debug_monitor_exe = get_debugserver_exe() if not self.debug_monitor_exe: self.skipTest("debugserver exe not found") -self.debug_monitor_extra_args = ["--log-file={}-server.log".format(self.log_basename), "--log-flags=0x80"] +self.setUpServerLogging(is_llgs=False) if use_named_pipe: (self.named_pipe_path, self.named_pipe, self.named_pipe_fd) = self.create_named_pipe() # The debugserver stub has a race on handling the 'k' command, so it sends an X09 right away, then sends the real X notification Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py === --- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -47,6 +47,7 @@ _verbose_log_handler = None _log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s %(message)s') +_remote_server_log_file = None def setUpBaseLogging(self): self.logger = logging.getLogger(__name__) @@ -104,10 +105,35 @@ self.stub_hostname = "localhost" def tearDown(self): +if self._remote_server_log_file is not None: +lldb.remote_platform.Get(lldb.SBFileSpec(self._remote_server_log_file), +lldb.SBFileSpec(self.getLocalServerLogFile())) +lldb.remote_platform.Run(lldb.SBPlatformShellCommand("rm " + self._remote_server_log_file)) +self._remote_server_log_file = None + self.logger.removeHandler(self._ver
[Lldb-commits] [lldb] r262482 - Upgrade the arm/thumb architecture used by the disassembler
Author: tberghammer Date: Wed Mar 2 06:42:43 2016 New Revision: 262482 URL: http://llvm.org/viewvc/llvm-project?rev=262482&view=rev Log: Upgrade the arm/thumb architecture used by the disassembler Previously we were using thumbv7 and armv8.1a what ended up showing a few undefined instruction when disassembling code. This CL update the architectures used to armv8.2a and thumbv8.2a (newest available) so we display all instruction in the disassambly. Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=262482&r1=262481&r2=262482&view=diff == --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Wed Mar 2 06:42:43 2016 @@ -633,7 +633,7 @@ DisassemblerLLVMC::DisassemblerLLVMC (co } else { -thumb_arch_name = "thumbv7"; +thumb_arch_name = "thumbv8.2a"; } thumb_arch.GetTriple().setArchName(llvm::StringRef(thumb_arch_name.c_str())); } @@ -643,7 +643,7 @@ DisassemblerLLVMC::DisassemblerLLVMC (co // in case the code uses instructions which are not available in the oldest arm version // (used when no sub architecture is specified) if (triple.getArch() == llvm::Triple::arm && triple.getSubArch() == llvm::Triple::NoSubArch) -triple.setArchName("armv8.1a"); +triple.setArchName("armv8.2a"); const char *triple_str = triple.getTriple().c_str(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17724: Replace getopt with llvm::cl in lldb driver
jingham added a comment. IIUC, we can't get out of the business of supporting the HostGetOpt on freebsd & windows since we can't use the llvm version for the command line. So I don't see that it much eases the support burden. The differences in the help output don't seem significant, which doesn't argue strongly one way or the other. So while I'm not sure I see the point of doing this, I don't see it doing any harm either. http://reviews.llvm.org/D17724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17724: Replace getopt with llvm::cl in lldb driver
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. So this is nice that you cleaned up this one place where we can use LLVM's option parsing stuff, but it now makes the driver inconsistent with the rest of LLDB. It also makes it so you have to link some LLVM .a files into the lldb command line driver which we didn't have before. If we are going to make a change away from getopt_long(), I would rather change everything over. Otherwise we have our command line that behaves one way, and all of our command interpreter commands behaving another. And if we use option parsing from the driver, I would rather have the one consistent way that we handle options be exported through the lldb::SB API with something like: lldb::SBOptionParser lldb::SBOption So while it seems nice to update just the driver, I would really rather us have one consistent way that we parse all command line options. For this to happen we would need to: - switch over to using LLVM's option parser everywhere - export the option stuff through the lldb::SB API so the driver can use it without having to directly link against llvm - make the LLVM option parser self contained so it doesn't use global variables where each option parser has its own data (thread safe and safe to use concurrently) In general we have been trying to do this: - lldb.so or LLDB.framework can use llvm and clang APIs directly, nothing outside should - if LLDB needs to export something that is fragile (like the LLVM option parser) it needs to wrap it up in a public API that will remain stable http://reviews.llvm.org/D17724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17724: Replace getopt with llvm::cl in lldb driver
clayborg added a comment. Our current consistent way of parsing options is to use getopt_long() everywhere. http://reviews.llvm.org/D17724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:291-292 @@ +290,4 @@ +// , either directly or indirectly. +auto compilands = +m_session_up->findCompilandsForSourceFile(file_spec.GetPath(), llvm::PDB_NameSearchFlags::NS_CaseInsensitive); + clayborg wrote: > So if file_spec is "vector", this function will return all compile units that > have line table entries that match "vector"? It doesn't seem like this is > correct. If "check_inlines" is true, I would expect that you need to traverse > all compilands? I was under the impression that this is exactly what it *should* do. If someone says they want to set a breakpoint in line 100 of ``, then this would need to find all compilands that have line contributions from ``, and put a breakpoint anywhere that line 100 of `` contributes to the source. So basically if `file_spec` is `` here, then this would return an iterator for all source files that have `#include `. If you had this code: ``` // foo.cpp #include std::vector g_vec; ``` ``` // bar.cpp #include "bar.h" std::vector g_vec; ``` ``` // bar.h #include ``` ``` // baz.cpp // empty file ``` So in the above example, that line would return an iterator with 2 compilands, one for `foo.cpp` and one for `bar.cpp`. Because `` contributes to both of those source files. If `check_inlines` is false, we then skip the file unless it is actually `` itself (which of course it never would be, because you would never "compile" ``). And if it's true, we create a `SymbolContext` for it. So in short, we don't need to traverse *all* compilands, only those that have line contributions from ``. My guess is that DWARF doesn't make this easy to figure out, so you have to traverse all the lines and figure this out manually. But in PDB it's easy to get, we just say "give me all compilands that have some lines from ``, and it magically narrows down the resulting compilands to the exact right set. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. You are right. I am slowly seeing that PDB was designed well to be consumed as a user would want to, not compressed to the point of obfuscation and very difficult to extract data from like DWARF. So then we really should leave things the way they are and let "SymbolFilePDB::ResolveSymbolContext(const lldb_private::FileSpec &, uint32_t, bool, uint32_t, lldb_private::SymbolContextList &)" do the search because it can do so more efficiently than the manual search we do with DWARF. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added a comment. In http://reviews.llvm.org/D17363#366522, @clayborg wrote: > You are right. I am slowly seeing that PDB was designed well to be consumed > as a user would want to, not compressed to the point of obfuscation and very > difficult to extract data from like DWARF. > > So then we really should leave things the way they are and let > "SymbolFilePDB::ResolveSymbolContext(const lldb_private::FileSpec &, > uint32_t, bool, uint32_t, lldb_private::SymbolContextList &)" do the search > because it can do so more efficiently than the manual search we do with DWARF. Yea, in fact I suspect that when we start having large modules with thousands of lines of pre-processed source things will perform really poorly with PDB under the current design. Because it already exposes an API to return stuff in a manner convenient for being consumed, but then we have to convert it to LLDB's format for being consumed. So the extra overhead done by the underlying API will have been wasted. I still need to fix the issue regarding termination entries before I can submit, but that sounds like the last issue. I'll try to get that worked out and then submit. Thanks! http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added a comment. I looked into this a little bit, it's going to be a couple days of work for me to get termination entries set correctly. Can I go in as-is? I know you already Accepted the revision, just want to double check. I need to go make some changes to `llvm-pdbdump` on the LLVM side (it's just a tool we use for exploratory purposes like `llvm-dwarfdump`) to learn a little bit more about how the API behaves in order to confidently set the termination entry. So I was thinking I can just make a followup patch to fix that issue. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added a comment. fwiw, here's my current output showing that things behave correctly for the test case I've created. (lldb) target create D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe Current executable set to 'D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe' (i686). (lldb) target modules dump line-table test-pdb.cpp Line table for d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp in `test-pdb.exe 0x00401040: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:7 0x00401043: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:8 0x00401045: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:9 0x00401050: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:13 0x00401054: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:14 0x00401070: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:15 0x00401080: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:5 0x00401083: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:6 0x00401089: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:7 0x00401090: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:9 0x00401093: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:10 0x004010a2: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:11 http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262513 - Use shallow clones in build-llvm.py.
Author: sas Date: Wed Mar 2 14:53:19 2016 New Revision: 262513 URL: http://llvm.org/viewvc/llvm-project?rev=262513&view=rev Log: Use shallow clones in build-llvm.py. Summary: This makes cloning (and therefore the whole build) faster. The checkout step goes from ~4m to ~30s on my host. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17425 Modified: lldb/trunk/scripts/Xcode/lldbbuild.py Modified: lldb/trunk/scripts/Xcode/lldbbuild.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/lldbbuild.py?rev=262513&r1=262512&r2=262513&view=diff == --- lldb/trunk/scripts/Xcode/lldbbuild.py (original) +++ lldb/trunk/scripts/Xcode/lldbbuild.py Wed Mar 2 14:53:19 2016 @@ -65,7 +65,7 @@ class Git: def diff (self): return run_in_directory(["git", "diff"], self.spec['root']) def check_out (self): -run_in_directory(["git", "clone", self.spec['url'], self.spec['root']], lldb_source_path()) +run_in_directory(["git", "clone", "--depth=1", self.spec['url'], self.spec['root']], lldb_source_path()) run_in_directory(["git", "fetch", "--all"], self.spec['root']) run_in_directory(["git", "checkout", self.spec['ref']], self.spec['root']) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17425: Use shallow clones in build-llvm.py.
This revision was automatically updated to reflect the committed changes. Closed by commit rL262513: Use shallow clones in build-llvm.py. (authored by sas). Changed prior to commit: http://reviews.llvm.org/D17425?vs=48427&id=49663#toc Repository: rL LLVM http://reviews.llvm.org/D17425 Files: lldb/trunk/scripts/Xcode/lldbbuild.py Index: lldb/trunk/scripts/Xcode/lldbbuild.py === --- lldb/trunk/scripts/Xcode/lldbbuild.py +++ lldb/trunk/scripts/Xcode/lldbbuild.py @@ -65,7 +65,7 @@ def diff (self): return run_in_directory(["git", "diff"], self.spec['root']) def check_out (self): -run_in_directory(["git", "clone", self.spec['url'], self.spec['root']], lldb_source_path()) +run_in_directory(["git", "clone", "--depth=1", self.spec['url'], self.spec['root']], lldb_source_path()) run_in_directory(["git", "fetch", "--all"], self.spec['root']) run_in_directory(["git", "checkout", self.spec['ref']], self.spec['root']) Index: lldb/trunk/scripts/Xcode/lldbbuild.py === --- lldb/trunk/scripts/Xcode/lldbbuild.py +++ lldb/trunk/scripts/Xcode/lldbbuild.py @@ -65,7 +65,7 @@ def diff (self): return run_in_directory(["git", "diff"], self.spec['root']) def check_out (self): -run_in_directory(["git", "clone", self.spec['url'], self.spec['root']], lldb_source_path()) +run_in_directory(["git", "clone", "--depth=1", self.spec['url'], self.spec['root']], lldb_source_path()) run_in_directory(["git", "fetch", "--all"], self.spec['root']) run_in_directory(["git", "checkout", self.spec['ref']], self.spec['root']) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. As long as you don't mind your last line entry potentially being really large because it isn't terminated? (lldb) target create D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe Current executable set to 'D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe' (i686). (lldb) target modules dump line-table test-pdb.cpp Line table for d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp in `test-pdb.exe 0x00401040: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:7 0x00401043: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:8 0x00401045: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:9 0x00401050: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:13 0x00401054: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:14 0x00401070: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:15 0x00401080: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:5 0x00401083: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:6 0x00401089: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:7 0x00401090: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:9 0x00401093: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:10 0x004010a2: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:11 How large is the last line entry going to be? It isn't capped at all. You at least need a termination entry for the last entry before this can go in. You probably just need to find the function for file address 0x004010a2 and get the end address of the function and use that to terminate. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added a comment. That should be easy enough. If we make the simplifying assumption "all functions are represented contiguously in memory with no gaps", then I can just create a termination entry at `start_of_function + num_bytes_in_function`. Obviously this is a wrong assumption in the general case, but it's at least true for trivial throwaway functions compiled in debug mode, which is enough to at least say "simple cases work" http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
zturner added a comment. Is this what I should be seeing? (lldb) target create D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe Current executable set to 'D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.exe' (i686). (lldb) target modules dump line-table test-pdb.cpp Line table for d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp in `test-pdb.exe 0x00401040: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:7 0x00401043: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:8 0x00401045: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:9 0x00401047: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:9 0x00401050: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:13 0x00401054: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:14 0x00401070: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:15 0x00401073: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.cpp:15 0x00401080: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:5 0x00401083: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:6 0x00401089: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:7 0x0040108b: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb-nested.h:7 0x00401090: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:9 0x00401093: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:10 0x004010a2: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:11 0x004010a4: d:\src\llvm\tools\lldb\unittests\symbolfile\pdb\inputs\test-pdb.h:11 There is an additional line entry now which corresponds to the termination entry. The penultimate entry (in this example anyway) is always the first byte of the epilogue, and the last entry is the first byte of non-function data. Each group of lines separated by an empty line represents one function in the named file. Does this seem right? http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. I guess you already tackled the termination entry! That is exactly what I wanted to see... Sounds like line tables are done! http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
clayborg added a comment. The empty line signifies that the previous entry was a termination entry. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262528 - Add support for reading line tables from PDB files.
Author: zturner Date: Wed Mar 2 16:05:52 2016 New Revision: 262528 URL: http://llvm.org/viewvc/llvm-project?rev=262528&view=rev Log: Add support for reading line tables from PDB files. PDB is Microsoft's debug information format, and although we cannot yet generate it, we still must be able to consume it. Reason for this is that debug information for system libraries (e.g. kernel32, C Runtime Library, etc) only have debug info in PDB format, so in order to be able to support debugging of system code, we must support it. Currently this code should compile on every platform, but on non-Windows platforms the PDB plugin will return 0 capabilities, meaning that for now PDB is only supported on Windows. This may change in the future, but the API is designed in such a way that this will require few (if any) changes on the LLDB side. In the future we can just flip a switch and everything will work. This patch only adds support for line tables. It does not return information about functions, types, global variables, or anything else. This functionality will be added in a followup patch. Differential Revision: http://reviews.llvm.org/D17363 Reviewed by: Greg Clayton Added: lldb/trunk/source/Plugins/SymbolFile/PDB/ lldb/trunk/source/Plugins/SymbolFile/PDB/CMakeLists.txt lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h lldb/trunk/unittests/SymbolFile/ lldb/trunk/unittests/SymbolFile/CMakeLists.txt lldb/trunk/unittests/SymbolFile/PDB/ lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt lldb/trunk/unittests/SymbolFile/PDB/Inputs/ lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-dwarf.exe lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb.exe lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb.h lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb.pdb lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Modified: lldb/trunk/cmake/LLDBDependencies.cmake lldb/trunk/cmake/modules/AddLLDB.cmake lldb/trunk/include/lldb/Host/FileSpec.h lldb/trunk/include/lldb/Host/windows/HostInfoWindows.h lldb/trunk/source/API/SystemInitializerFull.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/windows/HostInfoWindows.cpp lldb/trunk/source/Initialization/SystemInitializerCommon.cpp lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt lldb/trunk/unittests/CMakeLists.txt Modified: lldb/trunk/cmake/LLDBDependencies.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=262528&r1=262527&r2=262528&view=diff == --- lldb/trunk/cmake/LLDBDependencies.cmake (original) +++ lldb/trunk/cmake/LLDBDependencies.cmake Wed Mar 2 16:05:52 2016 @@ -15,6 +15,7 @@ set( LLDB_USED_LIBS # Plugins lldbPluginDisassemblerLLVM lldbPluginSymbolFileDWARF + lldbPluginSymbolFilePDB lldbPluginSymbolFileSymtab lldbPluginDynamicLoaderStatic lldbPluginDynamicLoaderPosixDYLD @@ -174,7 +175,7 @@ if (LLVM_BUILD_STATIC) endif() endif() -set( LLVM_LINK_COMPONENTS +set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} interpreter asmparser Modified: lldb/trunk/cmake/modules/AddLLDB.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=262528&r1=262527&r2=262528&view=diff == --- lldb/trunk/cmake/modules/AddLLDB.cmake (original) +++ lldb/trunk/cmake/modules/AddLLDB.cmake Wed Mar 2 16:05:52 2016 @@ -68,7 +68,7 @@ macro(add_lldb_library name) target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${CLANG_USED_LIBS}) endif() endif() -llvm_config(${name} ${LLVM_LINK_COMPONENTS}) +llvm_config(${name} ${LLVM_LINK_COMPONENTS} ${LLVM_PRIVATE_LINK_COMPONENTS}) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "liblldb") if (PARAM_SHARED) Modified: lldb/trunk/include/lldb/Host/FileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=262528&r1=262527&r2=262528&view=diff == --- lldb/trunk/include/lldb/Host/FileSpec.h (original) +++ lldb/trunk/include/lldb/Host/FileSpec.h Wed Mar 2 16:05:52 2016 @@ -117,6 +117,12 @@ public: //-- ~FileSpec (); +bool +DirectoryEquals(const FileSpec &other) const; + +bool +FileEquals(const FileSpec &other) const; + //-- /// Assignment operator.
[Lldb-commits] [lldb] r262543 - Add SymbolFilePDB to xcode project file to keep it
Author: jmolenda Date: Wed Mar 2 17:39:59 2016 New Revision: 262543 URL: http://llvm.org/viewvc/llvm-project?rev=262543&view=rev Log: Add SymbolFilePDB to xcode project file to keep it up to date after 4262528. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=262543&r1=262542&r2=262543&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Mar 2 17:39:59 2016 @@ -706,12 +706,12 @@ 4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; }; 4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; }; - 6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C8000A4ECEE /* JavaASTContext.cpp */; settings = {ASSET_TAGS = (); }; }; - 6D0F61481C80AAD600A4ECEE /* DWARFASTParserJava.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */; settings = {ASSET_TAGS = (); }; }; - 6D0F614E1C80AB0700A4ECEE /* JavaLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */; settings = {ASSET_TAGS = (); }; }; - 6D0F614F1C80AB0C00A4ECEE /* JavaLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */; settings = {ASSET_TAGS = (); }; }; - 6D0F61591C80AB3500A4ECEE /* JavaFormatterFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */; settings = {ASSET_TAGS = (); }; }; - 6D0F615A1C80AB3900A4ECEE /* JavaLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61531C80AB3000A4ECEE /* JavaLanguage.cpp */; settings = {ASSET_TAGS = (); }; }; + 6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C8000A4ECEE /* JavaASTContext.cpp */; }; + 6D0F61481C80AAD600A4ECEE /* DWARFASTParserJava.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */; }; + 6D0F614E1C80AB0700A4ECEE /* JavaLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */; }; + 6D0F614F1C80AB0C00A4ECEE /* JavaLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */; }; + 6D0F61591C80AB3500A4ECEE /* JavaFormatterFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */; }; + 6D0F615A1C80AB3900A4ECEE /* JavaLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61531C80AB3000A4ECEE /* JavaLanguage.cpp */; }; 6D55B2901A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28D1A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp */; }; 6D55B2911A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28E1A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp */; }; 6D55B2921A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28F1A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp */; }; @@ -879,6 +879,8 @@ AF37E10A17C861F20061E18E /* ProcessRunLock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF37E10917C861F20061E18E /* ProcessRunLock.cpp */; }; AF45E1FE1BF57C8D000563EB /* PythonTestSuite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */; }; AF45FDE518A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */; }; + AF6335E21C87B21E00F7D554 /* SymbolFilePDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */; }; + AF6335E31C87B21E00F7D554 /* SymbolFilePDB.h in Headers */ = {isa = PBXBuildFile; fileRef = AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */; }; AF77E08F1A033C7000
[Lldb-commits] [lldb] r262566 - Don't build source/Plugins/Process/Linux in the Xcode project file.
Author: jmolenda Date: Wed Mar 2 18:21:32 2016 New Revision: 262566 URL: http://llvm.org/viewvc/llvm-project?rev=262566&view=rev Log: Don't build source/Plugins/Process/Linux in the Xcode project file. These files won't build for ios etc arm builds of lldb and aren't used for macosx native lldb's. http://reviews.llvm.org/D17750 Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=262566&r1=262565&r2=262566&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Mar 2 18:21:32 2016 @@ -96,7 +96,6 @@ 254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; }; 255EFF741AFABA720069F277 /* LockFileBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF731AFABA720069F277 /* LockFileBase.cpp */; }; 255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF751AFABA950069F277 /* LockFilePosix.cpp */; }; - 256CBDB11ADD0E1700BC6CDC /* NativeRegisterContextLinux_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDAB1ADD0DB600BC6CDC /* NativeRegisterContextLinux_arm.cpp */; }; 256CBDB41ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */; }; 256CBDBA1ADD107200BC6CDC /* RegisterContextLinux_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB61ADD107200BC6CDC /* RegisterContextLinux_arm.cpp */; }; 256CBDBC1ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */; }; @@ -1159,19 +1158,11 @@ 232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = NativeProcessProtocol.cpp; path = source/Host/common/NativeProcessProtocol.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeThreadProtocol.cpp; path = source/Host/common/NativeThreadProtocol.cpp; sourceTree = ""; }; 232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoftwareBreakpoint.cpp; path = source/Host/common/SoftwareBreakpoint.cpp; sourceTree = ""; }; - 232CB62B19213AC200EF39FC /* NativeProcessLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NativeProcessLinux.cpp; sourceTree = ""; }; - 232CB62C19213AC200EF39FC /* NativeProcessLinux.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = NativeProcessLinux.h; sourceTree = ""; }; - 232CB62D19213AC200EF39FC /* NativeThreadLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NativeThreadLinux.cpp; sourceTree = ""; }; - 232CB62E19213AC200EF39FC /* NativeThreadLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NativeThreadLinux.h; sourceTree = ""; }; 233B007919609DB40090E598 /* ProcessLaunchInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessLaunchInfo.h; path = include/lldb/Target/ProcessLaunchInfo.h; sourceTree = ""; }; 233B007A1960A0440090E598 /* ProcessInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessInfo.h; path = include/lldb/Target/ProcessInfo.h; sourceTree = ""; }; 233B007B1960C9E60090E598 /* ProcessInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessInfo.cpp; path = source/Target/ProcessInfo.cpp; sourceTree = ""; }; 233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessLaunchInfo.cpp; path = source/Target/ProcessLaunchInfo.cpp; sourceTree = ""; }; 233B009D19610D6B0090E598 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = ""; }; - 233B00A1196113730090E598 /* ProcFileReader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcFileReader.cpp; sourceTree = ""; }; - 233B00A2196113730090E598 /* ProcFileRea
[Lldb-commits] [lldb] r262570 - Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
Author: eugenezelenko Date: Wed Mar 2 18:51:40 2016 New Revision: 262570 URL: http://llvm.org/viewvc/llvm-project?rev=262570&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes. Modified: lldb/trunk/source/Core/DataBufferHeap.cpp lldb/trunk/source/Core/DataBufferMemoryMap.cpp lldb/trunk/source/Core/Disassembler.cpp lldb/trunk/source/Core/DynamicLoader.cpp lldb/trunk/source/Core/EmulateInstruction.cpp lldb/trunk/source/Core/FileSpecList.cpp Modified: lldb/trunk/source/Core/DataBufferHeap.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferHeap.cpp?rev=262570&r1=262569&r2=262570&view=diff == --- lldb/trunk/source/Core/DataBufferHeap.cpp (original) +++ lldb/trunk/source/Core/DataBufferHeap.cpp Wed Mar 2 18:51:40 2016 @@ -9,6 +9,11 @@ #include "lldb/Core/DataBufferHeap.h" +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes + using namespace lldb_private; //-- @@ -44,32 +49,26 @@ DataBufferHeap::DataBufferHeap (const vo // Virtual destructor since this class inherits from a pure virtual // base class. //-- -DataBufferHeap::~DataBufferHeap () -{ -} +DataBufferHeap::~DataBufferHeap() = default; //-- -// Return a pointer to the bytes owned by this object, or NULL if +// Return a pointer to the bytes owned by this object, or nullptr if // the object contains no bytes. //-- uint8_t * DataBufferHeap::GetBytes () { -if (m_data.empty()) -return NULL; -return &m_data[0]; +return (m_data.empty() ? nullptr : m_data.data()); } //-- -// Return a const pointer to the bytes owned by this object, or NULL +// Return a const pointer to the bytes owned by this object, or nullptr // if the object contains no bytes. //-- const uint8_t * DataBufferHeap::GetBytes () const { -if (m_data.empty()) -return NULL; -return &m_data[0]; +return (m_data.empty() ? nullptr : m_data.data()); } //-- @@ -81,7 +80,6 @@ DataBufferHeap::GetByteSize () const return m_data.size(); } - //-- // Sets the number of bytes that this object should be able to // contain. This can be used prior to copying data into the buffer. Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=262570&r1=262569&r2=262570&view=diff == --- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original) +++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Wed Mar 2 18:51:40 2016 @@ -7,10 +7,8 @@ // //===--===// - -#include +// C Includes #include -#include #include #ifdef _WIN32 #include "lldb/Host/windows/windows.h" @@ -18,8 +16,14 @@ #include #endif +// C++ Includes +#include +#include + +// Other libraries and framework includes #include "llvm/Support/MathExtras.h" +// Project includes #include "lldb/Core/DataBufferMemoryMap.h" #include "lldb/Core/Error.h" #include "lldb/Host/File.h" @@ -34,9 +38,9 @@ using namespace lldb_private; // Default Constructor //-- DataBufferMemoryMap::DataBufferMemoryMap() : -m_mmap_addr(NULL), +m_mmap_addr(nullptr), m_mmap_size(0), -m_data(NULL), +m_data(nullptr), m_size(0) { } @@ -51,7 +55,7 @@ DataBufferMemoryMap::~DataBufferMemoryMa } //-- -// Return a pointer to the bytes owned by this object, or NULL if +// Return a pointer to the bytes owned by this object, or nullptr if // the object contains no bytes. //-- uint8_t * @@ -61,7 +65,7 @@ DataBufferMemoryMap::GetBytes() } //-- -// Return a const pointer to the bytes owned by this object, or NULL +// Return a const pointer to the bytes owned by this object, or nullptr // if the object contains no bytes. //-- const uint8_t * @@ -86,7 +90,7 @@ DataBufferMemoryMap::GetByteSize() const void DataBufferMemoryMap::Clear() {
Re: [Lldb-commits] [PATCH] D17798: Fetch remote log files from LLGS tests
tfiala added a subscriber: tfiala. tfiala added a comment. LGTM! -Todd http://reviews.llvm.org/D17798 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17798: Fetch remote log files from LLGS tests
LGTM! -Todd > On Mar 2, 2016, at 2:49 AM, Pavel Labath wrote: > > labath created this revision. > labath added a reviewer: tfiala. > labath added a subscriber: lldb-commits. > > this enables download of remote log files for llgs and debugserver tests > (previously we were just > passing the host file name which obviously did not work). Note this also > changes the debugserver > logging to work only when logging has been requested on the command line, > whereas previously it > would log unconditionally. I can change it back if anyone is relying on this, > but I thought I'd > make this consistent. > > http://reviews.llvm.org/D17798 > > Files: > packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py > > Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py > === > --- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py > +++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py > @@ -47,6 +47,7 @@ > > _verbose_log_handler = None > _log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s > %(message)s') > +_remote_server_log_file = None > > def setUpBaseLogging(self): > self.logger = logging.getLogger(__name__) > @@ -104,10 +105,35 @@ > self.stub_hostname = "localhost" > > def tearDown(self): > +if self._remote_server_log_file is not None: > + > lldb.remote_platform.Get(lldb.SBFileSpec(self._remote_server_log_file), > +lldb.SBFileSpec(self.getLocalServerLogFile())) > +lldb.remote_platform.Run(lldb.SBPlatformShellCommand("rm " + > self._remote_server_log_file)) > +self._remote_server_log_file = None > + > self.logger.removeHandler(self._verbose_log_handler) > self._verbose_log_handler = None > TestBase.tearDown(self) > > +def getLocalServerLogFile(self): > +return self.log_basename + "-server.log" > + > +def setUpServerLogging(self, is_llgs): > +if len(lldbtest_config.channels) == 0: > +return # No logging requested > + > +if lldb.remote_platform: > +log_file = > lldbutil.join_remote_paths(lldb.remote_platform.GetWorkingDirectory(), > "server.log") > +self._remote_server_log_file = log_file > +else: > +log_file = self.getLocalServerLogFile() > + > +if is_llgs: > +self.debug_monitor_extra_args.append("--log-file=" + log_file) > + > self.debug_monitor_extra_args.append("--log-channels={}".format(":".join(lldbtest_config.channels))) > +else: > +self.debug_monitor_extra_args = ["--log-file=" + self.log_file, > "--log-flags=0x80"] > + > def get_next_port(self): > return 12000 + random.randint(0,3999) > > @@ -214,19 +240,16 @@ > self.skipTest("lldb-server exe not found") > > self.debug_monitor_extra_args = ["gdbserver"] > - > -if len(lldbtest_config.channels) > 0: > - > self.debug_monitor_extra_args.append("--log-file={}-server.log".format(self.log_basename)) > - > self.debug_monitor_extra_args.append("--log-channels={}".format(":".join(lldbtest_config.channels))) > +self.setUpServerLogging(is_llgs=True) > > if use_named_pipe: > (self.named_pipe_path, self.named_pipe, self.named_pipe_fd) = > self.create_named_pipe() > > def init_debugserver_test(self, use_named_pipe=True): > self.debug_monitor_exe = get_debugserver_exe() > if not self.debug_monitor_exe: > self.skipTest("debugserver exe not found") > -self.debug_monitor_extra_args = > ["--log-file={}-server.log".format(self.log_basename), "--log-flags=0x80"] > +self.setUpServerLogging(is_llgs=False) > if use_named_pipe: > (self.named_pipe_path, self.named_pipe, self.named_pipe_fd) = > self.create_named_pipe() > # The debugserver stub has a race on handling the 'k' command, so it > sends an X09 right away, then sends the real X notification > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
chying added a subscriber: chying. chying added a comment. Seems this patch breaks OSX build. I guess the new files were not added to xcode project file. Could you please take a look? http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/8892/steps/ninja%20build%20local/logs/stdio http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
Fixed with r262543 Jim > On Mar 2, 2016, at 5:10 PM, Ying Chen via lldb-commits > wrote: > > chying added a subscriber: chying. > chying added a comment. > > Seems this patch breaks OSX build. I guess the new files were not added to > xcode project file. > Could you please take a look? > http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/8892/steps/ninja%20build%20local/logs/stdio > > > http://reviews.llvm.org/D17363 > > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
jingham added a subscriber: jingham. jingham added a comment. Fixed with r262543 Jim http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
This is already fixed. Update your sources and let us know if things are working. > On Mar 2, 2016, at 5:10 PM, Ying Chen wrote: > > chying added a subscriber: chying. > chying added a comment. > > Seems this patch breaks OSX build. I guess the new files were not added to > xcode project file. > Could you please take a look? > http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/8892/steps/ninja%20build%20local/logs/stdio > > > http://reviews.llvm.org/D17363 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
clayborg added a subscriber: clayborg. clayborg added a comment. This is already fixed. Update your sources and let us know if things are working. http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17724: Replace getopt with llvm::cl in lldb driver
krytarowski added a comment. In http://reviews.llvm.org/D17724#366479, @clayborg wrote: > Our current consistent way of parsing options is to use getopt_long() > everywhere. Actually with usage of `getopt_long_only()` which is unportable. http://reviews.llvm.org/D17724 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.
chying added a comment. Yes, it is fixed now. Thank you! http://reviews.llvm.org/D17363 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits