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 22:37:00 -0000 Message-id: <19991129223717L.mitchell@codesourcery.com> References: <19991129165903H.mitchell@codesourcery.com> <27496.943925188@upchuck> X-SW-Source: 1999-q4/msg00361.html >>>>> "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. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com >From law@cygnus.com Mon Nov 29 23:10: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:10:00 -0000 Message-id: <28295.943945638@upchuck> References: <19991129223717L.mitchell@codesourcery.com> X-SW-Source: 1999-q4/msg00362.html Content-length: 899 In message < 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. Looking at that I'd claim only one of the line notes should exist (probably the one of the "i = 3" statement. But it may be the case that our opinions about what constitutes sane debugging information for inline function calls differs. jeff