From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Mitchell To: law@cygnus.com Cc: gdb@sourceware.cygnus.com, gcc@gcc.gnu.org Subject: Re: More than one stabn for the same PC Date: Mon, 29 Nov 1999 23:25:00 -0000 Message-id: <19991129232529S.mitchell@codesourcery.com> References: <19991129223717L.mitchell@codesourcery.com> <28295.943945638@upchuck> X-SW-Source: 1999-q4/msg00363.html >>>>> "Jeffrey" == Jeffrey A Law writes: Jeffrey> In message Jeffrey> < 19991129223717L.mitchell@codesourcery.com >you write: >> >>>>> "Jeffrey" == Jeffrey A Law writes: >> Jeffrey> Though I am curious, how does this happen? >> We tend to do this with inlining. (We're doing it more with >> inlining-on-trees, but we used to do it anyhow.) Consider: >> >> int i; inline int f () { i = 3; } void g() { f(); } >> >> In `g' we first emit a line note for the line with the curly >> brace for `g', then emit a line note for the line with `i = 3' >> in it. I think that's roughly the right thing, but the >> debugger gets confused. Jeffrey> Looking at that I'd claim only one of the line notes Jeffrey> should exist (probably the one of the "i = 3" statement. That's not entirely unreasonable. But, I'd like to be able to say `break at ' and have something sensible happen. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com >From law@cygnus.com Mon Nov 29 23:29:00 1999 From: Jeffrey A Law To: Mark Mitchell Cc: gdb@sourceware.cygnus.com, gcc@gcc.gnu.org Subject: Re: More than one stabn for the same PC Date: Mon, 29 Nov 1999 23:29:00 -0000 Message-id: <28424.943946812@upchuck> References: <19991129232529S.mitchell@codesourcery.com> X-SW-Source: 1999-q4/msg00364.html Content-length: 1240 In message < 19991129232529S.mitchell@codesourcery.com >you write: > >>>>> "Jeffrey" == Jeffrey A Law writes: > > Jeffrey> In message > Jeffrey> < 19991129223717L.mitchell@codesourcery.com >you write: > >> >>>>> "Jeffrey" == Jeffrey A Law writes: > >> > Jeffrey> Though I am curious, how does this happen? > >> We tend to do this with inlining. (We're doing it more with > >> inlining-on-trees, but we used to do it anyhow.) Consider: > >> > >> int i; inline int f () { i = 3; } void g() { f(); } > >> > >> In `g' we first emit a line note for the line with the curly > >> brace for `g', then emit a line note for the line with `i = 3' > >> in it. I think that's roughly the right thing, but the > >> debugger gets confused. > > Jeffrey> Looking at that I'd claim only one of the line notes > Jeffrey> should exist (probably the one of the "i = 3" statement. > > That's not entirely unreasonable. But, I'd like to be able to say > `break at ' and have something sensible > happen. Good point. Considering that, both line notes are probably needed. jeff