dim created this revision. dim added reviewers: emaste, jingham. dim added a subscriber: lldb-commits.
Similar to rL256704 and rL256707, fix a few text files which were accidentally checked in with DOS line endings, or mixed line endings. http://reviews.llvm.org/D16027 Files: packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp packages/Python/lldbsuite/test/make/test_common.h source/Commands/CommandObjectLanguage.cpp source/Plugins/Process/Windows/Live/IDebugDelegate.h www/lldb-coding-conventions.html www/source.html
Index: www/source.html =================================================================== --- www/source.html +++ 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> Index: www/lldb-coding-conventions.html =================================================================== --- www/lldb-coding-conventions.html +++ 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 Index: source/Plugins/Process/Windows/Live/IDebugDelegate.h =================================================================== --- source/Plugins/Process/Windows/Live/IDebugDelegate.h +++ 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 Index: source/Commands/CommandObjectLanguage.cpp =================================================================== --- source/Commands/CommandObjectLanguage.cpp +++ 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 () +{ +} Index: packages/Python/lldbsuite/test/make/test_common.h =================================================================== --- packages/Python/lldbsuite/test/make/test_common.h +++ packages/Python/lldbsuite/test/make/test_common.h @@ -1,19 +1,19 @@ -// This header is included in all the test programs (C and C++) and provides a -// hook for dealing with platform-specifics. -#if defined(_WIN32) || defined(_WIN64) -#ifdef COMPILING_LLDB_TEST_DLL -#define LLDB_TEST_API __declspec(dllexport) -#else -#define LLDB_TEST_API __declspec(dllimport) -#endif -#else -#define LLDB_TEST_API -#endif - -#if defined(__cplusplus) && defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Compiling MSVC libraries with _HAS_EXCEPTIONS=0, eliminates most but not all -// calls to __uncaught_exception. Unfortunately, it does seem to eliminate -// the delcaration of __uncaught_excpeiton. Including <eh.h> ensures that it is -// declared. This may not be necessary after MSVC 12. -#include <eh.h> -#endif +// This header is included in all the test programs (C and C++) and provides a +// hook for dealing with platform-specifics. +#if defined(_WIN32) || defined(_WIN64) +#ifdef COMPILING_LLDB_TEST_DLL +#define LLDB_TEST_API __declspec(dllexport) +#else +#define LLDB_TEST_API __declspec(dllimport) +#endif +#else +#define LLDB_TEST_API +#endif + +#if defined(__cplusplus) && defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) +// Compiling MSVC libraries with _HAS_EXCEPTIONS=0, eliminates most but not all +// calls to __uncaught_exception. Unfortunately, it does seem to eliminate +// the delcaration of __uncaught_excpeiton. Including <eh.h> ensures that it is +// declared. This may not be necessary after MSVC 12. +#include <eh.h> +#endif Index: packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp =================================================================== --- packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp +++ 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; +}
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits