r198461 - Debug info: Ensure that the last stop point in a function is still within

dblaikie at gmail.com dblaikie at gmail.com
Mon Jan 6 12:58:12 PST 2014


On Mon Jan 06 2014 at 11:30:19 AM, Robinson, Paul <
Paul_Robinson at playstation.sony.com> wrote:

> > -----Original Message-----
> > From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
> > bounces at cs.uiuc.edu] On Behalf Of Adrian Prantl
> > Sent: Monday, January 06, 2014 8:29 AM
> > To: dblaikie at gmail.com
> > Cc: cfe-commits at cs.uiuc.edu
> > Subject: Re: r198461 - Debug info: Ensure that the last stop point in a
> > function is still within
> >
> >
> > On Jan 5, 2014, at 8:22 PM, dblaikie at gmail.com wrote:
> >
> > >
> > >
> > > On Fri Jan 03 2014 at 4:00:30 PM, Adrian Prantl <aprantl at apple.com>
> > wrote:
> > >
> > > On Jan 3, 2014, at 15:53, Eric Christopher <echristo at gmail.com> wrote:
> > >
> > >> There's not enough information in the commit message, the comments,
> > or the test cases to know what's broken or fixed here. Why is forcing
> > the block the correct solution here? What is it working around?
> > >>
> > >>
> > >
> > > Let's use this as an example:
> > >
> > >>
> > ========================================================================
> > ======
> > >> --- cfe/trunk/test/CodeGenObjC/arc-linetable.m (original)
> > >> +++ cfe/trunk/test/CodeGenObjC/arc-linetable.m Fri Jan  3 17:34:30
> > 2014
> > >
> > > - (int)testNoSideEffect:(NSString *)foo {
> > > int x = 1;
> > > return 1; // Return expression
> > > }
> > >
> > > Before this fix, a user would set a breakpoint at the return
> > expression and then attempt to print x and it would fail, because the
> > instruction that is at that line would be in the DW_TAG_subprogram
> > lexical scope (instead of the lexical scope of the function body
> > compound statement which contains x).
> > >
> > > I'm confused by this - Clang doesn't emit a separate lexical scope for
> > the top level compound statement of a function...
>
> I haven't checked lately but Clang was putting locals into a
> separate scope (versus parameters in the subprogram scope).
> Can't put my finger on the PR where we discussed it though.
>

It was at one point, yes. I believe I fixed it for C++ at least, I assume C
too, but that might not have affected ObjC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140106/ea118b3e/attachment.html>


More information about the cfe-commits mailing list