@@ -734,8 +734,14 @@ def test_pyup_command(self):
734
734
cmds_after_breakpoint = ['py-up' , 'py-up' ])
735
735
self .assertMultilineMatches (bt ,
736
736
r'''^.*
737
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 10, in baz \(args=\(1, 2, 3\)\)
738
+ id\(42\)
737
739
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
738
740
baz\(a, b, c\)
741
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
742
+ bar\(a=a, b=b, c=c\)
743
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
744
+ foo\(1, 2, 3\)
739
745
$''' )
740
746
741
747
@unittest .skipUnless (HAS_PYUP_PYDOWN , "test requires py-up/py-down commands" )
@@ -763,10 +769,18 @@ def test_up_then_down(self):
763
769
cmds_after_breakpoint = ['py-up' , 'py-up' , 'py-down' ])
764
770
self .assertMultilineMatches (bt ,
765
771
r'''^.*
772
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 10, in baz \(args=\(1, 2, 3\)\)
773
+ id\(42\)
766
774
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
767
775
baz\(a, b, c\)
776
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
777
+ bar\(a=a, b=b, c=c\)
778
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
779
+ foo\(1, 2, 3\)
768
780
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 10, in baz \(args=\(1, 2, 3\)\)
769
781
id\(42\)
782
+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
783
+ baz\(a, b, c\)
770
784
$''' )
771
785
772
786
class PyBtTests (DebuggerTests ):
@@ -785,7 +799,7 @@ def test_bt(self):
785
799
File ".*gdb_sample.py", line 7, in bar
786
800
baz\(a, b, c\)
787
801
File ".*gdb_sample.py", line 4, in foo
788
- bar\(a, b, c\)
802
+ bar\(a=a , b=b, c= c\)
789
803
File ".*gdb_sample.py", line 12, in <module>
790
804
foo\(1, 2, 3\)
791
805
''' )
@@ -801,7 +815,7 @@ def test_bt_full(self):
801
815
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
802
816
baz\(a, b, c\)
803
817
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
804
- bar\(a, b, c\)
818
+ bar\(a=a , b=b, c= c\)
805
819
#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
806
820
foo\(1, 2, 3\)
807
821
''' )
@@ -1008,7 +1022,13 @@ def test_locals_after_up(self):
1008
1022
bt = self .get_stack_trace (script = self .get_sample_script (),
1009
1023
cmds_after_breakpoint = ['py-up' , 'py-up' , 'py-locals' ])
1010
1024
self .assertMultilineMatches (bt ,
1011
- r".*\na = 1\nb = 2\nc = 3\n.*" )
1025
+ r'''^.*
1026
+ Locals for foo
1027
+ a = 1
1028
+ b = 2
1029
+ c = 3
1030
+ Locals for <module>
1031
+ .*$''' )
1012
1032
1013
1033
1014
1034
def setUpModule ():
0 commit comments