From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 153353858D38; Sun, 16 Apr 2023 22:01:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 153353858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681682492; bh=futOeyS/+bjom9fo3A0Qjix1uVvazDYeNQ4KjGaKfUQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v5+mXtI4PWBK9e0A+5xIkV6u7Y5KWnwaoIi6ZeaAI9MlvMQQRTeWRwq/UPjswDXx5 WJ2ub3nYsPxZ2uHXVBajX41VONPmYl6RCiWl4KnvElg/THlvJ0VUdmirbSpKXXqtq4 9v4e4uS84A6EHGqcqbt740D/l6D/CLDy3UpNUdK0= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: =?UTF-8?B?W0J1ZyBnZGIvMzAzNTJdIEEgc291cmNlIGxpbmUgd2l0aCBkZWJ1?= =?UTF-8?B?ZyBpbmZvcm1hdGlvbiBjYW5ub3QgYmUg4oCccmVhY2hlZOKAnSBpbiBpbnN0?= =?UTF-8?B?cnVjdGlvbi1sZXZlbCBzdGVwcGluZw==?= Date: Sun, 16 Apr 2023 22:01:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30352 --- Comment #5 from Tom de Vries --- (In reply to Yibiao Yang from comment #4) > Thank you very much for the detailed explanation. Yes, I can found that t= he > instruction is not changed when using source-level stepping for this inli= ned > function. After reading GDB's default behavior for inlined function you > mentioned, I understand why debugger has such a behavior. Ack. > However, I was > wondering the GCC side could do better for inlined functions by establish= ing > a mapping between the inserted copy function body with the orginal functi= on > code when the '-g' flag is enabled. Well, that information is there in the form of DW_TAG_inlined_subroutine, w= hich is why you're seeing what you're seeing when stepping. > In this way, gdb can display which > source code the instruction belongs to when stepping at instruction level. Well, AFAIU, gdb does exactly that, using the line info. --=20 You are receiving this mail because: You are on the CC list for the bug.=