[PATCH] D42582: [lldb][PPC64] Fixed step-in stopping in the wrong line

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 02:12:17 PST 2018


labath added a comment.

In https://reviews.llvm.org/D42582#1027372, @luporl wrote:

> @labath, did you have a chance to look at the breakpoint test, and the new "where" line in lldb-test?


Sorry, I missed this one. That's exactly the kind of test I had in mind. We just need to clean it up a bit.



================
Comment at: lit/Breakpoint/Inputs/ppc64-localentry.s:28-59
+	.globl	main
+	.p2align	4
+	.type	main, at function
+main:                                   # @main
+.Lfunc_begin1:
+.Lfunc_gep1:
+	addis 2, 12, .TOC.-.Lfunc_gep1 at ha
----------------
as far as i can tell, the main function is not used in the test. Can you remove it?
On the other hand, if you can think of any other interesting cases to test (e.g., can a function *not* have a local entry point?), then it would be nice to add those.


================
Comment at: tools/lldb-test/lldb-test.cpp:101-109
       P.formatLine("Address: {0}+{1:x}",
                    Loc->GetAddress().GetSection()->GetName(),
                    Loc->GetAddress().GetOffset());
+      SymbolContext sc;
+      Loc->GetAddress().CalculateSymbolContext(&sc);
+      lldb_private::StreamString S;
+      sc.DumpStopContext(&S, BP->GetTarget().GetProcessSP().get(),
----------------
The address part is currently not used for anything - I just added it in case it was needed. I think we should just delete it and rename your field to "address". As it stands now, the difference between "where" and "Address" is very unobvious.


https://reviews.llvm.org/D42582





More information about the llvm-commits mailing list