[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread via lldb-commits
github-actions[bot] wrote: @royitaqi Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7ecdf620330d8e044a48b6f59f8eddd2f88f01d4...542615a18949f6f325c03761104b2f0530270065

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 323b882db7f2845563176ca057c9cd2c88f3492a Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/19] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/19] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -766,6 +771,14 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; clayborg wrote: We should mention in a comment that this will only be filled in if the setting is true.

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Just a few comments to fixup as mentioned and this is good to go. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-20 Thread Greg Clayton via lldb-commits
@@ -766,6 +771,14 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands and their details. Each element in clayborg wrote: We should mention the

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-17 Thread via lldb-commits
@@ -135,7 +136,8 @@ CommandInterpreter::CommandInterpreter(Debugger , m_skip_lldbinit_files(false), m_skip_app_init_files(false), m_comment_char('#'), m_batch_command_mode(false), m_truncation_warning(eNoOmission), m_max_depth_warning(eNoOmission), -

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-17 Thread via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-17 Thread via lldb-commits
@@ -571,6 +571,15 @@ SBStructuredData SBCommandInterpreter::GetStatistics() { return data; } +SBStructuredData SBCommandInterpreter::GetTranscript() { + LLDB_INSTRUMENT_VA(this); + + SBStructuredData data; + if (IsValid()) +

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-17 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-17 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/18] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/17] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread Greg Clayton via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread Greg Clayton via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread Greg Clayton via lldb-commits
@@ -571,6 +571,15 @@ SBStructuredData SBCommandInterpreter::GetStatistics() { return data; } +SBStructuredData SBCommandInterpreter::GetTranscript() { + LLDB_INSTRUMENT_VA(this); + + SBStructuredData data; + if (IsValid()) +

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread Greg Clayton via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread via lldb-commits
@@ -1891,6 +1893,12 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << "(lldb) " << command_line << '\n'; + // The same `transcript_item` will be used below to add output and error of + // the command. + auto transcript_item =

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread via lldb-commits
@@ -135,7 +136,8 @@ CommandInterpreter::CommandInterpreter(Debugger , m_skip_lldbinit_files(false), m_skip_app_init_files(false), m_comment_char('#'), m_batch_command_mode(false), m_truncation_warning(eNoOmission), m_max_depth_warning(eNoOmission), -

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-16 Thread via lldb-commits
@@ -247,13 +247,13 @@ class SBCommandInterpreter { lldb::SBStringList , lldb::SBStringList ); - /// Returns whether an interrupt flag was raised either by the SBDebugger - + /// Returns whether

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
https://github.com/jeffreytan81 commented: General looks good to me. I do agree that we should hide this behind a setting to avoid memory leak in long running lldb sessions. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
@@ -1891,6 +1893,12 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << "(lldb) " << command_line << '\n'; + // The same `transcript_item` will be used below to add output and error of + // the command. + auto transcript_item =

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
@@ -135,7 +136,8 @@ CommandInterpreter::CommandInterpreter(Debugger , m_skip_lldbinit_files(false), m_skip_app_init_files(false), m_comment_char('#'), m_batch_command_mode(false), m_truncation_warning(eNoOmission), m_max_depth_warning(eNoOmission), -

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
@@ -150,7 +150,7 @@ bool SBCommandInterpreter::WasInterrupted() const { bool SBCommandInterpreter::InterruptCommand() { LLDB_INSTRUMENT_VA(this); - + jeffreytan81 wrote: Similar, undo the unnecessary change

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
@@ -247,13 +247,13 @@ class SBCommandInterpreter { lldb::SBStringList , lldb::SBStringList ); - /// Returns whether an interrupt flag was raised either by the SBDebugger - + /// Returns whether

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-15 Thread via lldb-commits
@@ -576,7 +577,7 @@ class CommandInterpreter : public Broadcaster, void SetEchoCommentCommands(bool enable); bool GetRepeatPreviousCommand() const; - + jeffreytan81 wrote: Similar, undo the unnecessary change

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-13 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/14] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
@@ -85,3 +86,91 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
@@ -290,6 +290,31 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +/// Creates an Array of substrings by splitting a string around the +/// occurrences of a separator character. +/// +/// \param[in] s +/// The

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + //

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/13] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-10 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/12] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not depending

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Needs a few changes. See inline comments. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + //

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -85,3 +86,91 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
@@ -290,6 +290,31 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +/// Creates an Array of substrings by splitting a string around the +/// occurrences of a separator character. +/// +/// \param[in] s +/// The

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
jimingham wrote: Sounds good to me. Jim > On May 7, 2024, at 4:52 PM, royitaqi ***@***.***> wrote: > > > Hi @jimingham , > > Thank you so much for the detailed explanation about the context and your > thoughts. I appreciate it. > > Good to know about the

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
royitaqi wrote: Hi @jimingham, Thank you so much for the detailed explanation about the context and your thoughts. I appreciate it. Good to know about the automated scripts and that you personally never used the existing transcript. It makes me feel that there are distinctively different

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
jimingham wrote: > On May 7, 2024, at 11:28 AM, royitaqi ***@***.***> wrote: > > > Hi @jimingham , > > Sorry to come in a little late on this > > No worries. Thanks for chiming in. > > I think we need a setting to turn this off as well. If you aren't

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
royitaqi wrote: Hi @jimingham , > Sorry to come in a little late on this No worries. Thanks for chiming in. > I think we need a setting to turn this off as well. If you aren't planning to > use the transcript, you shouldn't have to pay the cost for it. Could you elaborate about why this is

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + //

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-07 Thread via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
jimingham wrote: Sorry to come in a little late on this, but I think we need a setting to turn this off as well. If you aren't planning to use the transcript, you shouldn't have to pay the cost for it. https://github.com/llvm/llvm-project/pull/90703

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread Greg Clayton via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread Greg Clayton via lldb-commits
@@ -2044,6 +2052,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + //

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
royitaqi wrote: I believe I have addressed all your comments, @bulbazord . I appreciate your comments so far - they all make sense and are great comments to help me improve this PR. Thank you for spending time on this. https://github.com/llvm/llvm-project/pull/90703

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/11] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread via lldb-commits
@@ -85,3 +86,84 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-06 Thread Alex Langford via lldb-commits
@@ -85,3 +86,84 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-05 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-05 Thread via lldb-commits
@@ -85,3 +86,84 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-03 Thread Alex Langford via lldb-commits
@@ -85,3 +86,84 @@ def test_command_output(self): self.assertEqual(res.GetOutput(), "") self.assertIsNotNone(res.GetError()) self.assertEqual(res.GetError(), "") + +def test_structured_transcript(self): +"""Test structured transcript

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-03 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-03 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Looking better. Thanks for sticking with us through the review! :) https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-03 Thread Alex Langford via lldb-commits
@@ -289,3 +290,19 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +StructuredData::ArraySP

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-03 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
@@ -290,6 +290,36 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +/// Creates an Array of substrings by splitting a string around the +/// occurrences of a separator character. +/// +/// Note: +/// * This is

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 01/10] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
@@ -366,10 +396,10 @@ class StructuredData { class String : public Object { public: String() : Object(lldb::eStructuredDataTypeString) {} -explicit String(llvm::StringRef S) -: Object(lldb::eStructuredDataTypeString), m_value(S) {} +explicit

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread Alex Langford via lldb-commits
@@ -366,10 +396,10 @@ class StructuredData { class String : public Object { public: String() : Object(lldb::eStructuredDataTypeString) {} -explicit String(llvm::StringRef S) -: Object(lldb::eStructuredDataTypeString), m_value(S) {} +explicit

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread Alex Langford via lldb-commits
@@ -290,6 +290,36 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +/// Creates an Array of substrings by splitting a string around the +/// occurrences of a separator character. +/// +/// Note: +/// * This is

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread Alex Langford via lldb-commits
@@ -318,6 +318,12 @@ class SBCommandInterpreter { SBStructuredData GetStatistics(); + /// Returns a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys: "command" (string), "output" + /// (list of strings) and

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread Alex Langford via lldb-commits
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster, CommandUsageMap m_command_usages; StreamString m_transcript_stream; + + /// Contains a list of handled commands, output and error. Each element in + /// the list is a dictionary with three keys:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-02 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 1/9] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 1/8] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
@@ -290,6 +290,9 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +static ArraySP SplitString(llvm::StringRef s, char separator, int maxSplit, + bool keepEmpty); royitaqi wrote:

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not depending

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi commented: Updated according to @medismailben 's suggestions. https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
@@ -2044,6 +2050,15 @@ bool CommandInterpreter::HandleCommand(const char *command_line, m_transcript_stream << result.GetOutputData(); m_transcript_stream << result.GetErrorData(); + // Add output and error to the transcript item after splitting lines. In the + //

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not depending

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 1/7] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 1/5] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/90703 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not depending

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread via lldb-commits
https://github.com/royitaqi updated https://github.com/llvm/llvm-project/pull/90703 >From 0fd67e2de7e702ce6f7353845454ea7ff9f980d6 Mon Sep 17 00:00:00 2001 From: Roy Shi Date: Tue, 30 Apr 2024 21:35:49 -0700 Subject: [PATCH 1/4] Add SBCommandInterpreter::GetTranscript() ---

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread Med Ismail Bennani via lldb-commits
@@ -289,3 +292,35 @@ void StructuredData::Null::GetDescription(lldb_private::Stream ) const { void StructuredData::Generic::GetDescription(lldb_private::Stream ) const { s.Printf("%p", m_object); } + +/// This is the same implementation as `StringRef::split`. Not depending

[Lldb-commits] [lldb] Add new Python API `SBCommandInterpreter::GetTranscript()` (PR #90703)

2024-05-01 Thread Med Ismail Bennani via lldb-commits
@@ -290,6 +290,9 @@ class StructuredData { void GetDescription(lldb_private::Stream ) const override; +static ArraySP SplitString(llvm::StringRef s, char separator, int maxSplit, + bool keepEmpty); medismailben wrote:

  1   2   >