[Lldb-commits] [PATCH] D140368: [lldb] Consider all breakpoints in breakpoint detection

2023-01-25 Thread Pavel Kosov via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2af0a478eaee: [lldb] Consider all breakpoints in breakpoint 
detection (authored by kpdev42).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140368

Files:
  lldb/source/Target/StopInfo.cpp
  lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile
  
lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
  lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/main.cpp

Index: lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/main.cpp
@@ -0,0 +1,11 @@
+int func_1() { return 1; }
+
+int func_2() {
+  func_1(); // breakpoint_0
+  return 1 + func_1();  // breakpoint_1
+}
+
+int main(int argc, char const *argv[]) {
+  func_2();  // Start from here
+  return 0;
+}
Index: lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
===
--- /dev/null
+++ lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
@@ -0,0 +1,121 @@
+"""
+Test that breakpoints (reason = breakpoint) have more priority than
+plan completion (reason = step in/out/over) when reporting stop reason after step,
+in particular 'step out' and 'step over', and in addition 'step in'.
+Check for correct StopReason when stepping to the line with breakpoint,
+which should be eStopReasonBreakpoint in general,
+and eStopReasonPlanComplete when breakpoint's condition fails or it is disabled.
+"""
+
+
+import unittest2
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class ThreadPlanUserBreakpointsTestCase(TestBase):
+
+def setUp(self):
+TestBase.setUp(self)
+
+# Build and run to starting breakpoint
+self.build()
+src = lldb.SBFileSpec('main.cpp')
+(self.target, self.process, self.thread, _) = \
+lldbutil.run_to_source_breakpoint(self, '// Start from here', src)
+
+# Setup two more breakpoints
+self.breakpoints = [self.target.BreakpointCreateBySourceRegex('breakpoint_%i' % i, src)
+for i in range(2)]
+self.assertTrue(
+all(bp and bp.GetNumLocations() == 1 for bp in self.breakpoints),
+VALID_BREAKPOINT)
+
+def check_correct_stop_reason(self, breakpoint_idx, condition):
+self.assertState(self.process.GetState(), lldb.eStateStopped)
+if condition:
+# All breakpoints active, stop reason is breakpoint
+thread1 = lldbutil.get_one_thread_stopped_at_breakpoint(self.process, self.breakpoints[breakpoint_idx])
+self.assertEquals(self.thread, thread1, "Didn't stop at breakpoint %i." % breakpoint_idx)
+else:
+# Breakpoints are inactive, stop reason is plan complete
+self.assertEquals(self.thread.GetStopReason(), lldb.eStopReasonPlanComplete,
+'Expected stop reason to be step into/over/out for inactive breakpoint %i line.' % breakpoint_idx)
+
+def change_breakpoints(self, action):
+for bp in self.breakpoints:
+action(bp)
+
+def check_thread_plan_user_breakpoint(self, condition, set_up_breakpoint_func):
+# Make breakpoints active/inactive in different ways
+self.change_breakpoints(lambda bp: set_up_breakpoint_func(condition, bp))
+
+self.thread.StepInto()
+# We should be stopped at the breakpoint_0 line with the correct stop reason
+self.check_correct_stop_reason(0, condition)
+
+# This step-over creates a step-out from `func_1` plan
+self.thread.StepOver()
+# We should be stopped at the breakpoint_1 line with the correct stop reason
+self.check_correct_stop_reason(1, condition)
+
+# Check explicit step-out
+# Make sure we install the breakpoint at the right address:
+# step-out might stop on different lines, if the compiler
+# did or did not emit more instructions after the return
+return_addr = self.thread.GetFrameAtIndex(1).GetPC()
+step_out_breakpoint = self.target.BreakpointCreateByAddress(return_addr)
+self.assertTrue(step_out_breakpoint, VALID_BREAKPOINT)
+set_up_breakpoint_func(condition, step_out_breakpoint)
+self.breakpoints.append(step_out_breakpoint)
+self.thread.StepOut()
+# We should be stopped somewhere in the main frame with the correct stop reason
+self.check_correct_stop_reason(2, condition)
+
+# Run the process until termination
+self.process.Continu

[Lldb-commits] [lldb] 2af0a47 - [lldb] Consider all breakpoints in breakpoint detection

2023-01-25 Thread Pavel Kosov via lldb-commits

Author: Pavel Kosov
Date: 2023-01-25T11:06:07+03:00
New Revision: 2af0a478eaee5e6236e7e9fd9b1e3207228ce2ff

URL: 
https://github.com/llvm/llvm-project/commit/2af0a478eaee5e6236e7e9fd9b1e3207228ce2ff
DIFF: 
https://github.com/llvm/llvm-project/commit/2af0a478eaee5e6236e7e9fd9b1e3207228ce2ff.diff

LOG: [lldb] Consider all breakpoints in breakpoint detection

Currently in some cases lldb reports stop reason as "step out" or "step over" 
(from thread plan completion) instead of "breakpoint", if the user breakpoint 
happens to be set on the same address.
The part of 
https://github.com/llvm/llvm-project/commit/f08f5c99262ff9eaa08956334accbb2614b0f7a2
 seems to overwrite internal breakpoint detection logic, so that only the last 
breakpoint for the current stop address is considered.
Together with step-out plans not clearing its breakpoint until they are 
destrouyed, this creates a situation when there is a user breakpoint set for 
address, but internal breakpoint makes lldb report a plan completion stop 
reason instead of breakpoint.
This patch reverts that internal breakpoint detection logic to consider all 
breakpoints

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D140368

Added: 

lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile

lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py

lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/main.cpp

Modified: 
lldb/source/Target/StopInfo.cpp

Removed: 




diff  --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index 225234c0ffbad..2c61216ee53d5 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -256,7 +256,7 @@ class StopInfoBreakpoint : public StopInfo {
 if (!m_should_perform_action)
   return;
 m_should_perform_action = false;
-bool internal_breakpoint = true;
+bool all_stopping_locs_internal = true;
 
 ThreadSP thread_sp(m_thread_wp.lock());
 
@@ -421,8 +421,6 @@ class StopInfoBreakpoint : public StopInfo {
   continue;
 }
 
-internal_breakpoint = bp_loc_sp->GetBreakpoint().IsInternal();
-
 // First run the precondition, but since the precondition is per
 // breakpoint, only run it once per breakpoint.
 std::pair::iterator, bool> result =
@@ -509,7 +507,7 @@ class StopInfoBreakpoint : public StopInfo {
 loc_desc.GetData());
   // We want this stop reported, so you will know we auto-continued
   // but only for external breakpoints:
-  if (!internal_breakpoint)
+  if (!bp_loc_sp->GetBreakpoint().IsInternal())
 thread_sp->SetShouldReportStop(eVoteYes);
   auto_continue_says_stop = false;
 }
@@ -539,6 +537,9 @@ class StopInfoBreakpoint : public StopInfo {
 actually_said_continue = true;
 }
 
+if (m_should_stop && !bp_loc_sp->GetBreakpoint().IsInternal())
+  all_stopping_locs_internal = false;
+
 // If we are going to stop for this breakpoint, then remove the
 // breakpoint.
 if (callback_says_stop && bp_loc_sp &&
@@ -576,7 +577,7 @@ class StopInfoBreakpoint : public StopInfo {
   __FUNCTION__, m_value);
   }
 
-  if ((!m_should_stop || internal_breakpoint) &&
+  if ((!m_should_stop || all_stopping_locs_internal) &&
   thread_sp->CompletedPlanOverridesBreakpoint()) {
 
 // Override should_stop decision when we have completed step plan

diff  --git 
a/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile 
b/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile
new file mode 100644
index 0..2c00681fa2280
--- /dev/null
+++ 
b/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile
@@ -0,0 +1,8 @@
+CXX_SOURCES := main.cpp
+
+ifneq (,$(findstring icc,$(CC)))
+CXXFLAGS_EXTRAS := -debug inline-debug-info
+endif
+
+
+include Makefile.rules

diff  --git 
a/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
 
b/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
new file mode 100644
index 0..aaecdff0069f6
--- /dev/null
+++ 
b/lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py
@@ -0,0 +1,121 @@
+"""
+Test that breakpoints (reason = breakpoint) have more priority than
+plan completion (reason = step in/out/over) when reporting stop reason after 
step,
+in particular 'step out' and 'step over', and in addition 'step in'.
+Check for correct StopReason when stepping to the line with breakpoint,
+which should be eStopReasonBreakp

[Lldb-commits] [lldb] 4ae221f - [NFC][LLDB] Rename test file

2023-01-25 Thread Pavel Kosov via lldb-commits

Author: Pavel Kosov
Date: 2023-01-25T12:03:11+03:00
New Revision: 4ae221f5a4d1977f316b7d5f033763f876b471e7

URL: 
https://github.com/llvm/llvm-project/commit/4ae221f5a4d1977f316b7d5f033763f876b471e7
DIFF: 
https://github.com/llvm/llvm-project/commit/4ae221f5a4d1977f316b7d5f033763f876b471e7.diff

LOG: [NFC][LLDB] Rename test file

Commit 92f0e4cca introduced test file with name TestChangeValue.py,
which leads to test failure because there already is a test files with the same 
name
In this commit a newly added file is renamed to fix this failure

Added: 

lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeMapValue.py

Modified: 


Removed: 
lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeValue.py



diff  --git 
a/lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeValue.py 
b/lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeMapValue.py
similarity index 100%
rename from 
lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeValue.py
rename to 
lldb/test/API/python_api/value/change_values/libcxx/map/TestChangeMapValue.py



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


[Lldb-commits] [PATCH] D140624: [LLDB] Fixes summary formatter for libc++ map allowing modification of contained value

2023-01-25 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid reopened this revision.
omjavaid added a comment.
This revision is now accepted and ready to land.

This rev has broken lldb-arm-ubuntu buildbot 
https://lab.llvm.org/buildbot/#/builders/17/builds/33173


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140624

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


[Lldb-commits] [PATCH] D140624: [LLDB] Fixes summary formatter for libc++ map allowing modification of contained value

2023-01-25 Thread Pavel Kosov via Phabricator via lldb-commits
kpdev42 added a comment.

In D140624#4079306 , @omjavaid wrote:

> This rev has broken lldb-arm-ubuntu buildbot 
> https://lab.llvm.org/buildbot/#/builders/17/builds/33173

Sorry. I've added a small fix for it 
https://github.com/llvm/llvm-project/commit/4ae221f5a4d1977f316b7d5f033763f876b471e7
Could you please verify if it works now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140624

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


[Lldb-commits] [PATCH] D140624: [LLDB] Fixes summary formatter for libc++ map allowing modification of contained value

2023-01-25 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett closed this revision.
DavidSpickett added a comment.

The fix worked - https://lab.llvm.org/buildbot/#/builders/17/builds/33176 
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140624

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


[Lldb-commits] [PATCH] D142552: [lldb] Make GetDIENamesAndRanges() allow 0-valued decl and call lines

2023-01-25 Thread David Stenberg via Phabricator via lldb-commits
dstenb created this revision.
dstenb added reviewers: jasonmolenda, clayborg, aeubanks, ayermolo.
dstenb added a project: LLDB.
Herald added a subscriber: JDevlieghere.
Herald added a reviewer: shafik.
Herald added a project: All.
dstenb requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: lldb-commits, sstefan1.

In an upcoming patch Clang is proposed to be changed to emit
line locations that are inlined at line 0. This clashed with the behavior of
GetDIENamesAndRanges() which used 0 as a default value to determine if
file, line or column numbers had been set. Users of that function then
checked for any non-0 values when setting up the call site:

  if (call_file != 0 || call_line != 0 || call_column != 0)
[...]

which did not work with the Clang change since all three values then
could be 0.

This changes the function to use std::optional to catch non-set values
instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142552

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/test/Shell/SymbolFile/DWARF/Inputs/inlined-file0-line0-col0.yaml
  lldb/test/Shell/SymbolFile/DWARF/inlined-file0-line0-col0.test

Index: lldb/test/Shell/SymbolFile/DWARF/inlined-file0-line0-col0.test
===
--- /dev/null
+++ lldb/test/Shell/SymbolFile/DWARF/inlined-file0-line0-col0.test
@@ -0,0 +1,34 @@
+# RUN: yaml2obj %S/Inputs/inlined-file0-line0-col0.yaml -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+#  1 void abort(void);
+#  2 int g1 = 4, g2 = 6;
+#  3
+#  4 inline __attribute__((always_inline)) void bar(int q) {
+#  5   if (q > 5)
+#  6 abort();
+#  7 }
+#  8
+#  9 inline __attribute__((always_inline)) void foo(int q) {
+# 10   bar(q);
+# 11 }
+# 12
+# 13 int main() {
+# 14   foo(g1);
+# 15   foo(g2);
+# 16   return 0;
+# 17 }
+
+# The input object file contains a single abort invocation for the two inlined
+# instances of foo() in main() at line 0. As the file, line and column numbers
+# are all 0, file and line number information would be missing for foo and main
+# in the lookup information.
+#
+# A line number 0 is not printed for main in this case, but the same holds
+# for a non-inlined location with line number 0.
+
+# CHECK: Summary: inlined-file0-line0-col0.test.tmp`main + 30 [inlined] bar + 4 at inlined-file0-line0-col0.c:6:5
+# CHECK-NEXT: inlined-file0-line0-col0.test.tmp`main + 26 [inlined] foo at inlined-file0-line0-col0.c:10:3
+# CHECK-NEXT: inlined-file0-line0-col0.test.tmp`main + 26 at inlined-file0-line0-col0.c
+
+image lookup -a 0x1e
Index: lldb/test/Shell/SymbolFile/DWARF/Inputs/inlined-file0-line0-col0.yaml
===
--- /dev/null
+++ lldb/test/Shell/SymbolFile/DWARF/Inputs/inlined-file0-line0-col0.yaml
@@ -0,0 +1,699 @@
+--- !mach-o
+FileHeader:
+  magic:   0xFEEDFACF
+  cputype: 0x107
+  cpusubtype:  0x3
+  filetype:0x1
+  ncmds:   3
+  sizeofcmds:  736
+  flags:   0x2000
+  reserved:0x0
+LoadCommands:
+  - cmd: LC_SEGMENT_64
+cmdsize: 632
+segname: ''
+vmaddr:  0
+vmsize:  814
+fileoff: 768
+filesize:814
+maxprot: 7
+initprot:7
+nsects:  7
+flags:   0
+Sections:
+  - sectname:__text
+segname: __TEXT
+addr:0x0
+size:31
+offset:  0x300
+align:   4
+reloff:  0x630
+nreloc:  3
+flags:   0x8400
+reserved1:   0x0
+reserved2:   0x0
+reserved3:   0x0
+content: 554889E5833D067D0D833D067D0431C05DC3E8
+relocations:
+  - address: 0x1B
+symbolnum:   3
+pcrel:   true
+length:  2
+extern:  true
+type:2
+scattered:   false
+value:   0
+  - address: 0xF
+symbolnum:   1
+pcrel:   true
+length:  2
+extern:  true
+type:6
+scattered:   false
+value:   0
+  - address: 0x6
+symbolnum:   0
+pcrel:   true
+length:  2
+extern:  true
+type:6
+scattered:   false
+  

[Lldb-commits] [PATCH] D142552: [lldb] Make GetDIENamesAndRanges() allow 0-valued decl and call lines

2023-01-25 Thread David Stenberg via Phabricator via lldb-commits
dstenb added a comment.

First time looking at LLDB, so I had trouble finding a suitable way to create a 
reproducer for this. I would be happy to change to another type of lit test if 
that is more suitable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142552

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


[Lldb-commits] [lldb] 4076664 - [lldb][test] Replace use of p with expression (NFC)

2023-01-25 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2023-01-25T11:03:58-08:00
New Revision: 40766642283854d035a992513e314d59c1b4ca53

URL: 
https://github.com/llvm/llvm-project/commit/40766642283854d035a992513e314d59c1b4ca53
DIFF: 
https://github.com/llvm/llvm-project/commit/40766642283854d035a992513e314d59c1b4ca53.diff

LOG: [lldb][test] Replace use of p with expression (NFC)

In API tests, replace use of the `p` alias with the `expression` command.

To avoid conflating tests of the alias with tests of the expression command,
this patch canonicalizes to the use `expression`.

Differential Revision: https://reviews.llvm.org/D141539

Added: 
lldb/test/API/functionalities/alias/Makefile
lldb/test/API/functionalities/alias/TestPAlias.py
lldb/test/API/functionalities/alias/main.c

Modified: 
lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py

lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp

lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
lldb/test/API/commands/expression/rdar44436068/main.c

lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py

lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py

lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py

lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py

lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py

lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py

lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
lldb/test/API/functionalities/set-data/TestSetData.py

lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
lldb/test/API/lang/c/enum_types/TestEnumTypes.py
lldb/test/API/lang/c/strings/TestCStrings.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
lldb/test/API/lang/objc/modules/TestObjCModules.py
lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py

lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
lldb/test/API/lua_api/TestFileHandle.lua
lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py

lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
lldb/test/API/python_api/file_handle/TestFileHandle.py
lldb/test/API/types/TestRecursiveTypes.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py 
b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
index 2550194f0..35ef95761a86d 100644
--- 
a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
+++ 
b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
@@ -19,7 +19,7 @@ def test_with(self):
 self.build()
 lldbutil.run_to

[Lldb-commits] [PATCH] D141539: [lldb][test] Replace use of p with expression (NFC)

2023-01-25 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG407666422838: [lldb][test] Replace use of p with expression 
(NFC) (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141539

Files:
  lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py
  
lldb/test/API/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
  
lldb/test/API/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
  lldb/test/API/commands/expression/rdar44436068/main.c
  
lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py
  lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py
  lldb/test/API/functionalities/alias/Makefile
  lldb/test/API/functionalities/alias/TestPAlias.py
  lldb/test/API/functionalities/alias/main.c
  lldb/test/API/functionalities/backticks/TestBackticksWithoutATarget.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
  
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
  lldb/test/API/functionalities/inferior-assert/TestInferiorAssert.py
  lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
  lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
  
lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
  
lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
  lldb/test/API/functionalities/multiple-slides/TestMultipleSlides.py
  lldb/test/API/functionalities/set-data/TestSetData.py
  lldb/test/API/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/strings/TestCStrings.py
  lldb/test/API/lang/cpp/namespace/TestNamespace.py
  lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
  lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py
  lldb/test/API/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
  
lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
  lldb/test/API/linux/builtin_trap/TestBuiltinTrap.py
  lldb/test/API/lua_api/TestFileHandle.lua
  lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
  lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
  
lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
  lldb/test/API/python_api/file_handle/TestFileHandle.py
  lldb/test/API/types/TestRecursiveTypes.py

Index: lldb/test/API/types/TestRecursiveTypes.py
===
--- lldb/test/API/types/TestRecursiveTypes.py
+++ lldb/test/API/types/TestRecursiveTypes.py
@@ -48,5 +48,5 @@
 
 self.runCmd("run", RUN_SUCCEEDED)
 
-self.runCmd("print tpi")
-self.runCmd("print *tpi")
+self.runCmd("expression tpi")
+self.runCmd("expression *tpi")
Index: lldb/test/API/python_api/file_handle/TestFileHandle.py
===
--- lldb/test/API/python_api/file_handle/TestFileHandle.py
+++ lldb/test/API/python_api/file_handle/TestFileHandle.py
@@ -135,7 +135,7 @@
 def test_legacy_file_out(self):
 with open(self.out_filename, 'w') as f:
 self.dbg.SetOutputFileHandle(f, False)
-self.handleCmd('p/x 3735928559', collect_result=False, check=False)
+self.handleCmd('expression/x 3735928

[Lldb-commits] [PATCH] D138618: [LLDB] Enable 64 bit debug/type offset

2023-01-25 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D138618#4077851 , @ayermolo wrote:

> In D138618#4073329 , @labath wrote:
>
>> I think that the 1-based index thingy helps a lot here, but I haven't seen 
>> anything (in your reponse, or in the new patch) that would address my 
>> concernt DIERef<->user_id conversion ambiguity. I.e. how is one supposed to 
>> know what is the "right" way to convert a DIERef to a user_id:
>>
>> - `die_ref.get_id()`
>> - or `symbol_file.GetUID(die_ref)` (which, funnily enough, will construct 
>> another DIERef, and *then* call get_id? (`return DIERef(GetID(), 
>> ref.section(), ref.die_offset()).get_id();`)
>>
>> What's your position on that? That we should live with the ambiguity?
>
> Searching for GetUID doesn't look like it's used all that often, maybe follow 
> up patch is just to get rid of it, and replace with DIERef?

If you could make that work, that would be awesome, but I think that's going to 
be fairly hard. It's true that there aren't that many call sites of this 
functions, but the ones that are there are very crucial. The user_id_t type 
represents a symbol-file-neutral identifier (cookie, if you will) that 
different symbol file implementations use to identify parsed objects (types, 
mostly). SymbolFileDWARF uses it (via DIERef et al.) to identify the DIE 
belonging to that type. PDB symbol files use it differently, but the idea is 
the same. If we wanted to remove that, we'd have to come up with a whole new 
way to parse/link types -- and one that would work for non-dwarf symbol files 
as well.

(also, this would not really address my concern, because the question would 
then become "which DIERef is safe to be used as a Type cookie" (answer: only 
the one which has the OSO field set), but the reduction in complexity resulting 
from removing one step from the conversion process (DWARFDIE->DIERef->user_id) 
might be well worth it.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138618

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


[Lldb-commits] [PATCH] D142266: [lldb] Add PlatformMetadata for ScriptedPlatform

2023-01-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment.

Cool, I like how this sidesteps having to go through the plugin instantiation 
mechanism. LGTM if Pavel's happy.




Comment at: lldb/include/lldb/Interpreter/OptionGroupPlatform.h:19
 
+class CommandObjectPlatformSelect;
 // PlatformOptionGroup

newline


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142266

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


[Lldb-commits] [PATCH] D142513: [lldb][test] Set minimum compiler_versions

2023-01-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.

In D142513#4078932 , @kastiglione 
wrote:

> It's the LLDB matrix that's failing, where previous compiler versions are
> also used.

Gotcha, that makes sense


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142513

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


[Lldb-commits] [PATCH] D76697: [lldb] Replace debug-only assert in AppleObjCTypeEncodingParser::BuildObjCObjectPointerType with lldbassert

2023-01-25 Thread Davide Italiano via Phabricator via lldb-commits
davide added a comment.

LGTM


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

https://reviews.llvm.org/D76697

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