This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: [ARM] "svc" insn check at irrelevant address in ARM unwind info sniffer
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 15 Nov 2015 09:25:37 -0800
- Subject: Re: RFA: [ARM] "svc" insn check at irrelevant address in ARM unwind info sniffer
- Authentication-results: sourceware.org; auth=none
- References: <1447092513-20690-1-git-send-email-brobecker at adacore dot com> <86y4e5wxy9 dot fsf at gmail dot com>
Hi Yao,
> I don't think the innermost-ness of THIS_FRAME matters here. The root
> cause of this problem, IMO, is that get_frame_pc (this_frame) is
> the *first* instruction of the function, so get_frame_pc (this_frame) - 2
> can be anything, instruction of other functions, or non-instruction at
> all (your case). So instead, we may need the check like this?
>
> if (get_frame_pc (this_frame) > func_start)
I will start by saying that I see you point. If we're in a frame whose
first instruction is a call, then we could be seeing the same issue.
I would also argue that innermost-ness is important, here, assuming
that we agree that the ARM info is only correct at the point of call.
So, strictly speaking, we should not even be attempting to use it
for innermost frame.
Should I work on a version of the patch that merges the two ideas?
Or do you stand with just checking "get_frame_pc (this_frame) >
func_start"? I confess I know ARM unwind info just enough to get by,
so I trust your judgement on this.
Thanks!
--
Joel