User:Callahanp: Difference between revisions

Jump to navigation Jump to search
Replaced content with " [http://wiki.flightgear.org/User:Callahanp/goals ]"
(Weekly Status & Plan)
(Replaced content with " [http://wiki.flightgear.org/User:Callahanp/goals ]")
Line 1: Line 1:
=== This Week ===
11-Aug-2024 - 17-Aug-2024
[http://wiki.flightgear.org/User:Callahanp/goals ]
 
* initial commit for flightgear [https://sourceforge.net/p/flightgear/codetickets/2890/ tickets/2890 - Upgrade Mongoose Web Server]
* plan to refactor MongooseHttpd, MongooseConnection and the Handlers
* initiate work on test_suite/unit_tests/Network/test_httpd.cxx
 
19-Aug-2024 -
 
* Build & run test_suite/unit_tests/Network/test_httpd.cxx
*
 
=== Reading List: ===
 
==== Start With ====
*[[/cmake.org/getting-started/|https://cmake.org/getting-started/]] -- Build using g++ and clang.
*[[/learn.microsoft.com/en-us/vcpkg/|https://learn.microsoft.com/en-us/vcpkg/]] -- cross-platform C/C++ package manager
*[[https://www.jenkins.io/ -- Automation Server
*[[/www.sourceware.org/gdb/|https://www.sourceware.org/gdb/]] or [[/lldb.llvm.org/|https://lldb.llvm.org/]] -- Debuggers
*[[/github.com/google/sanitizers|https://github.com/google/sanitizers]] -- Read about each of the available sanitizers
*[[/valgrind.org/docs/manual/quick-start.html|https://valgrind.org/docs/manual/quick-start.html]] -- A suite of debugging and profiling tools
*A review of all the options for each tool you want to acquire.
 
 
 
==== Reading Lists ====
 
=== Overviews ===
 
{| class="wikitable"
! Topic !! Overview  !! Options !! Progress !! Notes !!
|-
| vcpkg || https://learn.microsoft.com/en-us/vcpkg/  ||
|-
| apt || https://wiki.debian.org/Apt ||
|-
| cmake || https://cmake.org/getting-started/ ||
|-
| g++ || https://www.gnu.org/software/gcc/ ||
|-
| gdb || https://www.sourceware.org/gdb/ ||
|-
| llvm || https://llvm.org ||
|-
| clang || https://clang.llvm.org/ ||
|-
| lldb || https://lldb.llvm.org/ ||
|-
| valgrind || https://valgrind.org/ ||
|-
| lcov || https://github.com/linux-test-project/lcov || -DENABLE_COVERAGE=1
if (ENABLE_COVERAGE)
  set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
    "set the build type." FORCE)
  include(CodeCoverage.cmake)
  append_coverage_compiler_flags()
endif()
 
add_executable
target_link_libraries( a.exe  test_a.cpp CPPUnit::CPPUnit
if (ENABLE_COVERAGE)
  setup_target_for_coverage_lcov(
      NAME coverage
      EXECUTABLE ${cmake_current_binarey_dir}/test_a
      LCOV_ARGS --rc lcov_branch_coverage=1
      GENHTML_ARGS --legend --branch-coveragbe
      DEPENDENCIES test_a)
|-
 
| sanitizers || https://github.com/google/sanitizers
https://www.cl.cam.ac.uk/~nk480/C1819/lecture5.pdf
|
|-
| asan || https://github.com/google/sanitizers/wiki/AddressSanitizer ||gdb & clang:
CMAKE_CXX_FLAGS -fsanitize=address
CMAKE_EXE_LINKER_FLAGS -fsanitize=address
|-
| msan || https://github.com/google/sanitizers/wiki/MemorySanitizer ||
|-
| tsan || https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual ||
|-
| ubsan || https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html || gdb & clang:
CMAKE_CXX_FLAGS -fsanitize=undefined
CMAKE_EXE_LINKER_FLAGS -fsanitize=undefined
|}
 
 
==Start With==
 
*[[/cmake.org/getting-started/|https://cmake.org/getting-started/]] -- Build using g++ and clang.
*[[/learn.microsoft.com/en-us/vcpkg/|https://learn.microsoft.com/en-us/vcpkg/]] -- cross-platform C/C++ package manager
*[[/www.sourceware.org/gdb/|https://www.sourceware.org/gdb/]] or [[/lldb.llvm.org/|https://lldb.llvm.org/]] -- Debuggers
*[[/github.com/google/sanitizers|https://github.com/google/sanitizers]] -- Read about each of the available sanitizers
*[[/valgrind.org/docs/manual/quick-start.html|https://valgrind.org/docs/manual/quick-start.html]] -- A suite of debugging and profiling tools
*A review of all the options for each tool you want to acquire.
 
 
== Reading Lists ==
 
=== Overviews ===
 
{| class="wikitable"
! Topic !! Overview  !! Options !! Progress !! Notes !!
|-
| vcpkg || https://learn.microsoft.com/en-us/vcpkg/  ||
|-
| apt || https://wiki.debian.org/Apt ||
|-
| cmake || https://cmake.org/getting-started/ ||
|-
| g++ || https://www.gnu.org/software/gcc/ ||
|-
| gdb || https://www.sourceware.org/gdb/ ||
|-
| llvm || https://llvm.org ||
|-
| clang || https://clang.llvm.org/ ||
|-
| lldb || https://lldb.llvm.org/ ||
|-
| valgrind || https://valgrind.org/ ||
|-
| sanitizers || https://github.com/google/sanitizers
https://www.cl.cam.ac.uk/~nk480/C1819/lecture5.pdf
|
|-
| asan || https://github.com/google/sanitizers/wiki/AddressSanitizer ||
|-
| msan || https://github.com/google/sanitizers/wiki/MemorySanitizer ||
|-
| tsan || https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual ||
|-
| ubsan || https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html ||
|}
 
==== Start With ====
*[[/cmake.org/getting-started/|https://cmake.org/getting-started/]] -- Build using g++ and clang.
*[[/learn.microsoft.com/en-us/vcpkg/|https://learn.microsoft.com/en-us/vcpkg/]] -- cross-platform C/C++ package manager
*[[/www.sourceware.org/gdb/|https://www.sourceware.org/gdb/]] or [[/lldb.llvm.org/|https://lldb.llvm.org/]] -- Debuggers
*[[/github.com/google/sanitizers|https://github.com/google/sanitizers]] -- Read about each of the available sanitizers
*[[/valgrind.org/docs/manual/quick-start.html|https://valgrind.org/docs/manual/quick-start.html]] -- A suite of debugging and profiling tools
*A review of all the options for each tool you want to acquire.
 
 
 
==== Reading Lists ====
 
=== Overviews ===
 
{| class="wikitable"
! Topic !! Overview  !! Options !! Progress !! Notes !!
|-
| vcpkg || https://learn.microsoft.com/en-us/vcpkg/  ||
|-
| apt || https://wiki.debian.org/Apt ||
|-
| cmake || https://cmake.org/getting-started/ ||
|-
| g++ || https://www.gnu.org/software/gcc/ ||
|-
| gdb || https://www.sourceware.org/gdb/ ||
|-
| llvm || https://llvm.org ||
|-
| clang || https://clang.llvm.org/ ||
|-
| lldb || https://lldb.llvm.org/ ||
|-
| valgrind || https://valgrind.org/ ||
|-
| sanitizers || https://github.com/google/sanitizers
https://www.cl.cam.ac.uk/~nk480/C1819/lecture5.pdf
|
|-
| asan || https://github.com/google/sanitizers/wiki/AddressSanitizer ||
|-
| msan || https://github.com/google/sanitizers/wiki/MemorySanitizer ||
|-
| tsan || https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual ||
|-
| ubsan || https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html ||
|}
 
=== Integration ===
 
{| class="wikitable"
! Topic !! Download_and_compile.sh !! dev1
|-
| vcpkg ||  ||
|-
| apt || ||
|-
| cmake || ||
|-
| g++ ||  ||
|-
| gdb || ||
|-
| llvm ||  ||
|-
| clang ||  ||
|-
| lldb ||  ||
|-
| valgrind ||  ||
|-
| sanitizers ||  ||
|-
| asan ||  ||
|-
| msan ||  ||
|-
| tsan || ||
|-
| ubsan || ||
|}
 
==== Follow-on Questions ====
* Does g++ support each of these sanitizers?
* What other tools should I research besides gdb, lldb, valgrind, UBSAN, ASAN, TSAN, and MSAN?
* Are there tools other than sanitizers and debuggers I should know about?
* Are there obsolete tools I should ignore?
* Are there books that cover C++ topics beyond writing C++? How about how-to guides? (I'll be searching for these next, but do you happen to know any particularly useful and easy to read?
* Crash dumps and crash dump tools. I don't know much about them. What good resources on this topic are there for Linux, Windows, and Mac?
 
 
 
 
 
==== Background ====
I'm about to start going through the list above for myself. It may take a while.
 
I'm currently involved in a project with about half a million existing lines of C++ code and want to know what tools I need to work in this environment properly. The application has multi-threaded parts.
 
I can do basic g++, Debug, DebWithRelInfo, and Release builds using cmake or a pre-defined build script and step through code line-by-line with the gdb in VSCode, but want to become familiar with gdb at the command line.
 
I want to come up to speed with clang and lldb in vscode.
 
[[/stackoverflow.com/questions/63978029/setup-lldb-debugging-with-cpp-extension-in-vscode-linux|https://stackoverflow.com/questions/63978029/setup-lldb-debugging-with-cpp-extension-in-vscode-linux]]
 
== Other Thoughts ==
 
I need to familiarize myself with other tools available, learn how to enable particular tools in a build, and learn how to use the tool's output.
 
I want to learn to use tools like UBSAN, ASAN, TSAN, and MSAN effectively and how to switch from g++ to clang when appropriate. I want to learn what tools other than the sanitizers and debuggers above are available.
 
There's no such thing as free beer! Someone pays for flightgear cloud infrastructure that I personallly benefit from.  So I contribute a little at:
 
<nowiki>https://liberapay.com/t3r</nowiki>
 
Currently working on:
 
Git Worktrees with download_and_compile.sh  (done & working)
 
Web Socket Refactor & Fix. 
 
OSM (Open Street Map) Scenery Build (on hold)
 
Goals (Maybe)
 
*Download Scenery from Current Scenery Developers
*Build Scripts for Scenery Land Class, Elevation, and OSM processing
*Understand the underlying formats in Flightgear Scenery
*Understand the processing of Scenery data between tiles in the build process and the running simulator
*Assist Scenery Developers with technical support.
*full explanation of the advantages and disadvantages of the worktree approach.
 
[[Hackathon Proposal: Property Subscription Improvements|Hackathon-2023-Proposal-Websocket-Property-Subscription-Improvements]]
980

edits

Navigation menu