From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 125D13853D47; Wed, 23 Nov 2022 10:14:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125D13853D47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669198450; bh=DCBB6Kr7rUDiob21uj4u9xanAsqmA+bjLnwKR0GeVTs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S+QzWp8NJU+waEQVuxLO53P1hocULjkYgFs2UuAzbop4l6luCNEDbaMYfakdlgmBW W3BbhRwyhFc5dwBWsv7Ao7PVk+VZsBEp9FTSgRJJ+vzCXo8WakMmCkSs694+78ooFi 18FoNj2cJLujqHbBpcP05GOY7moFgKWr6FpOMnYY= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29814] [gdb/tdep, powerpc64le] FAIL: gdb.base/msym-bp-shl.exp: debug=0: before run: info breakpoint Date: Wed, 23 Nov 2022 10:14:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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=3D29814 --- Comment #2 from Tom de Vries --- This is a point fix: ... diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index cc5a26431ba..a7ee72e24a5 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1667,9 +1667,11 @@ ppc_elfv2_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR pc) if (fun.minsym->target_flag_1 ()) local_entry_offset =3D 8; - if (fun.value_address () <=3D pc - && pc < fun.value_address () + local_entry_offset) - return fun.value_address () + local_entry_offset; + struct obj_section *section =3D fun.obj_section (); + CORE_ADDR new_pc =3D fun.value_address () + local_entry_offset; + if (fun.value_address () <=3D pc && pc < new_pc + && (section =3D=3D nullptr || new_pc < section->endaddr ())) + return new_pc; return pc; } ... It does fix the test-case, but not the general problem, since this will work for one or maybe two plt symbols, but if there are more, say foo1@plt, foo2= @plt and foo3@plt, then setting a breakpoint at foo1@plt will end up setting a breakpoint at foo3@plt. --=20 You are receiving this mail because: You are on the CC list for the bug.=