[Lldb-commits] [PATCH] D49776: Update framework-header-fix to force system sed

2018-11-04 Thread Keith Smiley via Phabricator via lldb-commits
keith added a subscriber: kastiglione.
keith added a comment.

No worries, thanks!

-

Keith Smiley


Repository:
  rL LLVM

https://reviews.llvm.org/D49776



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-25 Thread Keith Smiley via Phabricator via lldb-commits
keith created this revision.
keith added reviewers: kastiglione, beanz.
Herald added a subscriber: mgorny.

Previously the framework-header-fix script would change the sources
before they were copied, leading to unnecessary rebuilds on repeat
`ninja lldb` invocations. This runs the script on the headers after
they're copied into the produced LLDB.framework, meaning it doesn't
affect any files being built.


https://reviews.llvm.org/D49779

Files:
  cmake/modules/LLDBFramework.cmake


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,9 +12,6 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
@@ -40,6 +37,11 @@
   LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
   PUBLIC_HEADER "${framework_headers}")
 
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh
+$/Headers ${LLDB_VERSION})
+
 add_dependencies(lldb-framework
   lldb-framework-headers
   lldb-suite)


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,9 +12,6 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh ${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
@@ -40,6 +37,11 @@
   LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
   PUBLIC_HEADER "${framework_headers}")
 
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh
+$/Headers ${LLDB_VERSION})
+
 add_dependencies(lldb-framework
   lldb-framework-headers
   lldb-suite)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-25 Thread Keith Smiley via Phabricator via lldb-commits
keith added a comment.

It seems like if this was a common occurrence, it would've been fixed earlier, 
so I'm wondering if there's a difference in the way I'm building lldb that 
causes this. Using cmake:

  cmake ../llvm -G Ninja -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DLLDB_EXPORT_ALL_SYMBOLS=1 
-DLLDB_BUILD_FRAMEWORK=ON

And then `ninja lldb`, repeat `ninja lldb` builds causes ~500 files to be 
rebuilt with no source changes. I've diffed the `LLDB.framework` before and 
after and there don't seem to be any differences in the produced headers.


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-25 Thread Keith Smiley via Phabricator via lldb-commits
keith added inline comments.



Comment at: cmake/modules/LLDBFramework.cmake:21
   add_custom_command(TARGET lldb-framework POST_BUILD
 COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers

xiaobai wrote:
> This line shouldn't be necessary anymore then, right?
It still is, the change below doesn't actually do the copying, it only runs the 
script on the location the headers have already been copied too.


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith updated this revision to Diff 157525.
keith added a comment.

- Make headers a post build command


https://reviews.llvm.org/D49779

Files:
  cmake/modules/LLDBFramework.cmake


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,9 +12,6 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
@@ -40,6 +37,9 @@
   LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
   PUBLIC_HEADER "${framework_headers}")
 
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
$/Headers ${LLDB_VERSION}
+)
+
 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,9 +12,6 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh ${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
@@ -40,6 +37,9 @@
   LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
   PUBLIC_HEADER "${framework_headers}")
 
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $/Headers ${LLDB_VERSION}
+)
+
 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith added inline comments.



Comment at: cmake/modules/LLDBFramework.cmake:41
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh

xiaobai wrote:
> This should not just depend on `framework_headers`, because those are in the 
> location `${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders`. You want to run the 
> script on `$/Headers`, which is not guaranteed to 
> exist or have been populated with headers when this actually gets run. See my 
> comment above.
Updated this by making it a POST_BUILD command instead


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith added inline comments.



Comment at: cmake/modules/LLDBFramework.cmake:41
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh

xiaobai wrote:
> keith wrote:
> > xiaobai wrote:
> > > This should not just depend on `framework_headers`, because those are in 
> > > the location `${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders`. You want to 
> > > run the script on `$/Headers`, which is not 
> > > guaranteed to exist or have been populated with headers when this 
> > > actually gets run. See my comment above.
> > Updated this by making it a POST_BUILD command instead
> Can you combine this with the lldb-framework POST_BUILD above? After that 
> this should be good to go.
If I combine it with the one above I'd have to do it twice I think?


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith added inline comments.



Comment at: cmake/modules/LLDBFramework.cmake:41
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh

xiaobai wrote:
> keith wrote:
> > xiaobai wrote:
> > > keith wrote:
> > > > xiaobai wrote:
> > > > > This should not just depend on `framework_headers`, because those are 
> > > > > in the location `${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders`. You 
> > > > > want to run the script on `$/Headers`, which 
> > > > > is not guaranteed to exist or have been populated with headers when 
> > > > > this actually gets run. See my comment above.
> > > > Updated this by making it a POST_BUILD command instead
> > > Can you combine this with the lldb-framework POST_BUILD above? After that 
> > > this should be good to go.
> > If I combine it with the one above I'd have to do it twice I think?
> I think if you insert the command after moving the headers then you shouldn't 
> have to do it twice
I might be misunderstanding the suggestion. I think I would have to after line 
21 and line 28


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith added inline comments.



Comment at: cmake/modules/LLDBFramework.cmake:41
+add_custom_target(lldb-framework-headers
+  DEPENDS ${framework_headers}
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh

xiaobai wrote:
> keith wrote:
> > xiaobai wrote:
> > > keith wrote:
> > > > xiaobai wrote:
> > > > > keith wrote:
> > > > > > xiaobai wrote:
> > > > > > > This should not just depend on `framework_headers`, because those 
> > > > > > > are in the location 
> > > > > > > `${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders`. You want to run 
> > > > > > > the script on `$/Headers`, which is not 
> > > > > > > guaranteed to exist or have been populated with headers when this 
> > > > > > > actually gets run. See my comment above.
> > > > > > Updated this by making it a POST_BUILD command instead
> > > > > Can you combine this with the lldb-framework POST_BUILD above? After 
> > > > > that this should be good to go.
> > > > If I combine it with the one above I'd have to do it twice I think?
> > > I think if you insert the command after moving the headers then you 
> > > shouldn't have to do it twice
> > I might be misunderstanding the suggestion. I think I would have to after 
> > line 21 and line 28
> Oh, completely forgot about the line 28 case.  In that case, why not pull out 
> the copying of headers to right above this one then? Should allow us to 
> prevent duplicating that logic.
Done!


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith updated this revision to Diff 157547.
keith added a comment.

- Hoist LLDB.framework headers copy out of condition


https://reviews.llvm.org/D49779

Files:
  cmake/modules/LLDBFramework.cmake


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,24 +12,21 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
+
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
$/Headers ${LLDB_VERSION}
+)
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
 add_dependencies(lldb-framework clang-headers)
   endif()
   add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
 COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} 
$/Resources/Clang
   )
-else()
-  add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
-  )
 endif()
 
 set_target_properties(liblldb PROPERTIES
@@ -41,5 +38,4 @@
   PUBLIC_HEADER "${framework_headers}")
 
 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)


Index: cmake/modules/LLDBFramework.cmake
===
--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,24 +12,21 @@
  COMMAND ${CMAKE_COMMAND} -E copy ${header} ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh ${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
+
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $/Headers ${LLDB_VERSION}
+)
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
 add_dependencies(lldb-framework clang-headers)
   endif()
   add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} $/Resources/Clang
   )
-else()
-  add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
-  )
 endif()
 
 set_target_properties(liblldb PROPERTIES
@@ -41,5 +38,4 @@
   PUBLIC_HEADER "${framework_headers}")
 
 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D49779: Make framework-header-fix process copied headers

2018-07-26 Thread Keith Smiley via Phabricator via lldb-commits
keith added a comment.

No problem! Yes please! :)


https://reviews.llvm.org/D49779



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110981: [lldb] Improve help for platform put-file

2021-10-01 Thread Keith Smiley via Phabricator via lldb-commits
keith created this revision.
keith added a reviewer: kastiglione.
keith requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Herald added a subscriber: JDevlieghere.

Previously it was not clear what arguments this required, or what it would do 
if you didn't pass the destination argument.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110981

Files:
  lldb/source/Commands/CommandObjectPlatform.cpp


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,16 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) 
{
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Omitting the destination places the file in the debuggers current working 
directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,16 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) {
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Omitting the destination places the file in the debuggers current working directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110981: [lldb] Improve help for platform put-file

2021-10-04 Thread Keith Smiley via Phabricator via lldb-commits
keith updated this revision to Diff 377010.
keith marked an inline comment as done.
keith added a comment.

Update text about resolving paths


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110981

Files:
  lldb/source/Commands/CommandObjectPlatform.cpp


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,18 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) 
{
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Relative source file paths are resolved against lldb's local working 
directory.
+
+Omitting the destination places the file in the platform working 
directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,18 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) {
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Relative source file paths are resolved against lldb's local working directory.
+
+Omitting the destination places the file in the platform working directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110981: [lldb] Improve help for platform put-file

2021-10-05 Thread Keith Smiley via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0f3254b29f37: [lldb] Improve help for platform put-file 
(authored by keith).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110981

Files:
  lldb/source/Commands/CommandObjectPlatform.cpp


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,18 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) 
{
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Relative source file paths are resolved against lldb's local working 
directory.
+
+Omitting the destination places the file in the platform working 
directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;


Index: lldb/source/Commands/CommandObjectPlatform.cpp
===
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1067,7 +1067,18 @@
   CommandObjectPlatformPutFile(CommandInterpreter &interpreter)
   : CommandObjectParsed(
 interpreter, "platform put-file",
-"Transfer a file from this system to the remote end.", nullptr, 0) {
+"Transfer a file from this system to the remote end.",
+"platform put-file  []", 0) {
+SetHelpLong(
+R"(Examples:
+
+(lldb) platform put-file /source/foo.txt /destination/bar.txt
+
+(lldb) platform put-file /source/foo.txt
+
+Relative source file paths are resolved against lldb's local working directory.
+
+Omitting the destination places the file in the platform working directory.)");
   }
 
   ~CommandObjectPlatformPutFile() override = default;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114178: [lldb] Fix formatted log statement

2021-11-18 Thread Keith Smiley via Phabricator via lldb-commits
keith created this revision.
keith added reviewers: kastiglione, aprantl.
keith requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Previously this would output literally without replacements


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114178

Files:
  lldb/source/Core/Module.cpp


Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -1627,10 +1627,10 @@
 bool Module::MergeArchitecture(const ArchSpec &arch_spec) {
   if (!arch_spec.IsValid())
 return false;
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
-   "module has arch %s, merging/replacing with arch %s",
-   m_arch.GetTriple().getTriple().c_str(),
-   arch_spec.GetTriple().getTriple().c_str());
+  LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
+"module has arch %s, merging/replacing with arch %s",
+m_arch.GetTriple().getTriple().c_str(),
+arch_spec.GetTriple().getTriple().c_str());
   if (!m_arch.IsCompatibleMatch(arch_spec)) {
 // The new architecture is different, we just need to replace it.
 return SetArchitecture(arch_spec);


Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -1627,10 +1627,10 @@
 bool Module::MergeArchitecture(const ArchSpec &arch_spec) {
   if (!arch_spec.IsValid())
 return false;
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
-   "module has arch %s, merging/replacing with arch %s",
-   m_arch.GetTriple().getTriple().c_str(),
-   arch_spec.GetTriple().getTriple().c_str());
+  LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
+"module has arch %s, merging/replacing with arch %s",
+m_arch.GetTriple().getTriple().c_str(),
+arch_spec.GetTriple().getTriple().c_str());
   if (!m_arch.IsCompatibleMatch(arch_spec)) {
 // The new architecture is different, we just need to replace it.
 return SetArchitecture(arch_spec);
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114178: [lldb] Fix formatted log statement

2021-11-18 Thread Keith Smiley via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c4464a5bd35: [lldb] Fix formatted log statement (authored 
by keith).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114178

Files:
  lldb/source/Core/Module.cpp


Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -1627,10 +1627,10 @@
 bool Module::MergeArchitecture(const ArchSpec &arch_spec) {
   if (!arch_spec.IsValid())
 return false;
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
-   "module has arch %s, merging/replacing with arch %s",
-   m_arch.GetTriple().getTriple().c_str(),
-   arch_spec.GetTriple().getTriple().c_str());
+  LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
+"module has arch %s, merging/replacing with arch %s",
+m_arch.GetTriple().getTriple().c_str(),
+arch_spec.GetTriple().getTriple().c_str());
   if (!m_arch.IsCompatibleMatch(arch_spec)) {
 // The new architecture is different, we just need to replace it.
 return SetArchitecture(arch_spec);


Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -1627,10 +1627,10 @@
 bool Module::MergeArchitecture(const ArchSpec &arch_spec) {
   if (!arch_spec.IsValid())
 return false;
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
-   "module has arch %s, merging/replacing with arch %s",
-   m_arch.GetTriple().getTriple().c_str(),
-   arch_spec.GetTriple().getTriple().c_str());
+  LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
+"module has arch %s, merging/replacing with arch %s",
+m_arch.GetTriple().getTriple().c_str(),
+arch_spec.GetTriple().getTriple().c_str());
   if (!m_arch.IsCompatibleMatch(arch_spec)) {
 // The new architecture is different, we just need to replace it.
 return SetArchitecture(arch_spec);
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits