what rr does rr aspires to be your primary C/C++ debugging tool forLinux, replacing — well, enhancing — gdb. You record a failure once, then debug the recording, deterministically, as many times as you want. The same execution is replayed every time. rr also provides efficient reverse execution under gdb. Setbreakpoints and data watchpoints and quickly reverse-execute to where they were hit. rr
C/C++でプログラムを書いているときに遭遇する厄介なバグの一つがメモリリークです。 今回はメモリリークを検出するのに使えるツールの使い方について書きます。 AddressSanitizer コンパイルオプションをつけるだけで使えて出力も見やすいのでおすすめです。 AddressSanitizerはGCC 4.8以降かLLVM 3.1以降で使うことができます。 コンパイル時にオプションをつけるだけでメモリリークを検出してくれます。(若干実行時間が長くなります) 以下のメモリリークのあるプログラム leak.cpp を例に使い方を説明します。 int main() { int *a = new int[10]; } newで作った動的配列をdeleteしていないのでメモリリークになります。 g++ -fsanitize=address -fno-omit-frame-pointer -g l

既存のプロジェクトで使用しているコンパイラを置き換えるだけで、Zigに付属しているCコンパイラを利用できる。 クロスビルドが標準で可能 上でも述べた通り、Zigは標準でクロスコンパイルが可能である。Zig libcのTaget一覧 ❯zig targets | jq ".libc" [ "aarch64_be-linux-gnu", "aarch64_be-linux-musl", "aarch64_be-windows-gnu", "aarch64-linux-gnu", "aarch64-linux-musl", "aarch64-windows-gnu", "aarch64-macos-none", "aarch64-macos-none", "armeb-linux-gnueabi", "armeb-linux-gnueabihf", "armeb-linux-musleabi

Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 漢は黙ってシングルファイル C/C++ ライブラリですね! シングルファイル C/C++ ライブラリとは, ヘッダファイル .h ひとつだけで機能が実装されているライブラリ(もう少し条件をゆるくして .cc も含む)のことです. header-only とも言われれたりします. このあたりの元祖は nothings 先生 http://nothings.org/ ですね. 最近はgithub にコードをあげています. シングルファイル系のライブラリまとめ一覧もあります. シングルファイル系が便利すぎてやばいので, 自分でもいくつか作り

1リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く