diff options
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp | 62 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectLanguage.cpp | 82 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Live/IDebugDelegate.h | 92 | ||||
-rw-r--r-- | lldb/www/lldb-coding-conventions.html | 28 | ||||
-rwxr-xr-x | lldb/www/source.html | 80 |
5 files changed, 172 insertions, 172 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp index eb6476bfd9a..295d4a1f24d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp @@ -1,31 +1,31 @@ -// A sample program for getting minidumps on Windows.
-
-#include <iostream>
-
-bool
-fizz(int x)
-{
- return x % 3 == 0;
-}
-
-bool
-buzz(int x)
-{
- return x % 5 == 0;
-}
-
-int
-main()
-{
- int *buggy = 0;
-
- for (int i = 1; i <= 100; ++i)
- {
- if (fizz(i)) std::cout << "fizz";
- if (buzz(i)) std::cout << "buzz";
- if (!fizz(i) && !buzz(i)) std::cout << i;
- std::cout << '\n';
- }
-
- return *buggy;
-}
+// A sample program for getting minidumps on Windows. + +#include <iostream> + +bool +fizz(int x) +{ + return x % 3 == 0; +} + +bool +buzz(int x) +{ + return x % 5 == 0; +} + +int +main() +{ + int *buggy = 0; + + for (int i = 1; i <= 100; ++i) + { + if (fizz(i)) std::cout << "fizz"; + if (buzz(i)) std::cout << "buzz"; + if (!fizz(i) && !buzz(i)) std::cout << i; + std::cout << '\n'; + } + + return *buggy; +} diff --git a/lldb/source/Commands/CommandObjectLanguage.cpp b/lldb/source/Commands/CommandObjectLanguage.cpp index 44c66d34593..5a8f166cb3a 100644 --- a/lldb/source/Commands/CommandObjectLanguage.cpp +++ b/lldb/source/Commands/CommandObjectLanguage.cpp @@ -1,41 +1,41 @@ -//===-- CommandObjectLanguage.cpp -------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "CommandObjectLanguage.h"
-
-#include "lldb/Host/Host.h"
-
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-
-#include "lldb/Target/Language.h"
-#include "lldb/Target/LanguageRuntime.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-CommandObjectLanguage::CommandObjectLanguage (CommandInterpreter &interpreter) :
-CommandObjectMultiword (interpreter,
- "language",
- "A set of commands for managing language-specific functionality.'.",
- "language <language-name> <subcommand> [<subcommand-options>]"
- )
-{
- //Let the LanguageRuntime populates this command with subcommands
- LanguageRuntime::InitializeCommands(this);
-}
-
-void
-CommandObjectLanguage::GenerateHelpText (Stream &output_stream) {
- CommandObjectMultiword::GenerateHelpText(output_stream);
-}
-
-CommandObjectLanguage::~CommandObjectLanguage ()
-{
-}
+//===-- CommandObjectLanguage.cpp -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "CommandObjectLanguage.h" + +#include "lldb/Host/Host.h" + +#include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/CommandReturnObject.h" + +#include "lldb/Target/Language.h" +#include "lldb/Target/LanguageRuntime.h" + +using namespace lldb; +using namespace lldb_private; + +CommandObjectLanguage::CommandObjectLanguage (CommandInterpreter &interpreter) : +CommandObjectMultiword (interpreter, + "language", + "A set of commands for managing language-specific functionality.'.", + "language <language-name> <subcommand> [<subcommand-options>]" + ) +{ + //Let the LanguageRuntime populates this command with subcommands + LanguageRuntime::InitializeCommands(this); +} + +void +CommandObjectLanguage::GenerateHelpText (Stream &output_stream) { + CommandObjectMultiword::GenerateHelpText(output_stream); +} + +CommandObjectLanguage::~CommandObjectLanguage () +{ +} diff --git a/lldb/source/Plugins/Process/Windows/Live/IDebugDelegate.h b/lldb/source/Plugins/Process/Windows/Live/IDebugDelegate.h index 0e7849bb8ff..6d864de7ed4 100644 --- a/lldb/source/Plugins/Process/Windows/Live/IDebugDelegate.h +++ b/lldb/source/Plugins/Process/Windows/Live/IDebugDelegate.h @@ -1,46 +1,46 @@ -//===-- IDebugDelegate.h ----------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_Plugins_Process_Windows_IDebugDelegate_H_
-#define liblldb_Plugins_Process_Windows_IDebugDelegate_H_
-
-#include "ForwardDecl.h"
-#include "lldb/lldb-forward.h"
-#include "lldb/lldb-types.h"
-#include <string>
-
-namespace lldb_private
-{
-class Error;
-class HostThread;
-
-//----------------------------------------------------------------------
-// IDebugDelegate
-//
-// IDebugDelegate defines an interface which allows implementors to receive
-// notification of events that happen in a debugged process.
-//----------------------------------------------------------------------
-class IDebugDelegate
-{
- public:
- virtual ~IDebugDelegate() {}
-
- virtual void OnExitProcess(uint32_t exit_code) = 0;
- virtual void OnDebuggerConnected(lldb::addr_t image_base) = 0;
- virtual ExceptionResult OnDebugException(bool first_chance, const ExceptionRecord &record) = 0;
- virtual void OnCreateThread(const HostThread &thread) = 0;
- virtual void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) = 0;
- virtual void OnLoadDll(const ModuleSpec &module_spec, lldb::addr_t module_addr) = 0;
- virtual void OnUnloadDll(lldb::addr_t module_addr) = 0;
- virtual void OnDebugString(const std::string &string) = 0;
- virtual void OnDebuggerError(const Error &error, uint32_t type) = 0;
-};
-}
-
-#endif
+//===-- IDebugDelegate.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Plugins_Process_Windows_IDebugDelegate_H_ +#define liblldb_Plugins_Process_Windows_IDebugDelegate_H_ + +#include "ForwardDecl.h" +#include "lldb/lldb-forward.h" +#include "lldb/lldb-types.h" +#include <string> + +namespace lldb_private +{ +class Error; +class HostThread; + +//---------------------------------------------------------------------- +// IDebugDelegate +// +// IDebugDelegate defines an interface which allows implementors to receive +// notification of events that happen in a debugged process. +//---------------------------------------------------------------------- +class IDebugDelegate +{ + public: + virtual ~IDebugDelegate() {} + + virtual void OnExitProcess(uint32_t exit_code) = 0; + virtual void OnDebuggerConnected(lldb::addr_t image_base) = 0; + virtual ExceptionResult OnDebugException(bool first_chance, const ExceptionRecord &record) = 0; + virtual void OnCreateThread(const HostThread &thread) = 0; + virtual void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) = 0; + virtual void OnLoadDll(const ModuleSpec &module_spec, lldb::addr_t module_addr) = 0; + virtual void OnUnloadDll(lldb::addr_t module_addr) = 0; + virtual void OnDebugString(const std::string &string) = 0; + virtual void OnDebuggerError(const Error &error, uint32_t type) = 0; +}; +} + +#endif diff --git a/lldb/www/lldb-coding-conventions.html b/lldb/www/lldb-coding-conventions.html index 7cd959ccf9d..c3702decb31 100644 --- a/lldb/www/lldb-coding-conventions.html +++ b/lldb/www/lldb-coding-conventions.html @@ -22,20 +22,20 @@ <p>The LLDB coding conventions differ in a few important respects from LLVM.</p> - <p>
- Note that <a href="http://clang.llvm.org/docs/ClangFormat.html">clang-format</a> will deal with
- most of this for you, as such is suggested to run on patches before uploading. Note however that
- clang-format is not smart enough to detect instances of humans intentionally trying to line variables
- up on a particular column boundary, and it will reformat them to remove this "extraneous" whitespace.
- While this is usually the correct behavior, LLDB does have many uses of manually aligned types and
- fields, so please be aware of this behavior of clang-format when editing this type of code.
- </p>
- <p>
- <b>Important</b>: Where not explicitly outlined below, assume that the
- <a href="http://llvm.org/docs/CodingStandards.html">LLVM Coding Conventions</a> are to be followed.
- </p>
-
- <h3>Source code width:</h3>
+ <p> + Note that <a href="http://clang.llvm.org/docs/ClangFormat.html">clang-format</a> will deal with + most of this for you, as such is suggested to run on patches before uploading. Note however that + clang-format is not smart enough to detect instances of humans intentionally trying to line variables + up on a particular column boundary, and it will reformat them to remove this "extraneous" whitespace. + While this is usually the correct behavior, LLDB does have many uses of manually aligned types and + fields, so please be aware of this behavior of clang-format when editing this type of code. + </p> + <p> + <b>Important</b>: Where not explicitly outlined below, assume that the + <a href="http://llvm.org/docs/CodingStandards.html">LLVM Coding Conventions</a> are to be followed. + </p> + + <h3>Source code width:</h3> <p>lldb does not follow the 80 character line restriction llvm imposes. In our experience, trying to fit C++ code into an 80 character line results in code that is awkward to read, and the time spent trying to find good indentation points to diff --git a/lldb/www/source.html b/lldb/www/source.html index a92fdb5856a..86a3bda10a7 100755 --- a/lldb/www/source.html +++ b/lldb/www/source.html @@ -29,53 +29,53 @@ <p> For non-Mac platforms, and for MacOSX building with CMake (not Xcode), you should check out your sources to adhere to the following directory structure: - <pre><tt>
- llvm
- |
- `-- tools
- |
- +-- clang
- |
- `-- lldb
- </tt></pre>
+ <pre><tt> + llvm + | + `-- tools + | + +-- clang + | + `-- lldb + </tt></pre> </p> - <p>
- For MacOSX building from Xcode, simply checkout LLDB and then build from Xcode. The Xcode project will
- automatically detect that it is a fresh checkout, and checkout LLVM and clang automatically. Unlike other
- platforms / build systems, it will use the following directory structure.
- <pre><tt>
- lldb
- |
- `-- llvm
- |
- +-- tools
- |
- `-- clang
- </tt>
- </pre>
- So updating your checkout will consist of updating lldb, llvm, and clang in these locations.
- </p>
- <p>
- Refer to the <a href="build.html">Build Instructions</a> for more detailed instructions on how to build for a particular
- platform / build system combination.
+ <p> + For MacOSX building from Xcode, simply checkout LLDB and then build from Xcode. The Xcode project will + automatically detect that it is a fresh checkout, and checkout LLVM and clang automatically. Unlike other + platforms / build systems, it will use the following directory structure. + <pre><tt> + lldb + | + `-- llvm + | + +-- tools + | + `-- clang + </tt> + </pre> + So updating your checkout will consist of updating lldb, llvm, and clang in these locations. + </p> + <p> + Refer to the <a href="build.html">Build Instructions</a> for more detailed instructions on how to build for a particular + platform / build system combination. </p> </div> </div> <div class="post"> <h1 class ="postheader">Contributing to LLDB</h1> <div class="postcontent"> - <p>
- Please refer to the <a href="http://llvm.org/docs/DeveloperPolicy.html">LLVM Developer Policy</a>
- for information about authoring and uploading a patch. LLDB differs from the LLVM Developer Policy in
- the following respects.
- <ul>
- <li>Coding conventions. Refer to <a href="lldb-coding-conventions.html">LLDB Coding Conventions</a>.</li>
- <li>
- Test infrastructure. It is still important to submit tests with your patches, but LLDB uses a different
- system for tests. Refer to the lldb/test folder on disk for examples of how to write tests.
- </li>
- </ul>
- For anything not explicitly listed here, assume that LLDB follows the LLVM policy.
+ <p> + Please refer to the <a href="http://llvm.org/docs/DeveloperPolicy.html">LLVM Developer Policy</a> + for information about authoring and uploading a patch. LLDB differs from the LLVM Developer Policy in + the following respects. + <ul> + <li>Coding conventions. Refer to <a href="lldb-coding-conventions.html">LLDB Coding Conventions</a>.</li> + <li> + Test infrastructure. It is still important to submit tests with your patches, but LLDB uses a different + system for tests. Refer to the lldb/test folder on disk for examples of how to write tests. + </li> + </ul> + For anything not explicitly listed here, assume that LLDB follows the LLVM policy. </p> </div> <div class="postfooter"></div> |