[Lldb-commits] [PATCH] D105741: [trace] Introduce Hierarchical Trace Representation (HTR) and add `thread trace export ctf` command for Intel PT trace visualization

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 29 18:52:50 PDT 2021


wallace added inline comments.


================
Comment at: lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp:78
+                                          : LLDB_INVALID_THREAD_ID;
+    result.AppendErrorWithFormat(
+        "Thread index %lu is out of range (valid values are 0 - %u).\n", tid,
----------------
teemperor wrote:
> This generates a compiler warning:
> ```
> [3344/4085] Building CXX object tools/lldb/source/Plugins/TraceExporter/ctf/CMakeFiles/lldbPluginTraceExporterCTF.dir/CommandObjectThreadTraceExportCTF.cpp.o
> /Users/teemperor/3llvm/llvm-project/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp:79:82: warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
>         "Thread index %" PRIu64 " is out of range (valid values are 0 - %u).\n", tid,
>                       ~~~~~~~~~                                                  ^~~
> ```
> 
> The variadic format methods are obsolete and you can just use `llvm::formatv(...).str()` until we have a type-safe replacement.
thanks for the suggestion. TIL :) 
I'll make a quick fix for this


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105741/new/

https://reviews.llvm.org/D105741



More information about the lldb-commits mailing list