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

Leandro Lupori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 04:50:13 PST 2018


luporl added inline comments.


================
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
----------------
labath wrote:
> 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.
Yes, main can be removed. For a moment I forgot that this code would not be executed in the test.

Setting a breakpoint in a function without a local entry point is a good test case. I'll add that.


================
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(),
----------------
labath wrote:
> 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.
Ok.


https://reviews.llvm.org/D42582





More information about the llvm-commits mailing list